board: gateworks: venice: add imx8mn-gw7902 support
Subsystems (3)
PATCH RESEND v2 1/1 board: gateworks: venice: add imx8mn-gw7902 support
The GW7902 is based on the i.MX 8M Mini / Nano SoC featuring:
- LPDDR4 DRAM
- eMMC FLASH
- Gateworks System Controller
- LTE CAT M1 modem
- USB 2.0 HUB
- M.2 Socket with USB2.0, PCIe, and dual-SIM
- IMX8M FEC
- PCIe based GbE
- RS232/RS485/RS422 serial transceiver
- GPS
- CAN bus
- WiFi / Bluetooth
- MIPI header (DSI/CSI/GPIO/PWM/I2S)
- PMIC
To add support for the i.MX8M Nano GW7902:
- Add imx8mn-venice dts/defconfig/include
- Add imx8mn-gw7902 dts
- Add imx8mn-2gb lpddr4 dram configs
- Add misc support for IMX8M Nano SoC
- rename imx8mm-venice.c to venice.c as it is no longer imx8mm specific
- update README with differences for IMX8MN vs IMX8MM
---
v2:
- resend due to patch missing from patchwork
- rebase on origin/master
- remove unused fdt_pack_reg function
---
arch/arm/dts/Makefile | 2 +
arch/arm/dts/imx8mn-venice-gw7902-u-boot.dtsi | 29 +
arch/arm/dts/imx8mn-venice-gw7902.dts | 888 ++++++++++
arch/arm/dts/imx8mn-venice-u-boot.dtsi | 222 +++
arch/arm/dts/imx8mn-venice.dts | 152 ++
arch/arm/mach-imx/imx8m/Kconfig | 7 +
board/gateworks/venice/Kconfig | 15 +
board/gateworks/venice/MAINTAINERS | 6 +-
board/gateworks/venice/Makefile | 10 +-
board/gateworks/venice/README | 3 +-
board/gateworks/venice/gsc.c | 13 +
.../gateworks/venice/imximage-8mn-lpddr4.cfg | 10 +
board/gateworks/venice/lpddr4_timing.h | 5 +
...lpddr4_timing.c => lpddr4_timing_imx8mm.c} | 0
.../lpddr4_timing_imx8mn_2gb_dual_die.c | 1444 ++++++++++++++++
.../lpddr4_timing_imx8mn_2gb_single_die.c | 1445 +++++++++++++++++
board/gateworks/venice/spl.c | 31 +-
.../venice/{imx8mm_venice.c => venice.c} | 0
configs/imx8mn_venice_defconfig | 114 ++
include/configs/imx8mn_venice.h | 114 ++
20 files changed, 4503 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/dts/imx8mn-venice-gw7902-u-boot.dtsi
create mode 100644 arch/arm/dts/imx8mn-venice-gw7902.dts
create mode 100644 arch/arm/dts/imx8mn-venice-u-boot.dtsi
create mode 100644 arch/arm/dts/imx8mn-venice.dts
create mode 100644 board/gateworks/venice/imximage-8mn-lpddr4.cfg
rename board/gateworks/venice/{lpddr4_timing.c => lpddr4_timing_imx8mm.c} (100%)
create mode 100644 board/gateworks/venice/lpddr4_timing_imx8mn_2gb_dual_die.c
create mode 100644 board/gateworks/venice/lpddr4_timing_imx8mn_2gb_single_die.c
rename board/gateworks/venice/{imx8mm_venice.c => venice.c} (100%)
create mode 100644 configs/imx8mn_venice_defconfig
create mode 100644 include/configs/imx8mn_venice.harch/arm/dts/Makefile +2 -0
@@ -903,6 +903,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \ imx8mn-ddr4-evk.dtb \ imx8mq-cm.dtb \ imx8mn-evk.dtb \ + imx8mn-venice.dtb \ + imx8mn-venice-gw7902.dtb \ imx8mq-evk.dtb \ imx8mm-beacon-kit.dtb \ imx8mn-beacon-kit.dtb \
arch/arm/dts/imx8mn-venice-gw7902-u-boot.dtsi new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 Gateworks Corporation + */ + +#include "imx8mn-venice-u-boot.dtsi" + +&fec1 { + phy-reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + phy-reset-duration = <1>; + phy-reset-post-delay = <1>; +}; + +&pinctrl_fec1 { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b} { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b/regulators} { + u-boot,dm-spl; +}; + +&pinctrl_pmic { + u-boot,dm-spl; +}; +
arch/arm/dts/imx8mn-venice-gw7902.dts new file +888 -0
888 lines not on this page · raw message
arch/arm/dts/imx8mn-venice-u-boot.dtsi new file +222 -0
222 lines not on this page · raw message
arch/arm/dts/imx8mn-venice.dts new file +152 -0
152 lines not on this page · raw message
arch/arm/mach-imx/imx8m/Kconfig +7 -0
@@ -99,6 +99,13 @@ config TARGET_IMX8MN_DDR4_EVK select SUPPORT_SPL select IMX8M_DDR4 +config TARGET_IMX8MN_VENICE + bool "Support Gateworks Venice iMX8M Nano module" + select BINMAN + select IMX8MN + select SUPPORT_SPL + select IMX8M_LPDDR4 + config TARGET_IMX8MP_EVK bool "imx8mp LPDDR4 EVK board" select BINMAN
board/gateworks/venice/Kconfig +15 -0
@@ -12,3 +12,18 @@ config SYS_CONFIG_NAME config IMX_CONFIG default "board/gateworks/venice/imximage-8mm-lpddr4.cfg" endif + +if TARGET_IMX8MN_VENICE + +config SYS_BOARD + default "venice" + +config SYS_VENDOR + default "gateworks" + +config SYS_CONFIG_NAME + default "imx8mn_venice" + +config IMX_CONFIG + default "board/gateworks/venice/imximage-8mn-lpddr4.cfg" +endif
board/gateworks/venice/MAINTAINERS +3 -3
@@ -1,7 +1,7 @@ i.MX8MM Venice M: Tim Harvey <[email protected]> S: Maintained -F: arch/arm/dts/imx8mm-venice* +F: arch/arm/dts/imx8m*-venice* F: board/gateworks/venice/ -F: include/configs/venice.h -F: configs/imx8mm_venice_defconfig +F: include/configs/imx8m*_venice.h +F: configs/imx8m*_venice_defconfig
board/gateworks/venice/Makefile +8 -2
@@ -4,9 +4,15 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += imx8mm_venice.o gsc.o +obj-y += venice.o gsc.o ifdef CONFIG_SPL_BUILD obj-y += spl.o -obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o +ifdef CONFIG_IMX8MM +obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_imx8mm.o +endif +ifdef CONFIG_IMX8MN +obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_imx8mn_2gb_dual_die.o +obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_imx8mn_2gb_single_die.o +endif endif
board/gateworks/venice/README +2 -1
@@ -31,4 +31,5 @@ Update eMMC =========== => tftpboot $loadaddr flash.bin => setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200 -=> mmc dev 2 && mmc write $loadaddr 0x42 $blkcnt +=> mmc dev 2 && mmc write $loadaddr 0x42 $blkcnt # for IMX8MM +=> mmc dev 2 && mmc write $loadaddr 0x40 $blkcnt # for IMX8MN
board/gateworks/venice/gsc.c +13 -0
@@ -378,7 +378,11 @@ char get_pcb_rev(const char *str) snprintf((dest) + strlen(dest), (sz) - strlen(dest), fmt, ##__VA_ARGS__)const char *gsc_get_dtb_name (int level,char *buf,int sz) { +#ifdef CONFIG_IMX8MM const char *pre ="imx8mm-venice-gw" ; +#else +const char *pre ="imx8mn-venice-gw" ; +#endif int model, rev_pcb, rev_bom; model = ((som_info.model[2 ] -'0' ) *1000 )
@@ -544,6 +548,15 @@ int gsc_init(int quiet)* board may be ready to probe the GSC before its firmware is * running. We will wait here indefinately for the GSC/EEPROM. */ +#ifdef CONFIG_IMX8MN +// TODO: +// IMX8MN boots quicker than IMX8MM and exposes issue +// where because GSC I2C state machine isn't running and its +// SCL/SDA are driven low spams i2c errors +// +// Put a loop here that somehow waits for I2C CLK/DAT to be high +mdelay (40 ); +#endif while (1 ) {/* probe device */ dev =gsc_get_dev (GSC_BUSNO ,GSC_SC_ADDR );
board/gateworks/venice/imximage-8mn-lpddr4.cfg new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 Gateworks Corporation + */ + +#define __ASSEMBLY__ + +ROM_VERSION v2 +BOOT_FROM sd +LOADER u-boot-spl-ddr.bin 0x912000
board/gateworks/venice/lpddr4_timing.h +5 -0
@@ -6,8 +6,13 @@#ifndef __LPDDR4_TIMING_H__#define __LPDDR4_TIMING_H__ +#ifdef CONFIG_IMX8MM extern struct dram_timing_info dram_timing_1gb;extern struct dram_timing_info dram_timing_2gb;extern struct dram_timing_info dram_timing_4gb; +#elif CONFIG_IMX8MN +extern struct dram_timing_info dram_timing_2gb_single_die; +extern struct dram_timing_info dram_timing_2gb_dual_die; +#endif #endif /* __LPDDR4_TIMING_H__ */
board/gateworks/venice/lpddr4_timing_imx8mm.c renamed from board/gateworks/venice/lpddr4_timing.c +0 -0
board/gateworks/venice/lpddr4_timing_imx8mn_2gb_dual_die.c new file +1444 -0
1,444 lines not on this page · raw message
board/gateworks/venice/lpddr4_timing_imx8mn_2gb_single_die.c new file +1445 -0
144 lines not on this page · raw message
board/gateworks/venice/venice.c renamed from board/gateworks/venice/imx8mm_venice.c +0 -0
configs/imx8mn_venice_defconfig new file +114 -0
114 lines not on this page · raw message
include/configs/imx8mn_venice.h new file +114 -0
114 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.