[PATCH] gpio: mxc_gpio: Fix i.MX8M GPIO output status read

Harm Berntsen harm.berntsen at nedap.com
Mon Jan 17 16:55:34 CET 2022


Hi Fabio Estevam and Ye Li,

On Sat, 2022-01-15 at 10:43 -0300, Fabio Estevam wrote:
> Hi Harm and Ye Li,
> 
> On Fri, Aug 13, 2021 at 11:35 AM Harm Berntsen
> <harm.berntsen at nedap.com> wrote:
> > 
> > Currently the driver gets value from PSR register, but this
> > register is
> > only for input mode. For output mode, it always returns 0, not the
> > value
> > we set for output.
> > 
> > This patch changes to use DR register, which returns the DR value
> > for
> > output mode, and PSR value for input mode.
> > 
> > This patch is based on code from Ye Li <ye.li at nxp.com>
> 
> Could this issue be fixed by setting the SION bit mode?

SION works! I did not know about it :). I see the imxrt1020-evk,
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.


More information about the U-Boot mailing list