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.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com> #for i.MX8ULP
&iomuxc1 {
bootph-pre-ram;
- fsl,mux_mask = <0xf00>;
};
&pinctrl_lpuart5 {
iomuxc: iomuxc@401f8000 {
compatible = "fsl,imxrt-iomuxc";
reg = <0x401f8000 0x4000>;
- fsl,mux_mask = <0x7>;
};
anatop: anatop@400d8000 {
iomuxc: iomuxc@400e8000 {
compatible = "fsl,imxrt-iomuxc";
reg = <0x400e8000 0x4000>;
- fsl,mux_mask = <0x7>;
};
anatop: anatop@40c84000 {
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
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[] = {
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[] = {
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[] = {