From 9a83a8154590ebfbdbe32579b97c501ca240a706 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 26 May 2015 11:04:54 -0700 Subject: imx: ventana: various board-specific GPIO config updates - Added iomux for CAN_STBY and RS484_TEN (GW52xx/GW53xx/GW54xx/GW551x) - Moved iomux of USBHUB_RST# out of board_ehci_hcd_init so that it is done regardless of USB being initialized in bootloader - Added usb_sel iomux/hwconfig for GW552x - Fixed mezzanine DIO for GW54xx - Fixed PANLEDR# for GW54xx - Fixed dio iomux/hwconfig for GW552x - Fixed dio iomux for GW551x - removed redundant #define Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/gw_ventana.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'board/gateworks/gw_ventana/gw_ventana.c') diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 22f3b38..ae3cc84 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -157,20 +157,18 @@ static iomux_v3_cfg_t const usb_pads[] = { int board_ehci_hcd_init(int port) { - struct ventana_board_info *info = &ventana_info; int gpio; SETUP_IOMUX_PADS(usb_pads); - /* Reset USB HUB (present on GW54xx/GW53xx) */ - switch (info->model[3]) { - case '3': /* GW53xx */ - case '5': /* GW552x */ - SETUP_IOMUX_PAD(PAD_GPIO_9__GPIO1_IO09 | DIO_PAD_CFG); + /* Reset USB HUB */ + switch (board_type) { + case GW53xx: + case GW552x: gpio = (IMX_GPIO_NR(1, 9)); break; - case '4': /* GW54xx */ - SETUP_IOMUX_PAD(PAD_SD1_DAT0__GPIO1_IO16 | DIO_PAD_CFG); + case GW54proto: + case GW54xx: gpio = (IMX_GPIO_NR(1, 16)); break; default: -- cgit v1.1 From 40c746758c4b9fabf07fbfa3b4ed9e907b4c8fd5 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 26 May 2015 11:04:55 -0700 Subject: imx: ventana: make model env var automatic and non-overridable We want to model env var to always reflect what was in the EEPROM. There is no point in allowing a user to override this. Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/gw_ventana.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'board/gateworks/gw_ventana/gw_ventana.c') diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index ae3cc84..e3737d1 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -685,8 +685,7 @@ int misc_init_r(void) memset(str, 0, sizeof(str)); for (i = 0; i < (sizeof(str)-1) && info->model[i]; i++) str[i] = tolower(info->model[i]); - if (!getenv("model")) - setenv("model", str); + setenv("model", str); if (!getenv("fdt_file")) { sprintf(fdt, "%s-%s.dtb", cputype, str); setenv("fdt_file", fdt); @@ -827,10 +826,6 @@ int ft_board_setup(void *blob, bd_t *bd) printf(" Set display timings for %s...\n", display); } - if (!model) { - puts("invalid board info: Leaving FDT fully enabled\n"); - return 0; - } printf(" Adjusting FDT per EEPROM for %s...\n", model); /* board serial number */ -- cgit v1.1 From 80d1a3ee72ad6b88b871f745343becd07a546bef Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 26 May 2015 11:04:56 -0700 Subject: imx: ventana: make fdt_file1 and fdt_file2 automatic and non-overridable The fdt_file1 and fdt_file2 vars provide fallbacks for the fdt file loading script. There is no need to allow the user to override these as if they want to specify the fdt, they should do so in the first attempt which is the fdt_file var. Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/gw_ventana.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'board/gateworks/gw_ventana/gw_ventana.c') diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index e3737d1..221069f 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -695,18 +695,14 @@ int misc_init_r(void) *p++ = 0; setenv("model_base", str); - if (!getenv("fdt_file1")) { - sprintf(fdt, "%s-%s.dtb", cputype, str); - setenv("fdt_file1", fdt); - } + sprintf(fdt, "%s-%s.dtb", cputype, str); + setenv("fdt_file1", fdt); if (board_type != GW551x && board_type != GW552x) str[4] = 'x'; str[5] = 'x'; str[6] = 0; - if (!getenv("fdt_file2")) { - sprintf(fdt, "%s-%s.dtb", cputype, str); - setenv("fdt_file2", fdt); - } + sprintf(fdt, "%s-%s.dtb", cputype, str); + setenv("fdt_file2", fdt); } /* initialize env from EEPROM */ -- cgit v1.1 From c2fd3f57040d4d8e858f0449afe46416cfad95da Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 26 May 2015 11:04:58 -0700 Subject: imx: ventana: skip mtdparts fixup if no flash This avoids an error message on NAND-less boards. Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/gw_ventana.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'board/gateworks/gw_ventana/gw_ventana.c') diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 221069f..3b7c82b 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -811,9 +811,11 @@ int ft_board_setup(void *blob, bd_t *bd) return 0; } - /* Update partition nodes using info from mtdparts env var */ - puts(" Updating MTD partitions...\n"); - fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); + if (test_bit(EECONFIG_NAND, info->config)) { + /* Update partition nodes using info from mtdparts env var */ + puts(" Updating MTD partitions...\n"); + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); + } /* Update display timings from display env var */ if (display) { -- cgit v1.1