* [PATCH v2 0/3] gs101 reboot updates (DT)
@ 2025-02-10 12:52 André Draszik
2025-02-10 12:52 ` [PATCH v2 1/3] arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes André Draszik
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: André Draszik @ 2025-02-10 12:52 UTC (permalink / raw)
To: Peter Griffin, Tudor Ambarus, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, André Draszik
Hi,
These patches update some of gs101's reboot / power off DT nodes to
bring them in line with downstream / bootloader / EL3 monitor
expectations.
In particular:
* an unnecessary property is removed from the DT
* the shutdown SMC call is aligned with downstream now
* we now implement the requested boot mode as a notification for the
boot loader
Cheers,
Andre'
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v2:
- keep SYSTEM_CONFIGURATION register unchanged (Peter)
- collect tags
- Link to v1: https://lore.kernel.org/r/20250206-gs101-renppt-dts-v1-0-cdfe993fb3c5@linaro.org
---
André Draszik (3):
arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes
arm64: dts: exynos: gs101: align poweroff writes with downstream
arm64: dts: exynos: gs101: add reboot-mode support (SYSIP_DAT0)
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
---
base-commit: 808eb958781e4ebb6e9c0962af2e856767e20f45
change-id: 20250206-gs101-renppt-dts-cb8ab6bf6294
Best regards,
--
André Draszik <andre.draszik@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes
2025-02-10 12:52 [PATCH v2 0/3] gs101 reboot updates (DT) André Draszik
@ 2025-02-10 12:52 ` André Draszik
2025-02-10 12:52 ` [PATCH v2 2/3] arm64: dts: exynos: gs101: align poweroff writes with downstream André Draszik
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2025-02-10 12:52 UTC (permalink / raw)
To: Peter Griffin, Tudor Ambarus, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, André Draszik
The regmap property for syscon-poweroff and syscon-reboot is unneeded
here because the poweroff and reboot nodes are children of syscon
already. It also is deprecated.
We can just drop it to simplify the DT.
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
index 813f96089578..e78dcd506a5c 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
@@ -1400,14 +1400,12 @@ pmu_system_controller: system-controller@17460000 {
poweroff: syscon-poweroff {
compatible = "syscon-poweroff";
- regmap = <&pmu_system_controller>;
offset = <0x3e9c>; /* PAD_CTRL_PWR_HOLD */
mask = <0x100>; /* reset value */
};
reboot: syscon-reboot {
compatible = "syscon-reboot";
- regmap = <&pmu_system_controller>;
offset = <0x3a00>; /* SYSTEM_CONFIGURATION */
mask = <0x2>; /* SWRESET_SYSTEM */
value = <0x2>; /* reset value */
--
2.48.1.502.g6dc24dfdaf-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] arm64: dts: exynos: gs101: align poweroff writes with downstream
2025-02-10 12:52 [PATCH v2 0/3] gs101 reboot updates (DT) André Draszik
2025-02-10 12:52 ` [PATCH v2 1/3] arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes André Draszik
@ 2025-02-10 12:52 ` André Draszik
2025-02-10 12:52 ` [PATCH v2 3/3] arm64: dts: exynos: gs101: add reboot-mode support (SYSIP_DAT0) André Draszik
2025-02-15 13:44 ` [PATCH v2 0/3] gs101 reboot updates (DT) Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2025-02-10 12:52 UTC (permalink / raw)
To: Peter Griffin, Tudor Ambarus, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, André Draszik
For power off, downstream only clears bit 8 and leaves all other bits
untouched, whereas this here ends up setting bit 8 and clearing all
others, due to how sysconf-poweroff parses the DT.
I noticed this discrepancy while debugging some reboot related
differences between up- and downstream and it's useful to align the
behaviour here.
Note: for reboot downstream seems to be incorrectly writing 0x00000002
and not just setting bit 1 (which is the only R/W bit in this
register), so we keep that one as-is here.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
index e78dcd506a5c..86741994bb7c 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
@@ -1401,7 +1401,8 @@ pmu_system_controller: system-controller@17460000 {
poweroff: syscon-poweroff {
compatible = "syscon-poweroff";
offset = <0x3e9c>; /* PAD_CTRL_PWR_HOLD */
- mask = <0x100>; /* reset value */
+ mask = <0x00000100>;
+ value = <0x0>;
};
reboot: syscon-reboot {
--
2.48.1.502.g6dc24dfdaf-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] arm64: dts: exynos: gs101: add reboot-mode support (SYSIP_DAT0)
2025-02-10 12:52 [PATCH v2 0/3] gs101 reboot updates (DT) André Draszik
2025-02-10 12:52 ` [PATCH v2 1/3] arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes André Draszik
2025-02-10 12:52 ` [PATCH v2 2/3] arm64: dts: exynos: gs101: align poweroff writes with downstream André Draszik
@ 2025-02-10 12:52 ` André Draszik
2025-02-15 13:44 ` [PATCH v2 0/3] gs101 reboot updates (DT) Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2025-02-10 12:52 UTC (permalink / raw)
To: Peter Griffin, Tudor Ambarus, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alim Akhtar
Cc: Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel, André Draszik
syscon-reboot-mode can be used to indicate the reboot mode for the
bootloader.
While not sufficient for all boot modes, the boot loader does use
SYSIP_DAT0 (PMU + 0x0810) to determine some of the actions it should
take. This change helps it deciding what to do in those cases.
For complete support, we'll also have to write the boot mode to an
NVMEM storage location, but we have no upstream driver for that yet.
Nevertheless, this patch is a step towards full support for the boot
mode.
Note1: Android also uses 'shutdown,thermal' and
shutdown,thermal,battery', but that can not be described in DT as ','
is used to denote vendor prefixes. I've left them out from here for
that reason.
Note2: downstream / bootloader recognizes one more mode: 'dm-verity
device corrupted' with value 0x50, but we can not describe that in DT
using a property name due to the space, so it's been left out from here
as well. This string appears to come from drivers/md/dm-verity-target.c
and should probably be changed there in a follow-up patch, so that it
can be used in reboot-mode nodes like this one here.
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
index 86741994bb7c..d60e6a8e8723 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi
@@ -1411,6 +1411,19 @@ reboot: syscon-reboot {
mask = <0x2>; /* SWRESET_SYSTEM */
value = <0x2>; /* reset value */
};
+
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x0810>; /* EXYNOS_PMU_SYSIP_DAT0 */
+ mode-bootloader = <0xfc>;
+ mode-charge = <0x0a>;
+ mode-fastboot = <0xfa>;
+ mode-reboot-ab-update = <0x52>;
+ mode-recovery = <0xff>;
+ mode-rescue = <0xf9>;
+ mode-shutdown-thermal = <0x51>;
+ mode-shutdown-thermal-battery = <0x51>;
+ };
};
pinctrl_gpio_alive: pinctrl@174d0000 {
--
2.48.1.502.g6dc24dfdaf-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] gs101 reboot updates (DT)
2025-02-10 12:52 [PATCH v2 0/3] gs101 reboot updates (DT) André Draszik
` (2 preceding siblings ...)
2025-02-10 12:52 ` [PATCH v2 3/3] arm64: dts: exynos: gs101: add reboot-mode support (SYSIP_DAT0) André Draszik
@ 2025-02-15 13:44 ` Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-15 13:44 UTC (permalink / raw)
To: André Draszik, Peter Griffin, Tudor Ambarus, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: Will McVicker, kernel-team, linux-arm-kernel, linux-samsung-soc,
devicetree, linux-kernel
On 10/02/2025 13:52, André Draszik wrote:
> Hi,
>
> These patches update some of gs101's reboot / power off DT nodes to
> bring them in line with downstream / bootloader / EL3 monitor
> expectations.
>
> In particular:
> * an unnecessary property is removed from the DT
> * the shutdown SMC call is aligned with downstream now
> * we now implement the requested boot mode as a notification for the
> boot loader
>
Thanks, applied
(lost b4 tracking so no commit hashes)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-15 13:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 12:52 [PATCH v2 0/3] gs101 reboot updates (DT) André Draszik
2025-02-10 12:52 ` [PATCH v2 1/3] arm64: dts: exynos: gs101: drop explicit regmap from reboot nodes André Draszik
2025-02-10 12:52 ` [PATCH v2 2/3] arm64: dts: exynos: gs101: align poweroff writes with downstream André Draszik
2025-02-10 12:52 ` [PATCH v2 3/3] arm64: dts: exynos: gs101: add reboot-mode support (SYSIP_DAT0) André Draszik
2025-02-15 13:44 ` [PATCH v2 0/3] gs101 reboot updates (DT) Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).