imx: ventana: add support for GW5906
authorTim Harvey <tharvey@gateworks.com>
Mon, 4 Feb 2019 21:10:54 +0000 (13:10 -0800)
committerStefano Babic <sbabic@denx.de>
Fri, 15 Feb 2019 21:01:15 +0000 (22:01 +0100)
The GW5906 is a GW552x with mechanical and power supply connector
differences.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/common.c
board/gateworks/gw_ventana/eeprom.c
board/gateworks/gw_ventana/gw_ventana.c
board/gateworks/gw_ventana/ventana_eeprom.h

index f54eab5..3a187ea 100644 (file)
@@ -817,6 +817,33 @@ struct dio_cfg gw5904_dio[] = {
        },
 };
 
+struct dio_cfg gw5906_dio[] = {
+       {
+               { 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_CLK__GPIO1_IO20) },
+               IMX_GPIO_NR(1, 20),
+               { 0, 0 },
+               0
+       },
+};
+
 /*
  * Board Specific GPIO
  */
@@ -1052,6 +1079,24 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .pcie_rst = IMX_GPIO_NR(7, 11),
                .wdis = IMX_GPIO_NR(7, 13),
        },
+
+       /* GW5906 */
+       {
+               .gpio_pads = gw552x_gpio_pads,
+               .num_pads = ARRAY_SIZE(gw552x_gpio_pads)/2,
+               .dio_cfg = gw5906_dio,
+               .dio_num = ARRAY_SIZE(gw5906_dio),
+               .leds = {
+                       IMX_GPIO_NR(4, 6),
+                       IMX_GPIO_NR(4, 7),
+                       IMX_GPIO_NR(4, 15),
+               },
+               .pcie_rst = IMX_GPIO_NR(1, 29),
+               .usb_sel = IMX_GPIO_NR(1, 7),
+               .wdis = IMX_GPIO_NR(7, 12),
+               .msata_en = GP_MSATA_SEL,
+               .nand = true,
+       },
 };
 
 #define SETUP_GPIO_OUTPUT(gpio, name, level) \
index 13ccf2b..e697b8c 100644 (file)
@@ -103,6 +103,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
                        type = GW5904;
                else if (info->model[4] == '0' && info->model[5] == '5')
                        type = GW5905;
+               else if (info->model[4] == '0' && info->model[5] == '6')
+                       type = GW5906;
                break;
        }
        return type;
index fb81a96..da9f5d8 100644 (file)
@@ -155,6 +155,7 @@ int board_ehci_hcd_init(int port)
        switch (board_type) {
        case GW53xx:
        case GW552x:
+       case GW5906:
                gpio = (IMX_GPIO_NR(1, 9));
                break;
        case GW54proto:
index f2d8737..80a7023 100644 (file)
@@ -115,6 +115,7 @@ enum {
        GW5903,
        GW5904,
        GW5905,
+       GW5906,
        GW_UNKNOWN,
        GW_BADCRC,
 };