board: toradex: add verdin imx8m plus support
Subsystems (3)
PATCH v3 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-00059-gaa1f366337-dirty (Feb 04 2022 - 23:11:42 +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&48025c00, size 872
Download 779776, 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-00059-gaa1f366337-dirty (Feb 04 2022 - 23:11:42 +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# 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 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 | 158 ++ configs/verdin-imx8mp_defconfig | 133 ++ doc/board/toradex/index.rst | 1 + doc/board/toradex/verdin-imx8mm.rst | 4 +- doc/board/toradex/verdin-imx8mp.rst | 110 + include/configs/verdin-imx8mp.h | 131 ++ 16 files changed, 3715 insertions(+), 2 deletions(-) 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
@@ -918,6 +918,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
@@ -119,6 +119,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
@@ -178,5 +185,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
@@ -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
@@ -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
@@ -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 +158 -0
158 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/verdin-imx8mp.rst new file +110 -0
110 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.
Hi Marcel,
board/toradex/verdin-imx8mp/verdin-imx8mp.c line 136
Quoted 2 lines · Marcel Ziswiler
board/toradex/verdin-imx8mp/verdin-imx8mp.c new file +2
-0+#if 0 +int board_phys_sdram_size (phys_size_t *bank1_size,phys_size_t *bank2_size)
Please remove this unused function.
doc/board/toradex/verdin-imx8mm.rst
Quoted 4 lines
doc/board/toradex/verdin-imx8mm.rst +0
-0
The changes in this file should better be in a separate patch.
Quoted 8 lines · Fabio Estevam
Hi Marcel,
board/toradex/verdin-imx8mp/verdin-imx8mp.c line 136
Quoted 2 lines · Marcel Ziswiler
board/toradex/verdin-imx8mp/verdin-imx8mp.c new file +2
-0+#if 0 +int board_phys_sdram_size (phys_size_t *bank1_size,phys_size_t *bank2_size)Please remove this unused function.
Yes, this is left for after basic support got applied and I can work on properly supporting dynamic memory sizing on the i.MX 8M Plus as well.
Quoted 6 lines
doc/board/toradex/verdin-imx8mm.rst
Quoted 4 lines
doc/board/toradex/verdin-imx8mm.rst +0
-0The changes in this file should better be in a separate patch.
Yes, good catch. That one really slipped in. I will remove it again in a v4.
Quoted 1 line
Reviewed-by Fabio Estevam <[email protected]>
Thanks, Fabio.