devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
@ 2025-02-27 15:51 Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy Ryan.Wanner
                   ` (24 more replies)
  0 siblings, 25 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

This patch set adds support for low power modes for the SAMA7D65 SoC and
the required components and changes for low power modes.

The series includes changes in the asm code to account for the addtional
clocks that are in this SoC.

The Device tree additions are to enable all the components needed to
keep the SoC in low power mode.

There are some DTB check warnings but that is due to the dt-binding not
in the correct .yaml file format.

Changes v1 -> v2:
- Add missing compatible for ddr3phy, it is now in both syscon sets.
- Fix alphabetical ordering for sama7d65.
- Remove the incorrect reorganizing patch.
- Remove sama7g5-rtt as a compatible for sama7d65-rtt and add
  sama7d65-rtt as a compatible wake up source in the pm driver.

Changes from v2 -> v3:
- Correct mistake in v2 sfrbu dt-binding patch.
- Correct incorrect dt-binding addition and formatting for rtc and rtt bindings.
- Add missing SoB tag.
- Cleaned up commit message for Backup mode to describe SHDWC is status
  register is cleared for this SoC.
- Cleaned up variable naming and usage for mcks. Changed the mcks number
  to the correct number of clocks needed to be saved and corrected the
  ASM code accordingly.
- Removed the SHDWC from ULP0 wake-up source as it is not configured as
  a valid wake-up source for ULP0.
- Separated all the DTSI and DTS changes into individual patches.


Li Bin (1):
  ARM: at91: pm: fix at91_suspend_finish for ZQ calibration

Ryan Wanner (20):
  dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
  dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
  dt-bindings: sram: Add microchip,sama7d65-sram
  dt-bindings: power: reset: atmel,sama5d2-shdwc: Add
    microchip,sama7d65-shdwc
  dt-bindings: reset: atmel,at91sam9260-reset: add
    microchip,sama7d65-rstc
  dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
  dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
  ARM: at91: Add PM support to sama7d65
  ARM: at91: pm: add DT compatible support for sama7d65
  ARM: at91: PM: Add Backup mode for SAMA7D65
  ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
  power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
  ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
  ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
  ARM: dts: microchip: sama7d65: Add Shutdown controller support
  ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65
    SoC
  ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
  ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
  ARM: dts: microchip: sama7d65: Enable shutdown controller
  ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board

 .../devicetree/bindings/mfd/syscon.yaml       |   4 +
 .../power/reset/atmel,sama5d2-shdwc.yaml      |   5 +
 .../reset/atmel,at91sam9260-reset.yaml        |   3 +
 .../bindings/rtc/atmel,at91rm9200-rtc.yaml    |   4 +-
 .../bindings/rtc/atmel,at91sam9260-rtt.yaml   |   1 +
 .../devicetree/bindings/sram/sram.yaml        |   1 +
 .../dts/microchip/at91-sama7d65_curiosity.dts |  13 +++
 arch/arm/boot/dts/microchip/sama7d65.dtsi     |  77 +++++++++++++
 arch/arm/mach-at91/Kconfig                    |   1 +
 arch/arm/mach-at91/pm.c                       |  47 +++++---
 arch/arm/mach-at91/pm.h                       |   1 +
 arch/arm/mach-at91/pm_data-offsets.c          |   2 +
 arch/arm/mach-at91/pm_suspend.S               | 101 ++++++++++++++++--
 drivers/power/reset/at91-sama5d2_shdwc.c      |   1 +
 14 files changed, 238 insertions(+), 23 deletions(-)

-- 
2.43.0


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

* [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-03-21 11:32   ` (subset) " Lee Jones
  2025-02-27 15:51 ` [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu Ryan.Wanner
                   ` (23 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner, Krzysztof Kozlowski

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 DDR3phy compatible to DT bindings documentation

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 4d67ff26d445..769dcb096186 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -90,6 +90,7 @@ select:
           - microchip,lan966x-cpu-syscon
           - microchip,mpfs-sysreg-scb
           - microchip,sam9x60-sfr
+          - microchip,sama7d65-ddr3phy
           - microchip,sama7g5-ddr3phy
           - mscc,ocelot-cpu-syscon
           - mstar,msc313-pmsleep
@@ -189,6 +190,7 @@ properties:
           - microchip,lan966x-cpu-syscon
           - microchip,mpfs-sysreg-scb
           - microchip,sam9x60-sfr
+          - microchip,sama7d65-ddr3phy
           - microchip,sama7g5-ddr3phy
           - mscc,ocelot-cpu-syscon
           - mstar,msc313-pmsleep
-- 
2.43.0


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

* [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-28 21:22   ` Rob Herring (Arm)
  2025-03-21 11:32   ` (subset) " Lee Jones
  2025-02-27 15:51 ` [PATCH v3 03/21] dt-bindings: sram: Add microchip,sama7d65-sram Ryan.Wanner
                   ` (22 subsequent siblings)
  24 siblings, 2 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 SFRBU compatible string to DT bindings documentation

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 769dcb096186..05ef01f24ac4 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -91,6 +91,7 @@ select:
           - microchip,mpfs-sysreg-scb
           - microchip,sam9x60-sfr
           - microchip,sama7d65-ddr3phy
+          - microchip,sama7d65-sfrbu
           - microchip,sama7g5-ddr3phy
           - mscc,ocelot-cpu-syscon
           - mstar,msc313-pmsleep
@@ -191,6 +192,7 @@ properties:
           - microchip,mpfs-sysreg-scb
           - microchip,sam9x60-sfr
           - microchip,sama7d65-ddr3phy
+          - microchip,sama7d65-sfrbu
           - microchip,sama7g5-ddr3phy
           - mscc,ocelot-cpu-syscon
           - mstar,msc313-pmsleep
-- 
2.43.0


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

* [PATCH v3 03/21] dt-bindings: sram: Add microchip,sama7d65-sram
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 04/21] dt-bindings: power: reset: atmel,sama5d2-shdwc: Add microchip,sama7d65-shdwc Ryan.Wanner
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add microchip,sama7d65-sram compatibility to DT binding documentation.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/sram/sram.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 7c1337e159f2..3071c5075ee4 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -31,6 +31,7 @@ properties:
         - amlogic,meson-gxbb-sram
         - arm,juno-sram-ns
         - atmel,sama5d2-securam
+        - microchip,sama7d65-securam
         - nvidia,tegra186-sysram
         - nvidia,tegra194-sysram
         - nvidia,tegra234-sysram
-- 
2.43.0


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

* [PATCH v3 04/21] dt-bindings: power: reset: atmel,sama5d2-shdwc: Add microchip,sama7d65-shdwc
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (2 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 03/21] dt-bindings: sram: Add microchip,sama7d65-sram Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 05/21] dt-bindings: reset: atmel,at91sam9260-reset: add microchip,sama7d65-rstc Ryan.Wanner
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 SHDWC compatible to DT bindings documentation

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml b/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
index 0735ceb7c103..9c34249b2d6d 100644
--- a/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
+++ b/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
@@ -16,6 +16,11 @@ description: |
 properties:
   compatible:
     oneOf:
+      - items:
+          - enum:
+              - microchip,sama7d65-shdwc
+          - const: microchip,sama7g5-shdwc
+          - const: syscon
       - items:
           - const: microchip,sama7g5-shdwc
           - const: syscon
-- 
2.43.0


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

* [PATCH v3 05/21] dt-bindings: reset: atmel,at91sam9260-reset: add microchip,sama7d65-rstc
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (3 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 04/21] dt-bindings: power: reset: atmel,sama5d2-shdwc: Add microchip,sama7d65-shdwc Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc Ryan.Wanner
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner, Krzysztof Kozlowski

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 RSTC compatible to DT bindings documentation. The
sama7d65-rstc is compatible with the sama7g5-rstc.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/reset/atmel,at91sam9260-reset.yaml     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
index 98465d26949e..a2ab7f8a11f8 100644
--- a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
+++ b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
@@ -23,6 +23,9 @@ properties:
               - atmel,sama5d3-rstc
               - microchip,sam9x60-rstc
               - microchip,sama7g5-rstc
+      - items:
+          - const: microchip,sama7d65-rstc
+          - const: microchip,sama7g5-rstc
       - items:
           - const: atmel,sama5d3-rstc
           - const: atmel,at91sam9g45-rstc
-- 
2.43.0


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

* [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (4 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 05/21] dt-bindings: reset: atmel,at91sam9260-reset: add microchip,sama7d65-rstc Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-28 21:22   ` Rob Herring (Arm)
  2025-02-27 15:51 ` [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt Ryan.Wanner
                   ` (18 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 RTC compatible to DT bindings documentation.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 .../devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml
index c8bb2eef442d..7c5b13caa40b 100644
--- a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml
@@ -23,7 +23,9 @@ properties:
           - microchip,sam9x60-rtc
           - microchip,sama7g5-rtc
       - items:
-          - const: microchip,sam9x7-rtc
+          - enum:
+              - microchip,sam9x7-rtc
+              - microchip,sama7d65-rtc
           - const: microchip,sam9x60-rtc
 
   reg:
-- 
2.43.0


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

* [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (5 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-28 21:23   ` Rob Herring (Arm)
  2025-02-27 15:51 ` [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65 Ryan.Wanner
                   ` (17 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SAMA7D65 RTT compatible to DT bindings documentation.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml
index a7f6c1d1a08a..9c9b981fe38b 100644
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml
@@ -22,6 +22,7 @@ properties:
           - enum:
               - microchip,sam9x60-rtt
               - microchip,sam9x7-rtt
+              - microchip,sama7d65-rtt
           - const: atmel,at91sam9260-rtt
       - items:
           - const: microchip,sama7g5-rtt
-- 
2.43.0


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

* [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (6 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-03-03  8:26   ` Claudiu Beznea
  2025-02-27 15:51 ` [PATCH v3 09/21] ARM: at91: pm: fix at91_suspend_finish for ZQ calibration Ryan.Wanner
                   ` (16 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add PM support to SAMA7D65 SoC.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/mach-at91/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 04bd91c72521..f3ff1220c0fb 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -65,6 +65,7 @@ config SOC_SAMA7D65
 	select HAVE_AT91_SAM9X60_PLL
 	select HAVE_AT91_USB_CLK
 	select HAVE_AT91_UTMI
+	select PM_OPP
 	select SOC_SAMA7
 	help
 	  Select this if you are using one of Microchip's SAMA7D65 family SoC.
-- 
2.43.0


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

* [PATCH v3 09/21] ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (7 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65 Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-27 15:51 ` [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65 Ryan.Wanner
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Li Bin, Ryan Wanner, Durai Manickam KR, Andrei Simion

From: Li Bin <bin.li@microchip.com>

For sama7g5 and sama7d65 backup mode, we encountered a "ZQ calibrate error"
during recalibrating the impedance in BootStrap.
We found that the impedance value saved in at91_suspend_finish() before
the DDR entered self-refresh mode did not match the resistor values. The
ZDATA field in the DDR3PHY_ZQ0CR0 register uses a modified gray code to
select the different impedance setting.
But these gray code are incorrect, a workaournd from design team fixed the
bug in the calibration logic. The ZDATA contains four independent impedance
elements, but the algorithm combined the four elements into one. The elements
were fixed using properly shifted offsets.

Signed-off-by: Li Bin <bin.li@microchip.com>
[nicolas.ferre@microchip.com: fix indentation and combine 2 patches]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Tested-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Tested-by: Durai Manickam KR <durai.manickamkr@microchip.com>
Tested-by: Andrei Simion <andrei.simion@microchip.com>
Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/mach-at91/pm.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 05a1547642b6..6c3e6aa22606 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -545,11 +545,12 @@ extern u32 at91_pm_suspend_in_sram_sz;
 
 static int at91_suspend_finish(unsigned long val)
 {
-	unsigned char modified_gray_code[] = {
-		0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
-		0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
-		0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
-		0x10, 0x11,
+	/* SYNOPSYS workaround to fix a bug in the calibration logic */
+	unsigned char modified_fix_code[] = {
+		0x00, 0x01, 0x01, 0x06, 0x07, 0x0c, 0x06, 0x07, 0x0b, 0x18,
+		0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0a, 0x13, 0x13, 0x12, 0x13,
+		0x14, 0x15, 0x15, 0x12, 0x18, 0x19, 0x19, 0x1e, 0x1f, 0x14,
+		0x1e, 0x1f,
 	};
 	unsigned int tmp, index;
 	int i;
@@ -560,25 +561,25 @@ static int at91_suspend_finish(unsigned long val)
 		 * restore the ZQ0SR0 with the value saved here. But the
 		 * calibration is buggy and restoring some values from ZQ0SR0
 		 * is forbidden and risky thus we need to provide processed
-		 * values for these (modified gray code values).
+		 * values for these.
 		 */
 		tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
 
 		/* Store pull-down output impedance select. */
 		index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
-		soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
+		soc_pm.bu->ddr_phy_calibration[0] = modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDO_OFF;
 
 		/* Store pull-up output impedance select. */
 		index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
-		soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+		soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PUO_OFF;
 
 		/* Store pull-down on-die termination impedance select. */
 		index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
-		soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+		soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDODT_OFF;
 
 		/* Store pull-up on-die termination impedance select. */
 		index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
-		soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+		soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SRO_PUODT_OFF;
 
 		/*
 		 * The 1st 8 words of memory might get corrupted in the process
-- 
2.43.0


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

* [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (8 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 09/21] ARM: at91: pm: fix at91_suspend_finish for ZQ calibration Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-03-03  8:37   ` claudiu beznea (tuxon)
  2025-02-27 15:51 ` [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65 Ryan.Wanner
                   ` (14 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add support for SAMA7D65 new compatible strings in pm.c file for wakeup source
IDs and PMC.
This is the first bits of PM for this new SoC. PM depends on other patches.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
[nicolas.ferre@microchip.com: split patch and address only the pm.c changes]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 arch/arm/mach-at91/pm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 6c3e6aa22606..39644703244d 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -222,13 +222,16 @@ static const struct of_device_id sam9x60_ws_ids[] = {
 	{ /* sentinel */ }
 };
 
-static const struct of_device_id sama7g5_ws_ids[] = {
+static const struct of_device_id sama7_ws_ids[] = {
+	{ .compatible = "microchip,sama7d65-rtc",	.data = &ws_info[1] },
 	{ .compatible = "microchip,sama7g5-rtc",	.data = &ws_info[1] },
 	{ .compatible = "microchip,sama7g5-ohci",	.data = &ws_info[2] },
 	{ .compatible = "usb-ohci",			.data = &ws_info[2] },
 	{ .compatible = "atmel,at91sam9g45-ehci",	.data = &ws_info[2] },
 	{ .compatible = "usb-ehci",			.data = &ws_info[2] },
+	{ .compatible = "microchip,sama7d65-sdhci",	.data = &ws_info[3] },
 	{ .compatible = "microchip,sama7g5-sdhci",	.data = &ws_info[3] },
+	{ .compatible = "microchip,sama7d65-rtt",	.data = &ws_info[4] },
 	{ .compatible = "microchip,sama7g5-rtt",	.data = &ws_info[4] },
 	{ /* sentinel */ }
 };
@@ -1379,6 +1382,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
 	{ .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
 	{ .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
 	{ .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
+	{ .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[4] },
 	{ .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
 	{ /* sentinel */ },
 };
@@ -1672,7 +1676,7 @@ void __init sama7_pm_init(void)
 	at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
 	at91_pm_init(NULL);
 
-	soc_pm.ws_ids = sama7g5_ws_ids;
+	soc_pm.ws_ids = sama7_ws_ids;
 	soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
 
 	soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);
-- 
2.43.0


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

* [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (9 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65 Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-03-03  8:37   ` claudiu beznea (tuxon)
  2025-02-27 15:51 ` [PATCH v3 12/21] ARM: at91: pm: Enable ULP0/ULP1 " Ryan.Wanner
                   ` (13 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add config check that enables Backup mode for SAMA7D65 SoC.

Add SHDWC_SR read to clear the status bits once finished exiting backup
mode. This is only for SAMA7D65 SoCs. The SHDWC status register
needs to be cleared after exiting backup mode to clear the wake up pin
status.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/mach-at91/pm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 39644703244d..d82a507bc8da 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -647,6 +647,11 @@ static void at91_pm_suspend(suspend_state_t state)
 		at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
 					     &at91_pm_suspend_in_sram,
 					     at91_pm_suspend_in_sram_sz);
+
+		if (IS_ENABLED(CONFIG_SOC_SAMA7D65))
+			/* SHDWC.SR */
+			readl(soc_pm.data.shdwc + 0x08);
+
 	} else {
 		at91_suspend_finish(0);
 	}
@@ -707,6 +712,7 @@ static int at91_pm_enter(suspend_state_t state)
 static void at91_pm_end(void)
 {
 	at91_pm_config_ws(soc_pm.data.mode, false);
+
 }
 
 
@@ -1065,7 +1071,8 @@ static int __init at91_pm_backup_init(void)
 	int ret = -ENODEV, located = 0;
 
 	if (!IS_ENABLED(CONFIG_SOC_SAMA5D2) &&
-	    !IS_ENABLED(CONFIG_SOC_SAMA7G5))
+	    !IS_ENABLED(CONFIG_SOC_SAMA7G5) &&
+	    !IS_ENABLED(CONFIG_SOC_SAMA7D65))
 		return -EPERM;
 
 	if (!at91_is_pm_mode_active(AT91_PM_BACKUP))
-- 
2.43.0


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

* [PATCH v3 12/21] ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (10 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65 Ryan.Wanner
@ 2025-02-27 15:51 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 13/21] power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC Ryan.Wanner
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:51 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

New clocks are saved to enable ULP0/ULP1 for SAMA7D65 because this SoC has a
total of 9 main clocks that need to be saved for ULP0/ULP1 mode.

Add mcks member to at91_pm_data, this will be used to determine
how many main clocks need to be saved. In the pm_mcks variable will also make
sure that no unnecessary clock settings are written during
mck_ps_restore.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 arch/arm/mach-at91/pm.c              |  11 ++-
 arch/arm/mach-at91/pm.h              |   1 +
 arch/arm/mach-at91/pm_data-offsets.c |   2 +
 arch/arm/mach-at91/pm_suspend.S      | 101 ++++++++++++++++++++++++---
 4 files changed, 105 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index d82a507bc8da..ab51ca03632b 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -1340,6 +1340,7 @@ struct pmc_info {
 	unsigned long uhp_udp_mask;
 	unsigned long mckr;
 	unsigned long version;
+	unsigned long mcks;
 };
 
 static const struct pmc_info pmc_infos[] __initconst = {
@@ -1371,6 +1372,13 @@ static const struct pmc_info pmc_infos[] __initconst = {
 	{
 		.mckr = 0x28,
 		.version = AT91_PMC_V2,
+		.mcks = 4,
+	},
+	{
+		.uhp_udp_mask = AT91SAM926x_PMC_UHP,
+		.mckr = 0x28,
+		.version = AT91_PMC_V2,
+		.mcks = 9,
 	},
 
 };
@@ -1389,7 +1397,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
 	{ .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
 	{ .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
 	{ .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
-	{ .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[4] },
+	{ .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[6] },
 	{ .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
 	{ /* sentinel */ },
 };
@@ -1460,6 +1468,7 @@ static void __init at91_pm_init(void (*pm_idle)(void))
 	soc_pm.data.uhp_udp_mask = pmc->uhp_udp_mask;
 	soc_pm.data.pmc_mckr_offset = pmc->mckr;
 	soc_pm.data.pmc_version = pmc->version;
+	soc_pm.data.pmc_mcks = pmc->mcks;
 
 	if (pm_idle)
 		arm_pm_idle = pm_idle;
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h
index 53bdc9000e44..50c3a425d140 100644
--- a/arch/arm/mach-at91/pm.h
+++ b/arch/arm/mach-at91/pm.h
@@ -39,6 +39,7 @@ struct at91_pm_data {
 	unsigned int suspend_mode;
 	unsigned int pmc_mckr_offset;
 	unsigned int pmc_version;
+	unsigned int pmc_mcks;
 };
 #endif
 
diff --git a/arch/arm/mach-at91/pm_data-offsets.c b/arch/arm/mach-at91/pm_data-offsets.c
index 40bd4e8fe40a..0ca5da66dc26 100644
--- a/arch/arm/mach-at91/pm_data-offsets.c
+++ b/arch/arm/mach-at91/pm_data-offsets.c
@@ -18,6 +18,8 @@ int main(void)
 						 pmc_mckr_offset));
 	DEFINE(PM_DATA_PMC_VERSION,	offsetof(struct at91_pm_data,
 						 pmc_version));
+	DEFINE(PM_DATA_PMC_MCKS,	offsetof(struct at91_pm_data,
+						 pmc_mcks));
 
 	return 0;
 }
diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S
index e5869cca5e79..e23b86834096 100644
--- a/arch/arm/mach-at91/pm_suspend.S
+++ b/arch/arm/mach-at91/pm_suspend.S
@@ -814,18 +814,20 @@ sr_dis_exit:
 .endm
 
 /**
- * at91_mckx_ps_enable:	save MCK1..4 settings and switch it to main clock
+ * at91_mckx_ps_enable:	save MCK settings and switch it to main clock
  *
- * Side effects: overwrites tmp1, tmp2
+ * Side effects: overwrites tmp1, tmp2, tmp3
  */
 .macro at91_mckx_ps_enable
 #ifdef CONFIG_SOC_SAMA7
 	ldr	pmc, .pmc_base
+	ldr	tmp3, .mcks
 
-	/* There are 4 MCKs we need to handle: MCK1..4 */
+	/* Start at MCK1 and go until MCKs */
 	mov	tmp1, #1
-e_loop:	cmp	tmp1, #5
-	beq	e_done
+e_loop:
+	cmp	tmp1, tmp3
+	bgt	e_done
 
 	/* Write MCK ID to retrieve the settings. */
 	str	tmp1, [pmc, #AT91_PMC_MCR_V2]
@@ -850,7 +852,37 @@ e_save_mck3:
 	b	e_ps
 
 e_save_mck4:
+	cmp	tmp1, #4
+	bne	e_save_mck5
 	str	tmp2, .saved_mck4
+	b	e_ps
+
+e_save_mck5:
+	cmp	tmp1, #5
+	bne	e_save_mck6
+	str	tmp2, .saved_mck5
+	b	e_ps
+
+e_save_mck6:
+	cmp	tmp1, #6
+	bne	e_save_mck7
+	str	tmp2, .saved_mck6
+	b	e_ps
+
+e_save_mck7:
+	cmp	tmp1, #7
+	bne	e_save_mck8
+	str	tmp2, .saved_mck7
+	b	e_ps
+
+e_save_mck8:
+	cmp	tmp1, #8
+	bne	e_save_mck9
+	str	tmp2, .saved_mck8
+	b	e_ps
+
+e_save_mck9:
+	str	tmp2, .saved_mck9
 
 e_ps:
 	/* Use CSS=MAINCK and DIV=1. */
@@ -870,18 +902,20 @@ e_done:
 .endm
 
 /**
- * at91_mckx_ps_restore: restore MCK1..4 settings
+ * at91_mckx_ps_restore: restore MCKx settings
  *
  * Side effects: overwrites tmp1, tmp2
  */
 .macro at91_mckx_ps_restore
 #ifdef CONFIG_SOC_SAMA7
 	ldr	pmc, .pmc_base
+	ldr	tmp2, .mcks
 
-	/* There are 4 MCKs we need to handle: MCK1..4 */
+	/* Start from MCK1 and go up to MCKs */
 	mov	tmp1, #1
-r_loop:	cmp	tmp1, #5
-	beq	r_done
+r_loop:
+	cmp	tmp1, tmp2
+	bgt	r_done
 
 r_save_mck1:
 	cmp	tmp1, #1
@@ -902,7 +936,37 @@ r_save_mck3:
 	b	r_ps
 
 r_save_mck4:
+	cmp	tmp1, #4
+	bne	r_save_mck5
 	ldr	tmp2, .saved_mck4
+	b	r_ps
+
+r_save_mck5:
+	cmp	tmp1, #5
+	bne	r_save_mck6
+	ldr	tmp2, .saved_mck5
+	b	r_ps
+
+r_save_mck6:
+	cmp	tmp1, #6
+	bne	r_save_mck7
+	ldr	tmp2, .saved_mck6
+	b	r_ps
+
+r_save_mck7:
+	cmp	tmp1, #7
+	bne	r_save_mck8
+	ldr	tmp2, .saved_mck7
+	b	r_ps
+
+r_save_mck8:
+	cmp	tmp1, #8
+	bne	r_save_mck9
+	ldr	tmp2, .saved_mck8
+	b	r_ps
+
+r_save_mck9:
+	ldr	tmp2, .saved_mck9
 
 r_ps:
 	/* Write MCK ID to retrieve the settings. */
@@ -921,6 +985,7 @@ r_ps:
 	wait_mckrdy tmp1
 
 	add	tmp1, tmp1, #1
+	ldr	tmp2, .mcks
 	b	r_loop
 r_done:
 #endif
@@ -1045,6 +1110,10 @@ ENTRY(at91_pm_suspend_in_sram)
 	str	tmp1, .memtype
 	ldr	tmp1, [r0, #PM_DATA_MODE]
 	str	tmp1, .pm_mode
+#ifdef CONFIG_SOC_SAMA7
+	ldr	tmp1, [r0, #PM_DATA_PMC_MCKS]
+	str	tmp1, .mcks
+#endif
 
 	/*
 	 * ldrne below are here to preload their address in the TLB as access
@@ -1132,6 +1201,10 @@ ENDPROC(at91_pm_suspend_in_sram)
 	.word 0
 .pmc_version:
 	.word 0
+#ifdef CONFIG_SOC_SAMA7
+.mcks:
+	.word 0
+#endif
 .saved_mckr:
 	.word 0
 .saved_pllar:
@@ -1155,6 +1228,16 @@ ENDPROC(at91_pm_suspend_in_sram)
 	.word 0
 .saved_mck4:
 	.word 0
+.saved_mck5:
+	.word 0
+.saved_mck6:
+	.word 0
+.saved_mck7:
+	.word 0
+.saved_mck8:
+	.word 0
+.saved_mck9:
+	.word 0
 #endif
 
 ENTRY(at91_pm_suspend_in_sram_sz)
-- 
2.43.0


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

* [PATCH v3 13/21] power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (11 preceding siblings ...)
  2025-02-27 15:51 ` [PATCH v3 12/21] ARM: at91: pm: Enable ULP0/ULP1 " Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support Ryan.Wanner
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add sama7d65-pmc compatible string to the list of valid PMC IDs.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 drivers/power/reset/at91-sama5d2_shdwc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
index c2801bd6384d..e9fe08ee3812 100644
--- a/drivers/power/reset/at91-sama5d2_shdwc.c
+++ b/drivers/power/reset/at91-sama5d2_shdwc.c
@@ -327,6 +327,7 @@ static const struct of_device_id at91_pmc_ids[] = {
 	{ .compatible = "microchip,sam9x60-pmc" },
 	{ .compatible = "microchip,sama7g5-pmc" },
 	{ .compatible = "microchip,sam9x7-pmc" },
+	{ .compatible = "microchip,sama7d65-pmc" },
 	{ /* Sentinel. */ }
 };
 
-- 
2.43.0


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

* [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (12 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 13/21] power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-03-03  8:28   ` Claudiu Beznea
  2025-02-27 15:52 ` [PATCH v3 15/21] ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC Ryan.Wanner
                   ` (10 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SRAM, secumod, UDDRC, and DDR3phy to enable support for low power modes.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 35 +++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index 92a5347e35b5..c10cc3558efd 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -47,12 +47,37 @@ slow_xtal: clock-slowxtal {
 		};
 	};
 
+	ns_sram: sram@100000 {
+		compatible = "mmio-sram";
+		reg = <0x100000 0x20000>;
+		ranges;
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+
 	soc {
 		compatible = "simple-bus";
 		ranges;
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		securam: sram@e0000800 {
+			compatible = "microchip,sama7d65-securam", "atmel,sama5d2-securam", "mmio-sram";
+			reg = <0xe0000800 0x4000>;
+			ranges = <0 0xe0000800 0x4000>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 17>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			no-memory-wc;
+		};
+
+		secumod: secumod@e0004000 {
+			compatible = "microchip,sama7d65-secumod", "atmel,sama5d2-secumod", "syscon";
+			reg = <0xe0004000 0x4000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
 		pioa: pinctrl@e0014000 {
 			compatible = "microchip,sama7d65-pinctrl", "microchip,sama7g5-pinctrl";
 			reg = <0xe0014000 0x800>;
@@ -190,6 +215,16 @@ i2c10: i2c@600 {
 			};
 		};
 
+		uddrc: uddrc@e3800000 {
+			compatible = "microchip,sama7d65-uddrc", "microchip,sama7g5-uddrc";
+			reg = <0xe3800000 0x4000>;
+		};
+
+		ddr3phy: ddr3phy@e3804000 {
+			compatible = "microchip,sama7d65-ddr3phy", "microchip,sama7g5-ddr3phy";
+			reg = <0xe3804000 0x1000>;
+		};
+
 		gic: interrupt-controller@e8c11000 {
 			compatible = "arm,cortex-a7-gic";
 			reg = <0xe8c11000 0x1000>,
-- 
2.43.0


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

* [PATCH v3 15/21] ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (13 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 16/21] ARM: dts: microchip: sama7d65: Add Shutdown controller support Ryan.Wanner
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add Reset Controller support to SAMA7D65 SoC.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index c10cc3558efd..5165259fb926 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -102,6 +102,13 @@ pmc: clock-controller@e0018000 {
 			clock-names = "td_slck", "md_slck", "main_xtal";
 		};
 
+		reset_controller: reset-controller@e001d100 {
+			compatible = "microchip,sama7d65-rstc", "microchip,sama7g5-rstc";
+			reg = <0xe001d100 0xc>, <0xe001d1e4 0x4>;
+			#reset-cells = <1>;
+			clocks = <&clk32k 0>;
+		};
+
 		clk32k: clock-controller@e001d500 {
 			compatible = "microchip,sama7d65-sckc", "microchip,sam9x60-sckc";
 			reg = <0xe001d500 0x4>;
-- 
2.43.0


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

* [PATCH v3 16/21] ARM: dts: microchip: sama7d65: Add Shutdown controller support
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (14 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 15/21] ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Ryan.Wanner
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add shutdown controller support for SAMA7D65 SoC.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index 5165259fb926..b0a676623100 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -109,6 +109,17 @@ reset_controller: reset-controller@e001d100 {
 			clocks = <&clk32k 0>;
 		};
 
+		shdwc: poweroff@e001d200 {
+			compatible = "microchip,sama7d65-shdwc", "microchip,sama7g5-shdwc", "syscon";
+			reg = <0xe001d200 0x20>;
+			clocks = <&clk32k 0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			atmel,wakeup-rtc-timer;
+			atmel,wakeup-rtt-timer;
+			status = "disabled";
+		};
+
 		clk32k: clock-controller@e001d500 {
 			compatible = "microchip,sama7d65-sckc", "microchip,sam9x60-sckc";
 			reg = <0xe001d500 0x4>;
-- 
2.43.0


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

* [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (15 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 16/21] ARM: dts: microchip: sama7d65: Add Shutdown controller support Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-03-03  8:28   ` Claudiu Beznea
  2025-03-03  8:38   ` claudiu beznea (tuxon)
  2025-02-27 15:52 ` [PATCH v3 18/21] ARM: dts: microchip: sama7d65: Add RTC support for sama7d65 Ryan.Wanner
                   ` (7 subsequent siblings)
  24 siblings, 2 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add RTT support for SAMA7D65 SoC. The GPBR is added so the SoC is able
to store the RTT time data.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index b0a676623100..aadeea132289 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -120,6 +120,13 @@ shdwc: poweroff@e001d200 {
 			status = "disabled";
 		};
 
+		rtt: rtc@e001d300 {
+			compatible = "microchip,sama7d65-rtt", "atmel,at91sam9260-rtt";
+			reg = <0xe001d300 0x30>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk32k 0>;
+		};
+
 		clk32k: clock-controller@e001d500 {
 			compatible = "microchip,sama7d65-sckc", "microchip,sam9x60-sckc";
 			reg = <0xe001d500 0x4>;
@@ -132,6 +139,11 @@ chipid@e0020000 {
 			reg = <0xe0020000 0x8>;
 		};
 
+		gpbr: gpbr@e001d700 {
+			compatible = "microchip,sama7d65-gpbr", "syscon";
+			reg = <0xe001d700 0x48>;
+		};
+
 		dma2: dma-controller@e1200000 {
 			compatible = "microchip,sama7d65-dma", "microchip,sama7g5-dma";
 			reg = <0xe1200000 0x1000>;
-- 
2.43.0


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

* [PATCH v3 18/21] ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (16 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 19/21] ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65 Ryan.Wanner
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add RTC support for the SAMA7D65 SoC.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index aadeea132289..e623f9d22f36 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -144,6 +144,13 @@ gpbr: gpbr@e001d700 {
 			reg = <0xe001d700 0x48>;
 		};
 
+		rtc: rtc@e001d800 {
+			compatible = "microchip,sama7d65-rtc", "microchip,sam9x60-rtc";
+			reg = <0xe001d800 0x30>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk32k 1>;
+		};
+
 		dma2: dma-controller@e1200000 {
 			compatible = "microchip,sama7d65-dma", "microchip,sama7g5-dma";
 			reg = <0xe1200000 0x1000>;
-- 
2.43.0


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

* [PATCH v3 19/21] ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (17 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 18/21] ARM: dts: microchip: sama7d65: Add RTC support for sama7d65 Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 20/21] ARM: dts: microchip: sama7d65: Enable shutdown controller Ryan.Wanner
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add SFRBU support to the SAMA7D65 SoC. This is required to change the power
source for backup mode for the SoC.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7d65.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
index e623f9d22f36..45037fc95adf 100644
--- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
@@ -78,6 +78,11 @@ secumod: secumod@e0004000 {
 			#gpio-cells = <2>;
 		};
 
+		sfrbu: sfr@e0008000 {
+			compatible ="microchip,sama7d65-sfrbu", "atmel,sama5d2-sfrbu", "syscon";
+			reg = <0xe0008000 0x20>;
+		};
+
 		pioa: pinctrl@e0014000 {
 			compatible = "microchip,sama7d65-pinctrl", "microchip,sama7g5-pinctrl";
 			reg = <0xe0014000 0x800>;
-- 
2.43.0


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

* [PATCH v3 20/21] ARM: dts: microchip: sama7d65: Enable shutdown controller
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (18 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 19/21] ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65 Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-27 15:52 ` [PATCH v3 21/21] ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board Ryan.Wanner
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Enable shutdown controller to support shutdown and wake up.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
index 93a1b0684eb9..30fdc4f55a3b 100644
--- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
@@ -148,6 +148,15 @@ &sdmmc1 {
 	status = "okay";
 };
 
+&shdwc {
+	debounce-delay-us = <976>;
+	status = "okay";
+
+	input@0 {
+		reg = <0>;
+	};
+};
+
 &slow_xtal {
 	clock-frequency = <32768>;
 };
-- 
2.43.0


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

* [PATCH v3 21/21] ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (19 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 20/21] ARM: dts: microchip: sama7d65: Enable shutdown controller Ryan.Wanner
@ 2025-02-27 15:52 ` Ryan.Wanner
  2025-02-28 14:23 ` [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Rob Herring (Arm)
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-02-27 15:52 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Ryan Wanner

From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add RTT timer with backup register for SAMA7D65_Curiosity board.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
index 30fdc4f55a3b..3105fe1766c3 100644
--- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
@@ -141,6 +141,10 @@ pinctrl_uart6_default: uart6-default {
 	};
 };
 
+&rtt {
+	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+};
+
 &sdmmc1 {
 	bus-width = <4>;
 	pinctrl-names = "default";
-- 
2.43.0


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

* Re: [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (20 preceding siblings ...)
  2025-02-27 15:52 ` [PATCH v3 21/21] ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board Ryan.Wanner
@ 2025-02-28 14:23 ` Rob Herring (Arm)
  2025-03-03  8:40 ` Claudiu Beznea
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Rob Herring (Arm) @ 2025-02-28 14:23 UTC (permalink / raw)
  To: Ryan.Wanner
  Cc: linux-pm, linux-kernel, linux, linux-arm-kernel, conor+dt,
	krzk+dt, devicetree, p.zabel, alexandre.belloni, lee, linux-rtc,
	nicolas.ferre, claudiu.beznea, sre


On Thu, 27 Feb 2025 08:51:47 -0700, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> This patch set adds support for low power modes for the SAMA7D65 SoC and
> the required components and changes for low power modes.
> 
> The series includes changes in the asm code to account for the addtional
> clocks that are in this SoC.
> 
> The Device tree additions are to enable all the components needed to
> keep the SoC in low power mode.
> 
> There are some DTB check warnings but that is due to the dt-binding not
> in the correct .yaml file format.
> 
> Changes v1 -> v2:
> - Add missing compatible for ddr3phy, it is now in both syscon sets.
> - Fix alphabetical ordering for sama7d65.
> - Remove the incorrect reorganizing patch.
> - Remove sama7g5-rtt as a compatible for sama7d65-rtt and add
>   sama7d65-rtt as a compatible wake up source in the pm driver.
> 
> Changes from v2 -> v3:
> - Correct mistake in v2 sfrbu dt-binding patch.
> - Correct incorrect dt-binding addition and formatting for rtc and rtt bindings.
> - Add missing SoB tag.
> - Cleaned up commit message for Backup mode to describe SHDWC is status
>   register is cleared for this SoC.
> - Cleaned up variable naming and usage for mcks. Changed the mcks number
>   to the correct number of clocks needed to be saved and corrected the
>   ASM code accordingly.
> - Removed the SHDWC from ULP0 wake-up source as it is not configured as
>   a valid wake-up source for ULP0.
> - Separated all the DTSI and DTS changes into individual patches.
> 
> 
> Li Bin (1):
>   ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
> 
> Ryan Wanner (20):
>   dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
>   dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
>   dt-bindings: sram: Add microchip,sama7d65-sram
>   dt-bindings: power: reset: atmel,sama5d2-shdwc: Add
>     microchip,sama7d65-shdwc
>   dt-bindings: reset: atmel,at91sam9260-reset: add
>     microchip,sama7d65-rstc
>   dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
>   dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
>   ARM: at91: Add PM support to sama7d65
>   ARM: at91: pm: add DT compatible support for sama7d65
>   ARM: at91: PM: Add Backup mode for SAMA7D65
>   ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
>   power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
>   ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
>   ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
>   ARM: dts: microchip: sama7d65: Add Shutdown controller support
>   ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65
>     SoC
>   ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
>   ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
>   ARM: dts: microchip: sama7d65: Enable shutdown controller
>   ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board
> 
>  .../devicetree/bindings/mfd/syscon.yaml       |   4 +
>  .../power/reset/atmel,sama5d2-shdwc.yaml      |   5 +
>  .../reset/atmel,at91sam9260-reset.yaml        |   3 +
>  .../bindings/rtc/atmel,at91rm9200-rtc.yaml    |   4 +-
>  .../bindings/rtc/atmel,at91sam9260-rtt.yaml   |   1 +
>  .../devicetree/bindings/sram/sram.yaml        |   1 +
>  .../dts/microchip/at91-sama7d65_curiosity.dts |  13 +++
>  arch/arm/boot/dts/microchip/sama7d65.dtsi     |  77 +++++++++++++
>  arch/arm/mach-at91/Kconfig                    |   1 +
>  arch/arm/mach-at91/pm.c                       |  47 +++++---
>  arch/arm/mach-at91/pm.h                       |   1 +
>  arch/arm/mach-at91/pm_data-offsets.c          |   2 +
>  arch/arm/mach-at91/pm_suspend.S               | 101 ++++++++++++++++--
>  drivers/power/reset/at91-sama5d2_shdwc.c      |   1 +
>  14 files changed, 238 insertions(+), 23 deletions(-)
> 
> --
> 2.43.0
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/microchip/' for cover.1740671156.git.Ryan.Wanner@microchip.com:

arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: /soc/secumod@e0004000: failed to match any schema with compatible: ['microchip,sama7d65-secumod', 'atmel,sama5d2-secumod', 'syscon']
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: /soc/secumod@e0004000: failed to match any schema with compatible: ['microchip,sama7d65-secumod', 'atmel,sama5d2-secumod', 'syscon']
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: sfr@e0008000: compatible:1: 'syscon' was expected
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: sfr@e0008000: compatible: ['microchip,sama7d65-sfrbu', 'atmel,sama5d2-sfrbu', 'syscon'] is too long
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: /soc/gpbr@e001d700: failed to match any schema with compatible: ['microchip,sama7d65-gpbr', 'syscon']
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: /soc/uddrc@e3800000: failed to match any schema with compatible: ['microchip,sama7d65-uddrc', 'microchip,sama7g5-uddrc']
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: /soc/uddrc@e3800000: failed to match any schema with compatible: ['microchip,sama7d65-uddrc', 'microchip,sama7g5-uddrc']
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: ddr3phy@e3804000: compatible:1: 'syscon' was expected
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: ddr3phy@e3804000: compatible: ['microchip,sama7d65-ddr3phy', 'microchip,sama7g5-ddr3phy'] does not contain items matching the given schema
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb: ddr3phy@e3804000: Unevaluated properties are not allowed ('compatible' was unexpected)
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7g5ek.dtb: sfr@e0008000: compatible:0: 'microchip,sama7g5-sfrbu' is not one of ['al,alpine-sysfabric-service', 'allwinner,sun8i-a83t-system-controller', 'allwinner,sun8i-h3-system-controller', 'allwinner,sun8i-v3s-system-controller', 'allwinner,sun50i-a64-system-controller', 'altr,l3regs', 'altr,sdr-ctl', 'amd,pensando-elba-syscon', 'amlogic,meson-mx-assist', 'amlogic,meson-mx-bootrom', 'amlogic,meson8-analog-top', 'amlogic,meson8b-analog-top', 'amlogic,meson8-pmu', 'amlogic,meson8b-pmu', 'apm,merlin-poweroff-mailbox', 'apm,mustang-poweroff-mailbox', 'apm,xgene-csw', 'apm,xgene-efuse', 'apm,xgene-mcb', 'apm,xgene-rb', 'apm,xgene-scu', 'atmel,sama5d2-sfrbu', 'atmel,sama5d3-nfc-io', 'atmel,sama5d3-sfrbu', 'atmel,sama5d4-sfrbu', 'axis,artpec6-syscon', 'brcm,cru-clkset', 'brcm,sr-cdru', 'brcm,sr-mhb', 'cirrus,ep7209-syscon1', 'cirrus,ep7209-syscon2', 'cirrus,ep7209-syscon3', 'cnxt,cx92755-uc', 'freecom,fsg-cs2-system-controller', 'fsl,imx93-aonmix-ns-syscfg', 'fsl,imx93-wakeupmix-syscfg', 'fsl,ls1088a-reset', 'fsl,vf610-anatop', 'fsl,vf610-mscm-cpucfg', 'hisilicon,dsa-subctrl', 'hisilicon,hi6220-sramctrl', 'hisilicon,hip04-ppe', 'hisilicon,pcie-sas-subctrl', 'hisilicon,peri-subctrl', 'hpe,gxp-sysreg', 'loongson,ls1b-syscon', 'loongson,ls1c-syscon', 'lsi,axxia-syscon', 'marvell,armada-3700-cpu-misc', 'marvell,armada-3700-nb-pm', 'marvell,armada-3700-avs', 'marvell,armada-3700-usb2-host-misc', 'marvell,dove-global-config', 'mediatek,mt2701-pctl-a-syscfg', 'mediatek,mt2712-pctl-a-syscfg', 'mediatek,mt6397-pctl-pmic-syscfg', 'mediatek,mt8135-pctl-a-syscfg', 'mediatek,mt8135-pctl-b-syscfg', 'mediatek,mt8173-pctl-a-syscfg', 'mediatek,mt8365-syscfg', 'microchip,lan966x-cpu-syscon', 'microchip,mpfs-sysreg-scb', 'microchip,sam9x60-sfr', 'microchip,sama7d65-ddr3phy', 'microchip,sama7d65-sfrbu', 'microchip,sama7g5-ddr3phy', 'mscc,ocelot-cpu-syscon', 'mstar,msc313-pmsleep', 'nuvoton,ma35d1-sys', 'nuvoton,wpcm450-shm', 'rockchip,px30-qos', 'rockchip,rk3036-qos', 'rockchip,rk3066-qos', 'rockchip,rk3128-qos', 'rockchip,rk3228-qos', 'rockchip,rk3288-qos', 'rockchip,rk3368-qos', 'rockchip,rk3399-qos', 'rockchip,rk3562-qos', 'rockchip,rk3568-qos', 'rockchip,rk3576-qos', 'rockchip,rk3588-qos', 'rockchip,rv1126-qos', 'st,spear1340-misc', 'stericsson,nomadik-pmu', 'starfive,jh7100-sysmain', 'ti,am62-opp-efuse-table', 'ti,am62-usb-phy-ctrl', 'ti,am625-dss-oldi-io-ctrl', 'ti,am62p-cpsw-mac-efuse', 'ti,am654-dss-oldi-io-ctrl', 'ti,j784s4-acspcie-proxy-ctrl', 'ti,j784s4-pcie-ctrl', 'ti,keystone-pllctrl']
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#
arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dtb: sfr@e0008000: compatible:0: 'microchip,sama7g5-sfrbu' is not one of ['al,alpine-sysfabric-service', 'allwinner,sun8i-a83t-system-controller', 'allwinner,sun8i-h3-system-controller', 'allwinner,sun8i-v3s-system-controller', 'allwinner,sun50i-a64-system-controller', 'altr,l3regs', 'altr,sdr-ctl', 'amd,pensando-elba-syscon', 'amlogic,meson-mx-assist', 'amlogic,meson-mx-bootrom', 'amlogic,meson8-analog-top', 'amlogic,meson8b-analog-top', 'amlogic,meson8-pmu', 'amlogic,meson8b-pmu', 'apm,merlin-poweroff-mailbox', 'apm,mustang-poweroff-mailbox', 'apm,xgene-csw', 'apm,xgene-efuse', 'apm,xgene-mcb', 'apm,xgene-rb', 'apm,xgene-scu', 'atmel,sama5d2-sfrbu', 'atmel,sama5d3-nfc-io', 'atmel,sama5d3-sfrbu', 'atmel,sama5d4-sfrbu', 'axis,artpec6-syscon', 'brcm,cru-clkset', 'brcm,sr-cdru', 'brcm,sr-mhb', 'cirrus,ep7209-syscon1', 'cirrus,ep7209-syscon2', 'cirrus,ep7209-syscon3', 'cnxt,cx92755-uc', 'freecom,fsg-cs2-system-controller', 'fsl,imx93-aonmix-ns-syscfg', 'fsl,imx93-wakeupmix-syscfg', 'fsl,ls1088a-reset', 'fsl,vf610-anatop', 'fsl,vf610-mscm-cpucfg', 'hisilicon,dsa-subctrl', 'hisilicon,hi6220-sramctrl', 'hisilicon,hip04-ppe', 'hisilicon,pcie-sas-subctrl', 'hisilicon,peri-subctrl', 'hpe,gxp-sysreg', 'loongson,ls1b-syscon', 'loongson,ls1c-syscon', 'lsi,axxia-syscon', 'marvell,armada-3700-cpu-misc', 'marvell,armada-3700-nb-pm', 'marvell,armada-3700-avs', 'marvell,armada-3700-usb2-host-misc', 'marvell,dove-global-config', 'mediatek,mt2701-pctl-a-syscfg', 'mediatek,mt2712-pctl-a-syscfg', 'mediatek,mt6397-pctl-pmic-syscfg', 'mediatek,mt8135-pctl-a-syscfg', 'mediatek,mt8135-pctl-b-syscfg', 'mediatek,mt8173-pctl-a-syscfg', 'mediatek,mt8365-syscfg', 'microchip,lan966x-cpu-syscon', 'microchip,mpfs-sysreg-scb', 'microchip,sam9x60-sfr', 'microchip,sama7d65-ddr3phy', 'microchip,sama7d65-sfrbu', 'microchip,sama7g5-ddr3phy', 'mscc,ocelot-cpu-syscon', 'mstar,msc313-pmsleep', 'nuvoton,ma35d1-sys', 'nuvoton,wpcm450-shm', 'rockchip,px30-qos', 'rockchip,rk3036-qos', 'rockchip,rk3066-qos', 'rockchip,rk3128-qos', 'rockchip,rk3228-qos', 'rockchip,rk3288-qos', 'rockchip,rk3368-qos', 'rockchip,rk3399-qos', 'rockchip,rk3562-qos', 'rockchip,rk3568-qos', 'rockchip,rk3576-qos', 'rockchip,rk3588-qos', 'rockchip,rv1126-qos', 'st,spear1340-misc', 'stericsson,nomadik-pmu', 'starfive,jh7100-sysmain', 'ti,am62-opp-efuse-table', 'ti,am62-usb-phy-ctrl', 'ti,am625-dss-oldi-io-ctrl', 'ti,am62p-cpsw-mac-efuse', 'ti,am654-dss-oldi-io-ctrl', 'ti,j784s4-acspcie-proxy-ctrl', 'ti,j784s4-pcie-ctrl', 'ti,keystone-pllctrl']
	from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml#






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

* Re: [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
  2025-02-27 15:51 ` [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu Ryan.Wanner
@ 2025-02-28 21:22   ` Rob Herring (Arm)
  2025-03-21 11:32   ` (subset) " Lee Jones
  1 sibling, 0 replies; 39+ messages in thread
From: Rob Herring (Arm) @ 2025-02-28 21:22 UTC (permalink / raw)
  To: Ryan.Wanner
  Cc: linux-pm, conor+dt, linux, alexandre.belloni, linux-kernel,
	linux-arm-kernel, krzk+dt, claudiu.beznea, nicolas.ferre,
	devicetree, linux-rtc, lee, sre, p.zabel


On Thu, 27 Feb 2025 08:51:49 -0700, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add SAMA7D65 SFRBU compatible string to DT bindings documentation
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
  2025-02-27 15:51 ` [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc Ryan.Wanner
@ 2025-02-28 21:22   ` Rob Herring (Arm)
  0 siblings, 0 replies; 39+ messages in thread
From: Rob Herring (Arm) @ 2025-02-28 21:22 UTC (permalink / raw)
  To: Ryan.Wanner
  Cc: sre, p.zabel, lee, devicetree, linux-pm, krzk+dt, conor+dt,
	claudiu.beznea, alexandre.belloni, linux-arm-kernel, linux,
	linux-kernel, linux-rtc, nicolas.ferre


On Thu, 27 Feb 2025 08:51:53 -0700, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add SAMA7D65 RTC compatible to DT bindings documentation.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  .../devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml         | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
  2025-02-27 15:51 ` [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt Ryan.Wanner
@ 2025-02-28 21:23   ` Rob Herring (Arm)
  0 siblings, 0 replies; 39+ messages in thread
From: Rob Herring (Arm) @ 2025-02-28 21:23 UTC (permalink / raw)
  To: Ryan.Wanner
  Cc: lee, krzk+dt, linux-rtc, linux-kernel, linux-arm-kernel, sre,
	devicetree, nicolas.ferre, linux-pm, claudiu.beznea, conor+dt,
	linux, p.zabel, alexandre.belloni


On Thu, 27 Feb 2025 08:51:54 -0700, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add SAMA7D65 RTT compatible to DT bindings documentation.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65
  2025-02-27 15:51 ` [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65 Ryan.Wanner
@ 2025-03-03  8:26   ` Claudiu Beznea
  0 siblings, 0 replies; 39+ messages in thread
From: Claudiu Beznea @ 2025-03-03  8:26 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc

Hi, Ryan,

On 27.02.2025 17:51, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add PM support to SAMA7D65 SoC.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  arch/arm/mach-at91/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index 04bd91c72521..f3ff1220c0fb 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -65,6 +65,7 @@ config SOC_SAMA7D65
>  	select HAVE_AT91_SAM9X60_PLL
>  	select HAVE_AT91_USB_CLK
>  	select HAVE_AT91_UTMI
> +	select PM_OPP

This is for OPP not PM support. For this series this should not be needed.


>  	select SOC_SAMA7
>  	help
>  	  Select this if you are using one of Microchip's SAMA7D65 family SoC.


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

* Re: [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
  2025-02-27 15:52 ` [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support Ryan.Wanner
@ 2025-03-03  8:28   ` Claudiu Beznea
  0 siblings, 0 replies; 39+ messages in thread
From: Claudiu Beznea @ 2025-03-03  8:28 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc

Hi, Ryan,

On 27.02.2025 17:52, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add SRAM, secumod, UDDRC, and DDR3phy to enable support for low power modes.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  arch/arm/boot/dts/microchip/sama7d65.dtsi | 35 +++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> index 92a5347e35b5..c10cc3558efd 100644
> --- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> @@ -47,12 +47,37 @@ slow_xtal: clock-slowxtal {
>  		};
>  	};
>  
> +	ns_sram: sram@100000 {
> +		compatible = "mmio-sram";
> +		reg = <0x100000 0x20000>;
> +		ranges;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +	};
> +
>  	soc {
>  		compatible = "simple-bus";
>  		ranges;
>  		#address-cells = <1>;
>  		#size-cells = <1>;
>  
> +		securam: sram@e0000800 {
> +			compatible = "microchip,sama7d65-securam", "atmel,sama5d2-securam", "mmio-sram";
> +			reg = <0xe0000800 0x4000>;
> +			ranges = <0 0xe0000800 0x4000>;
> +			clocks = <&pmc PMC_TYPE_PERIPHERAL 17>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			no-memory-wc;
> +		};
> +
> +		secumod: secumod@e0004000 {
> +			compatible = "microchip,sama7d65-secumod", "atmel,sama5d2-secumod", "syscon";

microchip,sama7d65-secumod is undocumented. I'll postpone this until a
documentation a patch will be posted.

> +			reg = <0xe0004000 0x4000>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +		};
> +
>  		pioa: pinctrl@e0014000 {
>  			compatible = "microchip,sama7d65-pinctrl", "microchip,sama7g5-pinctrl";
>  			reg = <0xe0014000 0x800>;
> @@ -190,6 +215,16 @@ i2c10: i2c@600 {
>  			};
>  		};
>  
> +		uddrc: uddrc@e3800000 {
> +			compatible = "microchip,sama7d65-uddrc", "microchip,sama7g5-uddrc";
> +			reg = <0xe3800000 0x4000>;
> +		};
> +
> +		ddr3phy: ddr3phy@e3804000 {
> +			compatible = "microchip,sama7d65-ddr3phy", "microchip,sama7g5-ddr3phy";
> +			reg = <0xe3804000 0x1000>;
> +		};
> +
>  		gic: interrupt-controller@e8c11000 {
>  			compatible = "arm,cortex-a7-gic";
>  			reg = <0xe8c11000 0x1000>,


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

* Re: [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC
  2025-02-27 15:52 ` [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Ryan.Wanner
@ 2025-03-03  8:28   ` Claudiu Beznea
  2025-03-03  8:38   ` claudiu beznea (tuxon)
  1 sibling, 0 replies; 39+ messages in thread
From: Claudiu Beznea @ 2025-03-03  8:28 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc

Hi, Ryan,

On 27.02.2025 17:52, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add RTT support for SAMA7D65 SoC. The GPBR is added so the SoC is able
> to store the RTT time data.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  arch/arm/boot/dts/microchip/sama7d65.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> index b0a676623100..aadeea132289 100644
> --- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> @@ -120,6 +120,13 @@ shdwc: poweroff@e001d200 {
>  			status = "disabled";
>  		};
>  
> +		rtt: rtc@e001d300 {
> +			compatible = "microchip,sama7d65-rtt", "atmel,at91sam9260-rtt";
> +			reg = <0xe001d300 0x30>;
> +			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk32k 0>;
> +		};
> +
>  		clk32k: clock-controller@e001d500 {
>  			compatible = "microchip,sama7d65-sckc", "microchip,sam9x60-sckc";
>  			reg = <0xe001d500 0x4>;
> @@ -132,6 +139,11 @@ chipid@e0020000 {
>  			reg = <0xe0020000 0x8>;
>  		};
>  
> +		gpbr: gpbr@e001d700 {
> +			compatible = "microchip,sama7d65-gpbr", "syscon";

This is not documented. I'll postpone this until a documentation patch will
be posted.

> +			reg = <0xe001d700 0x48>;
> +		};
> +
>  		dma2: dma-controller@e1200000 {
>  			compatible = "microchip,sama7d65-dma", "microchip,sama7g5-dma";
>  			reg = <0xe1200000 0x1000>;


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

* Re: [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65
  2025-02-27 15:51 ` [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65 Ryan.Wanner
@ 2025-03-03  8:37   ` claudiu beznea (tuxon)
  0 siblings, 0 replies; 39+ messages in thread
From: claudiu beznea (tuxon) @ 2025-03-03  8:37 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc



On 2/27/25 17:51, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add support for SAMA7D65 new compatible strings in pm.c file for wakeup source
> IDs and PMC.
> This is the first bits of PM for this new SoC. PM depends on other patches.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> [nicolas.ferre@microchip.com: split patch and address only the pm.c changes]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
>   arch/arm/mach-at91/pm.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index 6c3e6aa22606..39644703244d 100644
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -222,13 +222,16 @@ static const struct of_device_id sam9x60_ws_ids[] = {
>   	{ /* sentinel */ }
>   };
>   
> -static const struct of_device_id sama7g5_ws_ids[] = {
> +static const struct of_device_id sama7_ws_ids[] = {
> +	{ .compatible = "microchip,sama7d65-rtc",	.data = &ws_info[1] },
>   	{ .compatible = "microchip,sama7g5-rtc",	.data = &ws_info[1] },
>   	{ .compatible = "microchip,sama7g5-ohci",	.data = &ws_info[2] },
>   	{ .compatible = "usb-ohci",			.data = &ws_info[2] },
>   	{ .compatible = "atmel,at91sam9g45-ehci",	.data = &ws_info[2] },
>   	{ .compatible = "usb-ehci",			.data = &ws_info[2] },
> +	{ .compatible = "microchip,sama7d65-sdhci",	.data = &ws_info[3] },
>   	{ .compatible = "microchip,sama7g5-sdhci",	.data = &ws_info[3] },
> +	{ .compatible = "microchip,sama7d65-rtt",	.data = &ws_info[4] },
>   	{ .compatible = "microchip,sama7g5-rtt",	.data = &ws_info[4] },
>   	{ /* sentinel */ }
>   };
> @@ -1379,6 +1382,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = {
>   	{ .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] },
>   	{ .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] },
>   	{ .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] },
> +	{ .compatible = "microchip,sama7d65-pmc", .data = &pmc_infos[4] },

According to the chapter 42.18.3. PMC System Clock Status Register at [1] there 
is no AT91SAM926x_PMC_UDP for SAMA7D65 (which you are dropping in the next 
patch). This patch would have to reflect what the documentation say instead of 
fixing it in patch 12/21.

Thank you,
Claudiu

[1] 
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA7D6-Series-Data-Sheet-DS60001851.pdf

>   	{ .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] },
>   	{ /* sentinel */ },
>   };
> @@ -1672,7 +1676,7 @@ void __init sama7_pm_init(void)
>   	at91_pm_modes_init(iomaps, ARRAY_SIZE(iomaps));
>   	at91_pm_init(NULL);
>   
> -	soc_pm.ws_ids = sama7g5_ws_ids;
> +	soc_pm.ws_ids = sama7_ws_ids;
>   	soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws;
>   
>   	soc_pm.sfrbu_regs.pswbu.key = (0x4BD20C << 8);


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

* Re: [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65
  2025-02-27 15:51 ` [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65 Ryan.Wanner
@ 2025-03-03  8:37   ` claudiu beznea (tuxon)
  0 siblings, 0 replies; 39+ messages in thread
From: claudiu beznea (tuxon) @ 2025-03-03  8:37 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc



On 2/27/25 17:51, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add config check that enables Backup mode for SAMA7D65 SoC.
> 
> Add SHDWC_SR read to clear the status bits once finished exiting backup
> mode. This is only for SAMA7D65 SoCs. The SHDWC status register
> needs to be cleared after exiting backup mode to clear the wake up pin
> status.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>   arch/arm/mach-at91/pm.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index 39644703244d..d82a507bc8da 100644
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -647,6 +647,11 @@ static void at91_pm_suspend(suspend_state_t state)
>   		at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
>   					     &at91_pm_suspend_in_sram,
>   					     at91_pm_suspend_in_sram_sz);
> +
> +		if (IS_ENABLED(CONFIG_SOC_SAMA7D65))
> +			/* SHDWC.SR */
> +			readl(soc_pm.data.shdwc + 0x08);
> +
>   	} else {
>   		at91_suspend_finish(0);
>   	}
> @@ -707,6 +712,7 @@ static int at91_pm_enter(suspend_state_t state)
>   static void at91_pm_end(void)
>   {
>   	at91_pm_config_ws(soc_pm.data.mode, false);
> +

Not needed. I'll drop it while applying.

>   }
>   
>   
> @@ -1065,7 +1071,8 @@ static int __init at91_pm_backup_init(void)
>   	int ret = -ENODEV, located = 0;
>   
>   	if (!IS_ENABLED(CONFIG_SOC_SAMA5D2) &&
> -	    !IS_ENABLED(CONFIG_SOC_SAMA7G5))
> +	    !IS_ENABLED(CONFIG_SOC_SAMA7G5) &&
> +	    !IS_ENABLED(CONFIG_SOC_SAMA7D65))
>   		return -EPERM;
>   
>   	if (!at91_is_pm_mode_active(AT91_PM_BACKUP))


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

* Re: [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC
  2025-02-27 15:52 ` [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Ryan.Wanner
  2025-03-03  8:28   ` Claudiu Beznea
@ 2025-03-03  8:38   ` claudiu beznea (tuxon)
  1 sibling, 0 replies; 39+ messages in thread
From: claudiu beznea (tuxon) @ 2025-03-03  8:38 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc



On 2/27/25 17:52, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add RTT support for SAMA7D65 SoC. The GPBR is added so the SoC is able
> to store the RTT time data.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>   arch/arm/boot/dts/microchip/sama7d65.dtsi | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> index b0a676623100..aadeea132289 100644
> --- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> @@ -120,6 +120,13 @@ shdwc: poweroff@e001d200 {
>   			status = "disabled";
>   		};
>   
> +		rtt: rtc@e001d300 {
> +			compatible = "microchip,sama7d65-rtt", "atmel,at91sam9260-rtt";
> +			reg = <0xe001d300 0x30>;
> +			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk32k 0>;
> +		};
> +
>   		clk32k: clock-controller@e001d500 {
>   			compatible = "microchip,sama7d65-sckc", "microchip,sam9x60-sckc";
>   			reg = <0xe001d500 0x4>;
> @@ -132,6 +139,11 @@ chipid@e0020000 {
>   			reg = <0xe0020000 0x8>;
>   		};
>   
> +		gpbr: gpbr@e001d700 {
> +			compatible = "microchip,sama7d65-gpbr", "syscon";
> +			reg = <0xe001d700 0x48>;
> +		};

This node should be before chipid one to have them sorted by node address.

> +
>   		dma2: dma-controller@e1200000 {
>   			compatible = "microchip,sama7d65-dma", "microchip,sama7g5-dma";
>   			reg = <0xe1200000 0x1000>;


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

* Re: [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (21 preceding siblings ...)
  2025-02-28 14:23 ` [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Rob Herring (Arm)
@ 2025-03-03  8:40 ` Claudiu Beznea
  2025-03-05 17:39   ` Ryan Wanner
  2025-03-08  0:38 ` (subset) " Sebastian Reichel
  2025-03-13 16:42 ` Lee Jones
  24 siblings, 1 reply; 39+ messages in thread
From: Claudiu Beznea @ 2025-03-03  8:40 UTC (permalink / raw)
  To: Ryan.Wanner, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc



On 27.02.2025 17:51, Ryan.Wanner@microchip.com wrote:
> Ryan Wanner (20):
>   ARM: at91: Add PM support to sama7d65
>   ARM: at91: pm: add DT compatible support for sama7d65
>   ARM: at91: PM: Add Backup mode for SAMA7D65
>   ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65

Applied to at91-soc with some adjustments, please check!

>   ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
>   ARM: dts: microchip: sama7d65: Add Shutdown controller support
>   ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
>   ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
>   ARM: dts: microchip: sama7d65: Enable shutdown controller

Applied to at91-dt with some adjustments, please check!

Thank you!

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

* Re: [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-03-03  8:40 ` Claudiu Beznea
@ 2025-03-05 17:39   ` Ryan Wanner
  0 siblings, 0 replies; 39+ messages in thread
From: Ryan Wanner @ 2025-03-05 17:39 UTC (permalink / raw)
  To: Claudiu Beznea, lee, robh, krzk+dt, conor+dt, sre, nicolas.ferre,
	alexandre.belloni, p.zabel
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc

On 3/3/25 01:40, Claudiu Beznea wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 27.02.2025 17:51, Ryan.Wanner@microchip.com wrote:
>> Ryan Wanner (20):
>>   ARM: at91: Add PM support to sama7d65
>>   ARM: at91: pm: add DT compatible support for sama7d65
>>   ARM: at91: PM: Add Backup mode for SAMA7D65
>>   ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
> 
> Applied to at91-soc with some adjustments, please check!
Checked! This is correct.
> 
>>   ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
>>   ARM: dts: microchip: sama7d65: Add Shutdown controller support
>>   ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
>>   ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
>>   ARM: dts: microchip: sama7d65: Enable shutdown controller
> 
> Applied to at91-dt with some adjustments, please check!
Same here

Thank you!
> 
> Thank you!


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

* Re: (subset) [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (22 preceding siblings ...)
  2025-03-03  8:40 ` Claudiu Beznea
@ 2025-03-08  0:38 ` Sebastian Reichel
  2025-03-13 16:42 ` Lee Jones
  24 siblings, 0 replies; 39+ messages in thread
From: Sebastian Reichel @ 2025-03-08  0:38 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel, Ryan.Wanner
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc


On Thu, 27 Feb 2025 08:51:47 -0700, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> This patch set adds support for low power modes for the SAMA7D65 SoC and
> the required components and changes for low power modes.
> 
> The series includes changes in the asm code to account for the addtional
> clocks that are in this SoC.
> 
> [...]

Applied, thanks!

[13/21] power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
        commit: 2fc78cd0a3c3013543e5f540eff61e9696138f83

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


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

* Re: [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
                   ` (23 preceding siblings ...)
  2025-03-08  0:38 ` (subset) " Sebastian Reichel
@ 2025-03-13 16:42 ` Lee Jones
  2025-03-17 19:29   ` Ryan.Wanner
  24 siblings, 1 reply; 39+ messages in thread
From: Lee Jones @ 2025-03-13 16:42 UTC (permalink / raw)
  To: Ryan.Wanner
  Cc: robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel, linux, devicetree, linux-kernel,
	linux-pm, linux-arm-kernel, linux-rtc

On Thu, 27 Feb 2025, Ryan.Wanner@microchip.com wrote:

> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> This patch set adds support for low power modes for the SAMA7D65 SoC and
> the required components and changes for low power modes.
> 
> The series includes changes in the asm code to account for the addtional
> clocks that are in this SoC.
> 
> The Device tree additions are to enable all the components needed to
> keep the SoC in low power mode.
> 
> There are some DTB check warnings but that is due to the dt-binding not
> in the correct .yaml file format.
> 
> Changes v1 -> v2:
> - Add missing compatible for ddr3phy, it is now in both syscon sets.
> - Fix alphabetical ordering for sama7d65.
> - Remove the incorrect reorganizing patch.
> - Remove sama7g5-rtt as a compatible for sama7d65-rtt and add
>   sama7d65-rtt as a compatible wake up source in the pm driver.
> 
> Changes from v2 -> v3:
> - Correct mistake in v2 sfrbu dt-binding patch.
> - Correct incorrect dt-binding addition and formatting for rtc and rtt bindings.
> - Add missing SoB tag.
> - Cleaned up commit message for Backup mode to describe SHDWC is status
>   register is cleared for this SoC.
> - Cleaned up variable naming and usage for mcks. Changed the mcks number
>   to the correct number of clocks needed to be saved and corrected the
>   ASM code accordingly.
> - Removed the SHDWC from ULP0 wake-up source as it is not configured as
>   a valid wake-up source for ULP0.
> - Separated all the DTSI and DTS changes into individual patches.
> 
> 
> Li Bin (1):
>   ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
> 
> Ryan Wanner (20):
>   dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
>   dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu

Ping me when these are ready to take.

>   dt-bindings: sram: Add microchip,sama7d65-sram
>   dt-bindings: power: reset: atmel,sama5d2-shdwc: Add
>     microchip,sama7d65-shdwc
>   dt-bindings: reset: atmel,at91sam9260-reset: add
>     microchip,sama7d65-rstc
>   dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
>   dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
>   ARM: at91: Add PM support to sama7d65
>   ARM: at91: pm: add DT compatible support for sama7d65
>   ARM: at91: PM: Add Backup mode for SAMA7D65
>   ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
>   power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
>   ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
>   ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
>   ARM: dts: microchip: sama7d65: Add Shutdown controller support
>   ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65
>     SoC
>   ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
>   ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
>   ARM: dts: microchip: sama7d65: Enable shutdown controller
>   ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board
> 
>  .../devicetree/bindings/mfd/syscon.yaml       |   4 +
>  .../power/reset/atmel,sama5d2-shdwc.yaml      |   5 +
>  .../reset/atmel,at91sam9260-reset.yaml        |   3 +
>  .../bindings/rtc/atmel,at91rm9200-rtc.yaml    |   4 +-
>  .../bindings/rtc/atmel,at91sam9260-rtt.yaml   |   1 +
>  .../devicetree/bindings/sram/sram.yaml        |   1 +
>  .../dts/microchip/at91-sama7d65_curiosity.dts |  13 +++
>  arch/arm/boot/dts/microchip/sama7d65.dtsi     |  77 +++++++++++++
>  arch/arm/mach-at91/Kconfig                    |   1 +
>  arch/arm/mach-at91/pm.c                       |  47 +++++---
>  arch/arm/mach-at91/pm.h                       |   1 +
>  arch/arm/mach-at91/pm_data-offsets.c          |   2 +
>  arch/arm/mach-at91/pm_suspend.S               | 101 ++++++++++++++++--
>  drivers/power/reset/at91-sama5d2_shdwc.c      |   1 +
>  14 files changed, 238 insertions(+), 23 deletions(-)
> 
> -- 
> 2.43.0
> 

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC
  2025-03-13 16:42 ` Lee Jones
@ 2025-03-17 19:29   ` Ryan.Wanner
  0 siblings, 0 replies; 39+ messages in thread
From: Ryan.Wanner @ 2025-03-17 19:29 UTC (permalink / raw)
  To: lee
  Cc: robh, krzk+dt, conor+dt, claudiu.beznea, sre, Nicolas.Ferre,
	alexandre.belloni, p.zabel, linux, devicetree, linux-kernel,
	linux-pm, linux-arm-kernel, linux-rtc

On 3/13/25 09:42, Lee Jones wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, 27 Feb 2025, Ryan.Wanner@microchip.com wrote:
> 
>> From: Ryan Wanner <Ryan.Wanner@microchip.com>
>>
>> This patch set adds support for low power modes for the SAMA7D65 SoC and
>> the required components and changes for low power modes.
>>
>> The series includes changes in the asm code to account for the addtional
>> clocks that are in this SoC.
>>
>> The Device tree additions are to enable all the components needed to
>> keep the SoC in low power mode.
>>
>> There are some DTB check warnings but that is due to the dt-binding not
>> in the correct .yaml file format.
>>
>> Changes v1 -> v2:
>> - Add missing compatible for ddr3phy, it is now in both syscon sets.
>> - Fix alphabetical ordering for sama7d65.
>> - Remove the incorrect reorganizing patch.
>> - Remove sama7g5-rtt as a compatible for sama7d65-rtt and add
>>   sama7d65-rtt as a compatible wake up source in the pm driver.
>>
>> Changes from v2 -> v3:
>> - Correct mistake in v2 sfrbu dt-binding patch.
>> - Correct incorrect dt-binding addition and formatting for rtc and rtt bindings.
>> - Add missing SoB tag.
>> - Cleaned up commit message for Backup mode to describe SHDWC is status
>>   register is cleared for this SoC.
>> - Cleaned up variable naming and usage for mcks. Changed the mcks number
>>   to the correct number of clocks needed to be saved and corrected the
>>   ASM code accordingly.
>> - Removed the SHDWC from ULP0 wake-up source as it is not configured as
>>   a valid wake-up source for ULP0.
>> - Separated all the DTSI and DTS changes into individual patches.
>>
>>
>> Li Bin (1):
>>   ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
>>
>> Ryan Wanner (20):
>>   dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
>>   dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
> 
> Ping me when these are ready to take.

I would say they are ready to take since they have been acked and the
SHDWC, RTC, SFRBU, and Reset controller have all been applied to the
DTSI file.

> 
>>   dt-bindings: sram: Add microchip,sama7d65-sram
>>   dt-bindings: power: reset: atmel,sama5d2-shdwc: Add
>>     microchip,sama7d65-shdwc
>>   dt-bindings: reset: atmel,at91sam9260-reset: add
>>     microchip,sama7d65-rstc
>>   dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc
>>   dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt
>>   ARM: at91: Add PM support to sama7d65
>>   ARM: at91: pm: add DT compatible support for sama7d65
>>   ARM: at91: PM: Add Backup mode for SAMA7D65
>>   ARM: at91: pm: Enable ULP0/ULP1 for SAMA7D65
>>   power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
>>   ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support
>>   ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC
>>   ARM: dts: microchip: sama7d65: Add Shutdown controller support
>>   ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65
>>     SoC
>>   ARM: dts: microchip: sama7d65: Add RTC support for sama7d65
>>   ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65
>>   ARM: dts: microchip: sama7d65: Enable shutdown controller
>>   ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board
>>
>>  .../devicetree/bindings/mfd/syscon.yaml       |   4 +
>>  .../power/reset/atmel,sama5d2-shdwc.yaml      |   5 +
>>  .../reset/atmel,at91sam9260-reset.yaml        |   3 +
>>  .../bindings/rtc/atmel,at91rm9200-rtc.yaml    |   4 +-
>>  .../bindings/rtc/atmel,at91sam9260-rtt.yaml   |   1 +
>>  .../devicetree/bindings/sram/sram.yaml        |   1 +
>>  .../dts/microchip/at91-sama7d65_curiosity.dts |  13 +++
>>  arch/arm/boot/dts/microchip/sama7d65.dtsi     |  77 +++++++++++++
>>  arch/arm/mach-at91/Kconfig                    |   1 +
>>  arch/arm/mach-at91/pm.c                       |  47 +++++---
>>  arch/arm/mach-at91/pm.h                       |   1 +
>>  arch/arm/mach-at91/pm_data-offsets.c          |   2 +
>>  arch/arm/mach-at91/pm_suspend.S               | 101 ++++++++++++++++--
>>  drivers/power/reset/at91-sama5d2_shdwc.c      |   1 +
>>  14 files changed, 238 insertions(+), 23 deletions(-)
>>
>> --
>> 2.43.0
>>
> 
> --
> Lee Jones [李琼斯]
Ryan Wanner

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

* Re: (subset) [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
  2025-02-27 15:51 ` [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy Ryan.Wanner
@ 2025-03-21 11:32   ` Lee Jones
  0 siblings, 0 replies; 39+ messages in thread
From: Lee Jones @ 2025-03-21 11:32 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel, Ryan.Wanner
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc, Krzysztof Kozlowski

On Thu, 27 Feb 2025 08:51:48 -0700, Ryan.Wanner@microchip.com wrote:
> Add SAMA7D65 DDR3phy compatible to DT bindings documentation
> 
> 

Applied, thanks!

[01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy
        commit: 2b4d2bdc07a152b3869f7888f64f37d4b09ae58e

--
Lee Jones [李琼斯]


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

* Re: (subset) [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
  2025-02-27 15:51 ` [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu Ryan.Wanner
  2025-02-28 21:22   ` Rob Herring (Arm)
@ 2025-03-21 11:32   ` Lee Jones
  1 sibling, 0 replies; 39+ messages in thread
From: Lee Jones @ 2025-03-21 11:32 UTC (permalink / raw)
  To: lee, robh, krzk+dt, conor+dt, claudiu.beznea, sre, nicolas.ferre,
	alexandre.belloni, p.zabel, Ryan.Wanner
  Cc: linux, devicetree, linux-kernel, linux-pm, linux-arm-kernel,
	linux-rtc

On Thu, 27 Feb 2025 08:51:49 -0700, Ryan.Wanner@microchip.com wrote:
> Add SAMA7D65 SFRBU compatible string to DT bindings documentation
> 
> 

Applied, thanks!

[02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu
        commit: 7e3ff6785039796728a515ea6e07378823e71be1

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2025-03-21 11:32 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 15:51 [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Ryan.Wanner
2025-02-27 15:51 ` [PATCH v3 01/21] dt-bindings: mfd: syscon: add microchip,sama7d65-ddr3phy Ryan.Wanner
2025-03-21 11:32   ` (subset) " Lee Jones
2025-02-27 15:51 ` [PATCH v3 02/21] dt-bindings: mfd: syscon: add microchip,sama7d65-sfrbu Ryan.Wanner
2025-02-28 21:22   ` Rob Herring (Arm)
2025-03-21 11:32   ` (subset) " Lee Jones
2025-02-27 15:51 ` [PATCH v3 03/21] dt-bindings: sram: Add microchip,sama7d65-sram Ryan.Wanner
2025-02-27 15:51 ` [PATCH v3 04/21] dt-bindings: power: reset: atmel,sama5d2-shdwc: Add microchip,sama7d65-shdwc Ryan.Wanner
2025-02-27 15:51 ` [PATCH v3 05/21] dt-bindings: reset: atmel,at91sam9260-reset: add microchip,sama7d65-rstc Ryan.Wanner
2025-02-27 15:51 ` [PATCH v3 06/21] dt-bindings: rtc: at91rm9200: add microchip,sama7d65-rtc Ryan.Wanner
2025-02-28 21:22   ` Rob Herring (Arm)
2025-02-27 15:51 ` [PATCH v3 07/21] dt-bindings: at91rm9260-rtt: add microchip,sama7d65-rtt Ryan.Wanner
2025-02-28 21:23   ` Rob Herring (Arm)
2025-02-27 15:51 ` [PATCH v3 08/21] ARM: at91: Add PM support to sama7d65 Ryan.Wanner
2025-03-03  8:26   ` Claudiu Beznea
2025-02-27 15:51 ` [PATCH v3 09/21] ARM: at91: pm: fix at91_suspend_finish for ZQ calibration Ryan.Wanner
2025-02-27 15:51 ` [PATCH v3 10/21] ARM: at91: pm: add DT compatible support for sama7d65 Ryan.Wanner
2025-03-03  8:37   ` claudiu beznea (tuxon)
2025-02-27 15:51 ` [PATCH v3 11/21] ARM: at91: PM: Add Backup mode for SAMA7D65 Ryan.Wanner
2025-03-03  8:37   ` claudiu beznea (tuxon)
2025-02-27 15:51 ` [PATCH v3 12/21] ARM: at91: pm: Enable ULP0/ULP1 " Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 13/21] power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 14/21] ARM: dts: microchip: sama7d65: Add SRAM and DRAM components support Ryan.Wanner
2025-03-03  8:28   ` Claudiu Beznea
2025-02-27 15:52 ` [PATCH v3 15/21] ARM: dts: microchip: sama7d65: Add Reset Controller to sama7d65 SoC Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 16/21] ARM: dts: microchip: sama7d65: Add Shutdown controller support Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 17/21] ARM: dts: microchip: sama7d65: Add RTT and GPBR Support for sama7d65 SoC Ryan.Wanner
2025-03-03  8:28   ` Claudiu Beznea
2025-03-03  8:38   ` claudiu beznea (tuxon)
2025-02-27 15:52 ` [PATCH v3 18/21] ARM: dts: microchip: sama7d65: Add RTC support for sama7d65 Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 19/21] ARM: dts: microchip: sama7d65: Add SFRBU support to sama7d65 Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 20/21] ARM: dts: microchip: sama7d65: Enable shutdown controller Ryan.Wanner
2025-02-27 15:52 ` [PATCH v3 21/21] ARM: dts: microchip: sama7d65: Add RTT timer to curiosity board Ryan.Wanner
2025-02-28 14:23 ` [PATCH v3 00/21] Enable Power Modes Support for SAMA7D65 SoC Rob Herring (Arm)
2025-03-03  8:40 ` Claudiu Beznea
2025-03-05 17:39   ` Ryan Wanner
2025-03-08  0:38 ` (subset) " Sebastian Reichel
2025-03-13 16:42 ` Lee Jones
2025-03-17 19:29   ` Ryan.Wanner

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).