[PATCH] gpio: mxc_gpio: Fix i.MX8M GPIO output status read
Harm Berntsen
harm.berntsen at nedap.com
Tue Jan 18 17:13:31 CET 2022
Hi,
On Mon, 2022-01-17 at 13:57 -0300, Fabio Estevam wrote:
> Hi Harm,
>
> Adding Angus, who submitted a similar patch:
> https://patchwork.ozlabs.org/project/uboot/patch/20211128145143.1433262-1-angus@akkea.ca/
>
> On Mon, Jan 17, 2022 at 12:55 PM Harm Berntsen
> <harm.berntsen at nedap.com> wrote:
>
> > > Could this issue be fixed by setting the SION bit mode?
> >
> > SION works! I did not know about it :). I see the imxrt1020-evk,
>
> Ok, great!
>
> > imxrt1050-evk and imx53-kp use it in their device tree. To make
> > this
> > feature available, I had to ensure the IMX_PAD_SION was available
> > in my
> > dts by adding a define:
> >
> > #define IMX_PAD_SION 0x40000000
> >
> > I could then configure the pinmux in my dts file. It would be nice
> > to
> > make this define available by default.
> >
> > To conclude, I would now need to enable SION in order to remove the
> > 'Warning: value of pin is still 0' text in my serial output. I'm
> > fine
> > with that.
>
> Actually, there are several i.MX dts files that set bit 30 (SION
> bit):
>
> For example, the I2C pins in imx8mq-evk.dts look like this:
>
> MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL 0x4000007f
>
> Does it work if you just set bit 30 in your device tree? Which SoC
> are
> you using?
I did not check the manual assignment of bit 30 in the dts, I now see
that it is used more often than I thought.
I'm using an imx8mn on U-Boot 2021.10. It was as simple as setting the
pinctrl as you described and in the same way as Angus has done. I don't
see why it does not work for him. He has an imx8mq so maybe that chip
behaves differently?
Just for completeness, some snippets from my device tree:
#define IMX_PAD_SION 0x40000000
&gpio3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_misc_gpio3>;
};
pinctrl_misc_gpio3: misc-gpio3 {
fsl,pins = <
MX8MN_IOMUXC_SAI5_RXD2_GPIO3_IO23 IMX_PAD_SION
MX8MN_IOMUXC_SAI5_RXD3_GPIO3_IO24 IMX_PAD_SION
>;
};
More information about the U-Boot
mailing list