ARM: dts: am33xx/am4372: Add suspend-resume support
cover ARM: dts: am33xx/am4372: Add suspend-resume support
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(+)
Signature · 1 line
2.16.1
PATCH 1/9 ARM: dts: am33xx: Reserve pm code and data regions in ocmcram sram node
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.
--- arch/arm/boot/dts/am33xx.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +15 -0
@@ -905,6 +905,21 @@ ocmcram: ocmcram at 40300000 { compatible = "mmio-sram"; reg = <0x40300000 0x10000>; /* 64k */ + ranges = <0x0 0x40300000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + + pm_sram_code: pm-sram-code at 0 { + compatible = "ti,sram"; + reg = <0x0 0x1000>; + protect-exec; + }; + + pm_sram_data: pm-sram-data at 1000 { + compatible = "ti,sram"; + reg = <0x1000 0x1000>; + pool; + }; }; elm: elm at 48080000 {
Signature · 1 line
2.16.1
PATCH 2/9 ARM: dts: am4372: Reserve pm code and data regions in ocmcram sram node
In reply to Dave GerlachAdd 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.
--- arch/arm/boot/dts/am4372.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/am4372.dtsi +15 -0
@@ -1141,6 +1141,21 @@ ocmcram: ocmcram at 40300000 { compatible = "mmio-sram"; reg = <0x40300000 0x40000>; /* 256k */ + ranges = <0x0 0x40300000 0x40000>; + #address-cells = <1>; + #size-cells = <1>; + + pm_sram_code: pm-sram-code at 0 { + compatible = "ti,sram"; + reg = <0x0 0x1000>; + protect-exec; + }; + + pm_sram_data: pm-sram-data at 1000 { + compatible = "ti,sram"; + reg = <0x1000 0x1000>; + pool; + }; }; dcan0: can at 481cc000 {
Signature · 1 line
2.16.1
PATCH 3/9 ARM: dts: am33xx: Update emif node
In reply to Dave GerlachNow that we will use ti-emif-sram driver for am335x PM, update the emif DT node with the required sram property.
--- arch/arm/boot/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +2 -0
@@ -960,6 +960,8 @@ compatible = "ti,emif-am3352"; reg = <0x4c000000 0x1000000>; ti,hwmods = "emif"; + sram = <&pm_sram_code + &pm_sram_data>; }; gpmc: gpmc at 50000000 {
Signature · 1 line
2.16.1
PATCH 4/9 ARM: dts: am4372: Update emif node
In reply to Dave GerlachNow that we will use ti-emif-sram driver for am4372 PM, update the emif DT node with the required sram property.
--- arch/arm/boot/dts/am4372.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/am4372.dtsi +2 -0
@@ -237,6 +237,8 @@ compatible = "ti,emif-am4372"; reg = <0x4c000000 0x1000000>; ti,hwmods = "emif"; + sram = <&pm_sram_code + &pm_sram_data>; }; edma: edma at 49000000 {
Signature · 1 line
2.16.1
PATCH 5/9 ARM: dts: am33xx: Add pm-sram phandle to soc node
In reply to Dave GerlachAdd 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.
--- arch/arm/boot/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +2 -0
@@ -147,6 +147,8 @@ mpu { compatible = "ti,omap3-mpu"; ti,hwmods = "mpu"; + pm-sram = <&pm_sram_code + &pm_sram_data>; }; };
Signature · 1 line
2.16.1
PATCH 6/9 ARM: dts: am4372: Add soc node
In reply to Dave GerlachAdd soc node for am4372 with pm-sram phandle to both pm-sram-code and pm-sram-data regions.
--- arch/arm/boot/dts/am4372.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/am4372.dtsi +10 -0
@@ -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 at 48241000 { compatible = "arm,cortex-a9-gic"; interrupt-controller;
Signature · 1 line
2.16.1
PATCH 7/9 ARM: dts: am33xx: Mark emif with ti,no-idle
In reply to Dave GerlachWe can never idle the emif hwmod from within the HLOS so mark the emif node with ti,no-idle.
--- arch/arm/boot/dts/am33xx.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am33xx.dtsi +1 -0
@@ -964,6 +964,7 @@ ti,hwmods = "emif"; sram = <&pm_sram_code &pm_sram_data>; + ti,no-idle; }; gpmc: gpmc at 50000000 {
Signature · 1 line
2.16.1
PATCH 8/9 ARM: dts: am4372: Mark emif with ti,no-idle
In reply to Dave GerlachWe can never idle the emif hwmod from within the HLOS so mark the emif node with ti,no-idle.
--- arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am4372.dtsi +1 -0
@@ -247,6 +247,7 @@ compatible = "ti,emif-am4372"; reg = <0x4c000000 0x1000000>; ti,hwmods = "emif"; + ti,no-idle; sram = <&pm_sram_code &pm_sram_data>; };
Signature · 1 line
2.16.1
PATCH 9/9 ARM: dts: am4372: Mark omap_l3_noc with ti,no-idle
In reply to Dave GerlachWe can never idle the l3_main hwmod so mark the omap_l3_noc node with ti,no-idle.
--- arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am4372.dtsi +1 -0
@@ -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>,
Signature · 1 line
2.16.1
cover ARM: dts: am33xx/am4372: Add suspend-resume support
In reply to Dave GerlachQuoted 6 lines · Dave Gerlach
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