[PATCH] mxc_gpio: on imx8m read the DR instead of the PSR

Fabio Estevam festevam at gmail.com
Sun Nov 28 16:15:15 CET 2021


Hi Angus,

On Sun, Nov 28, 2021 at 11:52 AM Angus Ainslie <angus at akkea.ca> wrote:
>
> On imx8m it is more correct to read the data register than the pad status
> register.
>
> In output mode the pad status register does not contain the value being
> output so we must read the DR for the value.
>
> In input mode the DR will contain the same value as the PSR when the pad
> mode is GPIO.
>
> If the pad mode is not GPIO and the pin is an input then 0 is always
> returned.

Have you tried setting the SION bit of the pad?


More information about the U-Boot mailing list