Skip to contentSkip to conversation

imx8mm-phg: Add board support

PATCH Superseded Fabio Estevam 3 participants 4 messages Jan 10, 2023

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 imx8mm-phg: Add board support

Add the board support for the i.MX8MM Cloos PHG board.

This board uses a imx8mm-tqma8mqml SoM from TQ-Group.

imx8mm-phg.dts and imx8mm-tqma8mqml.dtsi are taken directly from Linux 6.2-rc3.

---
Changes since v1:
- Rebased on top of current master (Tom)
- Converted doc to rst format (Tom)
- Simplified environment

 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/imx8mm-phg-u-boot.dtsi           |  137 ++
 arch/arm/dts/imx8mm-phg.dts                   |  266 +++
 arch/arm/dts/imx8mm-tqma8mqml.dtsi            |  341 +++
 arch/arm/mach-imx/imx8m/Kconfig               |    8 +
 board/cloos/imx8mm_phg/Kconfig                |   15 +
 board/cloos/imx8mm_phg/MAINTAINERS            |    6 +
 board/cloos/imx8mm_phg/Makefile               |   12 +
 board/cloos/imx8mm_phg/imx8mm_phg.c           |   50 +
 .../cloos/imx8mm_phg/imximage-8mm-lpddr4.cfg  |    8 +
 board/cloos/imx8mm_phg/lpddr4_timing.c        | 1846 +++++++++++++++++
 board/cloos/imx8mm_phg/spl.c                  |  147 ++
 configs/imx8mm_phg_defconfig                  |  120 ++
 doc/board/cloos/imx8mm_phg.rst                |   55 +
 doc/board/cloos/index.rst                     |    9 +
 doc/board/index.rst                           |    1 +
 include/configs/imx8mm_phg.h                  |   43 +
 17 files changed, 3065 insertions(+)
 create mode 100644 arch/arm/dts/imx8mm-phg-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mm-phg.dts
 create mode 100644 arch/arm/dts/imx8mm-tqma8mqml.dtsi
 create mode 100644 board/cloos/imx8mm_phg/Kconfig
 create mode 100644 board/cloos/imx8mm_phg/MAINTAINERS
 create mode 100644 board/cloos/imx8mm_phg/Makefile
 create mode 100644 board/cloos/imx8mm_phg/imx8mm_phg.c
 create mode 100644 board/cloos/imx8mm_phg/imximage-8mm-lpddr4.cfg
 create mode 100644 board/cloos/imx8mm_phg/lpddr4_timing.c
 create mode 100644 board/cloos/imx8mm_phg/spl.c
 create mode 100644 configs/imx8mm_phg_defconfig
 create mode 100644 doc/board/cloos/imx8mm_phg.rst
 create mode 100644 doc/board/cloos/index.rst
 create mode 100644 include/configs/imx8mm_phg.h
arch/arm/dts/Makefile +1 -0
index b3baaf4829..560070f187 100644
@@ -955,6 +955,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mm-kontron-bl.dtb \
 	imx8mm-kontron-bl-osm-s.dtb \
 	imx8mm-mx8menlo.dtb \
+	imx8mm-phg.dtb \
 	imx8mm-venice.dtb \
 	imx8mm-venice-gw71xx-0x.dtb \
 	imx8mm-venice-gw72xx-0x.dtb \
arch/arm/dts/imx8mm-phg-u-boot.dtsi new file +137 -0

137 lines not on this page · raw message

arch/arm/dts/imx8mm-phg.dts new file +266 -0

266 lines not on this page · raw message

arch/arm/dts/imx8mm-tqma8mqml.dtsi new file +341 -0

341 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +8 -0
index a0715e8091..64e6b49f46 100644
@@ -94,6 +94,13 @@ config TARGET_IMX8MM_MX8MENLO
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
 
+config TARGET_IMX8MM_PHG
+	bool "i.MX8MM PHG board"
+	select BINMAN
+	select IMX8MM
+	select SUPPORT_SPL
+	select IMX8M_LPDDR4
+
 config TARGET_IMX8MM_VENICE
 	bool "Support Gateworks Venice iMX8M Mini module"
 	select BINMAN
@@ -305,6 +312,7 @@ source "board/advantech/imx8mp_rsb3720a1/Kconfig"
 source "board/beacon/imx8mm/Kconfig"
 source "board/beacon/imx8mn/Kconfig"
 source "board/bsh/imx8mn_smm_s2/Kconfig"
+source "board/cloos/imx8mm_phg/Kconfig"
 source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
 source "board/data_modul/imx8mm_edm_sbc/Kconfig"
 source "board/dhelectronics/dh_imx8mp/Kconfig"
board/cloos/imx8mm_phg/Kconfig new file +15 -0
new file mode 100644
index 0000000000..04680d93b5
@@ -0,0 +1,15 @@
+if TARGET_IMX8MM_PHG
+
+config SYS_BOARD
+	default "imx8mm_phg"
+
+config SYS_VENDOR
+	default "cloos"
+
+config SYS_CONFIG_NAME
+	default "imx8mm_phg"
+
+config IMX_CONFIG
+	default "board/cloos/imx8mm_phg/imximage-8mm-lpddr4.cfg"
+
+endif
board/cloos/imx8mm_phg/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..476f23061b
@@ -0,0 +1,6 @@
+i.MX8MM PHG BOARD
+M:	Fabio Estevam <[email protected]>
+S:	Maintained
+F:	board/cloos/imx8mm_phg/
+F:	include/configs/imx8mm_phg.h
+F:	configs/imx8mm_phg_defconfig
board/cloos/imx8mm_phg/Makefile new file +12 -0
new file mode 100644
index 0000000000..2b36931fcf
@@ -0,0 +1,12 @@
+#
+# Copyright 2018 NXP
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx8mm_phg.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+endif
board/cloos/imx8mm_phg/imx8mm_phg.c new file +50 -0

50 lines not on this page · raw message

board/cloos/imx8mm_phg/imximage-8mm-lpddr4.cfg new file +8 -0
new file mode 100644
index 0000000000..20061521f2
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x7E1000
board/cloos/imx8mm_phg/lpddr4_timing.c new file +1846 -0

1,846 lines not on this page · raw message

board/cloos/imx8mm_phg/spl.c new file +147 -0

147 lines not on this page · raw message

configs/imx8mm_phg_defconfig new file +120 -0

120 lines not on this page · raw message

doc/board/cloos/imx8mm_phg.rst new file +55 -0

25 lines not on this page · raw message

doc/board/cloos/index.rst new file +9 -0
new file mode 100644
index 0000000000..02c84152db

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

doc/board/index.rst +1 -0
index 53edd5301f..1e628e99e6 100644

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

include/configs/imx8mm_phg.h new file +43 -0

43 lines not on this page · raw message

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

Signature · 1 line
2.25.1

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

#1 lore raw
Quoted 13 lines · Fabio Estevam

Add the board support for the i.MX8MM Cloos PHG board.

This board uses a imx8mm-tqma8mqml SoM from TQ-Group.

imx8mm-phg.dts and imx8mm-tqma8mqml.dtsi are taken directly from Linux 6.2-rc3.

---
Changes since v1:
- Rebased on top of current master (Tom)
- Converted doc to rst format (Tom)
- Simplified environment

[snip]

include/configs/imx8mm_phg.h line 32

Quoted 11 lines
include/configs/imx8mm_phg.h new file +11 -0
+/* Initial environment variables */
+#define CFG_EXTRA_ENV_SETTINGS	\
+	"console=ttymxc1,115200\0"	\
+	"fdtfile=imx8mm-phg.dtb\0"	\
+	"fdt_addr_r=0x43000000\0"	\
+	"mmcdev=0\0"			\
+	"mmcargs=setenv bootargs console=${console} root=/dev/mmcblk${mmcdev}p${mmcpart} rw rootwait quiet\0" \
+	"bootcmd=env exists mmcpart || setenv mmcpart 1; run mmcargs; \
+	mmc dev ${mmcdev}; load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/Image; \
+	load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} boot/${fdtfile}; \
+	booti ${loadaddr} - ${fdt_addr_r}\0"

We're not yet to the point of nak'ing new boards over this, but if you look at something like board/kontron/sl-mx8mm/sl-mx8mm.env the above is trivially done that way instead. Is there something blocking doing that?

Signature · 1 line
Tom
reviewer
#2 lore raw

Hi Tom,

Quoted 4 lines · Tom Rini

We're not yet to the point of nak'ing new boards over this, but if you look at something like board/kontron/sl-mx8mm/sl-mx8mm.env the above is trivially done that way instead. Is there something blocking doing that?

Thanks for the suggestion. I will keep it in mind for future board submissions.

This particular board has been in use for several months and we don't want to change the
environment at this time as this would require extra rework in the BSP layer.

I plan to keep the current environment as is.

Thanks

#3 lore raw
Quoted 9 lines · Fabio Estevam

Hi Tom,

Quoted 4 lines · Tom Rini

We're not yet to the point of nak'ing new boards over this, but if you look at something like board/kontron/sl-mx8mm/sl-mx8mm.env the above is trivially done that way instead. Is there something blocking doing that?

Quoted 7 lines

Thanks for the suggestion. I will keep it in mind for future board submissions.

This particular board has been in use for several months and we don't want to change the
environment at this time as this would require extra rework in the BSP layer.

I plan to keep the current environment as is.

You can use u-boot-initial-env to compare before/after and see it's unchanged :)

Signature · 1 line
Tom