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 87a59ad1a3fcf113b33103770c72fe94f5d468e5
Author: hujun5 <[email protected]>
AuthorDate: Thu May 7 15:42:49 2026 +0800

    arch/arm64: iomuxc: use dsyreg for SCMI pinctrl input_register field
    
    imx9_iomux_configure() was assigning cfg.padcfg.dsy (the daisy value)
    to scmi_pinctrl_t.input_register. The downstream code in
    imx9_sm_iomucx_configure() uses input_register to compute the SCMI
    DAISY_ID via:
      (input_register - SCMI_PLATFORM_PINCTRL_DAISYREG_OFF) / 4
    
    Passing the raw daisy value produces a bogus DAISY_ID. In practice the
    current SM firmware tolerates this (it applies DAISY_CFG regardless),
    but the semantic mismatch could break on stricter firmware or pins
    whose default daisy differs from the requested one.
    
    Use cfg.padcfg.dsyreg (the daisy register address) instead, matching
    what u-boot and Linux arm_scmi/pinctrl drivers send.
    
    Signed-off-by: hujun5 <[email protected]>
---
 arch/arm64/src/imx9/imx9_iomuxc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/src/imx9/imx9_iomuxc.c 
b/arch/arm64/src/imx9/imx9_iomuxc.c
index a669d11a483..75cec801d84 100644
--- a/arch/arm64/src/imx9/imx9_iomuxc.c
+++ b/arch/arm64/src/imx9/imx9_iomuxc.c
@@ -112,6 +112,7 @@ void imx9_sm_iomucx_configure(scmi_pinctrl_t *pinctrl)
       int32_t ret = imx9_scmi_set_pinctrl_config(
           channel, (mux_register - SCMI_PLATFORM_PINCTRL_MUXREG_OFF) / 4,
           attributes, configs);
+
       if (ret != 0)
         {
           assert("Unable to set iomux over SCMI");
@@ -133,7 +134,7 @@ int imx9_iomux_configure(iomux_cfg_t cfg)
   pinctrl.channel         = SCMI_PLATFORM_A2P;
   pinctrl.mux_register    = cfg.padcfg.ctlreg;
   pinctrl.mux_mode        = cfg.padcfg.mode;
-  pinctrl.input_register  = cfg.padcfg.dsy;
+  pinctrl.input_register  = cfg.padcfg.dsyreg;
   pinctrl.input_daisy     = cfg.padcfg.dsy;
   pinctrl.config_register = cfg.padcfg.padreg;
   pinctrl.config_value    = cfg.pad;

Reply via email to