[PATCH] board: ti: am62x: beagleplay: Disable semi-functional PSCI reset support

Nishanth Menon nm at ti.com
Fri Aug 25 03:16:23 CEST 2023

On 17:58-20230824, Tom Rini wrote:
> On Thu, Aug 24, 2023 at 11:53:17PM +0200, Jan Kiszka wrote:
> > From: Jan Kiszka <jan.kiszka at siemens.com>
> > 
> > At this point, system shutdown is not supported by the DM firmware that
> > TF-A calls. As we can't de-select only this feature, declare complete
> > PSCI reset support as non-functional so that we don't signal incomplete
> > support to the OS via EFI runtime services. This makes power-off under
> > Linux work again when booting via EFI.
> > 
> > Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> > ---
> >  board/ti/am62x/beagleplay_a53.config | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/board/ti/am62x/beagleplay_a53.config b/board/ti/am62x/beagleplay_a53.config
> > index 967f794446d..8b0f671bc9e 100644
> > --- a/board/ti/am62x/beagleplay_a53.config
> > +++ b/board/ti/am62x/beagleplay_a53.config
> > @@ -53,3 +53,5 @@ CONFIG_SPI=n
> > +# DM firmware lacks support for shutdown
> > +# CONFIG_PSCI_RESET is not set
> Is this lack of feature for just the beagleplay part of the firmware
> stack or more generically to the TI am62x platforms?

Thanks a ton Jan for digging deep into this and finding this. So much

This is all K3 platforms with the exception of j7200-evm.

PSCI SYSTEM_OFF function is routed by TFA to DM, there is no implementation
on DM side since involved PMIC and team is trying to lock in a manner in
which it is easier for people to describe things.

PSCI SYSTEM_RESET on the other hand is handled correctly by DM.

Even though CONFIG_POWEROFF is disabled, apparently enabling PSCI_RESET
results in EFI runtime services gets to think that poweroff is also
supported. Looking at drivers/firmware/psci.c[1] efi request for
poweroff is via EFI_RESET_SHUTDOWN[2] - so the specification itself
mandates that both reset AND poweroff should be implemented.

Luckily for us we have a broken u-boot reset implementation, which last
I looked was not following the h/w specifications and the intent was to
move to PSCI -> DM for reset so that system can properly reset and not
get randomly hung during reset under certain circumstances.

But, given the circumstances, I can pick this up and do it at am62_evm
level rather than at just beagle level. I will pick this patch up and
roll it up into v6 of the beagleplay series - but will modify am62x_evm
config instead.

[1] https://github.com/u-boot/u-boot/blob/master/drivers/firmware/psci.c#L246
[2] https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown#resetsystem
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

More information about the U-Boot mailing list