Skip to contentSkip to conversation

board: toradex: add verdin imx8m plus support

PATCH Superseded Marcel Ziswiler 2 participants 2 messages Oct 22, 2021

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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 2021.10-00289-g971442e784b (Oct 22 2021 - 09:13:32 +0200) 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&48025c00, size 872
Download 776704, Total size 777520

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 2021.10-00289-g971442e784b (Oct 22 2021 - 09:13:32 +0200)

CPU:   Freescale i.MX8MP[8] rev1.1 at 1200 MHz
Reset cause: POR
DRAM:  8 GiB
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# 10754333
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 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 | 2168 +++++++++++++++++++
 board/toradex/verdin-imx8mp/spl.c           |  158 ++
 board/toradex/verdin-imx8mp/verdin-imx8mp.c |  158 ++
 configs/verdin-imx8mp_defconfig             |  131 ++
 doc/board/toradex/index.rst                 |    1 +
 doc/board/toradex/verdin-imx8mp.rst         |  109 +
 include/configs/verdin-imx8mp.h             |  136 ++
 15 files changed, 3714 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 a88aecc5bd9..35198847efd 100644
@@ -899,6 +899,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-phyboard-pollux-rdk.dtb \
+	imx8mp-verdin.dtb \
 	imx8mq-pico-pi.dtb
 
 dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.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 276b8bd9742..699a4a11b96 100644
@@ -115,6 +115,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 IMX8MM
@@ -172,5 +179,6 @@ source "board/phytec/phycore_imx8mp/Kconfig"
 source "board/ronetix/imx8mq-cm/Kconfig"
 source "board/technexion/pico-imx8mq/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 00000000000..5820546d1c5
@@ -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 00000000000..8e7b581a0f6
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2021 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 00000000000..e2693b071eb
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 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 +2168 -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 +158 -0

158 lines not on this page · raw message

configs/verdin-imx8mp_defconfig new file +131 -0

131 lines not on this page · raw message

doc/board/toradex/index.rst +1 -0
index 56528480197..1cd926a7303 100644

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

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

109 lines not on this page · raw message

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

136 lines not on this page · raw message

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

Signature · 1 line
2.26.2

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

Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · Marcel Ziswiler

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.

...

Quoted 1 line

Francesco