arm: pinctrl: Define .mux_mask field for NXP's SoC
Subsystems (5)
PATCH 1/1 arm: pinctrl: Define .mux_mask field for NXP's SoC
The commit e8a9521e649f
("vf500/vf610: synchronise device trees with linux")
has synchronized U-Boot's DTS with v5.19 Linux kernel.
It turned out that in Linux's upstream iomuxc node description the 'fsl,mux_mask' was missing, so the U-Boot's pinctrl driver for NXP's Vybrid SoC was not working properly.
As by default the mux mask was set to 0, for example the vf610 based boards (like BK4) were bricked, due to misconfiguration of gpio at early boot stage.
The fix for all NXP eligible boards is to define .mux_mask field for soc specific *pinctrl_soc_info structure and use it directly in pinctrl MMIO driver, without the need to read the "fsl,mux_mask" property from device tree.
This change brings the NXP's pinctrl driver in U-Boot closer to Linux upstream one.
--- arch/arm/dts/imx8ulp-evk-u-boot.dtsi | 1 - arch/arm/dts/imxrt1020.dtsi | 1 - arch/arm/dts/imxrt1170.dtsi | 1 - drivers/pinctrl/nxp/pinctrl-imx-mmio.c | 1 - drivers/pinctrl/nxp/pinctrl-imx8ulp.c | 2 ++ drivers/pinctrl/nxp/pinctrl-imxrt.c | 1 + drivers/pinctrl/nxp/pinctrl-vf610.c | 1 + 7 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/imx8ulp-evk-u-boot.dtsi +0 -1
@@ -28,7 +28,6 @@ &iomuxc1 { bootph-pre-ram; - fsl,mux_mask = <0xf00>; }; &pinctrl_lpuart5 {
arch/arm/dts/imxrt1020.dtsi +0 -1
@@ -64,7 +64,6 @@ iomuxc: iomuxc@401f8000 { compatible = "fsl,imxrt-iomuxc"; reg = <0x401f8000 0x4000>; - fsl,mux_mask = <0x7>; }; anatop: anatop@400d8000 {
arch/arm/dts/imxrt1170.dtsi +0 -1
@@ -77,7 +77,6 @@ iomuxc: iomuxc@400e8000 { compatible = "fsl,imxrt-iomuxc"; reg = <0x400e8000 0x4000>; - fsl,mux_mask = <0x7>; }; anatop: anatop@40c84000 {
drivers/pinctrl/nxp/pinctrl-imx-mmio.c +0 -1
@@ -187,7 +187,6 @@ int imx_pinctrl_probe_mmio(struct udevice *dev)return -ENOMEM ; priv->info = info; - info->mux_mask =ofnode_read_u32_default (node,"fsl,mux_mask" ,0 );/* * Refer to linux documentation for details: * Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
drivers/pinctrl/nxp/pinctrl-imx8ulp.c +2 -0
@@ -11,10 +11,12 @@static struct imx_pinctrl_soc_info imx8ulp_pinctrl_soc_info0 = { .flags =ZERO_OFFSET_VALID |SHARE_MUX_CONF_REG |CFG_IBE_OBE , + .mux_mask =0xf00 , };static struct imx_pinctrl_soc_info imx8ulp_pinctrl_soc_info1 = { .flags =ZERO_OFFSET_VALID |SHARE_MUX_CONF_REG |CFG_IBE_OBE , + .mux_mask =0xf00 , };static const struct udevice_id imx8ulp_pinctrl_match[] = {
drivers/pinctrl/nxp/pinctrl-imxrt.c +1 -0
@@ -11,6 +11,7 @@static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = { .flags =ZERO_OFFSET_VALID , + .mux_mask =0x7 , };static const struct udevice_id imxrt_pinctrl_match[] = {
drivers/pinctrl/nxp/pinctrl-vf610.c +1 -0
@@ -11,6 +11,7 @@static struct imx_pinctrl_soc_info vf610_pinctrl_soc_info = { .flags =SHARE_MUX_CONF_REG |ZERO_OFFSET_VALID , + .mux_mask =0x700000 , };static const struct udevice_id vf610_pinctrl_match[] = {
Signature · 1 line
2.39.5
Quoted 21 lines
Subject: [PATCH] arm: pinctrl: Define .mux_mask field for NXP's SoC
The commit
e8a9521e649f
("vf500/vf610: synchronise device trees with linux") has synchronized U-Boot's DTS with v5.19 Linux kernel.
It turned out that in Linux's upstream iomuxc node description the 'fsl,mux_mask' was missing, so the U-Boot's pinctrl driver for NXP's Vybrid SoC was not working properly.As by default the mux mask was set to 0, for example the vf610 based boards (like BK4) were bricked, due to misconfiguration of gpio at early boot stage.
The fix for all NXP eligible boards is to define .mux_mask field for soc specific
*pinctrl_soc_infostructure and use it directly in pinctrl MMIO driver, without the need to read the "fsl,mux_mask" property from device tree.This change brings the NXP's pinctrl driver in U-Boot closer to Linux upstream one.
Quoted 7 lines
Signed-off-by Lukasz Majewski <[email protected]>--- arch/arm/dts/imx8ulp-evk-u-boot.dtsi | 1 - arch/arm/dts/imxrt1020.dtsi | 1 - arch/arm/dts/imxrt1170.dtsi | 1 - drivers/pinctrl/nxp/pinctrl-imx-mmio.c | 1 -
drivers/pinctrl/nxp/pinctrl-imx8ulp.c| 2 ++
Fabio Estevam
maintainerQuoted 17 lines · Lukasz Majewski
The commit
e8a9521e649f
("vf500/vf610: synchronise device trees with linux")
has synchronized U-Boot's DTS with v5.19 Linux kernel.
It turned out that in Linux's upstream iomuxc node description the 'fsl,mux_mask' was missing, so the U-Boot's pinctrl driver for NXP's Vybrid SoC was not working properly.As by default the mux mask was set to 0, for example the vf610 based boards (like BK4) were bricked, due to misconfiguration of gpio at early boot stage.
The fix for all NXP eligible boards is to define .mux_mask field for soc specific
*pinctrl_soc_infostructure and use it directly in pinctrl MMIO driver, without the need to read the "fsl,mux_mask" property from device tree.
Quoted 4 lines
This change brings the NXP's pinctrl driver in U-Boot closer to Linux upstream one.
Signed-off-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx/next, thanks.