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

Angus Ainslie angus.ainslie at puri.sm
Sun Nov 28 16:18:24 CET 2021


Hi Fabio,

On 2021-11-28 7:15 a.m., Fabio Estevam wrote:
> 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?

I have tried it with the SION bit set but I thought it would be better
if the dts would match the linux dts and return the same result.

Angus



More information about the U-Boot mailing list