This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit af5aadb5b2feb88c33fce68141cf27ba7b7ee4de Author: hujun5 <[email protected]> AuthorDate: Fri May 8 11:14:27 2026 +0800 arch/arm64/imx9: remove IMX95 pinmux skip and unify LPUART pad config Previously imx9_lowsetup() skipped the entire LPUART pinmux block on iMX95 via #ifndef CONFIG_ARCH_CHIP_IMX95, because the SCMI transport was not yet initialized at lowsetup time. This forced each board to configure non-console LPUART pads individually from imx9_bringup(). Fix by calling imx9_scmi_initialize() from arm64_chip_boot() just before imx9_lowsetup(), so the SCMI channel is ready when lowsetup runs. Then remove the #ifndef CONFIG_ARCH_CHIP_IMX95 guard so all LPUART pads are configured through the unified lowsetup path on both iMX93 and iMX95. Also add IOMUXC_PAD_UART1_RXD_LPUART1_RX/TX macros to the arm64 imx95_pinmux.h (absolute-address style) so MUX_LPUART1_RX/TX resolve correctly when the lowsetup code compiles for iMX95. Signed-off-by: hujun5 <[email protected]> --- arch/arm64/src/imx9/hardware/imx95/imx95_pinmux.h | 5 +++++ arch/arm64/src/imx9/imx9_boot.c | 7 +++++++ arch/arm64/src/imx9/imx9_lowputc.c | 2 -- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm64/src/imx9/hardware/imx95/imx95_pinmux.h b/arch/arm64/src/imx9/hardware/imx95/imx95_pinmux.h index 6bbe93859f8..46c60e412db 100644 --- a/arch/arm64/src/imx9/hardware/imx95/imx95_pinmux.h +++ b/arch/arm64/src/imx9/hardware/imx95/imx95_pinmux.h @@ -50,4 +50,9 @@ #define IOMUXC_PAD_GPIO_IO00_LPUART5_TX IOMUX_PADCFG(0x443c0010, 0x5, 0x443c0574, 0x1, 0x443c0214) #define IOMUXC_PAD_GPIO_IO01_LPUART5_RX IOMUX_PADCFG(0x443c0014, 0x5, 0x443c0570, 0x1, 0x443c0218) +/* LPUART1 on UART1_RXD / UART1_TXD pads (ALT0, no daisy) */ + +#define IOMUXC_PAD_UART1_RXD_LPUART1_RX IOMUX_PADCFG(0x443c01d0, 0x0, 0x00000000, 0x0, 0x443c03d4) +#define IOMUXC_PAD_UART1_TXD_LPUART1_TX IOMUX_PADCFG(0x443c01d4, 0x0, 0x00000000, 0x0, 0x443c03d8) + #endif /* __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX95_IMX95_PINMUX_H */ diff --git a/arch/arm64/src/imx9/imx9_boot.c b/arch/arm64/src/imx9/imx9_boot.c index bcdb700a4cc..6735ab03f63 100644 --- a/arch/arm64/src/imx9/imx9_boot.c +++ b/arch/arm64/src/imx9/imx9_boot.c @@ -39,6 +39,9 @@ #include "imx9_lowputc.h" #include "imx9_system_ctl.h" #include "hardware/imx9_ccm.h" +#ifdef CONFIG_IMX9_SCMI +#include "imx9_scmi.h" +#endif #ifdef CONFIG_IMX9_DDR_TRAINING #include "ddr/imx9_ddr_training.h" #endif @@ -218,6 +221,10 @@ void arm64_chip_boot(void) /* Do UART early initialization & pin muxing */ +#ifdef CONFIG_IMX9_SCMI + imx9_scmi_initialize(); +#endif + #ifdef CONFIG_IMX9_LPUART imx9_lowsetup(); #endif diff --git a/arch/arm64/src/imx9/imx9_lowputc.c b/arch/arm64/src/imx9/imx9_lowputc.c index 044ee1b4eb9..34974185b64 100644 --- a/arch/arm64/src/imx9/imx9_lowputc.c +++ b/arch/arm64/src/imx9/imx9_lowputc.c @@ -146,7 +146,6 @@ static const struct uart_config_s g_console_config = void imx9_lowsetup(void) { #ifndef CONFIG_SUPPRESS_LPUART_CONFIG -#ifndef CONFIG_ARCH_CHIP_IMX95 #ifdef CONFIG_IMX9_LPUART1 /* Configure LPUART1 pins: RXD and TXD. Also configure RTS and CTS if flow @@ -282,7 +281,6 @@ void imx9_lowsetup(void) imx9_iomux_configure(MUX_LPUART8_RTS); #endif #endif -#endif #ifdef IMX9_CONSOLE_BASE /* Configure the serial console for initial, non-interrupt driver mode */
