Skip to contentSkip to conversation

board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support

PATCH New Heiko Thiery 2 participants 2 messages Jan 31, 2022 – Feb 5, 2022

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

PATCH v9 1/1 board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support

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

---
v9:
- add spl_board_loader_name
- enable CONFIG_DM_SERIAL

changes due to internal review (thanks to Michael)
- refactor getcd
- create new file pitx_misc. for board variant detection
- remove atheros PHY specific init code (we use a TI PHY)
- remove board_fit_config_name_match
- disable/remove spl_board_init
- convert several config options to kconfig
- CONFIG_SPL_LIBCOMMON_SUPPORT
- CONFIG_SPL_LIBGENERIC_SUPPORT
- CONFIG_SPL_MMC
- CONFIG_SPL_DRIVERS_MISC
- CONFIG_IMX_BOOTAUX
- CONFIG_SPL_I2C
- CONFIG_SPL_POWER
- CONFIG_SPL_WATCHDOG
- CONFIG_PHY_GIGE
- CONFIG_FEC_MXC
- CONFIG_MII

v8:
- use only one commit for board support including linux upstream dts
- this includes the board dts from linux v5.16
- use common imx8mq-u-boot.dtsi
- save environment boot device dependent
- if boot from eMMC: save to eMMC boot partion 1
- if boot from SD: save to SD card partion 0
- get rid of unneeded off-on-delay-us for req_usdhc2_vmmc node

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

 arch/arm/dts/Makefile                         |    3 +-
 .../dts/imx8mq-kontron-pitx-imx8m-u-boot.dtsi |   12 +
 arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts    |  612 ++++++
 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/lpddr4_timing_2gb.c  | 1853 +++++++++++++++++
 board/kontron/pitx_imx8m/lpddr4_timing_4gb.c  | 1853 +++++++++++++++++
 board/kontron/pitx_imx8m/pitx_imx8m.c         |  169 ++
 board/kontron/pitx_imx8m/pitx_misc.c          |   38 +
 board/kontron/pitx_imx8m/pitx_misc.h          |    6 +
 board/kontron/pitx_imx8m/spl.c                |  299 +++
 configs/kontron_pitx_imx8m_defconfig          |   97 +
 doc/board/kontron/index.rst                   |    1 +
 doc/board/kontron/pitx-imx8m.rst              |   67 +
 include/configs/kontron_pitx_imx8m.h          |   97 +
 17 files changed, 5143 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx8mq-kontron-pitx-imx8m-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts
 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/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/pitx_misc.c
 create mode 100644 board/kontron/pitx_imx8m/pitx_misc.h
 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/Makefile +2 -1
index 5d45d19481..8992b9c668 100644
@@ -916,7 +916,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-u-boot.dtsi new file +12 -0
new file mode 100644
index 0000000000..6f9c81462e
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include "imx8mq-u-boot.dtsi"
+
+&usdhc1 {
+	mmc-hs400-1_8v;
+};
+
+&usdhc2 {
+	sd-uhs-sdr104;
+	sd-uhs-ddr50;
+};
arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts new file +612 -0

612 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +7 -0
index d6a869068a..217c939b3c 100644
@@ -112,6 +112,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
@@ -172,6 +178,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..ca1cec761a
@@ -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 "arch/arm/mach-imx/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..6ebe5d0770
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y += pitx_imx8m.o pitx_misc.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o pitx_misc.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing_2gb.o lpddr4_timing_4gb.o
+endif
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

465 lines not on this page · raw message

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

169 lines not on this page · raw message

board/kontron/pitx_imx8m/pitx_misc.c new file +38 -0
new file mode 100644
index 0000000000..48b29c4bd3

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

board/kontron/pitx_imx8m/pitx_misc.h new file +6 -0
new file mode 100644
index 0000000000..63d941a04a

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

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

299 lines not on this page · raw message

configs/kontron_pitx_imx8m_defconfig new file +97 -0

97 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 +97 -0

97 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.

#1 lore raw

PATCH v9 1/1 board: kontron: pitx-imx8m: Add Kontron pitx-imx8m board support

Quoted 2 lines

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

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================