2021-11-29 17:18:46

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2] ARM: dts: sun8i: Adjust power key nodes

On Tue, Nov 30, 2021 at 12:55 AM Jernej Skrabec
<[email protected]> wrote:
>
> Several H3 and one H2+ board have power key nodes, which are slightly
> off. Some are missing wakeup-source property and some have BTN_0 code
> assigned instead of KEY_POWER.

It might have been that after shutdown there was really no way to
"power on" the board with these GPIO power keys, so we didn't use
KEY_POWER for them?

> Adjust them, so they can function as intended by designer.
>
> Co-developed-by: Michael Klein <[email protected]>
> Signed-off-by: Michael Klein <[email protected]>
> Signed-off-by: Jernej Skrabec <[email protected]>

Acked-by: Chen-Yu Tsai <[email protected]>


2021-11-29 17:37:56

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: Re: [PATCH v2] ARM: dts: sun8i: Adjust power key nodes

On Tue, Nov 30, 2021 at 1:29 AM Jernej Škrabec <[email protected]> wrote:
>
> Dne ponedeljek, 29. november 2021 ob 18:16:31 CET je Chen-Yu Tsai napisal(a):
> > On Tue, Nov 30, 2021 at 12:55 AM Jernej Skrabec
> > <[email protected]> wrote:
> > >
> > > Several H3 and one H2+ board have power key nodes, which are slightly
> > > off. Some are missing wakeup-source property and some have BTN_0 code
> > > assigned instead of KEY_POWER.
> >
> > It might have been that after shutdown there was really no way to
> > "power on" the board with these GPIO power keys, so we didn't use
> > KEY_POWER for them?
>
> KEY_POWER is actually processed by userspace, so it would still make sense to
> power down board if power key is pressed. Correct me if I'm wrong, but in
> combination with wfi it could work before SCP FW was available?

I guess it could? But where would it do wfi, and what would execute
after wfi?

IIRC the kernel's halt sequence doesn't really clean up interrupts,
so wfi isn't going to get very far.

> >
> > > Adjust them, so they can function as intended by designer.
> > >
> > > Co-developed-by: Michael Klein <[email protected]>
> > > Signed-off-by: Michael Klein <[email protected]>
> > > Signed-off-by: Jernej Skrabec <[email protected]>
> >
> > Acked-by: Chen-Yu Tsai <[email protected]>
> >
>
> Thanks!
>
> Best regards,
> Jernej
>
>

2021-11-29 22:54:17

by Jernej Škrabec

[permalink] [raw]
Subject: Re: Re: [PATCH v2] ARM: dts: sun8i: Adjust power key nodes

Dne ponedeljek, 29. november 2021 ob 18:16:31 CET je Chen-Yu Tsai napisal(a):
> On Tue, Nov 30, 2021 at 12:55 AM Jernej Skrabec
> <[email protected]> wrote:
> >
> > Several H3 and one H2+ board have power key nodes, which are slightly
> > off. Some are missing wakeup-source property and some have BTN_0 code
> > assigned instead of KEY_POWER.
>
> It might have been that after shutdown there was really no way to
> "power on" the board with these GPIO power keys, so we didn't use
> KEY_POWER for them?

KEY_POWER is actually processed by userspace, so it would still make sense to
power down board if power key is pressed. Correct me if I'm wrong, but in
combination with wfi it could work before SCP FW was available?

>
> > Adjust them, so they can function as intended by designer.
> >
> > Co-developed-by: Michael Klein <[email protected]>
> > Signed-off-by: Michael Klein <[email protected]>
> > Signed-off-by: Jernej Skrabec <[email protected]>
>
> Acked-by: Chen-Yu Tsai <[email protected]>
>

Thanks!

Best regards,
Jernej