summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--board/freescale/mx6q_sabreauto/mx6q_sabreauto.c51
-rw-r--r--include/configs/mx6q_sabreauto_android.h78
3 files changed, 130 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b3ba8ee..a9a7016 100644
--- a/Makefile
+++ b/Makefile
@@ -3356,6 +3356,7 @@ mx6q_hdmidongle_mfg_config \
mx6q_hdmidongle_nand_mfg_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 mx6q_hdmidongle freescale mx6
+mx6q_sabreauto_android_config \
mx6q_sabreauto_weimnor_mfg_config \
mx6q_sabreauto_weimnor_config \
mx6q_sabreauto_nand_mfg_config \
diff --git a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c
index d97647f..d6c2dda 100644
--- a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c
+++ b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c
@@ -1219,3 +1219,54 @@ int checkboard(void)
}
return 0;
}
+
+#ifdef CONFIG_IMX_UDC
+#define SABREAUTO_MAX7310_1_BASE_ADDR IMX_GPIO_NR(8, 0)
+#define SABREAUTO_MAX7310_2_BASE_ADDR IMX_GPIO_NR(8, 8)
+#define SABREAUTO_MAX7310_3_BASE_ADDR IMX_GPIO_NR(8, 16)
+
+#define SABREAUTO_IO_EXP_GPIO1(x) (SABREAUTO_MAX7310_1_BASE_ADDR + (x))
+#define SABREAUTO_IO_EXP_GPIO2(x) (SABREAUTO_MAX7310_2_BASE_ADDR + (x))
+#define SABREAUTO_IO_EXP_GPIO3(x) (SABREAUTO_MAX7310_3_BASE_ADDR + (x))
+
+#define SABREAUTO_USB_HOST1_PWR SABREAUTO_IO_EXP_GPIO2(7)
+#define SABREAUTO_USB_OTG_PWR SABREAUTO_IO_EXP_GPIO3(1)
+
+void udc_pins_setting(void)
+{
+ mxc_iomux_v3_setup_pad(MX6X_IOMUX(PAD_ENET_RX_ER__ANATOP_USBOTG_ID));
+
+ /* USB_OTG_PWR = 0 */
+ gpio_direction_output(SABREAUTO_USB_OTG_PWR, 0);
+ /* USB_H1_POWER = 1 */
+ gpio_direction_output(SABREAUTO_USB_HOST1_PWR, 1);
+
+ mxc_iomux_set_gpr_register(1, 13, 1, 0);
+
+}
+#endif
+
+#ifdef CONFIG_ANDROID_RECOVERY
+
+#define GPIO_VOL_DN_KEY IMX_GPIO_NR(5, 14)
+
+int check_recovery_cmd_file(void)
+{
+ int button_pressed = 0;
+ int recovery_mode = 0;
+
+ recovery_mode = check_and_clean_recovery_flag();
+
+ /* Check Recovery Combo Button press or not. */
+ mxc_iomux_v3_setup_pad(MX6X_IOMUX(PAD_DISP0_DAT20__GPIO_5_14));
+
+ gpio_direction_input(GPIO_VOL_DN_KEY);
+
+ if (gpio_get_value(GPIO_VOL_DN_KEY) == 0) { /* VOL_DN key is low assert */
+ button_pressed = 1;
+ printf("Recovery key pressed\n");
+ }
+
+ return recovery_mode || button_pressed;
+}
+#endif
diff --git a/include/configs/mx6q_sabreauto_android.h b/include/configs/mx6q_sabreauto_android.h
new file mode 100644
index 0000000..59bc1d7
--- /dev/null
+++ b/include/configs/mx6q_sabreauto_android.h
@@ -0,0 +1,78 @@
+
+/*
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ *
+ * Configuration settings for the MX6Q Sabre auto Freescale board.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef MX6Q_SABREAUTO_ANDROID_H
+#define MX6Q_SABREAUTO_ANDROID_H
+
+#include "mx6q_sabreauto.h"
+
+#define CONFIG_USB_DEVICE
+#define CONFIG_IMX_UDC 1
+#define CONFIG_FASTBOOT 1
+#define CONFIG_FASTBOOT_STORAGE_EMMC_SATA
+#define CONFIG_FASTBOOT_VENDOR_ID 0x18d1
+#define CONFIG_FASTBOOT_PRODUCT_ID 0x0d02
+#define CONFIG_FASTBOOT_BCD_DEVICE 0x311
+#define CONFIG_FASTBOOT_MANUFACTURER_STR "Freescale"
+#define CONFIG_FASTBOOT_PRODUCT_NAME_STR "i.mx6q Sabre Auto Device"
+#define CONFIG_FASTBOOT_INTERFACE_STR "Android fastboot"
+#define CONFIG_FASTBOOT_CONFIGURATION_STR "Android fastboot"
+#define CONFIG_FASTBOOT_SERIAL_NUM "12345"
+#define CONFIG_FASTBOOT_SATA_NO 0
+
+/* For system.img growing up more than 256MB, more buffer needs
+* to receive the system.img*/
+#define CONFIG_FASTBOOT_TRANSFER_BUF 0x2c000000
+#define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x14000000 /* 320M byte */
+
+
+#define CONFIG_CMD_BOOTI
+#define CONFIG_ANDROID_RECOVERY
+/* which mmc bus is your main storage ? */
+#define CONFIG_ANDROID_MAIN_MMC_BUS 2
+#define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
+#define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5
+#define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 2
+#define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
+
+
+#define CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC NULL
+#define CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC \
+ "booti mmc2 recovery"
+#define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command"
+#define CONFIG_INITRD_TAG
+
+#undef CONFIG_LOADADDR
+#undef CONFIG_RD_LOADADDR
+#undef CONFIG_EXTRA_ENV_SETTINGS
+
+#define CONFIG_LOADADDR 0x10800000 /* loadaddr env var */
+#define CONFIG_RD_LOADADDR 0x11000000
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "netdev=eth0\0" \
+ "ethprime=FEC0\0" \
+ "fastboot_dev=mmc2\0" \
+ "bootcmd=booti mmc2\0" \
+ "splashimage=0x30000000\0" \
+ "splashpos=m,m\0" \
+ "lvds_num=1\0"
+#endif