Skip to contentSkip to conversation

board: gateworks: venice: add additional levels for dtb name match

PATCH Superseded Tim Harvey 2 participants 4 messages Apr 13, 2022 – Apr 21, 2022

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH v2 1/2 board: gateworks: venice: add additional levels for dtb name match

Gateworks produces many products from a single PCB with subloaded components. Add an additional two levels of dtb name matching so that for example a GW7400-A matches the dtb name of gw74xx.dtb

---
v2:
- rebase on imx/master

---
 board/gateworks/venice/eeprom.c | 8 ++++++++
 1 file changed, 8 insertions(+)
board/gateworks/venice/eeprom.c +8 -0
index 62b8125960c7..282d55f2ae30 100644
@@ -259,8 +259,16 @@ const char *eeprom_get_dtb_name(int level, char *buf, int sz)
 			break;
 		case 2: /* don't care about PCB or BOM revision */
 			break;
+		case 3: /* don't care about last digit of model */
+			buf[strlen(buf) - 1] = 'x';
+			break;
+		case 4: /* don't care about last two digits of model */
+			buf[strlen(buf) - 1] = 'x';
+			buf[strlen(buf) - 2] = 'x';
+			break;
 		default:
 			return NULL;
+			break;
 		}
 	}
 
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 2/2 board: gateworks: venice: add imx8mp-venice-gw740x support

The GW74xx is based on the i.MX 8M Plus SoC featuring:
- LPDDR4 DRAM
- eMMC FLASH
- Gateworks System Controller
- PCIe Gen 3.0 switch (build option)
- USB 3.0 HUB
- USB Type-C front panel connector
- GPS
- 3-axis accelerometer
- CAN bus
- 6x GbE RJ45 front-panel jacks
- 1x IMX8M FEC RGMII GbE (with Passive PoE)
- 5x IMX8M EQOS RGMII 6 port GbE Switch
(1x with 802.3af class 5 Active PoE)
- RS232/RS485/RS422 serial transceiver
- MIPI header (DSI/CSI/GPIO/PWM/I2S)
- DigI/O header (UART/GPIO/I2C/ADC)
- 802.11ac WiFi
- Bluetooth BLE
- 3x MiniPCIe sockets with PCI/USB
- 1x M.2 Socket with USB2.0, PCIe, and dual-SIM
- PMIC
- Wide range DC input supply (8V to 60V DC)

Do the following to add support for this and future imx8mp-venice boards:
- add dts
- add DRAM config
- add PMIC config
- add IMX8MP support in spl.c and venice.c

---
v2:
- rebase on imx/master

---
 arch/arm/dts/Makefile                         |    2 +
 arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi |  185 ++
 arch/arm/dts/imx8mp-venice-gw74xx.dts         |  923 +++++++++
 arch/arm/dts/imx8mp-venice-u-boot.dtsi        |   74 +
 arch/arm/dts/imx8mp-venice.dts                |  159 ++
 arch/arm/mach-imx/imx8m/Kconfig               |    9 +
 board/gateworks/venice/Kconfig                |   15 +
 board/gateworks/venice/Makefile               |    3 +
 board/gateworks/venice/eeprom.c               |    4 +-
 .../gateworks/venice/imximage-8mp-lpddr4.cfg  |    9 +
 board/gateworks/venice/lpddr4_timing.h        |    2 +
 board/gateworks/venice/lpddr4_timing_imx8mp.c | 1846 +++++++++++++++++
 board/gateworks/venice/spl.c                  |   74 +-
 board/gateworks/venice/venice.c               |   25 +-
 configs/imx8mp_venice_defconfig               |  142 ++
 include/configs/imx8mp_venice.h               |  109 +
 16 files changed, 3571 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mp-venice-gw74xx.dts
 create mode 100644 arch/arm/dts/imx8mp-venice-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mp-venice.dts
 create mode 100644 board/gateworks/venice/imximage-8mp-lpddr4.cfg
 create mode 100644 board/gateworks/venice/lpddr4_timing_imx8mp.c
 create mode 100644 configs/imx8mp_venice_defconfig
 create mode 100644 include/configs/imx8mp_venice.h
arch/arm/dts/Makefile +2 -0
index df7b4addf990..99243386ff4a 100644
@@ -931,6 +931,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-phyboard-pollux-rdk.dtb \
+	imx8mp-venice.dtb \
+	imx8mp-venice-gw74xx.dtb \
 	imx8mp-verdin.dtb \
 	imx8mq-pico-pi.dtb \
 	imx8mq-kontron-pitx-imx8m.dtb
arch/arm/dts/imx8mp-venice-gw74xx-u-boot.dtsi new file +185 -0

185 lines not on this page · raw message

arch/arm/dts/imx8mp-venice-gw74xx.dts new file +923 -0

923 lines not on this page · raw message

arch/arm/dts/imx8mp-venice-u-boot.dtsi new file +74 -0

74 lines not on this page · raw message

arch/arm/dts/imx8mp-venice.dts new file +159 -0

159 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +9 -0
index 1abf52611232..24299ae037f8 100644
@@ -158,6 +158,15 @@ config TARGET_IMX8MP_EVK
 	select ARCH_MISC_INIT
 	select SPL_CRYPTO if SPL
 
+config TARGET_IMX8MP_VENICE
+	bool "Support Gateworks Venice iMX8M Plus module"
+	select BINMAN
+	select IMX8MP
+	select SUPPORT_SPL
+	select IMX8M_LPDDR4
+	select GATEWORKS_SC
+	select MISC
+
 config TARGET_PICO_IMX8MQ
 	bool "Support Technexion Pico iMX8MQ"
 	select BINMAN
board/gateworks/venice/Kconfig +15 -0
index 3034275ac2cd..9d083dc55f3a 100644
@@ -27,3 +27,18 @@ config SYS_CONFIG_NAME
 config IMX_CONFIG
 	default "board/gateworks/venice/imximage-8mn-lpddr4.cfg"
 endif
+
+if TARGET_IMX8MP_VENICE
+
+config SYS_BOARD
+	default "venice"
+
+config SYS_VENDOR
+	default "gateworks"
+
+config SYS_CONFIG_NAME
+	default "imx8mp_venice"
+
+config IMX_CONFIG
+	default "board/gateworks/venice/imximage-8mp-lpddr4.cfg"
+endif
board/gateworks/venice/Makefile +3 -0
index fbb716ee852d..faf1348cfa91 100644
@@ -14,4 +14,7 @@ endif
 ifdef CONFIG_IMX8MN
 obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_imx8mn.o
 endif
+ifdef CONFIG_IMX8MP
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_imx8mp.o
+endif
 endif
board/gateworks/venice/eeprom.c +3 -1
index 282d55f2ae30..7a46f44828ce 100644
@@ -193,8 +193,10 @@ const char *eeprom_get_dtb_name(int level, char *buf, int sz)
 {
 #ifdef CONFIG_IMX8MM
 	const char *pre = "imx8mm-venice-gw";
-#else
+#elif CONFIG_IMX8MN
 	const char *pre = "imx8mn-venice-gw";
+#elif CONFIG_IMX8MP
+	const char *pre = "imx8mp-venice-gw";
 #endif
 	int model, rev_pcb, rev_bom;
 
board/gateworks/venice/imximage-8mp-lpddr4.cfg new file +9 -0
new file mode 100644
index 000000000000..7731d54d4ae9
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2022 Gateworks Corporation
+ */
+
+
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x920000
board/gateworks/venice/lpddr4_timing.h +2 -0
index f9a3ee1c8e6e..62b860610c5a 100644
@@ -15,6 +15,8 @@ extern struct dram_timing_info dram_timing_4gb;
 extern struct dram_timing_info dram_timing_1gb_single_die;
 extern struct dram_timing_info dram_timing_2gb_single_die;
 extern struct dram_timing_info dram_timing_2gb_dual_die;
+#elif CONFIG_IMX8MP
+extern struct dram_timing_info dram_timing_4gb_dual_die;
 #endif
 
 #endif /* __LPDDR4_TIMING_H__ */
board/gateworks/venice/lpddr4_timing_imx8mp.c new file +1846 -0

1,583 lines not on this page · raw message

board/gateworks/venice/spl.c +67 -7

74 lines not on this page · raw message

board/gateworks/venice/venice.c +23 -2
index b1828f4f187a..4290a6980771 100644

Lines of this file are not shown. View the raw message.

configs/imx8mp_venice_defconfig new file +142 -0

142 lines not on this page · raw message

include/configs/imx8mp_venice.h new file +109 -0

109 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v2 2/2 board: gateworks: venice: add imx8mp-venice-gw740x support

Quoted 28 lines

The GW74xx is based on the i.MX 8M Plus SoC featuring:
- LPDDR4 DRAM
- eMMC FLASH
- Gateworks System Controller
- PCIe Gen 3.0 switch (build option)
- USB 3.0 HUB
- USB Type-C front panel connector
- GPS
- 3-axis accelerometer
- CAN bus
- 6x GbE RJ45 front-panel jacks
- 1x IMX8M FEC RGMII GbE (with Passive PoE)
- 5x IMX8M EQOS RGMII 6 port GbE Switch
(1x with 802.3af class 5 Active PoE)
- RS232/RS485/RS422 serial transceiver
- MIPI header (DSI/CSI/GPIO/PWM/I2S)
- DigI/O header (UART/GPIO/I2C/ADC)
- 802.11ac WiFi
- Bluetooth BLE
- 3x MiniPCIe sockets with PCI/USB
- 1x M.2 Socket with USB2.0, PCIe, and dual-SIM
- PMIC
- Wide range DC input supply (8V to 60V DC)
Do the following to add support for this and future imx8mp-venice boards:
- add dts
- add DRAM config
- add PMIC config
- add IMX8MP support in spl.c and venice.c

Quoted 1 line

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw

PATCH v2 1/2 board: gateworks: venice: add additional levels for dtb name match

In reply to Tim Harvey
Quoted 4 lines

Gateworks produces many products from a single PCB with subloaded components. Add an additional two levels of dtb name matching so that for example a GW7400-A matches the dtb name of gw74xx.dtb

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================