From 385575bcb6013e8151fd98d80b8dc2b5bd732cfb Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 24 May 2016 11:03:58 -0700 Subject: imx: ventana: add GW553x support Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/common.c | 54 +++++++++++++++++++++++++++++ board/gateworks/gw_ventana/eeprom.c | 3 ++ board/gateworks/gw_ventana/gsc.c | 3 +- board/gateworks/gw_ventana/gw_ventana.c | 8 +++-- board/gateworks/gw_ventana/ventana_eeprom.h | 1 + 5 files changed, 66 insertions(+), 3 deletions(-) (limited to 'board') diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c index 5a8bacdd2b..2c3ac93a5c 100644 --- a/board/gateworks/gw_ventana/common.c +++ b/board/gateworks/gw_ventana/common.c @@ -316,6 +316,20 @@ static iomux_v3_cfg_t const gw552x_gpio_pads[] = { IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG), }; +static iomux_v3_cfg_t const gw553x_gpio_pads[] = { + /* PANLEDG# */ + IOMUX_PADS(PAD_KEY_COL2__GPIO4_IO10 | DIO_PAD_CFG), + /* PANLEDR# */ + IOMUX_PADS(PAD_KEY_ROW2__GPIO4_IO11 | DIO_PAD_CFG), + + /* VID_PWR */ + IOMUX_PADS(PAD_CSI0_DATA_EN__GPIO5_IO20 | DIO_PAD_CFG), + /* PCI_RST# */ + IOMUX_PADS(PAD_GPIO_0__GPIO1_IO00 | DIO_PAD_CFG), + /* PCIESKT_WDIS# */ + IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG), +}; + /* * Board Specific GPIO @@ -613,6 +627,46 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .wdis = IMX_GPIO_NR(7, 12), .msata_en = GP_MSATA_SEL, }, + + /* GW553x */ + { + .gpio_pads = gw553x_gpio_pads, + .num_pads = ARRAY_SIZE(gw553x_gpio_pads)/2, + .dio_cfg = { + { + { IOMUX_PADS(PAD_SD1_DAT0__GPIO1_IO16) }, + IMX_GPIO_NR(1, 16), + { 0, 0 }, + 0 + }, + { + { IOMUX_PADS(PAD_SD1_DAT2__GPIO1_IO19) }, + IMX_GPIO_NR(1, 19), + { IOMUX_PADS(PAD_SD1_DAT2__PWM2_OUT) }, + 2 + }, + { + { IOMUX_PADS(PAD_SD1_DAT1__GPIO1_IO17) }, + IMX_GPIO_NR(1, 17), + { IOMUX_PADS(PAD_SD1_DAT1__PWM3_OUT) }, + 3 + }, + { + { IOMUX_PADS(PAD_SD1_CMD__GPIO1_IO18) }, + IMX_GPIO_NR(1, 18), + { IOMUX_PADS(PAD_SD1_CMD__PWM4_OUT) }, + 4 + }, + }, + .num_gpios = 4, + .leds = { + IMX_GPIO_NR(4, 10), + IMX_GPIO_NR(4, 11), + }, + .pcie_rst = IMX_GPIO_NR(1, 0), + .vidin_en = IMX_GPIO_NR(5, 20), + .wdis = IMX_GPIO_NR(7, 12), + }, }; void setup_iomux_gpio(int board, struct ventana_board_info *info) diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c index e86c98e968..1382e5debe 100644 --- a/board/gateworks/gw_ventana/eeprom.c +++ b/board/gateworks/gw_ventana/eeprom.c @@ -87,6 +87,9 @@ read_eeprom(int bus, struct ventana_board_info *info) } else if (info->model[4] == '2') { type = GW552x; break; + } else if (info->model[4] == '3') { + type = GW553x; + break; } /* fall through */ default: diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c index 042f55ab73..2ca6d5c765 100644 --- a/board/gateworks/gw_ventana/gsc.c +++ b/board/gateworks/gw_ventana/gsc.c @@ -117,7 +117,8 @@ int gsc_info(int verbose) read_hwmon("VDD_HIGH", GSC_HWMON_VDD_HIGH, 3); read_hwmon("VDD_DDR", GSC_HWMON_VDD_DDR, 3); read_hwmon("VDD_5P0", GSC_HWMON_VDD_5P0, 3); - read_hwmon("VDD_2P5", GSC_HWMON_VDD_2P5, 3); + if (strncasecmp((const char*) ventana_info.model, "GW553", 5)) + read_hwmon("VDD_2P5", GSC_HWMON_VDD_2P5, 3); read_hwmon("VDD_1P8", GSC_HWMON_VDD_1P8, 3); read_hwmon("VDD_IO2", GSC_HWMON_VDD_IO2, 3); switch (ventana_info.model[3]) { diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index feb2df8fa1..15e4bf129a 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -267,7 +267,9 @@ int board_phy_config(struct phy_device *phydev) int board_eth_init(bd_t *bis) { #ifdef CONFIG_FEC_MXC - if (board_type != GW551x && board_type != GW552x) { + struct ventana_board_info *info = &ventana_info; + + if (test_bit(EECONFIG_ETH0, info->config)) { setup_iomux_enet(GP_PHY_RST); cpu_eth_init(bis); } @@ -699,7 +701,9 @@ int misc_init_r(void) setenv("model_base", str); sprintf(fdt, "%s-%s.dtb", cputype, str); setenv("fdt_file1", fdt); - if (board_type != GW551x && board_type != GW552x) + if (board_type != GW551x && + board_type != GW552x && + board_type != GW553x) str[4] = 'x'; str[5] = 'x'; str[6] = 0; diff --git a/board/gateworks/gw_ventana/ventana_eeprom.h b/board/gateworks/gw_ventana/ventana_eeprom.h index daff375e40..9ffad58e03 100644 --- a/board/gateworks/gw_ventana/ventana_eeprom.h +++ b/board/gateworks/gw_ventana/ventana_eeprom.h @@ -111,6 +111,7 @@ enum { GW54xx, GW551x, GW552x, + GW553x, GW_UNKNOWN, GW_BADCRC, }; -- cgit v1.2.1