[RESEND PATCH 14/16] imx: ventana: add GW5913 support

Tim Harvey tharvey at gateworks.com
Sat Jul 24 19:40:44 CEST 2021


The GW5913 is a Single Board Computer based on the NXP i.MX6Q/DL SoC
with the following features:
 - DDR3 DRAM
 - NAND FLASH (256MiB or 2048MiB)
 - Gateworks System Periperhal Controller
 - front panel LED's
 - front panel pushbutton
 - Digital I/O connector (I2C/GPIO/UART)
 - u-blox Zoe-M8Q GPS
 - 1x RJ45 GbE
 - 1x MiniPCIe socket with PCIe USB 2.0 and nanoSIM socket
 - Passive PoE and wide-range DC power supply

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 board/gateworks/gw_ventana/common.c         | 54 +++++++++++++++++++++
 board/gateworks/gw_ventana/eeprom.c         |  2 +
 board/gateworks/gw_ventana/ventana_eeprom.h |  1 +
 3 files changed, 57 insertions(+)

diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 3a0b18672f..a4c2f5549f 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -843,6 +843,51 @@ struct dio_cfg gw5906_dio[] = {
 	},
 };
 
+struct dio_cfg gw5913_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_CMD__GPIO1_IO18) },
+		IMX_GPIO_NR(1, 18),
+		{ IOMUX_PADS(PAD_SD1_CMD__PWM4_OUT) },
+		4
+	},
+	{
+		{ IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15) },
+		IMX_GPIO_NR(1, 15),
+		{ 0, 0 },
+		0
+	},
+	{
+		{ IOMUX_PADS(PAD_SD2_DAT1__GPIO1_IO14) },
+		IMX_GPIO_NR(1, 14),
+		{ 0, 0 },
+		0
+	},
+	{
+		{ IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05) },
+		IMX_GPIO_NR(4, 5),
+		{ 0, 0 },
+		0
+	},
+};
+
 /*
  * Board Specific GPIO
  */
@@ -1082,6 +1127,15 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
 		.vsel_pin = IMX_GPIO_NR(6, 14),
 		.mmc_cd = IMX_GPIO_NR(7, 0),
 	},
+
+	/* GW5913 */
+	{
+		.gpio_pads = gw5912_gpio_pads,
+		.num_pads = ARRAY_SIZE(gw5912_gpio_pads) / 2,
+		.dio_cfg = gw5913_dio,
+		.dio_num = ARRAY_SIZE(gw5913_dio),
+		.wdis = IMX_GPIO_NR(1, 0),
+	},
 };
 
 #define SETUP_GPIO_OUTPUT(gpio, name, level) \
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index a4f3065c7d..d21aa3c38f 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -128,6 +128,8 @@ read_eeprom(int bus, struct ventana_board_info *info)
 			type = GW5910;
 		else if (info->model[4] == '1' && info->model[5] == '2')
 			type = GW5912;
+		else if (info->model[4] == '1' && info->model[5] == '3')
+			type = GW5913;
 		break;
 	default:
 		printf("EEPROM: Unknown model in EEPROM: %s\n", info->model);
diff --git a/board/gateworks/gw_ventana/ventana_eeprom.h b/board/gateworks/gw_ventana/ventana_eeprom.h
index 9cac4a769c..2d5c27261e 100644
--- a/board/gateworks/gw_ventana/ventana_eeprom.h
+++ b/board/gateworks/gw_ventana/ventana_eeprom.h
@@ -123,6 +123,7 @@ enum {
 	GW5909,
 	GW5910,
 	GW5912,
+	GW5913,
 	GW_UNKNOWN,
 	GW_BADCRC,
 };
-- 
2.17.1



More information about the U-Boot mailing list