]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: ventana: add GW5910 support
authorTim Harvey <tharvey@gateworks.com>
Sat, 24 Jul 2021 17:40:42 +0000 (10:40 -0700)
committerStefano Babic <sbabic@denx.de>
Mon, 9 Aug 2021 12:46:50 +0000 (14:46 +0200)
The GW5910 is a Single Board Computer based on the NXP i.MX6Q/DL SoC
with the following features:
 - DDR3 DRAM
 - NAND FLASH (256MiB or 2048MiB)
 - microSD socket
 - Gateworks System Periperhal Controller
 - front panel LED's
 - front panel pushbutton
 - RS232 connector (2x UARTs)
 - Digital I/O connector (I2C/GPIO)
 - SPI connector
 - u-blox Zoe-M8Q GPS
 - LIS2DE12 Accellerometer
 - TI CC1352 ARM Cortex-M4 multiprotocol sub-1GHz / 2.4GHz wireless MCU
 - On-board brcmfmac WiFi and BT module
 - RGMII RJ45 GbE
 - 1x MiniPCIe socket with PCIe/USB 2.0
 - 1x MiniPCIe socket with USB 2.0 and nanoSIM socket
 - Passive PoE and wide-range DC power supply

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

index e8d42d849ac8759fe0519f364c513085f99c2eed..0256aa9f35e3b3ea8f01bc8dac7b81ffce6024fe 100644 (file)
@@ -19,6 +19,7 @@
 #include <power/pmic.h>
 #include <power/ltc3676_pmic.h>
 #include <power/pfuze100_pmic.h>
+#include <power/mp5416.h>
 
 #include "common.h"
 
@@ -420,6 +421,19 @@ static iomux_v3_cfg_t const gw5905_gpio_pads[] = {
        IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG),
 };
 
+static iomux_v3_cfg_t const gw5910_gpio_pads[] = {
+       /* SD3_VSELECT */
+       IOMUX_PADS(PAD_NANDF_CS1__GPIO6_IO14 | DIO_PAD_CFG),
+       /* RS232_EN# */
+       IOMUX_PADS(PAD_SD4_DAT3__GPIO2_IO11 | DIO_PAD_CFG),
+       /* RF_RESET# */
+       IOMUX_PADS(PAD_GPIO_7__GPIO1_IO07 | DIO_PAD_CFG),
+       /* RF_BOOT */
+       IOMUX_PADS(PAD_GPIO_8__GPIO1_IO08 | DIO_PAD_CFG),
+       /* PCIESKT_WDIS# */
+       IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG),
+};
+
 /* Digital I/O */
 struct dio_cfg gw51xx_dio[] = {
        {
@@ -1029,6 +1043,18 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
                .mezz_pwren = IMX_GPIO_NR(2, 19),
                .mezz_irq = IMX_GPIO_NR(2, 18),
        },
+
+       /* GW5910 */
+       {
+               .gpio_pads = gw5910_gpio_pads,
+               .num_pads = ARRAY_SIZE(gw5910_gpio_pads) / 2,
+               .dio_cfg = gw52xx_dio,
+               .dio_num = ARRAY_SIZE(gw52xx_dio),
+               .wdis = IMX_GPIO_NR(7, 12),
+               .rs232_en = GP_RS232_EN,
+               .vsel_pin = IMX_GPIO_NR(6, 14),
+               .mmc_cd = IMX_GPIO_NR(7, 0),
+       },
 };
 
 #define SETUP_GPIO_OUTPUT(gpio, name, level) \
@@ -1181,6 +1207,11 @@ void setup_iomux_gpio(int board, struct ventana_board_info *info)
                 */
                SETUP_GPIO_OUTPUT(IMX_GPIO_NR(4, 8), "touch_rst", 1);
                break;
+       case GW5910:
+               /* CC1352 */
+               SETUP_GPIO_OUTPUT(IMX_GPIO_NR(1, 7), "rf_reset#", 1);
+               SETUP_GPIO_OUTPUT(IMX_GPIO_NR(1, 8), "rf_boot", 1);
+               break;
        }
 }
 
@@ -1423,6 +1454,21 @@ void setup_pmic(void)
                pmic_reg_write(p, LTC3676_BUCK3, 0xc0);
                pmic_reg_write(p, LTC3676_BUCK4, 0xc0);
        }
+
+       /* configure MP5416 PMIC */
+       else if (!i2c_probe(0x69)) {
+               puts("PMIC:  MP5416\n");
+               switch (board) {
+               case GW5910:
+                       /* SW1: VDD_ARM 1.2V -> (1.275 to 1.475) */
+                       reg = MP5416_VSET_EN | MP5416_VSET_SW1_SVAL(1475000);
+                       i2c_write(0x69, MP5416_VSET_SW1, 1, (uint8_t *)&reg, 1);
+                       /* SW4: VDD_SOC 1.2V -> (1.350 to 1.475) */
+                       reg = MP5416_VSET_EN | MP5416_VSET_SW4_SVAL(1475000);
+                       i2c_write(0x69, MP5416_VSET_SW4, 1, (uint8_t *)&reg, 1);
+                       break;
+               }
+       }
 }
 
 #include <fdt_support.h>
@@ -1570,6 +1616,7 @@ int board_mmc_init(struct bd_info *bis)
        case GW53xx:
        case GW54xx:
        case GW553x:
+       case GW5910:
                /* usdhc3: 4bit microSD */
                SETUP_IOMUX_PADS(usdhc3_pads);
                usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
index b9862c7dfcf1d1acbd48e4ef56e0df6c166d541f..1e48141160effbb525ad0a185c19069c954849a6 100644 (file)
@@ -124,6 +124,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
                        type = GW5908;
                else if (info->model[4] == '0' && info->model[5] == '9')
                        type = GW5909;
+               else if (info->model[4] == '1' && info->model[5] == '0')
+                       type = GW5910;
                break;
        default:
                printf("EEPROM: Unknown model in EEPROM: %s\n", info->model);
index 4fa085b320ccb96eb734360bb2acb38f31d820b5..7c01e9edb48e21541c0003fc73be270a913bc9d5 100644 (file)
@@ -121,6 +121,7 @@ enum {
        GW5907,
        GW5908,
        GW5909,
+       GW5910,
        GW_UNKNOWN,
        GW_BADCRC,
 };