Skip to contentSkip to conversation

Add FRDM-IMX91 initial support

PATCH Superseded Joseph Guo 4 participants 11 messages Dec 2, 2025 – Dec 5, 2025

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Joseph Guo

author
#0 lore raw

v2 cover Add FRDM-IMX91 initial support

This series add initial support for the FRDM i.MX91 11x11 development board in U-Boot:
https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-IMX91

Include:
- Device tree for the board.
- Defconfig and Kconfig for the board.
- Header file defining memory layout and hadware addresses.

The board devicetree already attempted to upstream, but not been accepted yet:
https://lore.kernel.org/all/[email protected]/

---
Changes in v2:
- add upstream link
- rename 'vrpi' to 'vexp' to keep align with upstream dts
- move bootph- property from u-boot.dtsi to dts
- correct commit message 'EVK' to 'FRDM'
- use #include in ecc config file to avoid duplication
- add ecc description in README
- drop extraneous includes
- rename 'imx91_frdm.rst' to 'imx91_11x11_frdm.rst'
- drop IMX91_FRDM_LPDDR4 symbol
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Joseph Guo (2):
arm64: dts: add NXP FRDM-IMX91 device tree
imx: Support i.MX91 11x11 FRDM board

 arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi          |   51 +
 arch/arm/dts/imx91-11x11-frdm.dts                  |  767 ++++++++
 arch/arm/mach-imx/imx9/Kconfig                     |    9 +
 board/freescale/imx91_frdm/Kconfig                 |   12 +
 board/freescale/imx91_frdm/MAINTAINERS             |    7 +
 board/freescale/imx91_frdm/Makefile                |   16 +
 board/freescale/imx91_frdm/imx91_frdm.c            |   25 +
 board/freescale/imx91_frdm/imx91_frdm.env          |   88 +
 .../imx91_frdm/lpddr4_2400mts_1gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_2gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_1gb_timing.c     | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_2gb_timing.c     | 1996 ++++++++++++++++++++
 board/freescale/imx91_frdm/lpddr4_timing.h         |   12 +
 board/freescale/imx91_frdm/spl.c                   |  193 ++
 configs/imx91_11x11_frdm_defconfig                 |  143 ++
 configs/imx91_11x11_frdm_inline_ecc_defconfig      |    3 +
 doc/board/nxp/imx91_11x11_frdm.rst                 |  100 +
 doc/board/nxp/index.rst                            |    1 +
 include/configs/imx91_frdm.h                       |   25 +
 19 files changed, 9436 insertions(+)

---
base-commit: e199db57c00ba2c2aba81069800126b6543a644c
change-id: 20251117-imx91_frdm-7a2db95f279d

Best regards,

Signature · 1 line
Joseph Guo <[email protected]>
author
#1 lore raw

PATCH v2 1/2 arm64: dts: add NXP FRDM-IMX91 device tree

Add the device tree files for the FRDM-IMX91 board. Provide the initial DT support for FRDM-IMX91.

The board devicetree already attempted to upstream, but not been accepted yet:
https://lore.kernel.org/all/[email protected]/

Once it complete, can move to OF_UPSTREAM

---
Changes in v2:
- add upstream link
- rename 'vrpi' to 'vexp' to keep align with upstream dts
- add bootph- property

---
 arch/arm/dts/imx91-11x11-frdm.dts | 767 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 767 insertions(+)
arch/arm/dts/imx91-11x11-frdm.dts new file +767 -0
new file mode 100644
index 0000000000000000000000000000000000000000..148c4f05d61b4394cab26edc068aab526927d0d8
@@ -0,0 +1,767 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 NXP
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/usb/pd.h>
+#include "imx91.dtsi"
+
+/ {
+	compatible = "fsl,imx91-11x11-frdm", "fsl,imx91";
+	model = "NXP i.MX91 11X11 FRDM board";
+
+	aliases {
+		ethernet0 = &fec;
+		ethernet1 = &eqos;
+		rtc0 = &pcf2131;
+	};
+
+	chosen {
+		stdout-path = &lpuart1;
+	};
+
+	reg_vref_1v8: regulator-adc-vref {
+		compatible = "regulator-fixed";
+		regulator-max-microvolt = <1800000>;
+		regulator-min-microvolt = <1800000>;
+		regulator-name = "vref_1v8";
+	};
+
+	reg_usdhc2_vmmc: regulator-usdhc2 {
+		compatible = "regulator-fixed";
+		off-on-delay-us = <12000>;
+		pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+		pinctrl-names = "default";
+		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <3300000>;
+		regulator-name = "VSD_3V3";
+		gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	reg_vdd_12v: regulator-vdd-12v {
+		compatible = "regulator-fixed";
+		regulator-max-microvolt = <12000000>;
+		regulator-min-microvolt = <12000000>;
+		regulator-name = "reg_vdd_12v";
+		gpio = <&pcal6524 14 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reg_vexp_3v3: regulator-vexp-3v3 {
+		compatible = "regulator-fixed";
+		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <3300000>;
+		regulator-name = "VEXP_3V3";
+		vin-supply = <&buck4>;
+		gpio = <&pcal6524 2 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reg_vexp_5v: regulator-vexp-5v {
+		compatible = "regulator-fixed";
+		regulator-max-microvolt = <5000000>;
+		regulator-min-microvolt = <5000000>;
+		regulator-name = "VEXP_5V";
+		gpio = <&pcal6524 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reserved-memory {
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		linux,cma {
+			compatible = "shared-dma-pool";
+			alloc-ranges = <0 0x80000000 0 0x40000000>;
+			reusable;
+			size = <0 0x10000000>;
+			linux,cma-default;
+		};
+	};
+};
+
+&{/soc@0} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&adc1 {
+	vref-supply = <&reg_vref_1v8>;
+	status = "okay";
+};
+
+&aips1 {
+	bootph-pre-ram;
+	bootph-all;
+};
+
+&aips2 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&aips3 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&clk {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&clk_ext1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&eqos {
+	phy-handle = <&ethphy1>;
+	phy-mode = "rgmii-id";
+	pinctrl-0 = <&pinctrl_eqos>;
+	pinctrl-1 = <&pinctrl_eqos_sleep>;
+	pinctrl-names = "default", "sleep";
+	status = "okay";
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-frequency = <5000000>;
+
+		ethphy1: ethernet-phy@1 {
+			reg = <1>;
+			eee-broken-1000t;
+		};
+	};
+};
+
+&fec {
+	phy-handle = <&ethphy2>;
+	phy-mode = "rgmii-id";
+	pinctrl-0 = <&pinctrl_fec>;
+	pinctrl-1 = <&pinctrl_fec_sleep>;
+	pinctrl-names = "default", "sleep";
+	fsl,magic-packet;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clock-frequency = <5000000>;
+
+		ethphy2: ethernet-phy@2 {
+			reg = <2>;
+			eee-broken-1000t;
+		};
+	};
+};
+
+&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;
+};
+
+&lpi2c1 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&lpi2c2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	clock-frequency = <400000>;
+	pinctrl-0 = <&pinctrl_lpi2c2>;
+	pinctrl-names = "default";
+	status = "okay";
+	bootph-pre-ram;
+	bootph-some-ram;
+
+	pcal6524: gpio@22 {
+		compatible = "nxp,pcal6524";
+		reg = <0x22>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		interrupt-parent = <&gpio3>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		pinctrl-0 = <&pinctrl_pcal6524>;
+		pinctrl-names = "default";
+	};
+
+	pmic@25 {
+		compatible = "nxp,pca9451a";
+		reg = <0x25>;
+		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-parent = <&pcal6524>;
+		bootph-pre-ram;
+		bootph-some-ram;
+
+		regulators {
+			bootph-pre-ram;
+			bootph-some-ram;
+
+			buck1: BUCK1 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <2237500>;
+				regulator-min-microvolt = <650000>;
+				regulator-name = "BUCK1";
+				regulator-ramp-delay = <3125>;
+			};
+
+			buck2: BUCK2 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <2187500>;
+				regulator-min-microvolt = <600000>;
+				regulator-name = "BUCK2";
+				regulator-ramp-delay = <3125>;
+			};
+
+			buck4: BUCK4 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3400000>;
+				regulator-min-microvolt = <600000>;
+				regulator-name = "BUCK4";
+			};
+
+			buck5: BUCK5 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3400000>;
+				regulator-min-microvolt = <600000>;
+				regulator-name = "BUCK5";
+			};
+
+			buck6: BUCK6 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3400000>;
+				regulator-min-microvolt = <600000>;
+				regulator-name = "BUCK6";
+			};
+
+			ldo1: LDO1 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3300000>;
+				regulator-min-microvolt = <1600000>;
+				regulator-name = "LDO1";
+			};
+
+			ldo4: LDO4 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3300000>;
+				regulator-min-microvolt = <800000>;
+				regulator-name = "LDO4";
+			};
+
+			ldo5: LDO5 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-max-microvolt = <3300000>;
+				regulator-min-microvolt = <1800000>;
+				regulator-name = "LDO5";
+			};
+		};
+	};
+
+	eeprom: at24c256@50 {
+		compatible = "atmel,24c256";
+		reg = <0x50>;
+		pagesize = <64>;
+	};
+};
+
+&lpi2c3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	clock-frequency = <400000>;
+	pinctrl-0 = <&pinctrl_lpi2c3>;
+	pinctrl-names = "default";
+	status = "okay";
+	bootph-pre-ram;
+	bootph-some-ram;
+
+	ptn5110: tcpc@50 {
+		compatible = "nxp,ptn5110", "tcpci";
+		reg = <0x50>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-parent = <&gpio3>;
+		status = "okay";
+
+		typec1_con: connector {
+			compatible = "usb-c-connector";
+			data-role = "dual";
+			label = "USB-C";
+			op-sink-microwatt = <15000000>;
+			power-role = "dual";
+			self-powered;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			try-power-role = "sink";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					typec1_dr_sw: endpoint {
+						remote-endpoint = <&usb1_drd_sw>;
+					};
+				};
+			};
+		};
+	};
+
+	pcf2131: rtc@53 {
+		compatible = "nxp,pcf2131";
+		reg = <0x53>;
+		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-parent = <&pcal6524>;
+		status = "okay";
+	};
+};
+
+&lpuart1 {
+	pinctrl-0 = <&pinctrl_uart1>;
+	pinctrl-names = "default";
+	status = "okay";
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&lpuart5 {
+	pinctrl-0 = <&pinctrl_uart5>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&osc_32k {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&osc_24m {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&usbotg1 {
+	adp-disable;
+	disable-over-current;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	usb-role-switch;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	status = "okay";
+
+	port {
+		usb1_drd_sw: endpoint {
+			remote-endpoint = <&typec1_dr_sw>;
+		};
+	};
+};
+
+&usbotg2 {
+	disable-over-current;
+	dr_mode = "host";
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	status = "okay";
+};
+
+&usdhc1 {
+	bus-width = <8>;
+	non-removable;
+	pinctrl-0 = <&pinctrl_usdhc1>;
+	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+	status = "okay";
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&usdhc2 {
+	bus-width = <4>;
+	cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
+	no-mmc;
+	no-sdio;
+	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+	pinctrl-3 = <&pinctrl_usdhc2_sleep>, <&pinctrl_usdhc2_gpio_sleep>;
+	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
+	vmmc-supply = <&reg_usdhc2_vmmc>;
+	status = "okay";
+};
+
+&wdog3 {
+	fsl,ext-reset-output;
+	status = "okay";
+};
+
+&iomuxc {
+	bootph-pre-ram;
+	bootph-some-ram;
+
+	pinctrl_eqos: eqosgrp {
+		fsl,pins = <
+			MX91_PAD_ENET1_MDC__ENET1_MDC				0x57e
+			MX91_PAD_ENET1_MDIO__ENET_QOS_MDIO			0x57e
+			MX91_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0			0x57e
+			MX91_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1			0x57e
+			MX91_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2			0x57e
+			MX91_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3			0x57e
+			MX91_PAD_ENET1_RXC__ENET_QOS_RGMII_RXC	0x5fe
+			MX91_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL		0x57e
+			MX91_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0			0x57e
+			MX91_PAD_ENET1_TD1__ENET1_RGMII_TD1			0x57e
+			MX91_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2			0x57e
+			MX91_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3			0x57e
+			MX91_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK	0x5fe
+			MX91_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL		0x57e
+		>;
+	};
+
+	pinctrl_eqos_sleep: eqossleepgrp {
+		fsl,pins = <
+			MX91_PAD_ENET1_MDC__GPIO4_IO0				0x31e
+			MX91_PAD_ENET1_MDIO__GPIO4_IO1				0x31e
+			MX91_PAD_ENET1_RD0__GPIO4_IO10				0x31e
+			MX91_PAD_ENET1_RD1__GPIO4_IO11				0x31e
+			MX91_PAD_ENET1_RD2__GPIO4_IO12				0x31e
+			MX91_PAD_ENET1_RD3__GPIO4_IO13				0x31e
+			MX91_PAD_ENET1_RXC__GPIO4_IO9				0x31e
+			MX91_PAD_ENET1_RX_CTL__GPIO4_IO8			0x31e
+			MX91_PAD_ENET1_TD0__GPIO4_IO5				0x31e
+			MX91_PAD_ENET1_TD1__GPIO4_IO4				0x31e
+			MX91_PAD_ENET1_TD2__GPIO4_IO3				0x31e
+			MX91_PAD_ENET1_TD3__GPIO4_IO2				0x31e
+			MX91_PAD_ENET1_TXC__GPIO4_IO7				0x31e
+			MX91_PAD_ENET1_TX_CTL__GPIO4_IO6			0x31e
+		>;
+	};
+
+	pinctrl_fec: fecgrp {
+		fsl,pins = <
+			MX91_PAD_ENET2_MDC__ENET2_MDC			0x57e
+			MX91_PAD_ENET2_MDIO__ENET2_MDIO			0x57e
+			MX91_PAD_ENET2_RD0__ENET2_RGMII_RD0		0x57e
+			MX91_PAD_ENET2_RD1__ENET2_RGMII_RD1		0x57e
+			MX91_PAD_ENET2_RD2__ENET2_RGMII_RD2		0x57e
+			MX91_PAD_ENET2_RD3__ENET2_RGMII_RD3		0x57e
+			MX91_PAD_ENET2_RXC__ENET2_RGMII_RXC		0x5fe
+			MX91_PAD_ENET2_RX_CTL__ENET2_RGMII_RX_CTL	0x57e
+			MX91_PAD_ENET2_TD0__ENET2_RGMII_TD0		0x57e
+			MX91_PAD_ENET2_TD1__ENET2_RGMII_TD1		0x57e
+			MX91_PAD_ENET2_TD2__ENET2_RGMII_TD2		0x57e
+			MX91_PAD_ENET2_TD3__ENET2_RGMII_TD3		0x57e
+			MX91_PAD_ENET2_TXC__ENET2_RGMII_TXC		0x5fe
+			MX91_PAD_ENET2_TX_CTL__ENET2_RGMII_TX_CTL	0x57e
+		>;
+	};
+
+	pinctrl_fec_sleep: fecsleepgrp {
+		fsl,pins = <
+			MX91_PAD_ENET2_MDC__GPIO4_IO14			0x51e
+			MX91_PAD_ENET2_MDIO__GPIO4_IO15			0x51e
+			MX91_PAD_ENET2_RD0__GPIO4_IO24			0x51e
+			MX91_PAD_ENET2_RD1__GPIO4_IO25			0x51e
+			MX91_PAD_ENET2_RD2__GPIO4_IO26			0x51e
+			MX91_PAD_ENET2_RD3__GPIO4_IO27			0x51e
+			MX91_PAD_ENET2_RXC__GPIO4_IO23			0x51e
+			MX91_PAD_ENET2_RX_CTL__GPIO4_IO22		0x51e
+			MX91_PAD_ENET2_TD0__GPIO4_IO19			0x51e
+			MX91_PAD_ENET2_TD1__GPIO4_IO18			0x51e
+			MX91_PAD_ENET2_TD2__GPIO4_IO17			0x51e
+			MX91_PAD_ENET2_TD3__GPIO4_IO16			0x51e
+			MX91_PAD_ENET2_TXC__GPIO4_IO21			0x51e
+			MX91_PAD_ENET2_TX_CTL__GPIO4_IO20		0x51e
+		>;
+	};
+
+	pinctrl_lcdif_gpio: lcdifgpiogrp {
+		fsl,pins = <
+			MX91_PAD_GPIO_IO00__GPIO2_IO0			0x51e
+			MX91_PAD_GPIO_IO01__GPIO2_IO1			0x51e
+			MX91_PAD_GPIO_IO02__GPIO2_IO2			0x51e
+			MX91_PAD_GPIO_IO03__GPIO2_IO3			0x51e
+		>;
+	};
+
+	pinctrl_lcdif: lcdifgrp {
+		fsl,pins = <
+			MX91_PAD_GPIO_IO00__MEDIAMIX_DISP_CLK		0x31e
+			MX91_PAD_GPIO_IO01__MEDIAMIX_DISP_DE		0x31e
+			MX91_PAD_GPIO_IO02__MEDIAMIX_DISP_VSYNC		0x31e
+			MX91_PAD_GPIO_IO03__MEDIAMIX_DISP_HSYNC		0x31e
+			MX91_PAD_GPIO_IO04__MEDIAMIX_DISP_DATA0		0x31e
+			MX91_PAD_GPIO_IO05__MEDIAMIX_DISP_DATA1		0x31e
+			MX91_PAD_GPIO_IO06__MEDIAMIX_DISP_DATA2		0x31e
+			MX91_PAD_GPIO_IO07__MEDIAMIX_DISP_DATA3		0x31e
+			MX91_PAD_GPIO_IO08__MEDIAMIX_DISP_DATA4		0x31e
+			MX91_PAD_GPIO_IO09__MEDIAMIX_DISP_DATA5		0x31e
+			MX91_PAD_GPIO_IO10__MEDIAMIX_DISP_DATA6		0x31e
+			MX91_PAD_GPIO_IO11__MEDIAMIX_DISP_DATA7		0x31e
+			MX91_PAD_GPIO_IO12__MEDIAMIX_DISP_DATA8		0x31e
+			MX91_PAD_GPIO_IO13__MEDIAMIX_DISP_DATA9		0x31e
+			MX91_PAD_GPIO_IO14__MEDIAMIX_DISP_DATA10	0x31e
+			MX91_PAD_GPIO_IO15__MEDIAMIX_DISP_DATA11	0x31e
+			MX91_PAD_GPIO_IO16__MEDIAMIX_DISP_DATA12	0x31e
+			MX91_PAD_GPIO_IO17__MEDIAMIX_DISP_DATA13	0x31e
+			MX91_PAD_GPIO_IO18__MEDIAMIX_DISP_DATA14	0x31e
+			MX91_PAD_GPIO_IO19__MEDIAMIX_DISP_DATA15	0x31e
+			MX91_PAD_GPIO_IO20__MEDIAMIX_DISP_DATA16	0x31e
+			MX91_PAD_GPIO_IO21__MEDIAMIX_DISP_DATA17	0x31e
+			MX91_PAD_GPIO_IO27__GPIO2_IO27			0x31e
+		>;
+	};
+
+	pinctrl_lpi2c1: lpi2c1grp {
+		fsl,pins = <
+			MX91_PAD_I2C1_SCL__LPI2C1_SCL			0x40000b9e
+			MX91_PAD_I2C1_SDA__LPI2C1_SDA			0x40000b9e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_lpi2c2: lpi2c2grp {
+		fsl,pins = <
+			MX91_PAD_I2C2_SCL__LPI2C2_SCL			0x40000b9e
+			MX91_PAD_I2C2_SDA__LPI2C2_SDA			0x40000b9e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_lpi2c3: lpi2c3grp {
+		fsl,pins = <
+			MX91_PAD_GPIO_IO28__LPI2C3_SDA			0x40000b9e
+			MX91_PAD_GPIO_IO29__LPI2C3_SCL			0x40000b9e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_pcal6524: pcal6524grp {
+		fsl,pins = <
+			MX91_PAD_CCM_CLKO2__GPIO3_IO27			0x31e
+		>;
+	};
+
+	pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+		fsl,pins = <
+			MX91_PAD_SD2_RESET_B__GPIO3_IO7	0x31e
+		>;
+		bootph-pre-ram;
+	};
+
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX91_PAD_UART1_RXD__LPUART1_RX			0x31e
+			MX91_PAD_UART1_TXD__LPUART1_TX			0x31e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_uart5: uart5grp {
+		fsl,pins = <
+			MX91_PAD_DAP_TDO_TRACESWO__LPUART5_TX	0x31e
+			MX91_PAD_DAP_TDI__LPUART5_RX		0x31e
+			MX91_PAD_DAP_TMS_SWDIO__LPUART5_RTS_B	0x31e
+			MX91_PAD_DAP_TCLK_SWCLK__LPUART5_CTS_B	0x31e
+		>;
+	};
+
+	pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD1_CLK__USDHC1_CLK		0x158e
+			MX91_PAD_SD1_CMD__USDHC1_CMD		0x138e
+			MX91_PAD_SD1_DATA0__USDHC1_DATA0	0x138e
+			MX91_PAD_SD1_DATA1__USDHC1_DATA1	0x138e
+			MX91_PAD_SD1_DATA2__USDHC1_DATA2	0x138e
+			MX91_PAD_SD1_DATA3__USDHC1_DATA3	0x138e
+			MX91_PAD_SD1_DATA4__USDHC1_DATA4	0x138e
+			MX91_PAD_SD1_DATA5__USDHC1_DATA5	0x138e
+			MX91_PAD_SD1_DATA6__USDHC1_DATA6	0x138e
+			MX91_PAD_SD1_DATA7__USDHC1_DATA7	0x138e
+			MX91_PAD_SD1_STROBE__USDHC1_STROBE	0x158e
+		>;
+	};
+
+	pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD1_CLK__USDHC1_CLK		0x15fe
+			MX91_PAD_SD1_CMD__USDHC1_CMD		0x13fe
+			MX91_PAD_SD1_DATA0__USDHC1_DATA0	0x13fe
+			MX91_PAD_SD1_DATA1__USDHC1_DATA1	0x13fe
+			MX91_PAD_SD1_DATA2__USDHC1_DATA2	0x13fe
+			MX91_PAD_SD1_DATA3__USDHC1_DATA3	0x13fe
+			MX91_PAD_SD1_DATA4__USDHC1_DATA4	0x13fe
+			MX91_PAD_SD1_DATA5__USDHC1_DATA5	0x13fe
+			MX91_PAD_SD1_DATA6__USDHC1_DATA6	0x13fe
+			MX91_PAD_SD1_DATA7__USDHC1_DATA7	0x13fe
+			MX91_PAD_SD1_STROBE__USDHC1_STROBE	0x15fe
+		>;
+	};
+
+	pinctrl_usdhc1: usdhc1grp {
+		fsl,pins = <
+			MX91_PAD_SD1_CLK__USDHC1_CLK		0x1582
+			MX91_PAD_SD1_CMD__USDHC1_CMD		0x1382
+			MX91_PAD_SD1_DATA0__USDHC1_DATA0	0x1382
+			MX91_PAD_SD1_DATA1__USDHC1_DATA1	0x1382
+			MX91_PAD_SD1_DATA2__USDHC1_DATA2	0x1382
+			MX91_PAD_SD1_DATA3__USDHC1_DATA3	0x1382
+			MX91_PAD_SD1_DATA4__USDHC1_DATA4	0x1382
+			MX91_PAD_SD1_DATA5__USDHC1_DATA5	0x1382
+			MX91_PAD_SD1_DATA6__USDHC1_DATA6	0x1382
+			MX91_PAD_SD1_DATA7__USDHC1_DATA7	0x1382
+			MX91_PAD_SD1_STROBE__USDHC1_STROBE	0x1582
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD2_CLK__USDHC2_CLK		0x158e
+			MX91_PAD_SD2_CMD__USDHC2_CMD		0x138e
+			MX91_PAD_SD2_DATA0__USDHC2_DATA0	0x138e
+			MX91_PAD_SD2_DATA1__USDHC2_DATA1	0x138e
+			MX91_PAD_SD2_DATA2__USDHC2_DATA2	0x138e
+			MX91_PAD_SD2_DATA3__USDHC2_DATA3	0x138e
+			MX91_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};
+
+	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD2_CLK__USDHC2_CLK		0x15fe
+			MX91_PAD_SD2_CMD__USDHC2_CMD		0x13fe
+			MX91_PAD_SD2_DATA0__USDHC2_DATA0	0x13fe
+			MX91_PAD_SD2_DATA1__USDHC2_DATA1	0x13fe
+			MX91_PAD_SD2_DATA2__USDHC2_DATA2	0x13fe
+			MX91_PAD_SD2_DATA3__USDHC2_DATA3	0x13fe
+			MX91_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};
+
+	pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+		fsl,pins = <
+			MX91_PAD_SD2_CD_B__GPIO3_IO0		0x31e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_usdhc2_gpio_sleep: usdhc2gpiosleepgrp {
+		fsl,pins = <
+			MX91_PAD_SD2_CD_B__GPIO3_IO0		0x51e
+		>;
+	};
+
+	pinctrl_usdhc2: usdhc2grp {
+		fsl,pins = <
+			MX91_PAD_SD2_CLK__USDHC2_CLK		0x1582
+			MX91_PAD_SD2_CMD__USDHC2_CMD		0x1382
+			MX91_PAD_SD2_DATA0__USDHC2_DATA0	0x1382
+			MX91_PAD_SD2_DATA1__USDHC2_DATA1	0x1382
+			MX91_PAD_SD2_DATA2__USDHC2_DATA2	0x1382
+			MX91_PAD_SD2_DATA3__USDHC2_DATA3	0x1382
+			MX91_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	pinctrl_usdhc2_sleep: usdhc2sleepgrp {
+		fsl,pins = <
+			MX91_PAD_SD2_CLK__GPIO3_IO1		0x51e
+			MX91_PAD_SD2_CMD__GPIO3_IO2		0x51e
+			MX91_PAD_SD2_DATA0__GPIO3_IO3		0x51e
+			MX91_PAD_SD2_DATA1__GPIO3_IO4		0x51e
+			MX91_PAD_SD2_DATA2__GPIO3_IO5		0x51e
+			MX91_PAD_SD2_DATA3__GPIO3_IO6		0x51e
+			MX91_PAD_SD2_VSELECT__GPIO3_IO19	0x51e
+		>;
+	};
+
+	pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD3_CLK__USDHC3_CLK		0x158e
+			MX91_PAD_SD3_CMD__USDHC3_CMD		0x138e
+			MX91_PAD_SD3_DATA0__USDHC3_DATA0	0x138e
+			MX91_PAD_SD3_DATA1__USDHC3_DATA1	0x138e
+			MX91_PAD_SD3_DATA2__USDHC3_DATA2	0x138e
+			MX91_PAD_SD3_DATA3__USDHC3_DATA3	0x138e
+		>;
+	};
+
+	pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
+		fsl,pins = <
+			MX91_PAD_SD3_CLK__USDHC3_CLK		0x15fe
+			MX91_PAD_SD3_CMD__USDHC3_CMD		0x13fe
+			MX91_PAD_SD3_DATA0__USDHC3_DATA0	0x13fe
+			MX91_PAD_SD3_DATA1__USDHC3_DATA1	0x13fe
+			MX91_PAD_SD3_DATA2__USDHC3_DATA2	0x13fe
+			MX91_PAD_SD3_DATA3__USDHC3_DATA3	0x13fe
+		>;
+	};
+
+	pinctrl_usdhc3: usdhc3grp {
+		fsl,pins = <
+			MX91_PAD_SD3_CLK__USDHC3_CLK		0x1582
+			MX91_PAD_SD3_CMD__USDHC3_CMD		0x1382
+			MX91_PAD_SD3_DATA0__USDHC3_DATA0	0x1382
+			MX91_PAD_SD3_DATA1__USDHC3_DATA1	0x1382
+			MX91_PAD_SD3_DATA2__USDHC3_DATA2	0x1382
+			MX91_PAD_SD3_DATA3__USDHC3_DATA3	0x1382
+		>;
+	};
+
+	pinctrl_usdhc3_sleep: usdhc3sleepgrp {
+		fsl,pins = <
+			MX91_PAD_SD3_CLK__GPIO3_IO20		0x31e
+			MX91_PAD_SD3_CMD__GPIO3_IO21		0x31e
+			MX91_PAD_SD3_DATA0__GPIO3_IO22		0x31e
+			MX91_PAD_SD3_DATA1__GPIO3_IO23		0x31e
+			MX91_PAD_SD3_DATA2__GPIO3_IO24		0x31e
+			MX91_PAD_SD3_DATA3__GPIO3_IO25		0x31e
+		>;
+	};
+};
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH v2 2/2 imx: Support i.MX91 11x11 FRDM board

In reply to Joseph Guo

Add i.MX91 11x11 FRDM Board support.
- Four ddr scripts included w/o inline ecc feature. Support both 1gb and 2gb DDR
- SDHC/EQOS/I2C/UART supported
- PCA9451 supported, default nominal drive mode
- Documentation added.

---
Changes in v2:
- correct commit message 'EVK' to 'FRDM'
- use #include in ecc config file
- add ecc description in README
- drop extraneous includes
- rename 'imx91_frdm.rst' to 'imx91_11x11_frdm.rst'
- drop IMX91_FRDM_LPDDR4 symbol
- drop bootph- property

---
 arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi          |   51 +
 arch/arm/mach-imx/imx9/Kconfig                     |    9 +
 board/freescale/imx91_frdm/Kconfig                 |   12 +
 board/freescale/imx91_frdm/MAINTAINERS             |    7 +
 board/freescale/imx91_frdm/Makefile                |   16 +
 board/freescale/imx91_frdm/imx91_frdm.c            |   25 +
 board/freescale/imx91_frdm/imx91_frdm.env          |   88 +
 .../imx91_frdm/lpddr4_2400mts_1gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_2gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_1gb_timing.c     | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_2gb_timing.c     | 1996 ++++++++++++++++++++
 board/freescale/imx91_frdm/lpddr4_timing.h         |   12 +
 board/freescale/imx91_frdm/spl.c                   |  193 ++
 configs/imx91_11x11_frdm_defconfig                 |  143 ++
 configs/imx91_11x11_frdm_inline_ecc_defconfig      |    3 +
 doc/board/nxp/imx91_11x11_frdm.rst                 |  100 +
 doc/board/nxp/index.rst                            |    1 +
 include/configs/imx91_frdm.h                       |   25 +
 18 files changed, 8669 insertions(+)
arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +51 -0
new file mode 100644
index 0000000000000000000000000000000000000000..2541d808aa084fb68a047c74b21daf8af044cc84
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP
+ */
+
+#include "imx91-u-boot.dtsi"
+
+/ {
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog3>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+};
+
+&usdhc2 {
+	fsl,signal-voltage-switch-extra-delay-ms = <8>;
+};
+
+&fec {
+	compatible = "fsl,imx91-fec", "fsl,imx93-fec", "fsl,imx8mq-fec";
+	phy-reset-gpios = <&pcal6524 16 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <15>;
+	phy-reset-post-delay = <100>;
+};
+
+&ethphy1 {
+	reset-gpios = <&pcal6524 15 GPIO_ACTIVE_LOW>;
+	reset-assert-us = <15000>;
+	reset-deassert-us = <100000>;
+};
+
+&s4muap {
+	bootph-pre-ram;
+	bootph-some-ram;
+	status = "okay";
+};
+
+&clk {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ assigned-clock-parents;
+};
arch/arm/mach-imx/imx9/Kconfig +9 -0
index d9725a96043657768af424ffe8efed7155c78f69..1ac3e583068bc14444e5f68c3a79b21ddbfc24a0 100644
@@ -61,6 +61,14 @@ config TARGET_IMX91_11X11_EVK
 	imply BOOTSTD_FULL
 	imply BOOTSTD_BOOTCOMMAND
 
+config TARGET_IMX91_11X11_FRDM
+	bool "imx91_11x11_frdm"
+	select OF_BOARD_FIXUP
+	select IMX91
+	select IMX9_LPDDR4X
+	imply BOOTSTD_FULL
+	imply BOOTSTD_BOOTCOMMAND
+
 config TARGET_IMX93_9X9_QSB
 	bool "imx93_qsb"
 	select OF_BOARD_FIXUP
@@ -139,6 +147,7 @@ config TARGET_TORADEX_SMARC_IMX95
 endchoice
 
 source "board/freescale/imx91_evk/Kconfig"
+source "board/freescale/imx91_frdm/Kconfig"
 source "board/freescale/imx93_evk/Kconfig"
 source "board/freescale/imx93_frdm/Kconfig"
 source "board/freescale/imx93_qsb/Kconfig"
board/freescale/imx91_frdm/Kconfig new file +12 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68f4bb5c7ecda2b0847ecfd10f954283c4068960
@@ -0,0 +1,12 @@
+if TARGET_IMX91_11X11_FRDM
+
+config SYS_BOARD
+	default "imx91_frdm"
+
+config SYS_VENDOR
+	default "freescale"
+
+config SYS_CONFIG_NAME
+	default "imx91_frdm"
+
+endif
board/freescale/imx91_frdm/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bf5320f03dbb78e97e1e990408d43dc89054e397
@@ -0,0 +1,7 @@
+FRDM-IMX91 BOARD
+M:	Joseph Guo <[email protected]>
+S:	Maintained
+F:	board/freescale/imx91_frdm/
+F:	include/configs/imx91_frdm.h
+F:	configs/imx91_11x11_frdm_defconfig
+F:	configs/imx91_11x11_frdm_inline_ecc_defconfig
board/freescale/imx91_frdm/Makefile new file +16 -0
new file mode 100644
index 0000000000000000000000000000000000000000..75510b13b44ead742b5c463ba5e520e0d33a64f7
@@ -0,0 +1,16 @@
+#
+# Copyright 2025 NXP
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx91_frdm.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+ifdef CONFIG_IMX9_DRAM_INLINE_ECC
+obj-y += lpddr4_2400mts_ecc_1gb_timing.o lpddr4_2400mts_ecc_2gb_timing.o
+else
+obj-y += lpddr4_2400mts_1gb_timing.o lpddr4_2400mts_2gb_timing.o
+endif
+endif
board/freescale/imx91_frdm/imx91_frdm.c new file +25 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f32310e4a9df87e5d876cfa50e4ff38c31f887d7
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP
+ */
+
+#include <env.h>
+#include <asm/arch/sys_proto.h>
+
+int board_late_init(void)
+{
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+		board_late_mmc_env_init();
+
+	env_set("sec_boot", "no");
+
+	if (IS_ENABLED(CONFIG_AHAB_BOOT))
+		env_set("sec_boot", "yes");
+
+	if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) {
+		env_set("board_name", "11X11_FRDM");
+		env_set("board_rev", "iMX91");
+	}
+
+	return 0;
+}
board/freescale/imx91_frdm/imx91_frdm.env new file +88 -0

88 lines not on this page · raw message

board/freescale/imx91_frdm/lpddr4_2400mts_1gb_timing.c new file +1996 -0

1,996 lines not on this page · raw message

board/freescale/imx91_frdm/lpddr4_2400mts_2gb_timing.c new file +1996 -0

784 lines not on this page · raw message

board/freescale/imx91_frdm/lpddr4_2400mts_ecc_1gb_timing.c new file +1996 -0

1,996 lines not on this page · raw message

board/freescale/imx91_frdm/lpddr4_2400mts_ecc_2gb_timing.c new file +1996 -0

1,996 lines not on this page · raw message

board/freescale/imx91_frdm/lpddr4_timing.h new file +12 -0
new file mode 100644
index 0000000000000000000000000000000000000000..9b483bbc3ed06cd6cac716d4d695155bfb2cad3a

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

board/freescale/imx91_frdm/spl.c new file +193 -0

193 lines not on this page · raw message

configs/imx91_11x11_frdm_defconfig new file +143 -0

143 lines not on this page · raw message

configs/imx91_11x11_frdm_inline_ecc_defconfig new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..9b13e769442a6a098a364227fc42763116db94bf

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

doc/board/nxp/imx91_11x11_frdm.rst new file +100 -0

100 lines not on this page · raw message

doc/board/nxp/index.rst +1 -0
index 7b881961b65d4b481b018761cdedb7efb4d208c7..01d3468a47da8ddd25cf45b52920a35e4e131c48 100644

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

include/configs/imx91_frdm.h new file +25 -0
new file mode 100644
index 0000000000000000000000000000000000000000..157bb91bb806f2d9b31d9a98d9c7ed9b4d2266dd

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.

#3 lore raw

Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

Hello Joseph,

Quoted 184 lines · Joseph Guo

Add i.MX91 11x11 FRDM Board support.
- Four ddr scripts included w/o inline ecc feature. Support both 1gb and 2gb DDR
- SDHC/EQOS/I2C/UART supported
- PCA9451 supported, default nominal drive mode
- Documentation added.

---
Changes in v2:
- correct commit message 'EVK' to 'FRDM'
- use #include in ecc config file
- add ecc description in README
- drop extraneous includes
- rename 'imx91_frdm.rst' to 'imx91_11x11_frdm.rst'
- drop IMX91_FRDM_LPDDR4 symbol
- drop bootph- property

---
 arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi          |   51 +
 arch/arm/mach-imx/imx9/Kconfig                     |    9 +
 board/freescale/imx91_frdm/Kconfig                 |   12 +
 board/freescale/imx91_frdm/MAINTAINERS             |    7 +
 board/freescale/imx91_frdm/Makefile                |   16 +
 board/freescale/imx91_frdm/imx91_frdm.c            |   25 +
 board/freescale/imx91_frdm/imx91_frdm.env          |   88 +
 .../imx91_frdm/lpddr4_2400mts_1gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_2gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_1gb_timing.c     | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_2gb_timing.c     | 1996 ++++++++++++++++++++
 board/freescale/imx91_frdm/lpddr4_timing.h         |   12 +
 board/freescale/imx91_frdm/spl.c                   |  193 ++
 configs/imx91_11x11_frdm_defconfig                 |  143 ++
 configs/imx91_11x11_frdm_inline_ecc_defconfig      |    3 +
 doc/board/nxp/imx91_11x11_frdm.rst                 |  100 +
 doc/board/nxp/index.rst                            |    1 +
 include/configs/imx91_frdm.h                       |   25 +
 18 files changed, 8669 insertions(+)
arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +51 -0
new file mode 100644
index 0000000000000000000000000000000000000000..2541d808aa084fb68a047c74b21daf8af044cc84
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP
+ */
+
+#include "imx91-u-boot.dtsi"
+
+/ {
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog3>;
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+};
+
+&usdhc2 {
+	fsl,signal-voltage-switch-extra-delay-ms = <8>;
+};
+
+&fec {
+	compatible = "fsl,imx91-fec", "fsl,imx93-fec", "fsl,imx8mq-fec";
+	phy-reset-gpios = <&pcal6524 16 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <15>;
+	phy-reset-post-delay = <100>;
+};
+
+&ethphy1 {
+	reset-gpios = <&pcal6524 15 GPIO_ACTIVE_LOW>;
+	reset-assert-us = <15000>;
+	reset-deassert-us = <100000>;
+};
+
+&s4muap {
+	bootph-pre-ram;
+	bootph-some-ram;
+	status = "okay";
+};
+
+&clk {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ assigned-clock-parents;
+};
arch/arm/mach-imx/imx9/Kconfig +9 -0
index d9725a96043657768af424ffe8efed7155c78f69..1ac3e583068bc14444e5f68c3a79b21ddbfc24a0 100644
@@ -61,6 +61,14 @@ config TARGET_IMX91_11X11_EVK
 	imply BOOTSTD_FULL
 	imply BOOTSTD_BOOTCOMMAND
 
+config TARGET_IMX91_11X11_FRDM
+	bool "imx91_11x11_frdm"
+	select OF_BOARD_FIXUP
+	select IMX91
+	select IMX9_LPDDR4X
+	imply BOOTSTD_FULL
+	imply BOOTSTD_BOOTCOMMAND
+
 config TARGET_IMX93_9X9_QSB
 	bool "imx93_qsb"
 	select OF_BOARD_FIXUP
@@ -139,6 +147,7 @@ config TARGET_TORADEX_SMARC_IMX95
 endchoice
 
 source "board/freescale/imx91_evk/Kconfig"
+source "board/freescale/imx91_frdm/Kconfig"
 source "board/freescale/imx93_evk/Kconfig"
 source "board/freescale/imx93_frdm/Kconfig"
 source "board/freescale/imx93_qsb/Kconfig"
board/freescale/imx91_frdm/Kconfig new file +12 -0
new file mode 100644
index 0000000000000000000000000000000000000000..68f4bb5c7ecda2b0847ecfd10f954283c4068960
@@ -0,0 +1,12 @@
+if TARGET_IMX91_11X11_FRDM
+
+config SYS_BOARD
+	default "imx91_frdm"
+
+config SYS_VENDOR
+	default "freescale"
+
+config SYS_CONFIG_NAME
+	default "imx91_frdm"
+
+endif
board/freescale/imx91_frdm/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bf5320f03dbb78e97e1e990408d43dc89054e397
@@ -0,0 +1,7 @@
+FRDM-IMX91 BOARD
+M:	Joseph Guo <[email protected]>
+S:	Maintained
+F:	board/freescale/imx91_frdm/
+F:	include/configs/imx91_frdm.h
+F:	configs/imx91_11x11_frdm_defconfig
+F:	configs/imx91_11x11_frdm_inline_ecc_defconfig
board/freescale/imx91_frdm/Makefile new file +16 -0
new file mode 100644
index 0000000000000000000000000000000000000000..75510b13b44ead742b5c463ba5e520e0d33a64f7
@@ -0,0 +1,16 @@
+#
+# Copyright 2025 NXP
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx91_frdm.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+ifdef CONFIG_IMX9_DRAM_INLINE_ECC
+obj-y += lpddr4_2400mts_ecc_1gb_timing.o lpddr4_2400mts_ecc_2gb_timing.o
+else
+obj-y += lpddr4_2400mts_1gb_timing.o lpddr4_2400mts_2gb_timing.o
+endif
+endif
board/freescale/imx91_frdm/imx91_frdm.c new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f32310e4a9df87e5d876cfa50e4ff38c31f887d7
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP

board/freescale/imx91_frdm/imx91_frdm.c line 13

Quoted 10 lines
board/freescale/imx91_frdm/imx91_frdm.c new file +10 -0
+ */
+
+#include <env.h>
+#include <asm/arch/sys_proto.h>
+
+int board_late_init(void)
+{
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+		board_late_mmc_env_init();
+

This should probably depend on CONFIG_ENV_IS_IN_MMC, not CONFIG_EFI_HAVE_CAPSULE_SUPPORT.

Quoted 26 lines
board/freescale/imx91_frdm/imx91_frdm.c new file +12 -0
+	env_set("sec_boot", "no");
+
+	if (IS_ENABLED(CONFIG_AHAB_BOOT))
+		env_set("sec_boot", "yes");
+
+	if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) {
+		env_set("board_name", "11X11_FRDM");
+		env_set("board_rev", "iMX91");
+	}
+
+	return 0;
+}
board/freescale/imx91_frdm/imx91_frdm.env new file +8 -0
new file mode 100644
index 0000000000000000000000000000000000000000..6c10784cf61a9a6ee29f4c5e9c4cc41b6c8ef4dc
@@ -0,0 +1,88 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+
+boot_targets=mmc0 mmc1
+boot_fit=no
+bootm_size=0x10000000
+cntr_addr=0x98000000
+cntr_file=os_cntr_signed.bin
+console=ttyLP0,115200 earlycon

board/freescale/imx91_frdm/imx91_frdm.env line 18

Quoted 10 lines
board/freescale/imx91_frdm/imx91_frdm.env new file +10 -0
+fdt_addr_r=0x83000000
+fdt_addr=0x83000000
+fdtfile=CONFIG_DEFAULT_FDT_FILE
+image=Image
+mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
+mmcpart=1
+mmcroot=/dev/mmcblk1p2 rootwait rw
+mmcautodetect=yes
+mmcargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot}
+prepare_mcore=setenv mcore_clk clk-imx93.mcore_booted

There isn't a Cortex-M core in i.MX91.

Quoted 70 lines
board/freescale/imx91_frdm/imx91_frdm.env new file +70 -0
+loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
+loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
+loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}
+auth_os=auth_cntr ${cntr_addr}
+sec_boot=no
+boot_os=booti ${loadaddr} - ${fdt_addr_r}
+mmcboot=
+	echo Booting from mmc ...;
+	run mmcargs;
+	if test ${sec_boot} = yes; then
+		if run true; then
+			run boot_os;
+		else
+			echo ERR: failed to authenticate;
+		fi;
+	else
+		if run loadfdt; then
+			run boot_os;
+		else
+			echo WARN: Cannot load the DT;
+		fi;
+	fi;
+netargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=/dev/nfs
+	ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
+netboot=
+	echo Booting from net ...;
+	run netargs;
+	if test ${ip_dyn} = yes; then
+		setenv get_cmd dhcp;
+	else
+		setenv get_cmd tftp;
+	fi;
+	if test ${sec_boot} = yes; then
+		${get_cmd} ${cntr_addr} ${cntr_file};
+		if true; then
+			run boot_os;
+		else
+			echo ERR: failed to authenticate;
+		fi;
+	else
+		${get_cmd} ${loadaddr} ${image};
+		if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
+			run boot_os;
+		else
+			echo WARN: Cannot load the DT;
+		fi;
+	fi;
+bsp_bootcmd=
+	echo Running BSP bootcmd ...;
+	mmc dev ${mmcdev};
+	if mmc rescan; then
+		if run loadbootscript; then
+			run bootscript;
+		else
+			if test ${sec_boot} = yes; then
+				if run loadcntr; then
+					run mmcboot;
+				else
+					run netboot;
+				fi;
+			else
+				if run loadimage; then
+					run mmcboot;
+				else
+					run netboot;
+				fi;
+			fi;
+		fi;
+	fi;
+scriptaddr=0x83500000

[snip]

Quoted 106 lines
configs/imx91_11x11_frdm_defconfig new file +100 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f87f3bf5ef797816843398dceedd873b7acbb7ad
@@ -0,0 +1,143 @@
+CONFIG_ARM=y
+CONFIG_ARCH_IMX9=y
+CONFIG_TEXT_BASE=0x80200000
+CONFIG_SYS_MALLOC_LEN=0x2000000
+CONFIG_SYS_MALLOC_F_LEN=0x18000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_SF_DEFAULT_SPEED=40000000
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0x700000
+CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx91-11x11-frdm"
+CONFIG_TARGET_IMX91_11X11_FRDM=y
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SYS_MONITOR_LEN=524288
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_STACK=0x204E0000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_TEXT_BASE=0x204A0000
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x20498000
+CONFIG_SPL_BSS_MAX_SIZE=0x2000
+CONFIG_SYS_LOAD_ADDR=0x80400000
+CONFIG_SPL=y
+CONFIG_CMD_DEKBLOB=y
+CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
+CONFIG_SYS_MEMTEST_START=0x80000000
+CONFIG_SYS_MEMTEST_END=0x90000000
+CONFIG_REMAKE_ELF=y
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_BOOTCOMMAND="bootflow scan -lb; run bsp_bootcmd"
+CONFIG_DEFAULT_FDT_FILE="imx91-11x11-frdm.dtb"
+CONFIG_SYS_CBSIZE=2048
+CONFIG_SYS_PBSIZE=2074
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SPL_MAX_SIZE=0x26000
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_BOOTROM_SUPPORT=y
+CONFIG_SPL_LOAD_IMX_CONTAINER=y
+CONFIG_IMX_CONTAINER_CFG="arch/arm/mach-imx/imx9/container.cfg"
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SPL_HAVE_INIT_STACK=y
+CONFIG_SPL_SYS_MALLOC=y
+CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
+CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x83200000
+CONFIG_SPL_SYS_MALLOC_SIZE=0x80000
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
+CONFIG_SPL_WATCHDOG=y
+CONFIG_SYS_PROMPT="u-boot=> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CRC32_VERIFY=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_FUSE=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EFIDEBUG=y
+CONFIG_CMD_RTC=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_GETTIME=y
+CONFIG_CMD_TIMER=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_MMC_DEVICE_INDEX=1
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_USE_ETHPRIME=y
+CONFIG_ETHPRIME="eth1"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_ADC=y
+CONFIG_ADC_IMX93=y
+CONFIG_CLK_IMX93=y
+CONFIG_SAVED_DRAM_TIMING_BASE=0x2049C000
+CONFIG_IMX_RGPIO2P=y
+CONFIG_DM_PCA953X=y
+CONFIG_ADP5585_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_IMX_LPI2C=y

configs/imx91_11x11_frdm_defconfig line 110

Quoted 10 lines
configs/imx91_11x11_frdm_defconfig new file +10 -0
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_ES_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_STMICRO=y

Why is SPI flash support required here?

Quoted 23 lines
configs/imx91_11x11_frdm_defconfig new file +23 -0
+CONFIG_PHY_ANEG_TIMEOUT=20000
+CONFIG_PHY_MOTORCOMM=y
+CONFIG_DM_ETH_PHY=y
+CONFIG_PHY_GIGE=y
+CONFIG_DWC_ETH_QOS=y
+CONFIG_DWC_ETH_QOS_IMX=y
+CONFIG_MII=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_PINCTRL_IMX93=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_PCA9450=y
+CONFIG_SPL_DM_PMIC_PCA9450=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_PCA9450=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_EMULATION=y
+CONFIG_DM_SERIAL=y
+CONFIG_FSL_LPUART=y
+CONFIG_SPI=y

configs/imx91_11x11_frdm_defconfig line 143

Quoted 10 lines
configs/imx91_11x11_frdm_defconfig new file +10 -0
+CONFIG_DM_SPI=y
+CONFIG_NXP_FSPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
+CONFIG_SYSRESET_PSCI=y
+CONFIG_ULP_WATCHDOG=y
+CONFIG_WDT=y
+CONFIG_SHA384=y
+CONFIG_LZO=y
+CONFIG_BZIP2=y

[snip]

Regards,
Francesco

reviewer
#4 lore raw

Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

In reply to Joseph Guo
Quoted 2 lines · Joseph Guo

+&usdhc2 {
+ fsl,signal-voltage-switch-extra-delay-ms = <8>;

Why does U-Boot need this property? It doesn't exist in Linux,

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi line 32

Quoted 7 lines
arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +7 -0
+};
+
+&fec {
+       compatible = "fsl,imx91-fec", "fsl,imx93-fec", "fsl,imx8mq-fec";
+       phy-reset-gpios = <&pcal6524 16 GPIO_ACTIVE_LOW>;
+       phy-reset-duration = <15>;
+       phy-reset-post-delay = <100>;

Using phy-reset-gpios is considered deprecated.

The PHY reset GPIO should be described inside the MDIO node.

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi line 38

Quoted 4 lines

+&ethphy1 {

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +3 -0
+       reset-gpios = <&pcal6524 15 GPIO_ACTIVE_LOW>;
+       reset-assert-us = <15000>;
+       reset-deassert-us = <100000>;

Why is this inside the u-boot.dtsi instead of the main dts?

include/configs/imx91_frdm.h line 21

Quoted 3 lines
include/configs/imx91_frdm.h new file +3 -0
+#define CFG_SYS_SDRAM_BASE     0x80000000
+#define PHYS_SDRAM             0x80000000
+#define PHYS_SDRAM_SIZE                0x80000000 /* 2GB DDR */

What about:

#define PHYS_SDRAM_SIZE SIZE_2GB

#5 lore raw

Re: [EXT] Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

Quoted 10 lines · Fabio Estevam

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 2 lines · Joseph Guo

+&usdhc2 {
+ fsl,signal-voltage-switch-extra-delay-ms = <8>;

Why does U-Boot need this property? It doesn't exist in Linux,

Hi Fabio,

USDHC2 is for SD card and its initial stage is at u-boot.
The IO voltage switch from 3.3v to 1.8v need extra 8ms time on some platform. I also tested without this delay, SD card can work as SD3.0 on imx91 frdm platform.

I prefer to remain this to avoid potential risk as 91evk 93evk 93frdm all remain this property.

Quoted 10 lines

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi line 32

Quoted 7 lines
arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +7 -0
+};
+
+&fec {
+       compatible = "fsl,imx91-fec", "fsl,imx93-fec", "fsl,imx8mq-fec";
+       phy-reset-gpios = <&pcal6524 16 GPIO_ACTIVE_LOW>;
+       phy-reset-duration = <15>;
+       phy-reset-post-delay = <100>;

Using phy-reset-gpios is considered deprecated.

Quoted 2 lines

The PHY reset GPIO should be described inside the MDIO node.

Ok, will change to main dts MDIO node.

Quoted 7 lines

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi line 38

Quoted 4 lines

+&ethphy1 {

arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi new file +3 -0
+       reset-gpios = <&pcal6524 15 GPIO_ACTIVE_LOW>;
+       reset-assert-us = <15000>;
+       reset-deassert-us = <100000>;

Why is this inside the u-boot.dtsi instead of the main dts?

Can move to main dts.

Quoted 8 lines

include/configs/imx91_frdm.h line 21

Quoted 4 lines
include/configs/imx91_frdm.h new file +3 -0
+#define CFG_SYS_SDRAM_BASE     0x80000000
+#define PHYS_SDRAM             0x80000000
+#define PHYS_SDRAM_SIZE                0x80000000 /* 2GB DDR */

What about:

#define PHYS_SDRAM_SIZE SIZE_2GB

make sense, will change.

Regards,
Joseph

reviewer
#6 lore raw

Re: [EXT] Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

Hi Joseph,

Quoted 9 lines · Joseph Guo (OSS)

Hi Fabio,

USDHC2 is for SD card and its initial stage is at u-boot. The IO voltage switch from 3.3v to 1.8v need extra 8ms time on some platform. I also tested without this delay, SD card can work as SD3.0 on imx91 frdm platform.

I prefer to remain this to avoid potential risk as 91evk 93evk 93frdm all remain this property.

I understand that a few NXP boards use this fsl,signal-voltage-switch-extra-delay-ms property.

Linux does not use it. U-Boot should not use it either. Whatever solution the kernel applies to provide this delay, let's use it in U-Boot.

I would really appreciate it if you could investigate this with the NXP folks and try to remove this custom property from U-Boot.

Let's keep the U-Bot dts files as close as possible with Linux.

I appreciate your understanding and cooperation.

Thanks

#7 lore raw

Re: [EXT] Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

Quoted 21 lines · Fabio Estevam

Hi Joseph,

Quoted 9 lines · Joseph Guo (OSS)

Hi Fabio,

USDHC2 is for SD card and its initial stage is at u-boot. The IO voltage switch from 3.3v to 1.8v need extra 8ms time on some platform. I also tested without this delay, SD card can work as SD3.0 on imx91 frdm platform.

I prefer to remain this to avoid potential risk as 91evk 93evk 93frdm all remain this property.

I understand that a few NXP boards use this fsl,signal-voltage-switch-extra-delay-ms property.

Linux does not use it. U-Boot should not use it either. Whatever solution the kernel applies to provide this delay, let's use it in U-Boot.

Quoted 8 lines

I would really appreciate it if you could investigate this with the NXP folks and try to remove this custom property from U-Boot.

Let's keep the U-Bot dts files as close as possible with Linux.

I appreciate your understanding and cooperation.

Thanks

Hi Fabio,

I understand your requirement. But as I said, the IO voltage switch only happen on u-boot stage, so it is kind of u-boot specific requirement. So you mean we need to add this delay control into kernel driver, and add this property into kernel dts even kernel stage didn't need to control it?

Since we don't have this issue on FRDM-IMX91. How about I remove this property on this commit first. And we can have further discussion on how to resolve this property.

Regards,
Joseph

reviewer
#8 lore raw

Re: [EXT] Re: [PATCH v2 2/2] imx: Support i.MX91 11x11 FRDM board

Hi Joseph,

Quoted 5 lines · Joseph Guo (OSS)

I understand your requirement. But as I said, the IO voltage switch only happen on u-boot stage, so it is kind of u-boot specific requirement. So you mean we need to add this delay control into kernel driver, and add this property into kernel dts even kernel stage didn't need to control it?

What happens if U-Boot boots from a medium other than the SD card (eMMC, USB download mode, SPI, etc.) and mounts the rootfs from the SD card?

Will it fail to mount the rootfs mount due to the lack of this custom SD card property?

This mechanism is not fully understood, I'm afraid.

Why is it used only on some imx93 boards and imx8mm-evk?

I'm trying to avoid perpetuating this hack.

Quoted 3 lines

Since we don't have this issue on FRDM-IMX91. How about I remove this property on this commit first. And we can have further discussion on how to resolve this property.

That sounds great to me.

#9 lore raw
In reply to Joseph Guo

Hello Joseph,

thank you for the patch set.

Quoted 51 lines · Joseph Guo

This series add initial support for the FRDM i.MX91 11x11 development board in U-Boot:
https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-IMX91

Include:
- Device tree for the board.
- Defconfig and Kconfig for the board.
- Header file defining memory layout and hadware addresses.

The board devicetree already attempted to upstream, but not been accepted yet:
https://lore.kernel.org/all/[email protected]/

---
Changes in v2:
- add upstream link
- rename 'vrpi' to 'vexp' to keep align with upstream dts
- move bootph- property from u-boot.dtsi to dts
- correct commit message 'EVK' to 'FRDM'
- use #include in ecc config file to avoid duplication
- add ecc description in README
- drop extraneous includes
- rename 'imx91_frdm.rst' to 'imx91_11x11_frdm.rst'
- drop IMX91_FRDM_LPDDR4 symbol
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Joseph Guo (2):
arm64: dts: add NXP FRDM-IMX91 device tree
imx: Support i.MX91 11x11 FRDM board

 arch/arm/dts/imx91-11x11-frdm-u-boot.dtsi          |   51 +
 arch/arm/dts/imx91-11x11-frdm.dts                  |  767 ++++++++
 arch/arm/mach-imx/imx9/Kconfig                     |    9 +
 board/freescale/imx91_frdm/Kconfig                 |   12 +
 board/freescale/imx91_frdm/MAINTAINERS             |    7 +
 board/freescale/imx91_frdm/Makefile                |   16 +
 board/freescale/imx91_frdm/imx91_frdm.c            |   25 +
 board/freescale/imx91_frdm/imx91_frdm.env          |   88 +
 .../imx91_frdm/lpddr4_2400mts_1gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_2gb_timing.c         | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_1gb_timing.c     | 1996 ++++++++++++++++++++
 .../imx91_frdm/lpddr4_2400mts_ecc_2gb_timing.c     | 1996 ++++++++++++++++++++
 board/freescale/imx91_frdm/lpddr4_timing.h         |   12 +
 board/freescale/imx91_frdm/spl.c                   |  193 ++
 configs/imx91_11x11_frdm_defconfig                 |  143 ++
 configs/imx91_11x11_frdm_inline_ecc_defconfig      |    3 +
 doc/board/nxp/imx91_11x11_frdm.rst                 |  100 +
 doc/board/nxp/index.rst                            |    1 +
 include/configs/imx91_frdm.h                       |   25 +
 19 files changed, 9436 insertions(+)
Quoted 8 lines

---
base-commit: e199db57c00ba2c2aba81069800126b6543a644c
change-id: 20251117-imx91_frdm-7a2db95f279d

Best regards,

Signature · 1 line
Joseph Guo <[email protected]>

I tested the series on the actual hardware with [0] on top of the mainline Linux kernel and encountered a unmanaged interrupt warning during boot, which wasn't there using the downstream NXP u-boot version:

[    1.840096] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.850352] mmc1: new high speed SDHC card at address 1234
[    1.857170] mmcblk1: mmc1:1234 SA08G 7.21 GiB
[    1.864850]  mmcblk1: p1 p2
[    2.279012] random: crng init done
[   11.720182] platform pwrseq-usdhc3: deferred probe pending: pwrseq_simple: reset control not ready
[   11.734562] platform 42890000.ethernet: deferred probe pending: platform: wait for supplier /soc@0/efuse@47510000/mac-address@4ec
[   17.947574] irq 99: nobody cared (try booting with the "irqpoll" option)
[   17.954292] CPU: 0 UID: 0 PID: 55 Comm: irq/99-1-0022 Not tainted 6.18.0-01544-g0817234e6cf9-dirty #1 PREEMPT 
[   17.954302] Hardware name: NXP FRDM-IMX91 Development Board (DT)
[   17.954306] Call trace:
[   17.954310]  show_stack+0x18/0x30 (C)
[   17.954326]  dump_stack_lvl+0x60/0x80
[   17.954335]  dump_stack+0x18/0x24
[   17.954341]  __report_bad_irq+0x4c/0xec
[   17.954351]  note_interrupt+0x33c/0x390
[   17.954361]  handle_irq_event+0x94/0xbc
[   17.954368]  handle_level_irq+0xd8/0x170
[   17.954375]  handle_irq_desc+0x34/0x58
[   17.954380]  generic_handle_domain_irq+0x1c/0x28
[   17.954386]  vf610_gpio_irq_handler+0x70/0x110
[   17.954395]  handle_irq_desc+0x34/0x58
[   17.954401]  generic_handle_domain_irq+0x1c/0x28
[   17.954407]  gic_handle_irq+0x4c/0x140
[   17.954412]  call_on_irq_stack+0x30/0x48
[   17.954419]  do_interrupt_handler+0x80/0x84
[   17.954426]  el1_interrupt+0x38/0x60
[   17.954436]  el1h_64_irq_handler+0x18/0x24
[   17.954443]  el1h_64_irq+0x6c/0x70
[   17.954448]  _raw_spin_unlock_irqrestore+0x8/0x44 (P)
[   17.954457]  wake_threads_waitq+0x60/0x70
[   17.954463]  irq_thread+0x194/0x32c
[   17.954469]  kthread+0x12c/0x204
[   17.954478]  ret_from_fork+0x10/0x20
[   17.954485] handlers:
[   18.064352] [<00000000ec900a2b>] irq_default_primary_handler threaded [<00000000a61af792>] pca953x_irq_handler
[   18.074353] Disabling IRQ #99
[   18.080294] nxp-pca9450 1-0025: pca9451a probed.

Further analysis led me to think that this is caused by the fact that the PCAL6524 GPIO expander (1-0022) shares its interrupt line with the USB Type C port controller (PTN5110). As soon as the first interrupt line from the PCAL is enabled (i.e., when the PCA9451A PMIC requests its interrupt line, which is provided by the aforementioned PCAL6524), the corresponding parent interrupt - which is shared - is also enabled and this causes an interrupt storm, at least until the PTN5110 driver is probed.

The interrupt storm causes a noticeable delay during the boot sequence, as well as the disabling of the shared IRQ #99, making the device not really usable.

In the downstream version of u-boot, this is taken care by the support for the TypeC port controller logic [1], which is however not available in upstream u-boot. Until that support is added, I'd suggest to add a workaround in here (maybe in SPL code?) that simply disables the interrupts for the PTN5110 and clears the interrupt latch as well. The IRQ can then be enabled in a proper way by the kernel driver.

[0] https://lore.kernel.org/all/[email protected]/
[1] https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/board/freescale/common/tcpc.c#L1058

Thank you

Regards,

Francesco

author
#10 lore raw
Quoted 70 lines · Francesco Valla

Hello Joseph,

thank you for the patch set.

I tested the series on the actual hardware with [0] on top of the mainline Linux kernel and encountered a unmanaged interrupt warning during boot, which wasn't there using the downstream NXP u-boot version:

[    1.840096] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.850352] mmc1: new high speed SDHC card at address 1234
[    1.857170] mmcblk1: mmc1:1234 SA08G 7.21 GiB
[    1.864850]  mmcblk1: p1 p2
[    2.279012] random: crng init done
[   11.720182] platform pwrseq-usdhc3: deferred probe pending: pwrseq_simple: reset control not ready
[   11.734562] platform 42890000.ethernet: deferred probe pending: platform: wait for supplier /soc@0/efuse@47510000/mac-address@4ec
[   17.947574] irq 99: nobody cared (try booting with the "irqpoll" option)
[   17.954292] CPU: 0 UID: 0 PID: 55 Comm: irq/99-1-0022 Not tainted 6.18.0-01544-g0817234e6cf9-dirty #1 PREEMPT 
[   17.954302] Hardware name: NXP FRDM-IMX91 Development Board (DT)
[   17.954306] Call trace:
[   17.954310]  show_stack+0x18/0x30 (C)
[   17.954326]  dump_stack_lvl+0x60/0x80
[   17.954335]  dump_stack+0x18/0x24
[   17.954341]  __report_bad_irq+0x4c/0xec
[   17.954351]  note_interrupt+0x33c/0x390
[   17.954361]  handle_irq_event+0x94/0xbc
[   17.954368]  handle_level_irq+0xd8/0x170
[   17.954375]  handle_irq_desc+0x34/0x58
[   17.954380]  generic_handle_domain_irq+0x1c/0x28
[   17.954386]  vf610_gpio_irq_handler+0x70/0x110
[   17.954395]  handle_irq_desc+0x34/0x58
[   17.954401]  generic_handle_domain_irq+0x1c/0x28
[   17.954407]  gic_handle_irq+0x4c/0x140
[   17.954412]  call_on_irq_stack+0x30/0x48
[   17.954419]  do_interrupt_handler+0x80/0x84
[   17.954426]  el1_interrupt+0x38/0x60
[   17.954436]  el1h_64_irq_handler+0x18/0x24
[   17.954443]  el1h_64_irq+0x6c/0x70
[   17.954448]  _raw_spin_unlock_irqrestore+0x8/0x44 (P)
[   17.954457]  wake_threads_waitq+0x60/0x70
[   17.954463]  irq_thread+0x194/0x32c
[   17.954469]  kthread+0x12c/0x204
[   17.954478]  ret_from_fork+0x10/0x20
[   17.954485] handlers:
[   18.064352] [<00000000ec900a2b>] irq_default_primary_handler threaded [<00000000a61af792>] pca953x_irq_handler
[   18.074353] Disabling IRQ #99
[   18.080294] nxp-pca9450 1-0025: pca9451a probed.

Further analysis led me to think that this is caused by the fact that the PCAL6524 GPIO expander (1-0022) shares its interrupt line with the USB Type C port controller (PTN5110). As soon as the first interrupt line from the PCAL is enabled (i.e., when the PCA9451A PMIC requests its interrupt line, which is provided by the aforementioned PCAL6524), the corresponding parent interrupt - which is shared - is also enabled and this causes an interrupt storm, at least until the PTN5110 driver is probed.

The interrupt storm causes a noticeable delay during the boot sequence, as well as the disabling of the shared IRQ #99, making the device not really usable.

In the downstream version of u-boot, this is taken care by the support for the TypeC port controller logic [1], which is however not available in upstream u-boot. Until that support is added, I'd suggest to add a workaround in here (maybe in SPL code?) that simply disables the interrupts for the PTN5110 and clears the interrupt latch as well. The IRQ can then be enabled in a proper way by the kernel driver.

Quoted 2 lines

[0] https://lore.kernel.org/all/[email protected]/
[1] https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/board/freescale/common/tcpc.c#L1058

Hi Francesco,

Thank you for your test.
Yes we also observe such issue. But we are thinking about find a kernel fix for that, that's why I didn't submit v2 on kernel upstream.
I appreciate your test result and NXP will have a disucss about this issue to find a fix.

Regards,
Joseph

Quoted 11 lines

Thank you

Regards,

Francesco