linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add pmu and syscon-reboot support to Exynos990
@ 2024-12-04 14:55 Igor Belwon
  2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
  2024-12-04 14:55 ` [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes Igor Belwon
  0 siblings, 2 replies; 8+ messages in thread
From: Igor Belwon @ 2024-12-04 14:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi all,

This small series adds support for the pmu, as well as syscon-reboot
support to the Exynos990 SoC. It has been tested with the reboot command
in an initramfs.

Typically, this would be added during the initial SoC bringup,
however I was unsure as to if the syscon would work correctly until I
could test it (especially when it comes to reboot), which I just got
around to doing.

---
Changes since v1:
- Wrote a description for the PMU in the dt-bindings commit (thanks Krzysztof!)

Kind regards,

Igor

Igor Belwon (2):
  dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
  arm64: dts: exynos990: Add pmu and syscon-reboot nodes

 .../bindings/soc/samsung/exynos-pmu.yaml           |  1 +
 arch/arm64/boot/dts/exynos/exynos990.dtsi          | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
  2024-12-04 14:55 [PATCH v2 0/2] Add pmu and syscon-reboot support to Exynos990 Igor Belwon
@ 2024-12-04 14:55 ` Igor Belwon
  2024-12-04 17:45   ` Conor Dooley
                     ` (2 more replies)
  2024-12-04 14:55 ` [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes Igor Belwon
  1 sibling, 3 replies; 8+ messages in thread
From: Igor Belwon @ 2024-12-04 14:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

Add a dt-binding compatible for the Exynos990 PMU. It's compatible
with the Exynos7 PMU design. It handles system reboot, as well as
other system control registers (i.e registers for the USB PHY).

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
 Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
index 6cdfe7e059a3..8e6d051d8c97 100644
--- a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
+++ b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
@@ -55,6 +55,7 @@ properties:
               - samsung,exynos7885-pmu
               - samsung,exynos8895-pmu
               - samsung,exynos9810-pmu
+              - samsung,exynos990-pmu
               - samsung,exynosautov9-pmu
               - samsung,exynosautov920-pmu
               - tesla,fsd-pmu
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes
  2024-12-04 14:55 [PATCH v2 0/2] Add pmu and syscon-reboot support to Exynos990 Igor Belwon
  2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
@ 2024-12-04 14:55 ` Igor Belwon
  2024-12-05  1:07   ` Alim Akhtar
  2024-12-09 10:49   ` (subset) " Krzysztof Kozlowski
  1 sibling, 2 replies; 8+ messages in thread
From: Igor Belwon @ 2024-12-04 14:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

Add PMU syscon, and syscon-reboot nodes to the Exynos990 dtsi.

Reboot of the Exynos990 SoC is handled by setting bit(SWRESET_TRIGGER[1])
of SWRESET register (PMU + 0x3a00).

Tested using the "reboot" command.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
 arch/arm64/boot/dts/exynos/exynos990.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos990.dtsi b/arch/arm64/boot/dts/exynos/exynos990.dtsi
index c1986f00e443..2619f821bc7c 100644
--- a/arch/arm64/boot/dts/exynos/exynos990.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos990.dtsi
@@ -227,6 +227,20 @@ wakeup-interrupt-controller {
 			};
 		};
 
+		pmu_system_controller: system-controller@15860000 {
+			compatible = "samsung,exynos990-pmu",
+				     "samsung,exynos7-pmu", "syscon";
+			reg = <0x15860000 0x10000>;
+
+			reboot: syscon-reboot {
+				compatible = "syscon-reboot";
+				regmap = <&pmu_system_controller>;
+				offset = <0x3a00>; /* SWRESET */
+				mask = <0x2>; /* SWRESET_TRIGGER */
+				value = <0x2>;
+			};
+		};
+
 		pinctrl_cmgp: pinctrl@15c30000 {
 			compatible = "samsung,exynos990-pinctrl";
 			reg = <0x15c30000 0x1000>;
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
  2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
@ 2024-12-04 17:45   ` Conor Dooley
  2024-12-05  1:08   ` Alim Akhtar
  2024-12-09 10:49   ` (subset) " Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2024-12-04 17:45 UTC (permalink / raw)
  To: Igor Belwon
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

On Wed, Dec 04, 2024 at 03:55:58PM +0100, Igor Belwon wrote:
> Add a dt-binding compatible for the Exynos990 PMU. It's compatible
> with the Exynos7 PMU design. It handles system reboot, as well as
> other system control registers (i.e registers for the USB PHY).
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes
  2024-12-04 14:55 ` [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes Igor Belwon
@ 2024-12-05  1:07   ` Alim Akhtar
  2024-12-09 10:49   ` (subset) " Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2024-12-05  1:07 UTC (permalink / raw)
  To: 'Igor Belwon', 'Rob Herring',
	'Krzysztof Kozlowski', 'Conor Dooley'
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi Igor

> -----Original Message-----
> From: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> Sent: Wednesday, December 4, 2024 8:26 PM
> To: Rob Herring <robh@kernel.org>; Krzysztof Kozlowski
> <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Alim Akhtar
> <alim.akhtar@samsung.com>
> Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot
> nodes
> 
> Add PMU syscon, and syscon-reboot nodes to the Exynos990 dtsi.
> 
> Reboot of the Exynos990 SoC is handled by setting bit(SWRESET_TRIGGER[1])
> of SWRESET register (PMU + 0x3a00).
> 
> Tested using the "reboot" command.
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>  arch/arm64/boot/dts/exynos/exynos990.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
[snip]
> 2.45.2




^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
  2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
  2024-12-04 17:45   ` Conor Dooley
@ 2024-12-05  1:08   ` Alim Akhtar
  2024-12-09 10:49   ` (subset) " Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Alim Akhtar @ 2024-12-05  1:08 UTC (permalink / raw)
  To: 'Igor Belwon', 'Rob Herring',
	'Krzysztof Kozlowski', 'Conor Dooley'
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi Igor

> -----Original Message-----
> From: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> Sent: Wednesday, December 4, 2024 8:26 PM
> To: Rob Herring <robh@kernel.org>; Krzysztof Kozlowski
> <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Alim Akhtar
> <alim.akhtar@samsung.com>
> Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add
> exynos990-pmu compatible
> 
> Add a dt-binding compatible for the Exynos990 PMU. It's compatible with
the
> Exynos7 PMU design. It handles system reboot, as well as other system
> control registers (i.e registers for the USB PHY).
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>  Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-
> pmu.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-
> pmu.yaml
> index 6cdfe7e059a3..8e6d051d8c97 100644
> --- a/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
> +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
> @@ -55,6 +55,7 @@ properties:
>                - samsung,exynos7885-pmu
>                - samsung,exynos8895-pmu
>                - samsung,exynos9810-pmu
> +              - samsung,exynos990-pmu
>                - samsung,exynosautov9-pmu
>                - samsung,exynosautov920-pmu
>                - tesla,fsd-pmu
> --
> 2.45.2




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
  2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
  2024-12-04 17:45   ` Conor Dooley
  2024-12-05  1:08   ` Alim Akhtar
@ 2024-12-09 10:49   ` Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-09 10:49 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	Igor Belwon
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel


On Wed, 04 Dec 2024 15:55:58 +0100, Igor Belwon wrote:
> Add a dt-binding compatible for the Exynos990 PMU. It's compatible
> with the Exynos7 PMU design. It handles system reboot, as well as
> other system control registers (i.e registers for the USB PHY).
> 
> 

Applied, thanks!

[1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible
      https://git.kernel.org/krzk/linux/c/33ebc0fb73ba8fabbc1c8f581f7f512a0b277645

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes
  2024-12-04 14:55 ` [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes Igor Belwon
  2024-12-05  1:07   ` Alim Akhtar
@ 2024-12-09 10:49   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-09 10:49 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	Igor Belwon
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel


On Wed, 04 Dec 2024 15:55:59 +0100, Igor Belwon wrote:
> Add PMU syscon, and syscon-reboot nodes to the Exynos990 dtsi.
> 
> Reboot of the Exynos990 SoC is handled by setting bit(SWRESET_TRIGGER[1])
> of SWRESET register (PMU + 0x3a00).
> 
> Tested using the "reboot" command.
> 
> [...]

Applied, thanks!

[2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes
      https://git.kernel.org/krzk/linux/c/d5b3944bec944b40e91cae82583ce11740af6f10

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-09 10:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 14:55 [PATCH v2 0/2] Add pmu and syscon-reboot support to Exynos990 Igor Belwon
2024-12-04 14:55 ` [PATCH v2 1/2] dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Igor Belwon
2024-12-04 17:45   ` Conor Dooley
2024-12-05  1:08   ` Alim Akhtar
2024-12-09 10:49   ` (subset) " Krzysztof Kozlowski
2024-12-04 14:55 ` [PATCH v2 2/2] arm64: dts: exynos990: Add pmu and syscon-reboot nodes Igor Belwon
2024-12-05  1:07   ` Alim Akhtar
2024-12-09 10:49   ` (subset) " 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).