]> git.sur5r.net Git - u-boot/commitdiff
imx: ventana: add GW553x support
authorTim Harvey <tharvey@gateworks.com>
Tue, 24 May 2016 18:03:58 +0000 (11:03 -0700)
committerStefano Babic <sbabic@denx.de>
Tue, 31 May 2016 15:26:12 +0000 (17:26 +0200)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/common.c
board/gateworks/gw_ventana/eeprom.c
board/gateworks/gw_ventana/gsc.c
board/gateworks/gw_ventana/gw_ventana.c
board/gateworks/gw_ventana/ventana_eeprom.h

index 5a8bacdd2b58806e4249a14cfb5f3dc6dfb57551..2c3ac93a5c12044d66d90030ba0a11126a78d010 100644 (file)
@@ -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)
index e86c98e9685392bfb000feaf39aaafd90fb0c762..1382e5debea12b1fbfc2dc5d395ff27dd4f94244 100644 (file)
@@ -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:
index 042f55ab73478e8b526139a88086ee583b5e3ef4..2ca6d5c7659a33738303a269f10b9b93b6e5448c 100644 (file)
@@ -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]) {
index feb2df8fa1b975692b5d097fabc06af830f40a95..15e4bf129aced131c2abf95318bc7f65f729d04a 100644 (file)
@@ -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;
index daff375e40b0a70fa0513fd3ad36023511a3b3ad..9ffad58e03e906cf0ec311a87481057ab7548f8d 100644 (file)
@@ -111,6 +111,7 @@ enum {
        GW54xx,
        GW551x,
        GW552x,
+       GW553x,
        GW_UNKNOWN,
        GW_BADCRC,
 };