imx: add i.MX91 and 11x11-EVK support
Subsystems (9)
cover imx: add i.MX91 and 11x11-EVK support
iMX91 is reduced part from iMX93 with part number with some IPs removed [1]. The i.MX 91 family features an Cortex-A55 running at up to 1.4GHz, and supports for LPDDR4 memory.
Patch 1-4 are fixes when developing i.MX91 support. Patch 5-11 are to support i.MX91 and 11x11-EVK.
CI: https://dev.azure.com/pengfan/uboot-ci/_build/results?buildId=4
Bootlog:
U-Boot SPL 2025.01-rc3-00092-gc065e3b6a3ec-dirty (Dec 03 2024 - 18:24:41 +0800)
PMIC: Nominal Voltage Mode
DDR: 2400MTS
Normal Boot
Trying to boot from BOOTROM
Boot Stage: Primary boot
image offset 0x8000, pagesize 0x200, ivt offset 0x0
Load image from 0x4b800 by ROM_API
NOTICE: TRDC init done NOTICE: BL31: v2.10.0 (release):lf-6.6.36-2.1.0-rc3-dirty NOTICE: BL31: Built : 13:31:37, Dec 2 2024
U-Boot 2025.01-rc3-00092-gc065e3b6a3ec-dirty (Dec 03 2024 - 18:24:41 +0800)
Reset Status: POR
CPU: NXP i.MX91(31) Rev1.0 A55 at 1400 MHz CPU: Consumer temperature grade (0C to 95C) Model: NXP i.MX91 11X11 EVK board DRAM: 2 GiB Core: 216 devices, 24 uclasses, devicetree: separate WDT: Started watchdog@42490000 with servicing every 1000ms (40s timeout) MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Reading from MMC(1)... *** Warning - bad CRC, using default environment
In: serial@44380000 Out: serial@44380000 Err: serial@44380000
BuildInfo:
- ELE firmware version 2.0.0-64d8ef47
switch to partitions #0, OK
mmc1 is current device
Net:
Warning: ethernet@428a0000 (eth1) using random MAC address - 62:b9:61:81:d0:f8
eth1: ethernet@428a0000 [PRIME]
Hit any key to stop autoboot: 0
---
Peng Fan (8):
gpio: imx_rgpio2p: Move 8ulp_data to data section
imx9: trdc: correct DEBUG usage
imx9: gpio: include types.h header
imx: Add iMX91 support
clk: imx93: support i.MX91
pinctrl: imx93: support i.MX91
arm64: dts: add NXP i.MX91 device tree
imx: Support i.MX91 11x11 EVK board
Ye Li (3):
imx93: Update 9x9 part fuses checking
clk: imx: clk-fracn-gppll: Add new PLL rate
ddr: imx: Add new rates for i.MX91
arch/arm/dts/imx91-11x11-evk-u-boot.dtsi | 195 ++ arch/arm/dts/imx91-u-boot.dtsi | 92 + arch/arm/include/asm/arch-imx/cpu.h | 5 + arch/arm/include/asm/arch-imx9/clock.h | 7 + arch/arm/include/asm/arch-imx9/gpio.h | 2 + arch/arm/include/asm/arch-imx9/imx91_pins.h | 770 ++++++++ arch/arm/include/asm/mach-imx/iomux-v3.h | 2 +- arch/arm/include/asm/mach-imx/sys_proto.h | 6 + arch/arm/mach-imx/imx9/Kconfig | 13 + arch/arm/mach-imx/imx9/clock.c | 37 +- arch/arm/mach-imx/imx9/container.cfg | 6 +- arch/arm/mach-imx/imx9/imximage.cfg | 6 +- arch/arm/mach-imx/imx9/soc.c | 47 +- arch/arm/mach-imx/imx9/trdc.c | 2 +- board/freescale/imx91_evk/Kconfig | 19 + board/freescale/imx91_evk/MAINTAINERS | 7 + board/freescale/imx91_evk/Makefile | 16 + board/freescale/imx91_evk/imx91_evk.c | 33 + board/freescale/imx91_evk/imx91_evk.env | 63 + board/freescale/imx91_evk/lpddr4_timing_1600mts.c | 1995 ++++++++++++++++++++ .../imx91_evk/lpddr4_timing_1600mts_ecc.c | 1995 ++++++++++++++++++++ board/freescale/imx91_evk/lpddr4_timing_2400mts.c | 1995 ++++++++++++++++++++ .../imx91_evk/lpddr4_timing_2400mts_ecc.c | 1995 ++++++++++++++++++++ board/freescale/imx91_evk/spl.c | 167 ++ configs/imx91_11x11_evk_defconfig | 145 ++ configs/imx91_11x11_evk_inline_ecc_defconfig | 146 ++ doc/board/nxp/imx91_11x11_evk.rst | 70 + doc/board/nxp/index.rst | 1 + drivers/clk/imx/clk-fracn-gppll.c | 5 +- drivers/clk/imx/clk-imx93.c | 52 +- drivers/cpu/imx8_cpu.c | 10 + drivers/ddr/imx/phy/ddrphy_utils.c | 8 + drivers/gpio/imx_rgpio2p.c | 2 +- drivers/pinctrl/nxp/pinctrl-imx93.c | 1 + .../include/dt-bindings/clock/imx93-clock.h | 6 +- .../src/arm64/freescale/imx91-11x11-evk.dts | 875 +++++++++ dts/upstream/src/arm64/freescale/imx91-pinfunc.h | 770 ++++++++ dts/upstream/src/arm64/freescale/imx91.dtsi | 70 + include/configs/imx91_evk.h | 21 + 39 files changed, 11617 insertions(+), 40 deletions(-)
---
base-commit: 98dd010b311e68b8398428cadf56a6381f7de202
change-id: 20241130-imx91-9de528a1a4f2
Best regards,
Signature · 1 line
Peng Fan <[email protected]>
PATCH 1/11 gpio: imx_rgpio2p: Move 8ulp_data to data section
From: Peng Fan <[email protected]>
have_dual_base is set to false, so the 8ulp_data will be put in BSS section which conflicts with the area of u-boot.dtb which padded just after u-boot-nodtb.bin. So move 8ulp_data to data section to avoid its content being corrupted by dtb.
--- drivers/gpio/imx_rgpio2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/imx_rgpio2p.c +1 -1
@@ -231,7 +231,7 @@ static struct imx_rgpio2p_soc_data imx7ulp_data = { .have_dual_base = true, }; -static struct imx_rgpio2p_soc_data imx8ulp_data = { +static struct imx_rgpio2p_soc_data imx8ulp_data __section(".data") = { .have_dual_base = false, };
Signature · 1 line
2.35.3
Fabio Estevam
maintainerRe: [PATCH 01/11] gpio: imx_rgpio2p: Move 8ulp_data to data section
Quoted 7 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
have_dual_baseis set to false, so the 8ulp_data will be put in BSS section which conflicts with the area of u-boot.dtb which padded just after u-boot-nodtb.bin. So move 8ulp_data to data section to avoid its content being corrupted by dtb.
...
drivers/gpio/imx_rgpio2p.c static struct imx_rgpio2p_soc_data imx7ulp_data = { · line 235
Quoted 3 lines
drivers/gpio/imx_rgpio2p.c +1
-1-static struct imx_rgpio2p_soc_data imx8ulp_data = { +static struct imx_rgpio2p_soc_data imx8ulp_data __section(".data") = { .have_dual_base = false,
Isn't it the same kind of problem that was discussed before?
https://lore.kernel.org/all/20241017034507.GJ4959@bill-the-cat/
Peng Fan
reviewerRE: [PATCH 01/11] gpio: imx_rgpio2p: Move 8ulp_data to data section
Quoted 13 lines
Subject: Re: [PATCH 01/11] gpio:
imx_rgpio2p: Move 8ulp_data to data sectionQuoted 6 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
have_dual_baseis set to false, so the 8ulp_data will be put in BSS section which conflicts with the area of u-boot.dtb which padded just after u-boot-nodtb.bin. So move 8ulp_data to data section to avoidits
Quoted 1 line
content being corrupted by dtb.
Quoted 8 lines
...
Review
Quoted 2 lines
(quoted diff) +1
-1-static struct imx_rgpio2p_soc_data imx8ulp_data = { +static struct imx_rgpio2p_soc_data imx8ulp_data __section(".data")=
Quoted 2 lines
+{
.have_dual_base = false,Isn't it the same kind of problem that was discussed before?
It is different case here. Here the imx8ulp_data is not a local variable. It could not be dynamically allocated.
Thanks,
Peng.
Quoted 9 lines
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
lore.kernel.org%2Fall%2F20241017034507.GJ4959%40bill-the- cat%2F&data=05%7C02%7Cpeng.fan%40nxp.com%7C8832a4f253ce4f 5f58bf08dd13c83e1b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 %7C0%7C638688472963187297%7CUnknown%7CTWFpbGZsb3d8eyJ FbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkF OIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=sZJoC%2B VY5lKRwobq0H62MauDk%2FI82OEQZxsW2OxaQPo%3D&reserved=0
Fabio Estevam
maintainerRe: [PATCH 01/11] gpio: imx_rgpio2p: Move 8ulp_data to data section
In reply to Peng Fan (OSS)Quoted 10 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
have_dual_baseis set to false, so the 8ulp_data will be put in BSS section which conflicts with the area of u-boot.dtb which padded just after u-boot-nodtb.bin. So move 8ulp_data to data section to avoid its content being corrupted by dtb.Fixes 51cfa66f2c4 ("gpio: imx_rgpio2p: support one address")Signed-off-by Peng Fan <[email protected]>
Applied all to u-boot-imx/next, thanks.
PATCH 2/11 imx9: trdc: correct DEBUG usage
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Replace '#if DEBUG' with '#ifdef DEBUG', otherwise '#define DEBUG 1' should be used and conflict with '#define DEBUG' in include/log.h
--- arch/arm/mach-imx/imx9/trdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/imx9/trdc.c +1 -1
@@ -484,7 +484,7 @@ void trdc_init(void) } } -#if DEBUG +#ifdef DEBUG int trdc_mbc_control_dump (ulong trdc_reg,u32 mbc_x,u32 glbac_id) {struct trdc_mbc *mbc_base = (struct trdc_mbc *)trdc_get_mbc_base (trdc_reg, mbc_x);
Signature · 1 line
2.35.3
PATCH 3/11 imx9: gpio: include types.h header
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Include types.h header for u32, following Linux Coding Style to include necessary headers.
--- arch/arm/include/asm/arch-imx9/gpio.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/arch-imx9/gpio.h +2 -0
@@ -6,6 +6,8 @@ #ifndef __ASM_ARCH_IMX9_GPIO_H #define __ASM_ARCH_IMX9_GPIO_H +#include <linux/types.h> + struct gpio_regs { u32 gpio_pdor; u32 gpio_psor;
Signature · 1 line
2.35.3
PATCH 4/11 imx93: Update 9x9 part fuses checking
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
According to iMX93 fuse burn plan, all 9x9 parts will have USB2, ENET1 (FEC), LVDS1, CSI1 and DSI1 disabled. The codes missed ENET1 fuse when detecting 9x9. Although it still can detect 9x9 correctly, we add the ENET1 fuse to the check to be more accurate.
--- arch/arm/mach-imx/imx9/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/imx9/soc.c +1 -1
@@ -195,7 +195,7 @@ static u32 get_cpu_variant_type(u32 type)bool npu_disable = !!(val &BIT (13 ));bool core1_disable = !!(val &BIT (15 )); -u32 pack_9x9_fused =BIT (4 ) |BIT (17 ) |BIT (19 ) |BIT (24 ); +u32 pack_9x9_fused =BIT (4 ) |BIT (5 ) |BIT (17 ) |BIT (19 ) |BIT (24 );/* Low performance 93 part */ if (((val >>6 ) &0x3F ) ==0xE && npu_disable)
Signature · 1 line
2.35.3
PATCH 5/11 imx: Add iMX91 support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
iMX91 is reduced part from iMX93 with part number: i.MX9131/11/01 It removed A55_1, M33, MIPI DSI, LVDS, etc.
i.MX9131:
- Support 2.4GT/s DDR and HWFFC at 1.2GT/s
i.MX9121:
- A55 at 800Mhz and DDR at 1600MTS, with low drive mode.
i.MX9111:
- Support 1.6GT/s DDR and HWFFC at 800MT/s
i.MX9101:
- Support 800Mhz ARM clock
- Support 1.6GT/s DDR and HWFFC at 800MT/s
- No parallel display, eQOS, flexcan
Updated Clock/Container/CPU and etc for i.MX91
--- arch/arm/include/asm/arch-imx/cpu.h | 5 + arch/arm/include/asm/arch-imx9/clock.h | 7 + arch/arm/include/asm/arch-imx9/imx91_pins.h | 770 ++++++++++++++++++++++++++++ arch/arm/include/asm/mach-imx/iomux-v3.h | 2 +- arch/arm/include/asm/mach-imx/sys_proto.h | 6 + arch/arm/mach-imx/imx9/Kconfig | 6 + arch/arm/mach-imx/imx9/clock.c | 37 +- arch/arm/mach-imx/imx9/container.cfg | 6 +- arch/arm/mach-imx/imx9/imximage.cfg | 6 +- arch/arm/mach-imx/imx9/soc.c | 45 +- drivers/cpu/imx8_cpu.c | 10 + 11 files changed, 882 insertions(+), 18 deletions(-)
arch/arm/include/asm/arch-imx/cpu.h +5 -0
@@ -71,6 +71,11 @@#define MXC_CPU_IMX9302 0xC9/* dummy ID */ #define MXC_CPU_IMX9301 0xCA/* dummy ID */ +#define MXC_CPU_IMX91 0xCB/* dummy ID */ +#define MXC_CPU_IMX9121 0xCC/* dummy ID */ +#define MXC_CPU_IMX9111 0xCD/* dummy ID */ +#define MXC_CPU_IMX9101 0xCE/* dummy ID */ +#define MXC_SOC_MX6 0x60#define MXC_SOC_MX7 0x70#define MXC_SOC_IMX8M 0x80
arch/arm/include/asm/arch-imx9/clock.h +7 -0
@@ -205,10 +205,17 @@ struct clk_root_map {u32 mux_type; }; +enum clk_soc { +CLK_SOC_ALL =0 , +CLK_SOC_IMX93 =1 , +CLK_SOC_IMX91 =2 , +}; +struct imx_clk_setting {u32 clk_root;enum ccm_clk_src src;u32 div; +enum clk_soc soc; };int clock_init_early (void );
arch/arm/include/asm/arch-imx9/imx91_pins.h new file +770 -0
770 lines not on this page · raw message
arch/arm/include/asm/mach-imx/iomux-v3.h +1 -1
@@ -86,7 +86,7 @@ typedef u64 iomux_v3_cfg_t;#define IOMUX_CONFIG_LPSR 0x20#define MUX_MODE_LPSR ((iomux_v3_cfg_t)IOMUX_CONFIG_LPSR << \ MUX_MODE_SHIFT) -#ifdef CONFIG_IMX93 +#if defined(CONFIG_IMX93 ) || defined(CONFIG_IMX91 )#define PAD_CTL_FSEL2 (0x2 << 7)#define PAD_CTL_FSEL3 (0x3 << 7)#define PAD_CTL_PUE (0x1 << 9)
arch/arm/include/asm/mach-imx/sys_proto.h +6 -0
@@ -97,6 +97,12 @@ struct bd_info;#define is_imx9302 () (is_cpu_type(MXC_CPU_IMX9302))#define is_imx9301 () (is_cpu_type(MXC_CPU_IMX9301)) +#define is_imx9121 () (is_cpu_type(MXC_CPU_IMX9121)) +#define is_imx9111 () (is_cpu_type(MXC_CPU_IMX9111)) +#define is_imx9101 () (is_cpu_type(MXC_CPU_IMX9101)) +#define is_imx91 () (is_cpu_type(MXC_CPU_IMX91) || is_cpu_type(MXC_CPU_IMX9111) || \ + is_cpu_type(MXC_CPU_IMX9101) || is_cpu_type(MXC_CPU_IMX9121)) +#define is_imxrt1020 () (is_cpu_type(MXC_CPU_IMXRT1020))#define is_imxrt1050 () (is_cpu_type(MXC_CPU_IMXRT1050))
arch/arm/mach-imx/imx9/Kconfig +6 -0
@@ -16,6 +16,12 @@ config IMX93 select IMX9 select ARMV8_SPL_EXCEPTION_VECTORS +config IMX91 + bool + select IMX9 + select ARMV8_SPL_EXCEPTION_VECTORS + + config SYS_SOC default "imx9"
arch/arm/mach-imx/imx9/clock.c +26 -11
@@ -30,6 +30,7 @@ static struct imx_intpll_rate_table imx9_intpll_tbl[] = {INT_PLL_RATE (1400000000U ,1 ,175 ,3 ),/* 1.4Ghz */ INT_PLL_RATE (1000000000U ,1 ,166 ,4 ),/* 1000Mhz */ INT_PLL_RATE (900000000U ,1 ,150 ,4 ),/* 900Mhz */ + INT_PLL_RATE(800000000U, 1, 200, 6), /* 800Mhz */ }; static struct imx_fracpll_rate_table imx9_fracpll_tbl[] = {
@@ -37,12 +38,14 @@ static struct imx_fracpll_rate_table imx9_fracpll_tbl[] = {FRAC_PLL_RATE (933000000U ,1 ,155 ,4 ,1 ,2 ),/* 933Mhz */ FRAC_PLL_RATE (800000000U ,1 ,200 ,6 ,0 ,1 ),/* 800Mhz */ FRAC_PLL_RATE (700000000U ,1 ,145 ,5 ,5 ,6 ),/* 700Mhz */ +FRAC_PLL_RATE (600000000U ,1 ,200 ,8 ,0 ,1 ),/* 600Mhz */ FRAC_PLL_RATE (484000000U ,1 ,121 ,6 ,0 ,1 ),FRAC_PLL_RATE (445333333U ,1 ,167 ,9 ,0 ,1 ),FRAC_PLL_RATE (466000000U ,1 ,155 ,8 ,1 ,3 ),/* 466Mhz */ FRAC_PLL_RATE (400000000U ,1 ,200 ,12 ,0 ,1 ),/* 400Mhz */ FRAC_PLL_RATE (300000000U ,1 ,150 ,12 ,0 ,1 ),FRAC_PLL_RATE (233000000U ,1 ,174 ,18 ,3 ,4 ),/* 233Mhz */ + FRAC_PLL_RATE(200000000U, 1, 200, 24, 0, 1), /* 200Mhz */ };/* return in khz */
@@ -723,7 +726,7 @@ struct imx_clk_setting imx_clk_ld_settings[] = {/* SWO TRACE to 133M */ {SWO_TRACE_CLK_ROOT, SYS_PLL_PFD1_DIV2, 3},/* M33 systetick to 24M */ - {M33_SYSTICK_CLK_ROOT, OSC_24M_CLK, 1}, + {M33_SYSTICK_CLK_ROOT, OSC_24M_CLK, 1, CLK_SOC_IMX93},/* NIC to 250M */ {NIC_CLK_ROOT, SYS_PLL_PFD0, 4},/* NIC_APB to 133M */
@@ -753,13 +756,17 @@ struct imx_clk_setting imx_clk_settings[] = {* WAKEUP_AXI to 312.5M, because of FEC only can support to 320M for * generating MII clock at 2.5M */ - {WAKEUP_AXI_CLK_ROOT, SYS_PLL_PFD2, 2}, + {WAKEUP_AXI_CLK_ROOT, SYS_PLL_PFD2, 2, CLK_SOC_IMX93}, +/* Wakeup AXI 250M*/ + {WAKEUP_AXI_CLK_ROOT, SYS_PLL_PFD0, 4, CLK_SOC_IMX91},/* SWO TRACE to 133M */ {SWO_TRACE_CLK_ROOT, SYS_PLL_PFD1_DIV2, 3},/* M33 systetick to 24M */ - {M33_SYSTICK_CLK_ROOT, OSC_24M_CLK, 1}, + {M33_SYSTICK_CLK_ROOT, OSC_24M_CLK, 1, CLK_SOC_IMX93},/* NIC to 400M */ - {NIC_CLK_ROOT, SYS_PLL_PFD1, 2}, + {NIC_CLK_ROOT, SYS_PLL_PFD1, 2, CLK_SOC_IMX93}, +/* NIC to 333M */ + {NIC_CLK_ROOT, SYS_PLL_PFD0, 3, CLK_SOC_IMX91},/* NIC_APB to 133M */ {NIC_APB_CLK_ROOT, SYS_PLL_PFD1_DIV2, 3} };
@@ -769,8 +776,12 @@ void bus_clock_init_low_drive(void)int i;for (i =0 ; i <ARRAY_SIZE (imx_clk_ld_settings); i++) { -ccm_clk_root_cfg (imx_clk_ld_settings[i].clk_root, - imx_clk_ld_settings[i].src, imx_clk_ld_settings[i].div); +if (imx_clk_ld_settings[i].soc ==CLK_SOC_ALL || + (is_imx91 () && imx_clk_ld_settings[i].soc ==CLK_SOC_IMX91 ) || + (is_imx93 () && imx_clk_ld_settings[i].soc ==CLK_SOC_IMX93 )) { +ccm_clk_root_cfg (imx_clk_ld_settings[i].clk_root, + imx_clk_ld_settings[i].src, imx_clk_ld_settings[i].div); + } } }
@@ -779,8 +790,12 @@ void bus_clock_init(void)int i;for (i =0 ; i <ARRAY_SIZE (imx_clk_settings); i++) { -ccm_clk_root_cfg (imx_clk_settings[i].clk_root, - imx_clk_settings[i].src, imx_clk_settings[i].div); +if (imx_clk_settings[i].soc ==CLK_SOC_ALL || + (is_imx91 () && imx_clk_settings[i].soc ==CLK_SOC_IMX91 ) || + (is_imx93 () && imx_clk_settings[i].soc ==CLK_SOC_IMX93 )) { +ccm_clk_root_cfg (imx_clk_settings[i].clk_root, + imx_clk_settings[i].src, imx_clk_settings[i].div); + } } }
@@ -857,7 +872,7 @@ u32 imx_get_fecclk(void)return ccm_clk_root_get_rate (WAKEUP_AXI_CLK_ROOT ); } -#if defined(CONFIG_IMX93 ) && defined(CONFIG_DWC_ETH_QOS ) +#if (CONFIG_IS_ENABLED (IMX93 ) ||CONFIG_IS_ENABLED (IMX91 )) &&CONFIG_IS_ENABLED (DWC_ETH_QOS )static int imx93_eqos_interface_init (struct udevice *dev,phy_interface_t interface_type) { struct blk_ctrl_wakeupmix_regs *bctrl =
@@ -901,12 +916,12 @@ static int imx93_eqos_interface_init(struct udevice *dev, phy_interface_t interfint board_interface_eth_init (struct udevice *dev,phy_interface_t interface_type) { -if (IS_ENABLED (CONFIG_IMX93 ) && +if ((IS_ENABLED (CONFIG_IMX93 ) ||IS_ENABLED (CONFIG_IMX91 )) &&IS_ENABLED (CONFIG_DWC_ETH_QOS ) &&device_is_compatible (dev,"nxp,imx93-dwmac-eqos" ))return imx93_eqos_interface_init (dev, interface_type); -if (IS_ENABLED (CONFIG_IMX93 ) && +if ((IS_ENABLED (CONFIG_IMX93 ) ||IS_ENABLED (CONFIG_IMX91 )) &&IS_ENABLED (CONFIG_FEC_MXC ) &&device_is_compatible (dev,"fsl,imx93-fec" ))return 0 ;
arch/arm/mach-imx/imx9/container.cfg +5 -1
@@ -6,6 +6,10 @@ BOOT_FROM SD 0x400 SOC_TYPE IMX9 CONTAINER +#ifdef CONFIG_IMX91 +IMAGE A55 bl31.bin 0x204C0000 +#else IMAGE A55 bl31.bin 0x204E0000 +#endif IMAGE A55 u-boot.bin CONFIG_TEXT_BASE -IMAGE A55 tee.bin 0x96000000 +IMAGE A55 tee.bin 0x96000000
arch/arm/mach-imx/imx9/imximage.cfg +5 -1
@@ -5,6 +5,10 @@ BOOT_FROM SD 0x400 SOC_TYPE IMX9 +#ifdef CONFIG_IMX91 +APPEND mx91a0-ahab-container.img +#else APPEND mx93a1-ahab-container.img +#endif CONTAINER -IMAGE A55 u-boot-spl-ddr.bin 0x2049A000 +IMAGE A55 u-boot-spl-ddr.bin CONFIG_SPL_TEXT_BASE
arch/arm/mach-imx/imx9/soc.c +41 -4
88 lines not on this page · raw message
drivers/cpu/imx8_cpu.c +10 -0
@@ -65,6 +65,14 @@ static const char *get_imx_type_str(u32 imxtype)return "93(02)" ;/* iMX93 900Mhz Low performance Dual core without NPU */ case MXC_CPU_IMX9301 :return "93(01)" ;/* iMX93 900Mhz Low performance Single core without NPU */ +case MXC_CPU_IMX91 : +return "91(31)" ;/* iMX91 11x11 Full feature */ +case MXC_CPU_IMX9121 : +return "91(21)" ;/* iMX91 11x11 Low drive mode */ +case MXC_CPU_IMX9111 : +return "91(11)" ;/* iMX91 9x9 Reduced feature */ +case MXC_CPU_IMX9101 : +return "91(01)" ;/* iMX91 9x9 Specific feature */ default :return "??" ; }
@@ -127,6 +135,8 @@ static int cpu_imx_get_temp(struct cpu_imx_plat *plat)if (IS_ENABLED (CONFIG_IMX8 )) {if (plat->cpu_rsrc ==SC_R_A72 ) idx =2 ;/* use "cpu-thermal1" device */ + }else if (IS_ENABLED (CONFIG_IMX91 )) { + idx =0 ; }else { idx =1 ; }
Signature · 1 line
2.35.3
PATCH 6/11 clk: imx93: support i.MX91
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX91 is a derived from i.MX93, and most clocks could be reused from i.MX93. Also Update imx93-clock.h to sync with linux next.
--- drivers/clk/imx/clk-imx93.c | 52 +++++++++++++++------- .../include/dt-bindings/clock/imx93-clock.h | 6 ++- 2 files changed, 40 insertions(+), 18 deletions(-)
drivers/clk/imx/clk-imx93.c +35 -17
@@ -13,6 +13,11 @@#include "clk.h" +#define IMX93_CLK_END 207 + +#define PLAT_IMX93 BIT(0) +#define PLAT_IMX91 BIT(1) +enum clk_sel {LOW_SPEED_IO_SEL ,NON_IO_SEL ,
@@ -50,6 +55,7 @@ static const struct imx93_clk_root {u32 off;enum clk_sel sel;unsigned long flags; +unsigned long plat; } root_array[] = {/* a55/m33/bus critical clk for system run */ { IMX93_CLK_A55_PERIPH, "a55_periph_root", 0x0000, FAST_SEL, CLK_IS_CRITICAL },
@@ -60,7 +66,7 @@ static const struct imx93_clk_root { { IMX93_CLK_BUS_AON, "bus_aon_root", 0x0300, LOW_SPEED_IO_SEL, CLK_IS_CRITICAL }, { IMX93_CLK_WAKEUP_AXI, "wakeup_axi_root", 0x0380, FAST_SEL, CLK_IS_CRITICAL }, { IMX93_CLK_SWO_TRACE, "swo_trace_root", 0x0400, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_M33_SYSTICK, "m33_systick_root", 0x0480, LOW_SPEED_IO_SEL, }, + { IMX93_CLK_M33_SYSTICK, "m33_systick_root", 0x0480, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, { IMX93_CLK_FLEXIO1, "flexio1_root", 0x0500, LOW_SPEED_IO_SEL, }, { IMX93_CLK_FLEXIO2, "flexio2_root", 0x0580, LOW_SPEED_IO_SEL, }, { IMX93_CLK_LPTMR1, "lptmr1_root", 0x0700, LOW_SPEED_IO_SEL, },
@@ -117,15 +123,15 @@ static const struct imx93_clk_root { { IMX93_CLK_HSIO_ACSCAN_80M, "hsio_acscan_80m_root", 0x1f80, LOW_SPEED_IO_SEL, }, { IMX93_CLK_HSIO_ACSCAN_480M, "hsio_acscan_480m_root", 0x2000, MISC_SEL, }, { IMX93_CLK_NIC_AXI, "nic_axi_root", 0x2080, FAST_SEL, CLK_IS_CRITICAL, }, - { IMX93_CLK_ML_APB, "ml_apb_root", 0x2180, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_ML, "ml_root", 0x2200, FAST_SEL, }, + { IMX93_CLK_ML_APB, "ml_apb_root", 0x2180, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_ML, "ml_root", 0x2200, FAST_SEL, 0, PLAT_IMX93, }, { IMX93_CLK_MEDIA_AXI, "media_axi_root", 0x2280, FAST_SEL, }, { IMX93_CLK_MEDIA_APB, "media_apb_root", 0x2300, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_MEDIA_LDB, "media_ldb_root", 0x2380, VIDEO_SEL, }, + { IMX93_CLK_MEDIA_LDB, "media_ldb_root", 0x2380, VIDEO_SEL, 0, PLAT_IMX93, }, { IMX93_CLK_MEDIA_DISP_PIX, "media_disp_pix_root", 0x2400, VIDEO_SEL, }, { IMX93_CLK_CAM_PIX, "cam_pix_root", 0x2480, VIDEO_SEL, }, - { IMX93_CLK_MIPI_TEST_BYTE, "mipi_test_byte_root", 0x2500, VIDEO_SEL, }, - { IMX93_CLK_MIPI_PHY_CFG, "mipi_phy_cfg_root", 0x2580, VIDEO_SEL, }, + { IMX93_CLK_MIPI_TEST_BYTE, "mipi_test_byte_root", 0x2500, VIDEO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_MIPI_PHY_CFG, "mipi_phy_cfg_root", 0x2580, VIDEO_SEL, 0, PLAT_IMX93, }, { IMX93_CLK_ADC, "adc_root", 0x2700, LOW_SPEED_IO_SEL, }, { IMX93_CLK_PDM, "pdm_root", 0x2780, AUDIO_SEL, }, { IMX93_CLK_TSTMR1, "tstmr1_root", 0x2800, LOW_SPEED_IO_SEL, },
@@ -134,13 +140,16 @@ static const struct imx93_clk_root { { IMX93_CLK_MQS2, "mqs2_root", 0x2980, AUDIO_SEL, }, { IMX93_CLK_AUDIO_XCVR, "audio_xcvr_root", 0x2a00, NON_IO_SEL, }, { IMX93_CLK_SPDIF, "spdif_root", 0x2a80, AUDIO_SEL, }, - { IMX93_CLK_ENET, "enet_root", 0x2b00, NON_IO_SEL, }, - { IMX93_CLK_ENET_TIMER1, "enet_timer1_root", 0x2b80, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_ENET_TIMER2, "enet_timer2_root", 0x2c00, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_ENET_REF, "enet_ref_root", 0x2c80, NON_IO_SEL, }, - { IMX93_CLK_ENET_REF_PHY, "enet_ref_phy_root", 0x2d00, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_I3C1_SLOW, "i3c1_slow_root", 0x2d80, LOW_SPEED_IO_SEL, }, - { IMX93_CLK_I3C2_SLOW, "i3c2_slow_root", 0x2e00, LOW_SPEED_IO_SEL, }, + { IMX93_CLK_ENET, "enet_root", 0x2b00, NON_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_ENET_TIMER1, "enet_timer1_root", 0x2b80, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_ENET_TIMER2, "enet_timer2_root", 0x2c00, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_ENET_REF, "enet_ref_root", 0x2c80, NON_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_ENET_REF_PHY, "enet_ref_phy_root", 0x2d00, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, + { IMX91_CLK_ENET1_QOS_TSN, "enet1_qos_tsn_root", 0x2b00, NON_IO_SEL, 0, PLAT_IMX91, }, + { IMX91_CLK_ENET_TIMER, "enet_timer_root", 0x2b80, LOW_SPEED_IO_SEL, 0, PLAT_IMX91, }, + { IMX91_CLK_ENET2_REGULAR, "enet2_regular_root", 0x2c80, NON_IO_SEL, 0, PLAT_IMX91, }, + { IMX93_CLK_I3C1_SLOW, "i3c1_slow_root", 0x2d80, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, + { IMX93_CLK_I3C2_SLOW, "i3c2_slow_root", 0x2e00, LOW_SPEED_IO_SEL, 0, PLAT_IMX93, }, { IMX93_CLK_USB_PHY_BURUNIN, "usb_phy_root", 0x2e80, LOW_SPEED_IO_SEL, }, { IMX93_CLK_PAL_CAME_SCAN, "pal_came_scan_root", 0x2f00, MISC_SEL, } };
@@ -152,6 +161,7 @@ static const struct imx93_clk_ccgr {u32 off;unsigned long flags;u32 *shared_count; +unsigned long plat; } ccgr_array[] = { { IMX93_CLK_A55_GATE, "a55_alt", "a55_alt_root", 0x8000, },/* M33 critical clk for system run */
@@ -226,7 +236,7 @@ static const struct imx93_clk_ccgr { { IMX93_CLK_SAI3_IPG, "sai3_ipg_clk", "bus_wakeup_root", 0x94c0, 0, &share_count_sai3}, { IMX93_CLK_MIPI_CSI_GATE, "mipi_csi", "media_apb_root", 0x9580, }, { IMX93_CLK_MIPI_DSI_GATE, "mipi_dsi", "media_apb_root", 0x95c0, }, - { IMX93_CLK_LVDS_GATE, "lvds", "media_ldb_root", 0x9600, }, + { IMX93_CLK_LVDS_GATE, "lvds", "media_ldb_root", 0x9600, 0, NULL, PLAT_IMX93, }, { IMX93_CLK_LCDIF_GATE, "lcdif", "media_apb_root", 0x9640, }, { IMX93_CLK_PXP_GATE, "pxp", "media_apb_root", 0x9680, }, { IMX93_CLK_ISI_GATE, "isi", "media_apb_root", 0x96c0, },
@@ -240,8 +250,10 @@ static const struct imx93_clk_ccgr { { IMX93_CLK_AUD_XCVR_GATE, "aud_xcvr", "audio_xcvr_root", 0x9b80, }, { IMX93_CLK_SPDIF_GATE, "spdif", "spdif_root", 0x9c00, }, { IMX93_CLK_HSIO_32K_GATE, "hsio_32k", "clock-osc-24m", 0x9dc0, }, - { IMX93_CLK_ENET1_GATE, "enet1", "wakeup_axi_root", 0x9e00, }, - { IMX93_CLK_ENET_QOS_GATE, "enet_qos", "wakeup_axi_root", 0x9e40, }, + { IMX93_CLK_ENET1_GATE, "enet1", "wakeup_axi_root", 0x9e00, 0, NULL, PLAT_IMX93, }, + { IMX93_CLK_ENET_QOS_GATE, "enet_qos", "wakeup_axi_root", 0x9e40, 0, NULL, PLAT_IMX93, }, + { IMX91_CLK_ENET2_REGULAR_GATE, "enet2_regular", "wakeup_axi_root", 0x9e00, 0, NULL, PLAT_IMX91, }, + { IMX91_CLK_ENET1_QOS_TSN_GATE, "enet1_qos_tsn", "wakeup_axi_root", 0x9e40, 0, NULL, PLAT_IMX91, }, /* Critical because clk accessed during CPU idle */ { IMX93_CLK_SYS_CNT_GATE, "sys_cnt", "clock-osc-24m", 0x9e80, CLK_IS_CRITICAL}, { IMX93_CLK_TSTMR1_GATE, "tstmr1", "bus_aon_root", 0x9ec0, },
@@ -257,6 +269,7 @@ static int imx93_clk_probe(struct udevice *dev)struct clk osc_24m_clk, osc_32k_clk, ext1_clk;void __iomem *base, *anatop_base;int i, ret; +const unsigned long plat = (unsigned long )dev_get_driver_data (dev);clk_dm (IMX93_CLK_DUMMY ,clk_register_fixed_rate (NULL ,"dummy" ,0UL ));
@@ -307,6 +320,8 @@ static int imx93_clk_probe(struct udevice *dev)for (i =0 ; i <ARRAY_SIZE (root_array); i++) { root = &root_array[i]; +if (root->plat && !(root->plat & plat)) +continue ; clk_dm(root->clk, imx93_clk_composite_flags(root->name, parent_names[root->sel], 4, base + root->off, 3,
@@ -315,6 +330,8 @@ static int imx93_clk_probe(struct udevice *dev)for (i =0 ; i <ARRAY_SIZE (ccgr_array); i++) { ccgr = &ccgr_array[i]; +if (ccgr->plat && !(ccgr->plat & plat)) +continue ;clk_dm (ccgr->clk,imx93_clk_gate (NULL , ccgr->name, ccgr->parent_name, ccgr->flags, base + ccgr->off,0 ,1 ,1 ,3 , ccgr->shared_count));
@@ -328,7 +345,8 @@ static int imx93_clk_probe(struct udevice *dev) }static const struct udevice_id imx93_clk_ids[] = { - { .compatible ="fsl,imx93-ccm" }, + { .compatible ="fsl,imx93-ccm" , .data = (unsigned long )PLAT_IMX93 }, + { .compatible ="fsl,imx91-ccm" , .data = (unsigned long )PLAT_IMX91 }, {/* Sentinel */ }, };
dts/upstream/include/dt-bindings/clock/imx93-clock.h +5 -1
@@ -204,6 +204,10 @@#define IMX93_CLK_A55_SEL 199#define IMX93_CLK_A55_CORE 200#define IMX93_CLK_PDM_IPG 201 -#define IMX93_CLK_END 202 +#define IMX91_CLK_ENET1_QOS_TSN 202 +#define IMX91_CLK_ENET_TIMER 203 +#define IMX91_CLK_ENET2_REGULAR 204 +#define IMX91_CLK_ENET2_REGULAR_GATE 205 +#define IMX91_CLK_ENET1_QOS_TSN_GATE 206#endif
Signature · 1 line
2.35.3
PATCH 7/11 clk: imx: clk-fracn-gppll: Add new PLL rate
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
Add new rates to integer and frac PLL to support iMX91
--- drivers/clk/imx/clk-fracn-gppll.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clk/imx/clk-fracn-gppll.c +4 -1
@@ -86,6 +86,7 @@ struct clk_fracn_gppll {*/ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {PLL_FRACN_GP (650000000U ,162 ,50 ,100 ,0 ,6 ), +PLL_FRACN_GP (600000000U ,200 ,0 ,1 ,0 ,8 ),PLL_FRACN_GP (594000000U ,198 ,0 ,1 ,0 ,8 ),PLL_FRACN_GP (560000000U ,140 ,0 ,1 ,0 ,6 ),PLL_FRACN_GP (498000000U ,166 ,0 ,1 ,0 ,8 ),
@@ -93,7 +94,8 @@ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {PLL_FRACN_GP (445333333U ,167 ,0 ,1 ,0 ,9 ),PLL_FRACN_GP (400000000U ,200 ,0 ,1 ,0 ,12 ),PLL_FRACN_GP (393216000U ,163 ,84 ,100 ,0 ,10 ), -PLL_FRACN_GP (300000000U ,150 ,0 ,1 ,0 ,12 ) +PLL_FRACN_GP (300000000U ,150 ,0 ,1 ,0 ,12 ), +PLL_FRACN_GP (200000000U ,200 ,0 ,1 ,0 ,24 ) }; struct imx_fracn_gppll_clk imx_fracn_gppll = {
@@ -111,6 +113,7 @@ static const struct imx_fracn_gppll_rate_table int_tbl[] = {PLL_FRACN_GP_INTEGER (1700000000U ,141 ,1 ,2 ),PLL_FRACN_GP_INTEGER (1400000000U ,175 ,1 ,3 ),PLL_FRACN_GP_INTEGER (900000000U ,150 ,1 ,4 ), + PLL_FRACN_GP_INTEGER(800000000U, 200, 1, 6), }; struct imx_fracn_gppll_clk imx_fracn_gppll_integer = {
Signature · 1 line
2.35.3
PATCH 8/11 ddr: imx: Add new rates for i.MX91
In reply to Peng Fan (OSS)From: Ye Li <[email protected]>
iMX91 reuses iMX93 controller and PHY, but with lower speed, so add new DDR rates for i.MX91.
--- drivers/ddr/imx/phy/ddrphy_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/ddr/imx/phy/ddrphy_utils.c +8 -0
@@ -144,6 +144,10 @@ void ddrphy_init_set_dfi_clk(unsigned int drate)dram_pll_init (MHZ (400 ));dram_disable_bypass ();break ; +case 1200 : +dram_pll_init (MHZ (300 )); +dram_disable_bypass (); +break ;case 1066 :dram_pll_init (MHZ (266 ));dram_disable_bypass ();
@@ -152,6 +156,10 @@ void ddrphy_init_set_dfi_clk(unsigned int drate)dram_pll_init (MHZ (233 ));dram_disable_bypass ();break ; +case 800 : +dram_pll_init (MHZ (200 )); +dram_disable_bypass (); +break ;case 667 :dram_pll_init (MHZ (167 ));dram_disable_bypass ();
Signature · 1 line
2.35.3
PATCH 9/11 pinctrl: imx93: support i.MX91
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Reuse i.MX93 pinctrl driver for i.MX91, because i.MX91 follows same design as i.MX93 in IOMUXC controller.
--- drivers/pinctrl/nxp/pinctrl-imx93.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/nxp/pinctrl-imx93.c +1 -0
@@ -22,6 +22,7 @@ static int imx93_pinctrl_probe(struct udevice *dev)static const struct udevice_id imx93_pinctrl_match[] = { { .compatible ="fsl,imx93-iomuxc" , .data = (ulong)&imx93_pinctrl_soc_info }, + { .compatible ="fsl,imx91-iomuxc" , .data = (ulong)&imx93_pinctrl_soc_info }, {/* sentinel */ } };
Signature · 1 line
2.35.3
PATCH 10/11 arm64: dts: add NXP i.MX91 device tree
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add the i.MX91 device tree from [1]. These files could be synced to linux upstream after [1] merged to linux source tree.
[1]
https://lore.kernel.org/all/[email protected]/
--- .../src/arm64/freescale/imx91-11x11-evk.dts | 875 +++++++++++++++++++++ dts/upstream/src/arm64/freescale/imx91-pinfunc.h | 770 ++++++++++++++++++ dts/upstream/src/arm64/freescale/imx91.dtsi | 70 ++ 3 files changed, 1715 insertions(+)
dts/upstream/src/arm64/freescale/imx91-11x11-evk.dts new file +875 -0
@@ -0,0 +1,875 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +/dts-v1/; + +#include <dt-bindings/usb/pd.h> +#include "imx91.dtsi" + +/ { + compatible = "fsl,imx91-11x11-evk", "fsl,imx91"; + model = "NXP i.MX91 11X11 EVK board"; + + aliases { + ethernet0 = &fec; + ethernet1 = &eqos; + rtc0 = &bbnsm_rtc; + }; + + 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_audio_pwr: regulator-audio-pwr { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "audio-pwr"; + gpio = <&adp5585 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + 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; + }; + + reg_usdhc3_vmmc: regulator-usdhc3 { + compatible = "regulator-fixed"; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "WLAN_EN"; + gpio = <&pcal6524 20 GPIO_ACTIVE_HIGH>; + enable-active-high; + /* + * IW612 wifi chip needs more delay than other wifi chips to complete + * the host interface initialization after power up, otherwise the + * internal state of IW612 may be unstable, resulting in the failure of + * the SDIO3.0 switch voltage. + */ + startup-delay-us = <20000>; + }; + + 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_vrpi_3v3: regulator-vrpi-3v3 { + compatible = "regulator-fixed"; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "VRPI_3V3"; + vin-supply = <&buck4>; + gpio = <&pcal6524 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_vrpi_5v: regulator-vrpi-5v { + compatible = "regulator-fixed"; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "VRPI_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; + }; + }; +}; + +&adc1 { + vref-supply = <®_vref_1v8>; + status = "okay"; +}; + +&eqos { + phy-handle = <ðphy1>; + 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 = <ðphy2>; + 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; + }; + }; +}; + +/* + * When add, delete or change any target device setting in &lpi2c1, + * please synchronize the changes to the &i3c1 bus in imx91-11x11-evk-i3c.dts. + */ +&lpi2c1 { + clock-frequency = <400000>; + pinctrl-0 = <&pinctrl_lpi2c1>; + pinctrl-names = "default"; + status = "okay"; + + codec: wm8962@1a { + compatible = "wlf,wm8962"; + reg = <0x1a>; + clocks = <&clk IMX93_CLK_SAI3_GATE>; + AVDD-supply = <®_audio_pwr>; + CPVDD-supply = <®_audio_pwr>; + DBVDD-supply = <®_audio_pwr>; + DCVDD-supply = <®_audio_pwr>; + MICVDD-supply = <®_audio_pwr>; + PLLVDD-supply = <®_audio_pwr>; + SPKVDD1-supply = <®_audio_pwr>; + SPKVDD2-supply = <®_audio_pwr>; + gpio-cfg = < + 0x0000 /* 0:Default */ + 0x0000 /* 1:Default */ + 0x0000 /* 2:FN_DMICCLK */ + 0x0000 /* 3:Default */ + 0x0000 /* 4:FN_DMICCDAT */ + 0x0000 /* 5:Default */ + >; + }; + + lsm6dsm@6a { + compatible = "st,lsm6dso"; + reg = <0x6a>; + }; +}; + +&lpi2c2 { + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <400000>; + pinctrl-0 = <&pinctrl_lpi2c2>; + pinctrl-names = "default"; + status = "okay"; + + pcal6524: gpio@22 { + compatible = "nxp,pcal6524"; + reg = <0x22>; + #interrupt-cells = <2>; + interrupt-controller; + interrupts = <27 IRQ_TYPE_LEVEL_LOW>; + #gpio-cells = <2>; + gpio-controller; + interrupt-parent = <&gpio3>; + pinctrl-0 = <&pinctrl_pcal6524>; + pinctrl-names = "default"; + }; + + pmic@25 { + compatible = "nxp,pca9451a"; + reg = <0x25>; + interrupts = <11 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&pcal6524>; + + regulators { + + 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"; + }; + }; + }; + + adp5585: io-expander@34 { + compatible = "adi,adp5585-00", "adi,adp5585"; + reg = <0x34>; + #gpio-cells = <2>; + gpio-controller; + #pwm-cells = <3>; + gpio-reserved-ranges = <5 1>; + + exp-sel-hog { + gpio-hog; + gpios = <4 GPIO_ACTIVE_HIGH>; + output-low; + }; + }; +}; + +&lpi2c3 { + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <400000>; + pinctrl-0 = <&pinctrl_lpi2c3>; + pinctrl-names = "default"; + status = "okay"; + + 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>; + }; + }; + }; + }; + }; + + ptn5110_2: tcpc@51 { + compatible = "nxp,ptn5110", "tcpci"; + reg = <0x51>; + interrupts = <27 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&gpio3>; + status = "okay"; + + typec2_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>; + + typec2_dr_sw: endpoint { + remote-endpoint = <&usb2_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"; +}; + +&lpuart5 { + pinctrl-0 = <&pinctrl_uart5>; + pinctrl-names = "default"; + status = "okay"; +}; + +&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 { + 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 { + usb2_drd_sw: endpoint { + remote-endpoint = <&typec2_dr_sw>; + }; + }; +}; + +&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"; +}; + +&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 = <®_usdhc2_vmmc>; + status = "okay"; +}; + +&wdog3 { + fsl,ext-reset-output; + status = "okay"; +}; + +&iomuxc { + 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_IO3 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_flexcan2: flexcan2grp { + fsl,pins = < + MX91_PAD_GPIO_IO25__CAN2_TX 0x139e + MX91_PAD_GPIO_IO27__CAN2_RX 0x139e + >; + }; + + pinctrl_flexcan2_sleep: flexcan2sleepgrp { + fsl,pins = < + MX91_PAD_GPIO_IO25__GPIO2_IO25 0x31e + MX91_PAD_GPIO_IO27__GPIO2_IO27 0x31e + >; + }; + + 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 + >; + }; + + pinctrl_lpi2c2: lpi2c2grp { + fsl,pins = < + MX91_PAD_I2C2_SCL__LPI2C2_SCL 0x40000b9e + MX91_PAD_I2C2_SDA__LPI2C2_SDA 0x40000b9e + >; + }; + + pinctrl_lpi2c3: lpi2c3grp { + fsl,pins = < + MX91_PAD_GPIO_IO28__LPI2C3_SDA 0x40000b9e + MX91_PAD_GPIO_IO29__LPI2C3_SCL 0x40000b9e + >; + }; + + pinctrl_pcal6524: pcal6524grp { + fsl,pins = < + MX91_PAD_CCM_CLKO2__GPIO3_IO27 0x31e + >; + }; + + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX91_PAD_PDM_CLK__PDM_CLK 0x31e + MX91_PAD_PDM_BIT_STREAM0__PDM_BIT_STREAM0 0x31e + MX91_PAD_PDM_BIT_STREAM1__PDM_BIT_STREAM1 0x31e + >; + }; + + pinctrl_pdm_sleep: pdmsleepgrp { + fsl,pins = < + MX91_PAD_PDM_CLK__GPIO1_IO8 0x31e + MX91_PAD_PDM_BIT_STREAM0__GPIO1_IO9 0x31e + MX91_PAD_PDM_BIT_STREAM1__GPIO1_IO10 0x31e + >; + }; + + pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp { + fsl,pins = < + MX91_PAD_SD2_RESET_B__GPIO3_IO7 0x31e + >; + }; + + pinctrl_sai1: sai1grp { + fsl,pins = < + MX91_PAD_SAI1_TXC__SAI1_TX_BCLK 0x31e + MX91_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x31e + MX91_PAD_SAI1_TXD0__SAI1_TX_DATA0 0x31e + MX91_PAD_SAI1_RXD0__SAI1_RX_DATA0 0x31e + >; + }; + + pinctrl_sai1_sleep: sai1sleepgrp { + fsl,pins = < + MX91_PAD_SAI1_TXC__GPIO1_IO12 0x51e + MX91_PAD_SAI1_TXFS__GPIO1_IO11 0x51e + MX91_PAD_SAI1_TXD0__GPIO1_IO13 0x51e + MX91_PAD_SAI1_RXD0__GPIO1_IO14 0x51e + >; + }; + + pinctrl_sai3: sai3grp { + fsl,pins = < + MX91_PAD_GPIO_IO26__SAI3_TX_SYNC 0x31e + MX91_PAD_GPIO_IO16__SAI3_TX_BCLK 0x31e + MX91_PAD_GPIO_IO17__SAI3_MCLK 0x31e + MX91_PAD_GPIO_IO19__SAI3_TX_DATA0 0x31e + MX91_PAD_GPIO_IO20__SAI3_RX_DATA0 0x31e + >; + }; + + pinctrl_sai3_sleep: sai3sleepgrp { + fsl,pins = < + MX91_PAD_GPIO_IO26__GPIO2_IO26 0x51e + MX91_PAD_GPIO_IO16__GPIO2_IO16 0x51e + MX91_PAD_GPIO_IO17__GPIO2_IO17 0x51e + MX91_PAD_GPIO_IO19__GPIO2_IO19 0x51e + MX91_PAD_GPIO_IO20__GPIO2_IO20 0x51e + >; + }; + + pinctrl_spdif: spdifgrp { + fsl,pins = < + MX91_PAD_GPIO_IO22__SPDIF_IN 0x31e + MX91_PAD_GPIO_IO23__SPDIF_OUT 0x31e + >; + }; + + pinctrl_spdif_sleep: spdifsleepgrp { + fsl,pins = < + MX91_PAD_GPIO_IO22__GPIO2_IO22 0x31e + MX91_PAD_GPIO_IO23__GPIO2_IO23 0x31e + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX91_PAD_UART1_RXD__LPUART1_RX 0x31e + MX91_PAD_UART1_TXD__LPUART1_TX 0x31e + >; + }; + + 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 + >; + }; + + 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 + >; + }; + + 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 + >; + }; + + 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 + >; + }; + + pinctrl_usdhc3_wlan: usdhc3wlangrp { + fsl,pins = < + MX91_PAD_CCM_CLKO1__GPIO3_IO26 0x31e + >; + }; +};
dts/upstream/src/arm64/freescale/imx91-pinfunc.h new file +770 -0
770 lines not on this page · raw message
dts/upstream/src/arm64/freescale/imx91.dtsi new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.35.3
PATCH 11/11 imx: Support i.MX91 11x11 EVK board
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add i.MX91 11x11 EVK Board support.
- Four ddr scripts included w/o inline ecc feature.
- SDHC/NETWORK/I2C/UART supported
- PCA9451 supported, default nominal drive mode
- Documentation added.
--- arch/arm/dts/imx91-11x11-evk-u-boot.dtsi | 195 ++ arch/arm/dts/imx91-u-boot.dtsi | 92 + arch/arm/mach-imx/imx9/Kconfig | 7 + board/freescale/imx91_evk/Kconfig | 19 + board/freescale/imx91_evk/MAINTAINERS | 7 + board/freescale/imx91_evk/Makefile | 16 + board/freescale/imx91_evk/imx91_evk.c | 33 + board/freescale/imx91_evk/imx91_evk.env | 63 + board/freescale/imx91_evk/lpddr4_timing_1600mts.c | 1995 ++++++++++++++++++++ .../imx91_evk/lpddr4_timing_1600mts_ecc.c | 1995 ++++++++++++++++++++ board/freescale/imx91_evk/lpddr4_timing_2400mts.c | 1995 ++++++++++++++++++++ .../imx91_evk/lpddr4_timing_2400mts_ecc.c | 1995 ++++++++++++++++++++ board/freescale/imx91_evk/spl.c | 167 ++ configs/imx91_11x11_evk_defconfig | 145 ++ configs/imx91_11x11_evk_inline_ecc_defconfig | 146 ++ doc/board/nxp/imx91_11x11_evk.rst | 70 + doc/board/nxp/index.rst | 1 + include/configs/imx91_evk.h | 21 + 18 files changed, 8962 insertions(+)
arch/arm/dts/imx91-11x11-evk-u-boot.dtsi new file +195 -0
@@ -0,0 +1,195 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 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"; + }; + }; +}; + +&{/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_reg_usdhc2_vmmc { + bootph-pre-ram; +}; + +&pinctrl_uart1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2_gpio { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_usdhc2 { + 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; +}; + +&{/soc@0/bus@44000000/i2c@44350000/pmic@25} { + bootph-pre-ram; + bootph-some-ram; +}; + +&{/soc@0/bus@44000000/i2c@44350000/pmic@25/regulators} { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_lpi2c1 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_lpi2c2 { + bootph-pre-ram; + bootph-some-ram; +}; + +&pinctrl_lpi2c3 { + bootph-pre-ram; + bootph-some-ram; +}; + +&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>; +}; + +ðphy1 { + 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 { + 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; +};
arch/arm/dts/imx91-u-boot.dtsi new file +92 -0
92 lines not on this page · raw message
arch/arm/mach-imx/imx9/Kconfig +7 -0
@@ -29,6 +29,12 @@ choice prompt "NXP i.MX9 board select" optional +config TARGET_IMX91_11X11_EVK + bool "imx91_11x11_evk" + select OF_BOARD_FIXUP + select IMX91 + imply OF_UPSTREAM + config TARGET_IMX93_9X9_QSB bool "imx93_qsb" select OF_BOARD_FIXUP
@@ -56,6 +62,7 @@ config TARGET_PHYCORE_IMX93 endchoice +source "board/freescale/imx91_evk/Kconfig" source "board/freescale/imx93_evk/Kconfig" source "board/freescale/imx93_qsb/Kconfig" source "board/phytec/phycore_imx93/Kconfig"
board/freescale/imx91_evk/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +if TARGET_IMX91_11X11_EVK + +config SYS_BOARD + default "imx91_evk" + +config SYS_VENDOR + default "freescale" + +config SYS_CONFIG_NAME + default "imx91_evk" + +config IMX91_EVK_LPDDR4 + bool "Using LPDDR4 Timing and PMIC voltage" + default y + select IMX9_LPDDR4X + help + Select the LPDDR4 timing and 1.1V VDDQ + +endif
board/freescale/imx91_evk/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +i.MX91 11x11 EVK BOARD +M: Peng Fan <[email protected]> +S: Maintained +F: board/freescale/imx91_evk/ +F: include/configs/imx91_evk.h +F: configs/imx91_11x11_evk_defconfig +F: configs/imx91_11x11_evk_inline_ecc_defconfig
board/freescale/imx91_evk/Makefile new file +16 -0
@@ -0,0 +1,16 @@ +# +# Copyright 2024 NXP +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += imx91_evk.o + +ifdef CONFIG_XPL_BUILD +obj-y += spl.o +ifdef CONFIG_IMX9_DRAM_INLINE_ECC +obj-$(CONFIG_IMX91_EVK_LPDDR4) += lpddr4_timing_2400mts_ecc.o lpddr4_timing_1600mts_ecc.o +else +obj-$(CONFIG_IMX91_EVK_LPDDR4) += lpddr4_timing_2400mts.o lpddr4_timing_1600mts.o +endif +endif
board/freescale/imx91_evk/imx91_evk.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2024 NXP +*/ + +#include <env.h> +#include <init.h> +#include <miiphy.h> +#include <netdev.h> +#include <asm/arch/sys_proto.h> + +int board_init (void ) +{ +return 0 ; +} + +int board_late_init (void ) +{ +#ifdef CONFIG_ENV_IS_IN_MMC +board_late_mmc_env_init (); +#endif + +env_set ("sec_boot" ,"no" ); +#ifdef CONFIG_AHAB_BOOT +env_set ("sec_boot" ,"yes" ); +#endif + +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +env_set ("board_name" ,"11X11_EVK" ); +env_set ("board_rev" ,"iMX93" ); +#endif +return 0 ; +}
board/freescale/imx91_evk/imx91_evk.env new file +63 -0
63 lines not on this page · raw message
board/freescale/imx91_evk/lpddr4_timing_1600mts.c new file +1995 -0
1,995 lines not on this page · raw message
board/freescale/imx91_evk/lpddr4_timing_1600mts_ecc.c new file +1995 -0
561 lines not on this page · raw message
board/freescale/imx91_evk/lpddr4_timing_2400mts.c new file +1995 -0
1,995 lines not on this page · raw message
board/freescale/imx91_evk/lpddr4_timing_2400mts_ecc.c new file +1995 -0
1,995 lines not on this page · raw message
board/freescale/imx91_evk/spl.c new file +167 -0
167 lines not on this page · raw message
configs/imx91_11x11_evk_defconfig new file +145 -0
145 lines not on this page · raw message
configs/imx91_11x11_evk_inline_ecc_defconfig new file +146 -0
146 lines not on this page · raw message
doc/board/nxp/imx91_11x11_evk.rst new file +70 -0
70 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.35.3
Part of the diff is not shown here. View the raw message.