devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support
@ 2018-02-19  3:34 Dave Gerlach
  2018-02-19  3:34 ` [PATCH 1/9] ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node Dave Gerlach
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Hi,
This series is the last needed to enable suspend/resume on am335x/am437x
along with [1]. It adds required dt nodes for the emif and core PM code
to find the needed sram nodes and marks key devices with ti,no-idle so
that the kernel does not idle them. With this suspend to mem can be achieved
by following the steps described in [1].

Branch containing all patches needed for suspend/resume is here [2].

Regards,
Dave

[1] https://www.spinics.net/lists/linux-omap/msg141652.html
[2] https://github.com/dgerlach/linux-pm/tree/upstream/v4.16/amx3-suspend-v4

Dave Gerlach (9):
  ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram
    node
  ARM: dts: am4372: Reserve pm code and data regions in ocmcram sram
    node
  ARM: dts: am33xx: Update emif node
  ARM: dts: am4372: Update emif node
  ARM: dts: am33xx: Add pm-sram phandle to soc node
  ARM: dts: am4372: Add soc node
  ARM: dts: am33xx: Mark emif with ti,no-idle
  ARM: dts: am4372: Mark emif with ti,no-idle
  ARM: dts: am4372: Mark omap_l3_noc with ti,no-idle

 arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++++++++++++++
 arch/arm/boot/dts/am4372.dtsi | 29 +++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

-- 
2.16.1

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

* [PATCH 1/9] ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
@ 2018-02-19  3:34 ` Dave Gerlach
  2018-02-19  3:34 ` [PATCH 2/9] ARM: dts: am4372: " Dave Gerlach
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Add a 'pm_sram_code' reserved region to the ocmcram node to be exposed
by the mmio-sram driver as a pool but also mark it protect-exec so that
it can run code copied to it using sram_exec_copy.

Add another 'pm_sram_data' reserved region to the ocmcram node to act as
the data space for any code running from the 'pm_sram_code' region that
is exposed as a regular pool.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 628c77b0b386..a9bbf68db077 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -905,6 +905,21 @@
 		ocmcram: ocmcram@40300000 {
 			compatible = "mmio-sram";
 			reg = <0x40300000 0x10000>; /* 64k */
+			ranges = <0x0 0x40300000 0x10000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			pm_sram_code: pm-sram-code@0 {
+				compatible = "ti,sram";
+				reg = <0x0 0x1000>;
+				protect-exec;
+			};
+
+			pm_sram_data: pm-sram-data@1000 {
+				compatible = "ti,sram";
+				reg = <0x1000 0x1000>;
+				pool;
+			};
 		};
 
 		elm: elm@48080000 {
-- 
2.16.1

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

* [PATCH 2/9] ARM: dts: am4372: Reserve pm code and data regions in ocmcram sram node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
  2018-02-19  3:34 ` [PATCH 1/9] ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node Dave Gerlach
@ 2018-02-19  3:34 ` Dave Gerlach
  2018-02-19  3:34 ` [PATCH 3/9] ARM: dts: am33xx: Update emif node Dave Gerlach
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Add a 'pm_sram_code' reserved region to the ocmcram node to be exposed
by the mmio-sram driver as a pool but also mark it protect-exec so that
it can run code copied to it using sram_exec_copy.

Add another 'pm_sram_data' reserved region to the ocmcram node to act as
the data space for any code running from the 'pm_sram_code' region that
is exposed as a regular pool.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 964f3ef79728..81a03c1ad770 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -1141,6 +1141,21 @@
 		ocmcram: ocmcram@40300000 {
 			compatible = "mmio-sram";
 			reg = <0x40300000 0x40000>; /* 256k */
+			ranges = <0x0 0x40300000 0x40000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			pm_sram_code: pm-sram-code@0 {
+				compatible = "ti,sram";
+				reg = <0x0 0x1000>;
+				protect-exec;
+			};
+
+			pm_sram_data: pm-sram-data@1000 {
+				compatible = "ti,sram";
+				reg = <0x1000 0x1000>;
+				pool;
+			};
 		};
 
 		dcan0: can@481cc000 {
-- 
2.16.1

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

* [PATCH 3/9] ARM: dts: am33xx: Update emif node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
  2018-02-19  3:34 ` [PATCH 1/9] ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node Dave Gerlach
  2018-02-19  3:34 ` [PATCH 2/9] ARM: dts: am4372: " Dave Gerlach
@ 2018-02-19  3:34 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 4/9] ARM: dts: am4372: " Dave Gerlach
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Now that we will use ti-emif-sram driver for am335x PM, update the
emif DT node with the required sram property.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index a9bbf68db077..c27ef2cac394 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -960,6 +960,8 @@
 			compatible = "ti,emif-am3352";
 			reg = <0x4c000000 0x1000000>;
 			ti,hwmods = "emif";
+			sram = <&pm_sram_code
+				&pm_sram_data>;
 		};
 
 		gpmc: gpmc@50000000 {
-- 
2.16.1

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

* [PATCH 4/9] ARM: dts: am4372: Update emif node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (2 preceding siblings ...)
  2018-02-19  3:34 ` [PATCH 3/9] ARM: dts: am33xx: Update emif node Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 5/9] ARM: dts: am33xx: Add pm-sram phandle to soc node Dave Gerlach
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Now that we will use ti-emif-sram driver for am4372 PM, update the
emif DT node with the required sram property.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 81a03c1ad770..10dc52a07b32 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -237,6 +237,8 @@
 			compatible = "ti,emif-am4372";
 			reg = <0x4c000000 0x1000000>;
 			ti,hwmods = "emif";
+			sram = <&pm_sram_code
+				&pm_sram_data>;
 		};
 
 		edma: edma@49000000 {
-- 
2.16.1

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

* [PATCH 5/9] ARM: dts: am33xx: Add pm-sram phandle to soc node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (3 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 4/9] ARM: dts: am4372: " Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 6/9] ARM: dts: am4372: Add " Dave Gerlach
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Add a phandle to point to both the pm-sram-code and pm-sram-data nodes
so that the pm code can locate the sram regions needed to copy low level
PM code.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index c27ef2cac394..842e726b944e 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -147,6 +147,8 @@
 		mpu {
 			compatible = "ti,omap3-mpu";
 			ti,hwmods = "mpu";
+			pm-sram = <&pm_sram_code
+				   &pm_sram_data>;
 		};
 	};
 
-- 
2.16.1

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

* [PATCH 6/9] ARM: dts: am4372: Add soc node
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (4 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 5/9] ARM: dts: am33xx: Add pm-sram phandle to soc node Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 7/9] ARM: dts: am33xx: Mark emif with ti,no-idle Dave Gerlach
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

Add soc node for am4372 with pm-sram phandle to both pm-sram-code and
pm-sram-data regions.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 10dc52a07b32..b136c401879f 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -92,6 +92,16 @@
 		};
 	};
 
+	soc {
+		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap4-mpu";
+			ti,hwmods = "mpu";
+			pm-sram = <&pm_sram_code
+				   &pm_sram_data>;
+		};
+	};
+
 	gic: interrupt-controller@48241000 {
 		compatible = "arm,cortex-a9-gic";
 		interrupt-controller;
-- 
2.16.1

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

* [PATCH 7/9] ARM: dts: am33xx: Mark emif with ti,no-idle
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (5 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 6/9] ARM: dts: am4372: Add " Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 8/9] ARM: dts: am4372: " Dave Gerlach
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

We can never idle the emif hwmod from within the HLOS so mark the emif
node with ti,no-idle.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 842e726b944e..77c618829734 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -964,6 +964,7 @@
 			ti,hwmods = "emif";
 			sram = <&pm_sram_code
 				&pm_sram_data>;
+			ti,no-idle;
 		};
 
 		gpmc: gpmc@50000000 {
-- 
2.16.1

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

* [PATCH 8/9] ARM: dts: am4372: Mark emif with ti,no-idle
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (6 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 7/9] ARM: dts: am33xx: Mark emif with ti,no-idle Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-19  3:35 ` [PATCH 9/9] ARM: dts: am4372: Mark omap_l3_noc " Dave Gerlach
  2018-02-27 17:46 ` [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

We can never idle the emif hwmod from within the HLOS so mark the emif
node with ti,no-idle.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index b136c401879f..1ec8bdb00183 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -247,6 +247,7 @@
 			compatible = "ti,emif-am4372";
 			reg = <0x4c000000 0x1000000>;
 			ti,hwmods = "emif";
+			ti,no-idle;
 			sram = <&pm_sram_code
 				&pm_sram_data>;
 		};
-- 
2.16.1

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

* [PATCH 9/9] ARM: dts: am4372: Mark omap_l3_noc with ti,no-idle
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (7 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 8/9] ARM: dts: am4372: " Dave Gerlach
@ 2018-02-19  3:35 ` Dave Gerlach
  2018-02-27 17:46 ` [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2018-02-19  3:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, Dave Gerlach, Keerthy J, Johan Hovold, linux-omap,
	linux-arm-kernel

We can never idle the l3_main hwmod so mark the omap_l3_noc node
with ti,no-idle.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 1ec8bdb00183..9a541cd12e0a 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -153,6 +153,7 @@
 		#size-cells = <1>;
 		ranges;
 		ti,hwmods = "l3_main";
+		ti,no-idle;
 		reg = <0x44000000 0x400000
 		       0x44800000 0x400000>;
 		interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.16.1

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

* Re: [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support
  2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
                   ` (8 preceding siblings ...)
  2018-02-19  3:35 ` [PATCH 9/9] ARM: dts: am4372: Mark omap_l3_noc " Dave Gerlach
@ 2018-02-27 17:46 ` Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2018-02-27 17:46 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: devicetree, linux-omap, Johan Hovold, linux-arm-kernel, Keerthy J

* Dave Gerlach <d-gerlach@ti.com> [180218 19:35]:
> Hi,
> This series is the last needed to enable suspend/resume on am335x/am437x
> along with [1]. It adds required dt nodes for the emif and core PM code
> to find the needed sram nodes and marks key devices with ti,no-idle so
> that the kernel does not idle them. With this suspend to mem can be achieved
> by following the steps described in [1].

Applying all these into omap-for-v4.17/dt thanks.

Tony

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

end of thread, other threads:[~2018-02-27 17:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-19  3:34 [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Dave Gerlach
2018-02-19  3:34 ` [PATCH 1/9] ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node Dave Gerlach
2018-02-19  3:34 ` [PATCH 2/9] ARM: dts: am4372: " Dave Gerlach
2018-02-19  3:34 ` [PATCH 3/9] ARM: dts: am33xx: Update emif node Dave Gerlach
2018-02-19  3:35 ` [PATCH 4/9] ARM: dts: am4372: " Dave Gerlach
2018-02-19  3:35 ` [PATCH 5/9] ARM: dts: am33xx: Add pm-sram phandle to soc node Dave Gerlach
2018-02-19  3:35 ` [PATCH 6/9] ARM: dts: am4372: Add " Dave Gerlach
2018-02-19  3:35 ` [PATCH 7/9] ARM: dts: am33xx: Mark emif with ti,no-idle Dave Gerlach
2018-02-19  3:35 ` [PATCH 8/9] ARM: dts: am4372: " Dave Gerlach
2018-02-19  3:35 ` [PATCH 9/9] ARM: dts: am4372: Mark omap_l3_noc " Dave Gerlach
2018-02-27 17:46 ` [PATCH 0/9] ARM: dts: am33xx/am4372: Add suspend-resume support Tony Lindgren

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