Skip to contentSkip to conversation

arm: dts: imx8mq: Add Kontron pitx-imx8m

PATCH In review Heiko Thiery 2 participants 4 messages Jan 10, 2022

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

PATCH v7 1/2 arm: dts: imx8mq: Add Kontron pitx-imx8m

This adds the device tree for the Kontron pitx-imx8m Board. It is a copy of the device tree from the linux kernel sources.

---
 arch/arm/dts/Makefile                      |   3 +-
 arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts | 613 +++++++++++++++++++++
 2 files changed, 615 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts
arch/arm/dts/Makefile +2 -1
index b3e2a9c9d7..512114630b 100644
@@ -909,7 +909,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-phyboard-pollux-rdk.dtb \
-	imx8mq-pico-pi.dtb
+	imx8mq-pico-pi.dtb \
+	imx8mq-kontron-pitx-imx8m.dtb
 
 dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \
 	imxrt1020-evk.dtb
arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts new file +613 -0

613 lines not on this page · raw message

Signature · 1 line
2.30.2
#1 lore raw

PATCH v7 2/2 board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support

In reply to Heiko Thiery

The Kontron pitx-imx8m is an NXP i.MX8MQ based board in the pITX form factor.

---
v7:
- add external blob entry for HDMI firmware

v6:
- increase PHY_ANEG_TIMEOUT
- spl: print boot source on startup
- spl: remove PMIC output
- enable CONFIG_CMD_TIME

v5:
- save env in eMMC boot partition 0

v4: update board integration

- migrate to IMX_CONFIG
- convert config options to Kconfig
- CONFIG_POWER_I2C
- CONFIG_SPL_POWER_I2C
- CONFIG_POWER_LEGACY
- CONFIG_SYS_LOAD_ADDR
- CONFIG_SYS_I2C_MXC
- CONFIG_SYS_I2C_LEGACY
- CONFIG_SYS_I2C_MXC_I2C1
- CONFIG_SYS_I2C_MXC_I2C2
- CONFIG_SYS_I2C_MXC_I2C3
- CONFIG_SYS_LOAD_ADDR
- CONFIG_MXC_GPIO

v3:
- enable EFI capsule support
- add update FIT image creation to binman config
- change env offset to fit into eMMC boot partition

v2:
- add support for 2/4GB variant
- enable config options
- CONFIG_CMD_GPT
- CONFIG_DM_ETH_PHY
- CONFIG_EFI_SET_TIME
- add pxefile_addr_r env variable

 .../dts/imx8mq-kontron-pitx-imx8m-u-boot.dtsi |  169 ++
 arch/arm/mach-imx/imx8m/Kconfig               |    7 +
 board/kontron/pitx_imx8m/Kconfig              |   15 +
 board/kontron/pitx_imx8m/MAINTAINERS          |    7 +
 board/kontron/pitx_imx8m/Makefile             |    8 +
 board/kontron/pitx_imx8m/imximage.cfg         |    5 +
 board/kontron/pitx_imx8m/lpddr4_timing_2gb.c  | 1853 +++++++++++++++++
 board/kontron/pitx_imx8m/lpddr4_timing_4gb.c  | 1853 +++++++++++++++++
 board/kontron/pitx_imx8m/pitx_imx8m.c         |  156 ++
 board/kontron/pitx_imx8m/spl.c                |  327 +++
 configs/kontron_pitx_imx8m_defconfig          |   87 +
 doc/board/kontron/index.rst                   |    1 +
 doc/board/kontron/pitx-imx8m.rst              |   67 +
 include/configs/kontron_pitx_imx8m.h          |  111 +
 14 files changed, 4666 insertions(+)
 create mode 100644 arch/arm/dts/imx8mq-kontron-pitx-imx8m-u-boot.dtsi
 create mode 100644 board/kontron/pitx_imx8m/Kconfig
 create mode 100644 board/kontron/pitx_imx8m/MAINTAINERS
 create mode 100644 board/kontron/pitx_imx8m/Makefile
 create mode 100644 board/kontron/pitx_imx8m/imximage.cfg
 create mode 100644 board/kontron/pitx_imx8m/lpddr4_timing_2gb.c
 create mode 100644 board/kontron/pitx_imx8m/lpddr4_timing_4gb.c
 create mode 100644 board/kontron/pitx_imx8m/pitx_imx8m.c
 create mode 100644 board/kontron/pitx_imx8m/spl.c
 create mode 100644 configs/kontron_pitx_imx8m_defconfig
 create mode 100644 doc/board/kontron/pitx-imx8m.rst
 create mode 100644 include/configs/kontron_pitx_imx8m.h
arch/arm/dts/imx8mq-kontron-pitx-imx8m-u-boot.dtsi new file +169 -0
new file mode 100644
index 0000000000..e367b5d5df
@@ -0,0 +1,169 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include <config.h>
+
+/ {
+	binman: binman {
+		multiple-images;
+	};
+};
+
+&binman {
+	u-boot-spl-ddr {
+		filename = "u-boot-spl-ddr.bin";
+		pad-byte = <0xff>;
+		align-size = <4>;
+		align = <4>;
+
+		u-boot-spl {
+			align-end = <4>;
+		};
+
+		blob_1: blob-ext@1 {
+			filename = "lpddr4_pmu_train_1d_imem.bin";
+			size = <0x8000>;
+		};
+
+		blob_2: blob-ext@2 {
+			filename = "lpddr4_pmu_train_1d_dmem.bin";
+			size = <0x4000>;
+		};
+
+		blob_3: blob-ext@3 {
+			filename = "lpddr4_pmu_train_2d_imem.bin";
+			size = <0x8000>;
+		};
+
+		blob_4: blob-ext@4 {
+			filename = "lpddr4_pmu_train_2d_dmem.bin";
+			size = <0x4000>;
+		};
+	};
+
+	spl {
+		filename = "spl.bin";
+
+		mkimage {
+			args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
+
+			blob {
+				filename = "u-boot-spl-ddr.bin";
+			};
+
+			hdmi_firmware: blob-ext {
+				filename = "signed_hdmi_imx8m.bin";
+			};
+
+		};
+
+	};
+
+	itb {
+		filename = "u-boot.itb";
+
+		fit {
+			description = "Configuration to load ATF before U-Boot";
+			#address-cells = <1>;
+			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+
+			images {
+				uboot {
+					description = "U-Boot (64-bit)";
+					type = "standalone";
+					arch = "arm64";
+					compression = "none";
+					load = <CONFIG_SYS_TEXT_BASE>;
+
+					u-boot-nodtb {
+					};
+				};
+
+				atf {
+					description = "ARM Trusted Firmware";
+					type = "firmware";
+					arch = "arm64";
+					compression = "none";
+					load = <0x910000>;
+					entry = <0x910000>;
+
+					atf_blob: blob-ext {
+						filename = "bl31.bin";
+					};
+				};
+
+				fdt {
+					description = "imx8mq-kontron-pitx-imx8m.dtb";
+					type = "flat_dt";
+					compression = "none";
+
+					uboot_fdt_blob: blob-ext {
+						filename = "u-boot.dtb";
+					};
+				};
+			};
+
+			configurations {
+				default = "conf";
+
+				conf {
+					description = "imx8mq-kontron-pitx-imx8m.dtb";
+					firmware = "uboot";
+					loadables = "atf";
+					fdt = "fdt";
+				};
+			};
+		};
+	};
+
+	imx-boot {
+		filename = "flash.bin";
+		pad-byte = <0x00>;
+
+		spl: blob-ext@1 {
+			offset = <0x0>;
+			filename = "spl.bin";
+		};
+
+		uboot: blob-ext@2 {
+			offset = <0x57c00>;
+			filename = "u-boot.itb";
+		};
+	};
+
+	u-boot-update {
+		filename = "firmware-update.itb";
+
+		fit {
+			description = "Configuration for firmware update file";
+
+			images {
+				flash-bin {
+					description = "U-Boot flash image";
+					type = "firmware";
+					os = "u-boot";
+					arch = "arm";
+					compress = "none";
+					load = <0>; /* unused */
+
+					blob {
+						filename = "flash.bin";
+					};
+
+				};
+			};
+		};
+	};
+};
+
+&reg_usdhc2_vmmc {
+	off-on-delay-us = <0>;
+};
+
+&usdhc1 {
+	mmc-hs400-1_8v;
+};
+
+&usdhc2 {
+	sd-uhs-sdr104;
+	sd-uhs-ddr50;
+};
arch/arm/mach-imx/imx8m/Kconfig +7 -0
index 276b8bd974..6d3a4f4824 100644
@@ -108,6 +108,12 @@ config TARGET_PICO_IMX8MQ
 	select IMX8MQ
 	select IMX8M_LPDDR4
 
+config TARGET_KONTRON_PITX_IMX8M
+	bool "Support Kontron pITX-imx8m"
+	select BINMAN
+	select IMX8MQ
+	select IMX8M_LPDDR4
+
 config TARGET_VERDIN_IMX8MM
 	bool "Support Toradex Verdin iMX8M Mini module"
 	select BINMAN
@@ -166,6 +172,7 @@ source "board/freescale/imx8mn_evk/Kconfig"
 source "board/freescale/imx8mp_evk/Kconfig"
 source "board/gateworks/venice/Kconfig"
 source "board/google/imx8mq_phanbell/Kconfig"
+source "board/kontron/pitx_imx8m/Kconfig"
 source "board/kontron/sl-mx8mm/Kconfig"
 source "board/phytec/phycore_imx8mm/Kconfig"
 source "board/phytec/phycore_imx8mp/Kconfig"
board/kontron/pitx_imx8m/Kconfig new file +15 -0
new file mode 100644
index 0000000000..5dce2cd37e
@@ -0,0 +1,15 @@
+if TARGET_KONTRON_PITX_IMX8M
+
+config SYS_BOARD
+	default "pitx_imx8m"
+
+config SYS_VENDOR
+	default "kontron"
+
+config SYS_CONFIG_NAME
+	default "kontron_pitx_imx8m"
+
+config IMX_CONFIG
+	default "board/kontron/pitx_imx8m/imximage.cfg"
+
+endif
board/kontron/pitx_imx8m/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000000..aad84528e3
@@ -0,0 +1,7 @@
+Kontron pITX-imx8m Board
+M:	Heiko Thiery <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/imx8mq-kontron-pitx-imx8m*
+F:	board/kontron/pitx_imx8m/*
+F:	include/configs/kontron_pitx_imx8m.h
+F:	configs/kontron_pitx_imx8m_defconfig
board/kontron/pitx_imx8m/Makefile new file +8 -0
new file mode 100644
index 0000000000..904c480281
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier:      GPL-2.0+
+
+obj-y += pitx_imx8m.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_2gb.o lpddr4_timing_4gb.o
+endif
board/kontron/pitx_imx8m/imximage.cfg new file +5 -0
new file mode 100644
index 0000000000..4a110c8bcc
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+BOOT_FROM	sd
+SIGNED_HDMI	signed_hdmi_imx8m.bin
+LOADER		u-boot-spl-ddr.bin	0x7E1000
board/kontron/pitx_imx8m/lpddr4_timing_2gb.c new file +1853 -0

1,853 lines not on this page · raw message

board/kontron/pitx_imx8m/lpddr4_timing_4gb.c new file +1853 -0

924 lines not on this page · raw message

board/kontron/pitx_imx8m/pitx_imx8m.c new file +156 -0

156 lines not on this page · raw message

board/kontron/pitx_imx8m/spl.c new file +327 -0

327 lines not on this page · raw message

configs/kontron_pitx_imx8m_defconfig new file +87 -0

87 lines not on this page · raw message

doc/board/kontron/index.rst +1 -0
index 7dfe3d9bc0..cb1906e626 100644

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

doc/board/kontron/pitx-imx8m.rst new file +67 -0

67 lines not on this page · raw message

include/configs/kontron_pitx_imx8m.h new file +111 -0

111 lines not on this page · raw message

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

Signature · 1 line
2.30.2

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