board: phytec: phycore-imx91-93: Add phyCORE-i.MX91 support
Subsystems (3)
PATCH 1/1 board: phytec: phycore-imx91-93: Add phyCORE-i.MX91 support
As the PHYTEC phyCORE-i.MX91 [1] is just another variant of the existing PHYTEC phyCORE-i.MX93 SoM but with i.MX91 SoC populated instead, add it to the existing board-code "phycore_imx93", and rename that board to "phycore_imx91_93" to reflect the dual SoCs support. While at it, also rename and change common files accordingly. This way i.MX91 and i.MX93 SoC variants of the phyCORE SoM share most of the code and documentation without duplication, while maintaining own device-tree and defconfigs for each CPU variant.
Supported features:
- 1GB LPDDR4 RAM
- Debug UART
- EEPROM
- eMMC
- Ethernet
- SD-card
- USB
Product page SoM:
[1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-91-93/
---
...imx91-93-phyboard-segin-common-u-boot.dtsi | 228 ++
arch/arm/dts/imx91-phyboard-segin-u-boot.dtsi | 18 +
arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi | 221 +-
arch/arm/mach-imx/imx9/Kconfig | 10 +-
arch/arm/mach-imx/imx9/soc.c | 3 +-
board/phytec/common/Kconfig | 6 +-
board/phytec/common/Makefile | 2 +-
...m_detection.c => imx91_93_som_detection.c} | 39 +-
board/phytec/common/imx91_93_som_detection.h | 51 +
board/phytec/common/imx93_som_detection.h | 51 -
board/phytec/phycore_imx91_93/Kconfig | 47 +
board/phytec/phycore_imx91_93/MAINTAINERS | 16 +
.../Makefile | 9 +-
.../phycore_imx91_93/lpddr4_timing_imx91.c | 1998 +++++++++++++++++
.../lpddr4_timing_imx93.c} | 0
.../phycore-imx91-93.c} | 8 +-
.../phycore_imx91_93.env} | 2 +
.../{phycore_imx93 => phycore_imx91_93}/spl.c | 46 +-
board/phytec/phycore_imx93/Kconfig | 41 -
board/phytec/phycore_imx93/MAINTAINERS | 12 -
configs/imx91-phycore_defconfig | 167 ++
configs/imx93-phycore_defconfig | 2 +-
...imx93-phycore.rst => imx91-93-phycore.rst} | 38 +-
doc/board/phytec/index.rst | 2 +-
.../{phycore_imx93.h => phycore_imx91_93.h} | 6 +-
25 files changed, 2637 insertions(+), 386 deletions(-)
create mode 100644 arch/arm/dts/imx91-93-phyboard-segin-common-u-boot.dtsi
create mode 100644 arch/arm/dts/imx91-phyboard-segin-u-boot.dtsi
rename board/phytec/common/{imx93_som_detection.c => imx91_93_som_detection.c} (56%)
create mode 100644 board/phytec/common/imx91_93_som_detection.h
delete mode 100644 board/phytec/common/imx93_som_detection.h
create mode 100644 board/phytec/phycore_imx91_93/Kconfig
create mode 100644 board/phytec/phycore_imx91_93/MAINTAINERS
rename board/phytec/{phycore_imx93 => phycore_imx91_93}/Makefile (58%)
create mode 100644 board/phytec/phycore_imx91_93/lpddr4_timing_imx91.c
rename board/phytec/{phycore_imx93/lpddr4_timing.c => phycore_imx91_93/lpddr4_timing_imx93.c} (100%)
rename board/phytec/{phycore_imx93/phycore-imx93.c => phycore_imx91_93/phycore-imx91-93.c} (90%)
rename board/phytec/{phycore_imx93/phycore_imx93.env => phycore_imx91_93/phycore_imx91_93.env} (94%)
rename board/phytec/{phycore_imx93 => phycore_imx91_93}/spl.c (75%)
delete mode 100644 board/phytec/phycore_imx93/Kconfig
delete mode 100644 board/phytec/phycore_imx93/MAINTAINERS
create mode 100644 configs/imx91-phycore_defconfig
rename doc/board/phytec/{imx93-phycore.rst => imx91-93-phycore.rst} (52%)
rename include/configs/{phycore_imx93.h => phycore_imx91_93.h} (88%)arch/arm/dts/imx91-93-phyboard-segin-common-u-boot.dtsi new file +228 -0
@@ -0,0 +1,228 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2026 PHYTEC Messtechnik GmbH + * Author: Primoz Fiser <[email protected]> + * + */ + +/ { + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog3>; + bootph-pre-ram; + bootph-some-ram; + }; + + aliases { + ethernet0 = &fec; + ethernet1 = &eqos; + }; + + bootstd { + bootph-verify; + compatible = "u-boot,boot-std"; + + filename-prefixes = "/", "/boot/"; + bootdev-order = "mmc0", "mmc1", "ethernet"; + + rauc { + compatible = "u-boot,distro-rauc"; + }; + + script { + compatible = "u-boot,script"; + }; + }; + + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; +}; + +&{/soc@0} { + bootph-all; + bootph-pre-ram; +}; + +&aips1 { + bootph-pre-ram; + bootph-all; +}; + +&aips2 { + bootph-pre-ram; + bootph-some-ram; +}; + +&aips3 { + bootph-pre-ram; + bootph-some-ram; +}; + +&iomuxc { + bootph-pre-ram; + bootph-some-ram; +}; + +®_usdhc2_vmmc { + u-boot,off-on-delay-us = <20000>; + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_lpi2c3 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_pmic { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_reg_usdhc2_vmmc { + bootph-pre-ram; +}; + +&pinctrl_uart1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc1_100mhz { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc1_200mhz { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2_cd { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2_default { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2_100mhz { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2_200mhz { + bootph-pre-ram; + bootph-some-ram; +}; + +&gpio1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&gpio2 { + bootph-pre-ram; + bootph-some-ram; +}; + +&gpio3 { + bootph-pre-ram; + bootph-some-ram; +}; + +&gpio4 { + bootph-pre-ram; + bootph-some-ram; +}; + +&lpuart1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&usdhc1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&usdhc2 { + bootph-pre-ram; + bootph-some-ram; + fsl,signal-voltage-switch-extra-delay-ms = <8>; +}; + +&lpi2c1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&lpi2c2 { + bootph-pre-ram; + bootph-some-ram; +}; + +&lpi2c3 { + bootph-pre-ram; + bootph-some-ram; + + pmic@25 { + bootph-pre-ram; + bootph-some-ram; + + regulators { + bootph-pre-ram; + bootph-some-ram; + }; + }; + + eeprom@50 { + bootph-pre-ram; + bootph-some-ram; + }; +}; + +&s4muap { + bootph-pre-ram; + bootph-some-ram; + status = "okay"; +}; + +&clk { + bootph-all; + bootph-pre-ram; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-rates; + /delete-property/ assigned-clock-parents; +}; + +&osc_32k { + bootph-all; + bootph-pre-ram; +}; + +&osc_24m { + bootph-all; + bootph-pre-ram; +}; + +&clk_ext1 { + bootph-all; + bootph-pre-ram; +}; + +&wdog3 { + bootph-all; + bootph-pre-ram; +};
arch/arm/dts/imx91-phyboard-segin-u-boot.dtsi new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2026 PHYTEC Messtechnik GmbH + * Author: Primoz Fiser <[email protected]> + * + */ + +#include "imx91-u-boot.dtsi" +#include "imx91-93-phyboard-segin-common-u-boot.dtsi" + +/ { + /* + * The phyCORE-i.MX91 u-boot uses the imx91-phyboard-segin.dts as + * reference, but does only make use of its SoM (phyCORE) contained + * periphery. + */ + model = "PHYTEC phyCORE-i.MX91"; +};
arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi +1 -220
231 lines not on this page · raw message
arch/arm/mach-imx/imx9/Kconfig +9 -1
@@ -120,6 +120,14 @@ config TARGET_KONTRON_MX93 Kontron Electronics BL i.MX93 using SoM module conformant to OSM standard 1.1 size S. +config TARGET_PHYCORE_IMX91 + bool "phycore_imx91" + select IMX91 + select IMX9_LPDDR4X + imply OF_UPSTREAM + select OF_BOARD_FIXUP + select OF_BOARD_SETUP + config TARGET_PHYCORE_IMX93 bool "phycore_imx93" select IMX93
@@ -161,7 +169,7 @@ source "board/nxp/imx93_evk/Kconfig" source "board/nxp/imx93_frdm/Kconfig" source "board/nxp/imx93_qsb/Kconfig" source "board/kontron/osm-s-mx93/Kconfig" -source "board/phytec/phycore_imx93/Kconfig" +source "board/phytec/phycore_imx91_93/Kconfig" source "board/variscite/imx93_var_som/Kconfig" source "board/nxp/imx94_evk/Kconfig" source "board/nxp/imx95_evk/Kconfig"
arch/arm/mach-imx/imx9/soc.c +2 -1
@@ -664,7 +664,8 @@ int low_drive_freq_update(void *blob)return 0 ; } -#if defined(CONFIG_OF_BOARD_FIXUP) && !defined(CONFIG_TARGET_PHYCORE_IMX93) +#if defined(CONFIG_OF_BOARD_FIXUP) && !defined(CONFIG_TARGET_PHYCORE_IMX93) && \ + !defined(CONFIG_TARGET_PHYCORE_IMX91) #ifndef CONFIG_XPL_BUILD int board_fix_fdt(void *fdt) {
board/phytec/common/Kconfig +3 -3
@@ -19,13 +19,13 @@ config PHYTEC_IMX8M_SOM_DETECTION Support of I2C EEPROM based SoM detection. Supported for PHYTEC i.MX8MM/i.MX8MP boards -config PHYTEC_IMX93_SOM_DETECTION - bool "Support SoM detection for i.MX93 PHYTEC platforms" +config PHYTEC_IMX91_93_SOM_DETECTION + bool "Support SoM detection for i.MX91/93 PHYTEC platforms" depends on ARCH_IMX9 && PHYTEC_SOM_DETECTION default y help Support of I2C EEPROM based SoM detection. Supported - for PHYTEC i.MX93 based boards + for PHYTEC i.MX91/93 based boards config PHYTEC_AM62_SOM_DETECTION bool "Support SoM detection for AM62x PHYTEC platforms"
board/phytec/common/Makefile +1 -1
@@ -10,4 +10,4 @@ endif obj-y += phytec_som_detection.o phytec_som_detection_blocks.o obj-$(CONFIG_ARCH_K3) += am6_som_detection.o k3/ obj-$(CONFIG_ARCH_IMX8M) += imx8m_som_detection.o -obj-$(CONFIG_ARCH_IMX9) += imx93_som_detection.o +obj-$(CONFIG_ARCH_IMX9) += imx91_93_som_detection.o
board/phytec/common/imx91_93_som_detection.c renamed from board/phytec/common/imx93_som_detection.c +21 -18
@@ -10,18 +10,19 @@#include <i2c.h> #include <u-boot/crc.h> -#include "imx93_som_detection.h" +#include "imx91_93_som_detection.h" extern struct phytec_eeprom_data eeprom_data; -#if IS_ENABLED (CONFIG_PHYTEC_IMX93_SOM_DETECTION ) +#if IS_ENABLED (CONFIG_PHYTEC_IMX91_93_SOM_DETECTION )/* Check if the SoM is actually one of the following products: +* - i.MX91 * - i.MX93 * * Returns 0 in case it's a known SoM. Otherwise, returns 1. */ -u8 __maybe_unused phytec_imx93_detect (struct phytec_eeprom_data *data) +u8 __maybe_unused phytec_imx91_93_detect (struct phytec_eeprom_data *data) {u8 som;
@@ -35,7 +36,7 @@ u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data) som = data->payload.data.data_api2.som_no;debug ("%s: som id: %u\n" , __func__, som); -if (som ==PHYTEC_IMX93_SOM &&is_imx93 ()) +if (som ==PHYTEC_IMX91_93_SOM && (is_imx91 () ||is_imx93 ()))return 0 ;pr_err ("%s: SoM ID does not match. Wrong EEPROM data?\n" , __func__);
@@ -43,15 +44,15 @@ u8 __maybe_unused phytec_imx93_detect(struct phytec_eeprom_data *data) }/* -* Filter PHYTEC i.MX93 SoM options by option index +* Filter PHYTEC i.MX91/93 SoM options by option index * * Returns: * - option value * - PHYTEC_EEPROM_INVAL when the data is invalid * */ -u8 __maybe_unused phytec_imx93_get_opt (struct phytec_eeprom_data *data, -enum phytec_imx93_option_index idx) +u8 __maybe_unused phytec_imx91_93_get_opt (struct phytec_eeprom_data *data, +enum phytec_imx91_93_option_index idx) {char *opt;u8 opt_id;
@@ -73,39 +74,41 @@ u8 __maybe_unused phytec_imx93_get_opt(struct phytec_eeprom_data *data, }/* -* Filter PHYTEC i.MX93 SoM voltage +* Filter PHYTEC i.MX91/93 SoM voltage * * Returns: -* - PHYTEC_IMX93_VOLTAGE_1V8 or PHYTEC_IMX93_VOLTAGE_3V3 +* - PHYTEC_IMX91_93_VOLTAGE_1V8 or PHYTEC_IMX91_93_VOLTAGE_3V3 * - PHYTEC_EEPROM_INVAL when the data is invalid * */ -enum phytec_imx93_voltage __maybe_unused phytec_imx93_get_voltage (struct phytec_eeprom_data *data) +enum phytec_imx91_93_voltage __maybe_unused +phytec_imx91_93_get_voltage (struct phytec_eeprom_data *data) { -u8 option =phytec_imx93_get_opt (data,PHYTEC_IMX93_OPT_FEAT ); +u8 option =phytec_imx91_93_get_opt (data,PHYTEC_IMX91_93_OPT_FEAT );if (option ==PHYTEC_EEPROM_INVAL ) -return PHYTEC_IMX93_VOLTAGE_INVALID ; -return (option &0x01 ) ?PHYTEC_IMX93_VOLTAGE_1V8 :PHYTEC_IMX93_VOLTAGE_3V3 ; +return PHYTEC_IMX91_93_VOLTAGE_INVALID ; +return (option &0x01 ) ?PHYTEC_IMX91_93_VOLTAGE_1V8 : +PHYTEC_IMX91_93_VOLTAGE_3V3 ; }#else -inline u8 __maybe_unused phytec_imx93_detect (struct phytec_eeprom_data *data) +inline u8 __maybe_unused phytec_imx91_93_detect (struct phytec_eeprom_data *data) {return 1 ; } -inline u8 __maybe_unused phytec_imx93_get_opt (struct phytec_eeprom_data *data, -enum phytec_imx93_option_index idx) +inline u8 __maybe_unused phytec_imx91_93_get_opt (struct phytec_eeprom_data *data, +enum phytec_imx91_93_option_index idx) {return PHYTEC_EEPROM_INVAL ; } -inline enum phytec_imx93_voltage __maybe_unused phytec_imx93_get_voltage +inline enum phytec_imx91_93_voltage __maybe_unused phytec_imx91_93_get_voltage (struct phytec_eeprom_data *data) {return PHYTEC_EEPROM_INVAL ; } -#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX93_SOM_DETECTION) */ +#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX91_93_SOM_DETECTION) */
board/phytec/common/imx91_93_som_detection.h new file +51 -0
51 lines not on this page · raw message
board/phytec/common/imx93_som_detection.h deleted +0 -51
51 lines not on this page · raw message
board/phytec/phycore_imx91_93/Kconfig new file +47 -0
47 lines not on this page · raw message
board/phytec/phycore_imx91_93/MAINTAINERS new file +16 -0
@@ -0,0 +1,16 @@ +phyCORE-i.MX91/93 +M: Mathieu Othacehe <[email protected]> +R: Christoph Stoidner <[email protected]> +L: [email protected] +W: https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-91-93/ +S: Maintained +F: arch/arm/dts/imx91-93-phyboard-segin-common-u-boot.dtsi +F: arch/arm/dts/imx91-phyboard-segin-u-boot.dtsi +F: arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi +F: board/phytec/phycore_imx91_93/ +F: board/phytec/common/imx91_93_som_detection.c +F: board/phytec/common/imx91_93_som_detection.h +F: configs/imx91-phycore_defconfig +F: configs/imx93-phycore_defconfig +F: include/configs/phycore_imx91_93.h +F: doc/board/phytec/imx91-93-phycore.rst
board/phytec/phycore_imx91_93/Makefile renamed from board/phytec/phycore_imx93/Makefile +7 -2
@@ -7,8 +7,13 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += phycore-imx93.o +obj-y += phycore-imx91-93.o ifdef CONFIG_XPL_BUILD -obj-y += spl.o lpddr4_timing.o +obj-y += spl.o +ifdef CONFIG_IMX91 +obj-$(CONFIG_IMX9_LPDDR4X) += lpddr4_timing_imx91.o +else +obj-$(CONFIG_IMX9_LPDDR4X) += lpddr4_timing_imx93.o +endif endif
board/phytec/phycore_imx91_93/lpddr4_timing_imx91.c new file +1998 -0
1,998 lines not on this page · raw message
board/phytec/phycore_imx91_93/lpddr4_timing_imx93.c renamed from board/phytec/phycore_imx93/lpddr4_timing.c +0 -0
board/phytec/phycore_imx91_93/phycore-imx91-93.c renamed from board/phytec/phycore_imx93/phycore-imx93.c +4 -4
@@ -11,7 +11,7 @@#include <env.h> #include <fdt_support.h> -#include "../common/imx93_som_detection.h" +#include "../common/imx91_93_som_detection.h" #define EEPROM_ADDR 0x50
@@ -55,13 +55,13 @@ int board_late_init(void)static void emmc_fixup (void *blob,struct phytec_eeprom_data *data) { -enum phytec_imx93_voltage voltage =phytec_imx93_get_voltage (data); +enum phytec_imx91_93_voltage voltage =phytec_imx91_93_get_voltage (data);int offset; -if (voltage ==PHYTEC_IMX93_VOLTAGE_INVALID ) +if (voltage ==PHYTEC_IMX91_93_VOLTAGE_INVALID ) goto err; -if (voltage ==PHYTEC_IMX93_VOLTAGE_1V8 ) { +if (voltage ==PHYTEC_IMX91_93_VOLTAGE_1V8 ) { offset =fdt_node_offset_by_compat_reg (blob,"fsl,imx93-usdhc" ,0x42850000 );if (offset)
board/phytec/phycore_imx91_93/phycore_imx91_93.env renamed from board/phytec/phycore_imx93/phycore_imx93.env +2 -0
@@ -9,6 +9,8 @@ fdtoverlay_addr_r=0x900c0000 ip_dyn=yes kernel_addr_r=0x88000000 nfsroot=/srv/nfs +#ifdef CONFIG_IMX93 prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted" +#endif scriptaddr=0x83500000 sd_dev=1 /* This is needed by built-in uuu flash scripts */
board/phytec/phycore_imx91_93/spl.c renamed from board/phytec/phycore_imx93/spl.c +27 -19
83 lines not on this page · raw message
board/phytec/phycore_imx93/Kconfig deleted +0 -41
41 lines not on this page · raw message
board/phytec/phycore_imx93/MAINTAINERS deleted +0 -12
@@ -1,12 +0,0 @@ -phyCORE-i.MX93 -M: Mathieu Othacehe <[email protected]> -R: Christoph Stoidner <[email protected]> -L: [email protected] -W: https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-91-93/ -S: Maintained -F: arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi -F: board/phytec/phycore_imx93/ -F: board/phytec/common/imx93_som_detection.c -F: board/phytec/common/imx93_som_detection.h -F: configs/imx93-phycore_defconfig -F: include/configs/phycore_imx93.h
configs/imx91-phycore_defconfig new file +167 -0
25 lines not on this page · raw message
doc/board/phytec/imx91-93-phycore.rst renamed from doc/board/phytec/imx93-phycore.rst +30 -8
Lines of this file are not shown. View the raw message.
include/configs/phycore_imx91_93.h renamed from include/configs/phycore_imx93.h +3 -3
Lines of this file are not shown. View the 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.