From b16a9ad7bd7ac6e5f3293c003b96d15fb2504a92 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 10 Dec 2014 14:31:19 +0100 Subject: apalis-imx6: add HW revision detection - Default to DTE UART mode, as used on HW V1.1 but automatically fall back to use DCE UART on V1.0 HW. - If using the default device tree filename imx6q-apalis-eval.dtb, switch to the V1.0 devicetree on V1.0 HW. If device tree name is not the default leave it alone. - Add board_rev to the U-Boot environment. On V1.0A HW: 010a - Add CONFIG_ENV_VARS_UBOOT_CONFIG --- include/configs/apalis_imx6.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 06e8d5838ea..5d3211849ed 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -16,6 +16,11 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO +/* Define CONFIG_APALIS_IMX6_V1_0 to use the UARTS in DCE mode unconditionally. + Otherwise U-Boot uses the Configblock to fall back to DCE on V1.0 HW */ +/* #define CONFIG_APALIS_IMX6_V1_0 */ + + #define CONFIG_MACH_TYPE 4886 #include @@ -42,10 +47,10 @@ #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART1_BASE -#define CONFIG_MXC_UART_DTE /* use the uart in DTE mode */ /* Make the HW version stuff available in u-boot env */ #define CONFIG_VERSION_VARIABLE /* ver environment variable */ +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG /* I2C Configs */ @@ -217,6 +222,12 @@ "sddtbload=setenv dtbparam; fatload mmc 1:1 ${fdt_addr_r} " \ "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0" +#ifndef CONFIG_APALIS_IMX6_V1_0 +#define FDT_FILE "imx6q-apalis-eval.dtb" +#define FDT_FILE_V1_0 "imx6q-apalis-eval_v1_0.dtb" +#else +#define FDT_FILE "imx6q-apalis-eval_v1_0.dtb" +#endif #define CONFIG_EXTRA_ENV_SETTINGS \ "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \ "run nfsboot ; echo ; echo nfsboot failed ; " \ @@ -226,7 +237,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off vmalloc=400M\0" \ EMMC_BOOTCMD \ - "fdt_file=imx6q-apalis-eval.dtb\0" \ + "fdt_file=" FDT_FILE "\0" \ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \ SD_BOOTCMD \ -- cgit v1.2.3