Skip to contentSkip to conversation

board: toradex: add verdin imx8m plus support

PATCH New Marcel Ziswiler 1 participant 1 message Feb 7, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 board: toradex: add verdin imx8m plus support

From: Marcel Ziswiler <[email protected]>

This adds initial support for the Toradex Verdin iMX8M Plus Quad 4GB WB IT V1.0B module. They are strapped to boot from eFuses which are factory fused to properly boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC only, SDP support is disabled for now due to missing i.MX 8M Plus USB support.

Functionality wise the following is known to be working:
- eMMC, 8-bit and 4-bit MMC/SD card slots
- Ethernet both on-module eQoS and FEC (requires PHY on carrier board)
- GPIOs
- I2C

Boot sequence is:
SPL ---> ATF (TF-A) ---> U-boot proper

ATF, U-boot proper and u-boot.dtb images are packed into a FIT image, loaded by SPL.

Boot:
U-Boot SPL 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) Quad die, dual rank failed, attempting dual die, single rank configuration. Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Find img info 0x&48025a00, size 872
Need continue download 1024
Download 779264, Total size 780424

NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
NOTICE:  BL31: Built : 16:52:37, Aug 26 2021

U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100)

CPU:   Freescale i.MX8MP[8] rev1.1 at 1200 MHz
Reset cause: POR
DRAM:  8 GiB
Core:  78 devices, 18 uclasses, devicetree: separate
WDT:   Started watchdog@30280000 with servicing (60s timeout)
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0B, Serial# 06817281
Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609
Setting variant to wifi
Net:   Hard-coding pdata->enetaddr
eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
Hit any key to stop autoboot:  0

Verdin iMX8MP #

---
Known issues:
- MAC address: While the FEC driver allows using it from the environment rather than the SoC fuses the DWC EQoS iMX driver currently hard-codes this to only be read from fuses. I am still working on a patch that would allow the MAC address to be retrieved from the environment similar to how the FEC driver does.
- RAM size: Right now it is hard-coded to 8 GB. I am still working on a patch which allows our automatic RAM sizing approach with mainline.
- ETH PHY regulator: For now we just use a GPIO hog as in downstream. Doing this properly requires more work on the whole Ethernet stack within U-Boot but seems rather not that urgent.

Changes in v4:
- Remove unused function board_phys_sdram_size() for now. Dynamic memory sizing work is planned to continue once basic support got applied.
- Remove doc/board/toradex/verdin-imx8mm.rst change again which inadvertently slipped in.
- Add Fabio's reviewed-by tag. Thanks also for spotting them above!

Changes in v3:
- Re-base on top of u-boot-imx/master.
- Update configs after recent migration of CONFIG_FSL_USDHC, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR and CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.
- Remove documentation of manually having to set ATF_LOAD_ADDR prior to compiling as this is handled by binman now.
- Remove obsolete/stale config defines CONFIG_SYS_MMC_IMG_LOAD_PART and CONFIG_SYS_MMCSD_FS_BOOT_PARTITION from config header file.
- Add Toradex copyright message to lpddr4_timing.c source file.
- Update SPDX-License-Identifier from GPL-2.0+ to GPL-2.0-or-later resp. from GPL-2.0+ OR MIT to GPL-2.0-or-later OR MIT.
- Update copyright year as this patch series progressed well into 2022.

Changes in v2:
- Separate commit notes from commit message.
- Fix mmc instance being 2 rather than 0 in the doc.
- Add the doc to the index.
- Document known issues in the commit notes.
- Re-based on top of imx/master which now already includes all dependencies making those commit notes superfluous.

 arch/arm/dts/Makefile                       |    1 +
 arch/arm/dts/imx8mp-verdin-u-boot.dtsi      |  132 ++
 arch/arm/dts/imx8mp-verdin.dts              |  639 ++++++
 arch/arm/mach-imx/imx8m/Kconfig             |    8 +
 board/toradex/verdin-imx8mp/Kconfig         |   42 +
 board/toradex/verdin-imx8mp/MAINTAINERS     |   10 +
 board/toradex/verdin-imx8mp/Makefile        |   11 +
 board/toradex/verdin-imx8mp/imximage.cfg    |   10 +
 board/toradex/verdin-imx8mp/lpddr4_timing.c | 2169 +++++++++++++++++++
 board/toradex/verdin-imx8mp/spl.c           |  158 ++
 board/toradex/verdin-imx8mp/verdin-imx8mp.c |  140 ++
 configs/verdin-imx8mp_defconfig             |  133 ++
 doc/board/toradex/index.rst                 |    1 +
 doc/board/toradex/verdin-imx8mp.rst         |  111 +
 include/configs/verdin-imx8mp.h             |  131 ++
 15 files changed, 3696 insertions(+)
 create mode 100644 arch/arm/dts/imx8mp-verdin-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mp-verdin.dts
 create mode 100644 board/toradex/verdin-imx8mp/Kconfig
 create mode 100644 board/toradex/verdin-imx8mp/MAINTAINERS
 create mode 100644 board/toradex/verdin-imx8mp/Makefile
 create mode 100644 board/toradex/verdin-imx8mp/imximage.cfg
 create mode 100644 board/toradex/verdin-imx8mp/lpddr4_timing.c
 create mode 100644 board/toradex/verdin-imx8mp/spl.c
 create mode 100644 board/toradex/verdin-imx8mp/verdin-imx8mp.c
 create mode 100644 configs/verdin-imx8mp_defconfig
 create mode 100644 doc/board/toradex/verdin-imx8mp.rst
 create mode 100644 include/configs/verdin-imx8mp.h
arch/arm/dts/Makefile +1 -0
index 191af76d84..e51e875079 100644
@@ -921,6 +921,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-phyboard-pollux-rdk.dtb \
+	imx8mp-verdin.dtb \
 	imx8mq-pico-pi.dtb \
 	imx8mq-kontron-pitx-imx8m.dtb
 
arch/arm/dts/imx8mp-verdin-u-boot.dtsi new file +132 -0

132 lines not on this page · raw message

arch/arm/dts/imx8mp-verdin.dts new file +639 -0

639 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +8 -0
index 852b1c0874..73bc9b34f3 100644
@@ -132,6 +132,13 @@ config TARGET_VERDIN_IMX8MM
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
 
+config TARGET_VERDIN_IMX8MP
+	bool "Support Toradex Verdin iMX8M Plus module"
+	select BINMAN
+	select IMX8MP
+	select SUPPORT_SPL
+	select IMX8M_LPDDR4
+
 config TARGET_IMX8MM_BEACON
 	bool "imx8mm Beacon Embedded devkit"
 	select BINMAN
@@ -195,5 +202,6 @@ source "board/ronetix/imx8mq-cm/Kconfig"
 source "board/technexion/pico-imx8mq/Kconfig"
 source "board/variscite/imx8mn_var_som/Kconfig"
 source "board/toradex/verdin-imx8mm/Kconfig"
+source "board/toradex/verdin-imx8mp/Kconfig"
 
 endif
board/toradex/verdin-imx8mp/Kconfig new file +42 -0

42 lines not on this page · raw message

board/toradex/verdin-imx8mp/MAINTAINERS new file +10 -0
new file mode 100644
index 0000000000..5820546d1c
@@ -0,0 +1,10 @@
+Verdin iMX8M Plus
+F:	arch/arm/dts/imx8mp-verdin.dts
+F:	arch/arm/dts/imx8mp-verdin-u-boot.dtsi
+F:	board/toradex/verdin-imx8mp/
+F:	configs/verdin-imx8mp_defconfig
+F:	doc/board/toradex/verdin-imx8mp.rst
+F:	include/configs/verdin-imx8mp.h
+M:	Marcel Ziswiler <[email protected]>
+S:	Maintained
+W:	https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-plus
board/toradex/verdin-imx8mp/Makefile new file +11 -0
new file mode 100644
index 0000000000..98fa14e4e2
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright 2022 Toradex
+#
+
+obj-y += verdin-imx8mp.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+endif
board/toradex/verdin-imx8mp/imximage.cfg new file +10 -0
new file mode 100644
index 0000000000..7d72de86b1
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright 2022 Toradex
+ */
+
+#define __ASSEMBLY__
+
+ROM_VERSION	v2
+BOOT_FROM	emmc_fastboot
+LOADER		u-boot-spl-ddr.bin	0x920000
board/toradex/verdin-imx8mp/lpddr4_timing.c new file +2169 -0

2,130 lines not on this page · raw message

board/toradex/verdin-imx8mp/spl.c new file +158 -0

158 lines not on this page · raw message

board/toradex/verdin-imx8mp/verdin-imx8mp.c new file +140 -0

140 lines not on this page · raw message

configs/verdin-imx8mp_defconfig new file +133 -0

133 lines not on this page · raw message

doc/board/toradex/index.rst +1 -0
index 5652848019..1cd926a730 100644

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

doc/board/toradex/verdin-imx8mp.rst new file +111 -0

111 lines not on this page · raw message

include/configs/verdin-imx8mp.h new file +131 -0

131 lines not on this page · raw message

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

Signature · 1 line
2.34.1

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