All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ARM:mstar: DT filling out
@ 2020-07-26  4:39 ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

This series adds a few low hanging fruit that are purely DT changes to
keep the ball rolling while I work on series for more complicated things
like the interrupt controllers.

Summary of changes:

- Adds the IMI SRAM region and sets the right size for each family
- Adds the ARM PMU
- Adds a syscon for a lump of registers called "pmsleep"
- Uses the pmsleep syscon to enable reboot

Daniel Palmer (7):
  ARM:mstar: Add IMI SRAM region
  ARM:mstar: Adjust IMI size of infinity
  ARM:mstar: Adjust IMI size for mercury5
  ARM:mstar: Adjust IMI size for infinity3
  ARM:mstar: Add PMU
  ARM:mstar: Add syscon node for "pmsleep" area
  ARM:mstar: Add reboot support

 arch/arm/boot/dts/infinity.dtsi  |  4 ++++
 arch/arm/boot/dts/infinity3.dtsi |  4 ++++
 arch/arm/boot/dts/mercury5.dtsi  |  4 ++++
 arch/arm/boot/dts/mstar-v7.dtsi  | 26 +++++++++++++++++++++++++-
 4 files changed, 37 insertions(+), 1 deletion(-)

-- 
2.27.0


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

* [PATCH 0/7] ARM:mstar: DT filling out
@ 2020-07-26  4:39 ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

This series adds a few low hanging fruit that are purely DT changes to
keep the ball rolling while I work on series for more complicated things
like the interrupt controllers.

Summary of changes:

- Adds the IMI SRAM region and sets the right size for each family
- Adds the ARM PMU
- Adds a syscon for a lump of registers called "pmsleep"
- Uses the pmsleep syscon to enable reboot

Daniel Palmer (7):
  ARM:mstar: Add IMI SRAM region
  ARM:mstar: Adjust IMI size of infinity
  ARM:mstar: Adjust IMI size for mercury5
  ARM:mstar: Adjust IMI size for infinity3
  ARM:mstar: Add PMU
  ARM:mstar: Add syscon node for "pmsleep" area
  ARM:mstar: Add reboot support

 arch/arm/boot/dts/infinity.dtsi  |  4 ++++
 arch/arm/boot/dts/infinity3.dtsi |  4 ++++
 arch/arm/boot/dts/mercury5.dtsi  |  4 ++++
 arch/arm/boot/dts/mstar-v7.dtsi  | 26 +++++++++++++++++++++++++-
 4 files changed, 37 insertions(+), 1 deletion(-)

-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/7] ARM:mstar: Add IMI SRAM region
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

All MStar v7 SoCs have an internal SRAM region that is between 64KB
(infinity2m) and 128KB(infinity3, mercury5).

The region is always at the same base address and is used for the
second stage loader (MStar IPL or u-boot SPL) and will be used for
the DDR self-refresh entry code within the kernel eventually.

This patch adds a 128KB region to the SoC and the minimum 64KB SRAM
region to the base dtsi. Families with more SRAM will override the
size in their family level dtsi.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index 3b99bb435bb5..6bc55fdbee04 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -45,7 +45,8 @@ soc: soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x16001000 0x16001000 0x00007000>,
-			 <0x1f000000 0x1f000000 0x00400000>;
+			 <0x1f000000 0x1f000000 0x00400000>,
+			 <0xa0000000 0xa0000000 0x20000>;
 
 		gic: interrupt-controller@16001000 {
 			compatible = "arm,cortex-a7-gic";
@@ -78,6 +79,11 @@ pm_uart: uart@221000 {
 				clock-frequency = <172000000>;
 				status = "disabled";
 			};
+                };
+
+		imi: sram@a0000000 {
+			compatible = "mmio-sram";
+			reg = <0xa0000000 0x10000>;
 		};
 	};
 };
-- 
2.27.0


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

* [PATCH 1/7] ARM:mstar: Add IMI SRAM region
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

All MStar v7 SoCs have an internal SRAM region that is between 64KB
(infinity2m) and 128KB(infinity3, mercury5).

The region is always at the same base address and is used for the
second stage loader (MStar IPL or u-boot SPL) and will be used for
the DDR self-refresh entry code within the kernel eventually.

This patch adds a 128KB region to the SoC and the minimum 64KB SRAM
region to the base dtsi. Families with more SRAM will override the
size in their family level dtsi.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index 3b99bb435bb5..6bc55fdbee04 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -45,7 +45,8 @@ soc: soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x16001000 0x16001000 0x00007000>,
-			 <0x1f000000 0x1f000000 0x00400000>;
+			 <0x1f000000 0x1f000000 0x00400000>,
+			 <0xa0000000 0xa0000000 0x20000>;
 
 		gic: interrupt-controller@16001000 {
 			compatible = "arm,cortex-a7-gic";
@@ -78,6 +79,11 @@ pm_uart: uart@221000 {
 				clock-frequency = <172000000>;
 				status = "disabled";
 			};
+                };
+
+		imi: sram@a0000000 {
+			compatible = "mmio-sram";
+			reg = <0xa0000000 0x10000>;
 		};
 	};
 };
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/7] ARM:mstar: Adjust IMI size of infinity
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

infinity has 88KB of SRAM at the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/infinity.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/infinity.dtsi b/arch/arm/boot/dts/infinity.dtsi
index f68e6d59c328..cd911adef014 100644
--- a/arch/arm/boot/dts/infinity.dtsi
+++ b/arch/arm/boot/dts/infinity.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "mstar-v7.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x16000>;
+};
-- 
2.27.0


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

* [PATCH 2/7] ARM:mstar: Adjust IMI size of infinity
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

infinity has 88KB of SRAM at the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/infinity.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/infinity.dtsi b/arch/arm/boot/dts/infinity.dtsi
index f68e6d59c328..cd911adef014 100644
--- a/arch/arm/boot/dts/infinity.dtsi
+++ b/arch/arm/boot/dts/infinity.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "mstar-v7.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x16000>;
+};
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/7] ARM:mstar: Adjust IMI size for mercury5
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

mercury5 family chips have 128KB of SRAM in the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mercury5.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/mercury5.dtsi b/arch/arm/boot/dts/mercury5.dtsi
index f68e6d59c328..a7d0dd9d6132 100644
--- a/arch/arm/boot/dts/mercury5.dtsi
+++ b/arch/arm/boot/dts/mercury5.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "mstar-v7.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x20000>;
+};
-- 
2.27.0


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

* [PATCH 3/7] ARM:mstar: Adjust IMI size for mercury5
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

mercury5 family chips have 128KB of SRAM in the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mercury5.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/mercury5.dtsi b/arch/arm/boot/dts/mercury5.dtsi
index f68e6d59c328..a7d0dd9d6132 100644
--- a/arch/arm/boot/dts/mercury5.dtsi
+++ b/arch/arm/boot/dts/mercury5.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "mstar-v7.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x20000>;
+};
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/7] ARM:mstar: Adjust IMI size for infinity3
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

infinity3 has 128KB of SRAM at the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/infinity3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/infinity3.dtsi b/arch/arm/boot/dts/infinity3.dtsi
index 2830d064c07d..9b918c802654 100644
--- a/arch/arm/boot/dts/infinity3.dtsi
+++ b/arch/arm/boot/dts/infinity3.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "infinity.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x20000>;
+};
-- 
2.27.0


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

* [PATCH 4/7] ARM:mstar: Adjust IMI size for infinity3
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

infinity3 has 128KB of SRAM at the IMI region.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/infinity3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/infinity3.dtsi b/arch/arm/boot/dts/infinity3.dtsi
index 2830d064c07d..9b918c802654 100644
--- a/arch/arm/boot/dts/infinity3.dtsi
+++ b/arch/arm/boot/dts/infinity3.dtsi
@@ -5,3 +5,7 @@
  */
 
 #include "infinity.dtsi"
+
+&imi {
+	reg = <0xa0000000 0x20000>;
+};
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/7] ARM:mstar: Add PMU
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

Adds the ARM PMU to the base MStar v7 dtsi.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index 6bc55fdbee04..a73b1d162dfd 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -40,6 +40,12 @@ arch_timer {
 		clock-frequency = <6000000>;
 	};
 
+	pmu: pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>;
+	};
+
 	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
2.27.0


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

* [PATCH 5/7] ARM:mstar: Add PMU
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

Adds the ARM PMU to the base MStar v7 dtsi.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index 6bc55fdbee04..a73b1d162dfd 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -40,6 +40,12 @@ arch_timer {
 		clock-frequency = <6000000>;
 	};
 
+	pmu: pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>;
+	};
+
 	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/7] ARM:mstar: Add syscon node for "pmsleep" area
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

MStar v7 SoCs contain a region of registers that are in the always on
domain that the vendor code calls the "pmsleep" area.

This area contains registers for a broad range of functionality and
needs to be shared between drivers.

This patch adds a syscon node for the pmsleep area so that other
drivers can access registers in the area.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index a73b1d162dfd..c8b192569d05 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -73,6 +73,11 @@ riu: bus@1f000000 {
 			#size-cells = <1>;
 			ranges = <0x0 0x1f000000 0x00400000>;
 
+			pmsleep: syscon@1c00 {
+				compatible = "syscon";
+				reg = <0x1c00 0x100>;
+			};
+
 			l3bridge: l3bridge@204400 {
 				compatible = "mstar,l3bridge";
 				reg = <0x204400 0x200>;
-- 
2.27.0


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

* [PATCH 6/7] ARM:mstar: Add syscon node for "pmsleep" area
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

MStar v7 SoCs contain a region of registers that are in the always on
domain that the vendor code calls the "pmsleep" area.

This area contains registers for a broad range of functionality and
needs to be shared between drivers.

This patch adds a syscon node for the pmsleep area so that other
drivers can access registers in the area.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index a73b1d162dfd..c8b192569d05 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -73,6 +73,11 @@ riu: bus@1f000000 {
 			#size-cells = <1>;
 			ranges = <0x0 0x1f000000 0x00400000>;
 
+			pmsleep: syscon@1c00 {
+				compatible = "syscon";
+				reg = <0x1c00 0x100>;
+			};
+
 			l3bridge: l3bridge@204400 {
 				compatible = "mstar,l3bridge";
 				reg = <0x204400 0x200>;
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 7/7] ARM:mstar: Add reboot support
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-26  4:39   ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: arnd, linux-arm-kernel, linux-kernel, Daniel Palmer

MStar v7 SoCs support reset by writing a magic value to a register
in the "pmsleep" area.

This adds a node for using the syscon reboot driver to trigger a reset.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index c8b192569d05..7ac7e649189f 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -78,6 +78,13 @@ pmsleep: syscon@1c00 {
 				reg = <0x1c00 0x100>;
 			};
 
+			reboot {
+				compatible = "syscon-reboot";
+				regmap = <&pmsleep>;
+				offset = <0xb8>;
+				mask = <0x79>;
+			};
+
 			l3bridge: l3bridge@204400 {
 				compatible = "mstar,l3bridge";
 				reg = <0x204400 0x200>;
-- 
2.27.0


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

* [PATCH 7/7] ARM:mstar: Add reboot support
@ 2020-07-26  4:39   ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-26  4:39 UTC (permalink / raw)
  To: soc; +Cc: Daniel Palmer, linux-arm-kernel, arnd, linux-kernel

MStar v7 SoCs support reset by writing a magic value to a register
in the "pmsleep" area.

This adds a node for using the syscon reboot driver to trigger a reset.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/mstar-v7.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
index c8b192569d05..7ac7e649189f 100644
--- a/arch/arm/boot/dts/mstar-v7.dtsi
+++ b/arch/arm/boot/dts/mstar-v7.dtsi
@@ -78,6 +78,13 @@ pmsleep: syscon@1c00 {
 				reg = <0x1c00 0x100>;
 			};
 
+			reboot {
+				compatible = "syscon-reboot";
+				regmap = <&pmsleep>;
+				offset = <0xb8>;
+				mask = <0x79>;
+			};
+
 			l3bridge: l3bridge@204400 {
 				compatible = "mstar,l3bridge";
 				reg = <0x204400 0x200>;
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/7] ARM:mstar: Add syscon node for "pmsleep" area
  2020-07-26  4:39   ` Daniel Palmer
@ 2020-07-27  7:49     ` Arnd Bergmann
  -1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2020-07-27  7:49 UTC (permalink / raw)
  To: Daniel Palmer; +Cc: SoC Team, Linux ARM, linux-kernel

On Sun, Jul 26, 2020 at 6:40 AM Daniel Palmer <daniel@0x0f.com> wrote:
>
> MStar v7 SoCs contain a region of registers that are in the always on
> domain that the vendor code calls the "pmsleep" area.
>
> This area contains registers for a broad range of functionality and
> needs to be shared between drivers.
>
> This patch adds a syscon node for the pmsleep area so that other
> drivers can access registers in the area.
>
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>

I think it would be better to add a more specific compatible string in
addition to the "syscon" one, to make it possible to later add a proper
driver for this area, in case there is a need for that.

       Arnd

> ---
>  arch/arm/boot/dts/mstar-v7.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
> index a73b1d162dfd..c8b192569d05 100644
> --- a/arch/arm/boot/dts/mstar-v7.dtsi
> +++ b/arch/arm/boot/dts/mstar-v7.dtsi
> @@ -73,6 +73,11 @@ riu: bus@1f000000 {
>                         #size-cells = <1>;
>                         ranges = <0x0 0x1f000000 0x00400000>;
>
> +                       pmsleep: syscon@1c00 {
> +                               compatible = "syscon";
> +                               reg = <0x1c00 0x100>;
> +                       };
> +
>                         l3bridge: l3bridge@204400 {
>                                 compatible = "mstar,l3bridge";
>                                 reg = <0x204400 0x200>;
> --
> 2.27.0
>

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

* Re: [PATCH 6/7] ARM:mstar: Add syscon node for "pmsleep" area
@ 2020-07-27  7:49     ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2020-07-27  7:49 UTC (permalink / raw)
  To: Daniel Palmer; +Cc: SoC Team, linux-kernel, Linux ARM

On Sun, Jul 26, 2020 at 6:40 AM Daniel Palmer <daniel@0x0f.com> wrote:
>
> MStar v7 SoCs contain a region of registers that are in the always on
> domain that the vendor code calls the "pmsleep" area.
>
> This area contains registers for a broad range of functionality and
> needs to be shared between drivers.
>
> This patch adds a syscon node for the pmsleep area so that other
> drivers can access registers in the area.
>
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>

I think it would be better to add a more specific compatible string in
addition to the "syscon" one, to make it possible to later add a proper
driver for this area, in case there is a need for that.

       Arnd

> ---
>  arch/arm/boot/dts/mstar-v7.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi
> index a73b1d162dfd..c8b192569d05 100644
> --- a/arch/arm/boot/dts/mstar-v7.dtsi
> +++ b/arch/arm/boot/dts/mstar-v7.dtsi
> @@ -73,6 +73,11 @@ riu: bus@1f000000 {
>                         #size-cells = <1>;
>                         ranges = <0x0 0x1f000000 0x00400000>;
>
> +                       pmsleep: syscon@1c00 {
> +                               compatible = "syscon";
> +                               reg = <0x1c00 0x100>;
> +                       };
> +
>                         l3bridge: l3bridge@204400 {
>                                 compatible = "mstar,l3bridge";
>                                 reg = <0x204400 0x200>;
> --
> 2.27.0
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/7] ARM:mstar: DT filling out
  2020-07-26  4:39 ` Daniel Palmer
@ 2020-07-27 12:33   ` Arnd Bergmann
  -1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2020-07-27 12:33 UTC (permalink / raw)
  To: Daniel Palmer; +Cc: SoC Team, Linux ARM, linux-kernel

On Sun, Jul 26, 2020 at 6:39 AM Daniel Palmer <daniel@0x0f.com> wrote:
>
> This series adds a few low hanging fruit that are purely DT changes to
> keep the ball rolling while I work on series for more complicated things
> like the interrupt controllers.
>
> Summary of changes:
>
> - Adds the IMI SRAM region and sets the right size for each family
> - Adds the ARM PMU
> - Adds a syscon for a lump of registers called "pmsleep"
> - Uses the pmsleep syscon to enable reboot

I had one comment for the last commit in this list and have therefore
not applied the series (yet).

I also noticed that the subject lines are slightly inconsistent, please
add  a space between "ARM:" and "mstar:" as you did for the first
set of patches.

      Arnd

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

* Re: [PATCH 0/7] ARM:mstar: DT filling out
@ 2020-07-27 12:33   ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2020-07-27 12:33 UTC (permalink / raw)
  To: Daniel Palmer; +Cc: SoC Team, linux-kernel, Linux ARM

On Sun, Jul 26, 2020 at 6:39 AM Daniel Palmer <daniel@0x0f.com> wrote:
>
> This series adds a few low hanging fruit that are purely DT changes to
> keep the ball rolling while I work on series for more complicated things
> like the interrupt controllers.
>
> Summary of changes:
>
> - Adds the IMI SRAM region and sets the right size for each family
> - Adds the ARM PMU
> - Adds a syscon for a lump of registers called "pmsleep"
> - Uses the pmsleep syscon to enable reboot

I had one comment for the last commit in this list and have therefore
not applied the series (yet).

I also noticed that the subject lines are slightly inconsistent, please
add  a space between "ARM:" and "mstar:" as you did for the first
set of patches.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/7] ARM:mstar: DT filling out
  2020-07-27 12:33   ` Arnd Bergmann
@ 2020-07-27 13:26     ` Daniel Palmer
  -1 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-27 13:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: SoC Team, Linux ARM, linux-kernel

Hi Arnd,

On Mon, 27 Jul 2020 at 21:33, Arnd Bergmann <arnd@arndb.de> wrote:

> I had one comment for the last commit in this list and have therefore
> not applied the series (yet).

I was going to wait for other comments before making a v2 but it seems like
it was just the pmsleep syscon that needs changes. I'll fix that up and send
a v2.

> I also noticed that the subject lines are slightly inconsistent, please
> add  a space between "ARM:" and "mstar:" as you did for the first
> set of patches.

Oops sorry about that. Not sure why I did that. I'll fix for the next version.

Thanks,

Daniel

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

* Re: [PATCH 0/7] ARM:mstar: DT filling out
@ 2020-07-27 13:26     ` Daniel Palmer
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Palmer @ 2020-07-27 13:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: SoC Team, linux-kernel, Linux ARM

Hi Arnd,

On Mon, 27 Jul 2020 at 21:33, Arnd Bergmann <arnd@arndb.de> wrote:

> I had one comment for the last commit in this list and have therefore
> not applied the series (yet).

I was going to wait for other comments before making a v2 but it seems like
it was just the pmsleep syscon that needs changes. I'll fix that up and send
a v2.

> I also noticed that the subject lines are slightly inconsistent, please
> add  a space between "ARM:" and "mstar:" as you did for the first
> set of patches.

Oops sorry about that. Not sure why I did that. I'll fix for the next version.

Thanks,

Daniel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-07-27 13:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26  4:39 [PATCH 0/7] ARM:mstar: DT filling out Daniel Palmer
2020-07-26  4:39 ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 1/7] ARM:mstar: Add IMI SRAM region Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 2/7] ARM:mstar: Adjust IMI size of infinity Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 3/7] ARM:mstar: Adjust IMI size for mercury5 Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 4/7] ARM:mstar: Adjust IMI size for infinity3 Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 5/7] ARM:mstar: Add PMU Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-26  4:39 ` [PATCH 6/7] ARM:mstar: Add syscon node for "pmsleep" area Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-27  7:49   ` Arnd Bergmann
2020-07-27  7:49     ` Arnd Bergmann
2020-07-26  4:39 ` [PATCH 7/7] ARM:mstar: Add reboot support Daniel Palmer
2020-07-26  4:39   ` Daniel Palmer
2020-07-27 12:33 ` [PATCH 0/7] ARM:mstar: DT filling out Arnd Bergmann
2020-07-27 12:33   ` Arnd Bergmann
2020-07-27 13:26   ` Daniel Palmer
2020-07-27 13:26     ` Daniel Palmer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.