[PATCH] rockchip: rk356x: Enable poweroff command
Jonas Karlman
jonas at kwiboo.se
Fri Aug 4 08:53:50 CEST 2023
Hi Kever,
On 2023-08-04 03:37, Kever Yang wrote:
> Hi Jonas,
>
> On 2023/8/4 03:54, Jonas Karlman wrote:
>> With PMIC_RK8XX, SYSRESET and CMD_POWEROFF options enabled it is
>> possible to power down a board using the poweroff command and turn the
>> board back on using a power button.
>
> I'm confuse about the use case, when will people need to do this(other
> than just test)?
Yes this is mostly for testing and possible automation/CI purposes.
Similar to why we include other commands such as gpio, regulator etc.
Main reason is that I use ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON on my
Pine64 PineTab2 RK3566 tablet, and it simplified testing of the
"power: pmic: rk8xx: Fix power-on source check in SPL" series.
I could just poweroff from u-boot cmdline instead of pushing power
button for 5-10 seconds or boot into linux to issue a power off command
to validate the functionality.
Until PineTab2 has a mainline linux device tree that can be imported to
U-Boot, I settled for enabling poweroff command on my other RK356x
devices that has a power button wired to PMIC pwron.
Regards,
Jonas
>
> Usually people do the power on/off or reboot/reset both by software only
> or by hardware only,
>
> but very little chance need to do these ops by both software and hardware.
>
> What's more, we usually enable the power off cmd in kernel, not in
> bootloader.
>
> Thanks,
> - Kever
>>
>> Enable the poweroff command on RK356x boards that have a button wired
>> to PMIC pwron. Also update to use PMIC poweroff when PMIC_RK8XX is
>> enabled to avoid also having to enable the SYSRESET_CMD_POWEROFF option.
>>
>> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
[...]
More information about the U-Boot
mailing list