* [PATCH v1 0/2] arm64: dts: exynos8895: Add m2-pmu, poweroff and reboot
@ 2024-12-10 18:02 Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 1/2] arm64: dts: exynos8895: Add a PMU node for the second cluster Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes Ivaylo Ivanov
0 siblings, 2 replies; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-12-10 18:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel
Hey folks,
This series adds support for syscon-reboot and syscon-poweroff to
exynos8895, as well as support for the mongoose cluster PMU in DT hence
a compatible for that was recently added.
The new syscon nodes have been tested with reboot and poweroff commands
respectively.
Kind regards,
Ivo
Ivaylo Ivanov (2):
arm64: dts: exynos8895: Add a PMU node for the second cluster
arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes
arch/arm64/boot/dts/exynos/exynos8895.dtsi | 27 +++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] arm64: dts: exynos8895: Add a PMU node for the second cluster
2024-12-10 18:02 [PATCH v1 0/2] arm64: dts: exynos8895: Add m2-pmu, poweroff and reboot Ivaylo Ivanov
@ 2024-12-10 18:02 ` Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes Ivaylo Ivanov
1 sibling, 0 replies; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-12-10 18:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel
Since we have a PMU compatible for Samsung's Mongoose cores now, drop
the comment that explains the lack of it and define the node.
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
arch/arm64/boot/dts/exynos/exynos8895.dtsi | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/exynos/exynos8895.dtsi b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
index ee393f4f0..90b318b2f 100644
--- a/arch/arm64/boot/dts/exynos/exynos8895.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
@@ -38,7 +38,17 @@ arm-a53-pmu {
<&cpu3>;
};
- /* There's no PMU model for the Mongoose cores */
+ mongoose-m2-pmu {
+ compatible = "samsung,mongoose-pmu";
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-affinity = <&cpu4>,
+ <&cpu5>,
+ <&cpu6>,
+ <&cpu7>;
+ };
cpus {
#address-cells = <1>;
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes
2024-12-10 18:02 [PATCH v1 0/2] arm64: dts: exynos8895: Add m2-pmu, poweroff and reboot Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 1/2] arm64: dts: exynos8895: Add a PMU node for the second cluster Ivaylo Ivanov
@ 2024-12-10 18:02 ` Ivaylo Ivanov
2024-12-10 21:10 ` Markuss Broks
1 sibling, 1 reply; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-12-10 18:02 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
Cc: linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel
For Exynos8895, a reboot is handled by setting the bit(SWRESET_SYSTEM[1])
of SWRESET register(PMU + 0x400) and power-off is handled by setting
bit(DATA[8]) of PS_HOLD_CONTROL register (PMU + 0x330c).
Tested using "reboot" and "poweroff -p" commands.
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
arch/arm64/boot/dts/exynos/exynos8895.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/exynos/exynos8895.dtsi b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
index 90b318b2f..9eb89dd19 100644
--- a/arch/arm64/boot/dts/exynos/exynos8895.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
@@ -388,6 +388,21 @@ pmu_system_controller: system-controller@16480000 {
compatible = "samsung,exynos8895-pmu",
"samsung,exynos7-pmu", "syscon";
reg = <0x16480000 0x10000>;
+
+ poweroff: syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmu_system_controller>;
+ offset = <0x330c>; /* PS_HOLD_CONTROL */
+ mask = <0x100>; /* reset value */
+ };
+
+ reboot: syscon-reboot {
+ compatible = "syscon-reboot";
+ regmap = <&pmu_system_controller>;
+ offset = <0x400>; /* SWRESET */
+ mask = <0x1>; /* SWRESET_SYSTEM */
+ value = <0x1>; /* reset value */
+ };
};
pinctrl_alive: pinctrl@164b0000 {
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes
2024-12-10 18:02 ` [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes Ivaylo Ivanov
@ 2024-12-10 21:10 ` Markuss Broks
2024-12-10 21:28 ` Ivaylo Ivanov
0 siblings, 1 reply; 5+ messages in thread
From: Markuss Broks @ 2024-12-10 21:10 UTC (permalink / raw)
To: Ivaylo Ivanov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Alim Akhtar
Cc: linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel
Hi,
On 12/10/24 8:02 PM, Ivaylo Ivanov wrote:
> For Exynos8895, a reboot is handled by setting the bit(SWRESET_SYSTEM[1])
> of SWRESET register(PMU + 0x400) and power-off is handled by setting
> bit(DATA[8]) of PS_HOLD_CONTROL register (PMU + 0x330c).
>
> Tested using "reboot" and "poweroff -p" commands.
>
> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
> ---
> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/exynos/exynos8895.dtsi b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
> index 90b318b2f..9eb89dd19 100644
> --- a/arch/arm64/boot/dts/exynos/exynos8895.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
> @@ -388,6 +388,21 @@ pmu_system_controller: system-controller@16480000 {
> compatible = "samsung,exynos8895-pmu",
> "samsung,exynos7-pmu", "syscon";
> reg = <0x16480000 0x10000>;
> +
> + poweroff: syscon-poweroff {
> + compatible = "syscon-poweroff";
> + regmap = <&pmu_system_controller>;
> + offset = <0x330c>; /* PS_HOLD_CONTROL */
> + mask = <0x100>; /* reset value */
> + };
> +
> + reboot: syscon-reboot {
> + compatible = "syscon-reboot";
> + regmap = <&pmu_system_controller>;
> + offset = <0x400>; /* SWRESET */
> + mask = <0x1>; /* SWRESET_SYSTEM */
> + value = <0x1>; /* reset value */
> + };
> };
Aren't those already included with
arm/samsung/exynos-syscon-restart.dtsi? I can see that the values for
poweroff are different here though, does it not work with the value from
exynos-syscon-restart?
>
> pinctrl_alive: pinctrl@164b0000 {
- Markuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes
2024-12-10 21:10 ` Markuss Broks
@ 2024-12-10 21:28 ` Ivaylo Ivanov
0 siblings, 0 replies; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-12-10 21:28 UTC (permalink / raw)
To: Markuss Broks, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Alim Akhtar
Cc: linux-samsung-soc, devicetree, linux-arm-kernel, linux-kernel
On 12/10/24 23:10, Markuss Broks wrote:
> Hi,
>
> On 12/10/24 8:02 PM, Ivaylo Ivanov wrote:
>> For Exynos8895, a reboot is handled by setting the bit(SWRESET_SYSTEM[1])
>> of SWRESET register(PMU + 0x400) and power-off is handled by setting
>> bit(DATA[8]) of PS_HOLD_CONTROL register (PMU + 0x330c).
>>
>> Tested using "reboot" and "poweroff -p" commands.
>>
>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
>> ---
>> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/exynos/exynos8895.dtsi b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
>> index 90b318b2f..9eb89dd19 100644
>> --- a/arch/arm64/boot/dts/exynos/exynos8895.dtsi
>> +++ b/arch/arm64/boot/dts/exynos/exynos8895.dtsi
>> @@ -388,6 +388,21 @@ pmu_system_controller: system-controller@16480000 {
>> compatible = "samsung,exynos8895-pmu",
>> "samsung,exynos7-pmu", "syscon";
>> reg = <0x16480000 0x10000>;
>> +
>> + poweroff: syscon-poweroff {
>> + compatible = "syscon-poweroff";
>> + regmap = <&pmu_system_controller>;
>> + offset = <0x330c>; /* PS_HOLD_CONTROL */
>> + mask = <0x100>; /* reset value */
>> + };
>> +
>> + reboot: syscon-reboot {
>> + compatible = "syscon-reboot";
>> + regmap = <&pmu_system_controller>;
>> + offset = <0x400>; /* SWRESET */
>> + mask = <0x1>; /* SWRESET_SYSTEM */
>> + value = <0x1>; /* reset value */
>> + };
>> };
> Aren't those already included with arm/samsung/exynos-syscon-restart.dtsi? I can see that the values for poweroff are different here though, does it not work with the value from exynos-syscon-restart?
Riiight... seems like I've completely omitted that during testing.
Although the poweroff mask should be different, it's meant to set
BIT 8. I'll check it tomorrow and send a v2.
Thanks!
Best regards, Ivo.
>> pinctrl_alive: pinctrl@164b0000 {
>
>
> - Markuss
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-10 21:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-10 18:02 [PATCH v1 0/2] arm64: dts: exynos8895: Add m2-pmu, poweroff and reboot Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 1/2] arm64: dts: exynos8895: Add a PMU node for the second cluster Ivaylo Ivanov
2024-12-10 18:02 ` [PATCH v1 2/2] arm64: dts: exynos8895: Add syscon-poweroff and syscon-reboot nodes Ivaylo Ivanov
2024-12-10 21:10 ` Markuss Broks
2024-12-10 21:28 ` Ivaylo Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®