All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 1/2] dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml
@ 2020-03-31 12:13 ` Johan Jonker
  0 siblings, 0 replies; 7+ messages in thread
From: Johan Jonker @ 2020-03-31 12:13 UTC (permalink / raw)
  To: heiko; +Cc: robh+dt, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

Current dts files with 'rockchip-pmu-sram' compatible nodes
are now verified with sram.yaml, although the original
text document still exists. Merge rockchip-pmu-sram.txt
with sram.yaml by adding it as description with an example.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Not tested with hardware.

Changes v3:
  Document the compatible

Changed v2:
  Merge with sram.yaml
---
 .../devicetree/bindings/sram/rockchip-pmu-sram.txt       | 16 ----------------
 Documentation/devicetree/bindings/sram/sram.yaml         | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt

diff --git a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
deleted file mode 100644
index 6b42fda30..000000000
--- a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Rockchip SRAM for pmu:
-------------------------------
-
-The sram of pmu is used to store the function of resume from maskrom(the 1st
-level loader). This is a common use of the "pmu-sram" because it keeps power
-even in low power states in the system.
-
-Required node properties:
-- compatible : should be "rockchip,rk3288-pmu-sram"
-- reg : physical base address and the size of the registers window
-
-Example:
-	sram@ff720000 {
-		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
-		reg = <0xff720000 0x1000>;
-	};
diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 7b83cc6c9..605eb1460 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -29,6 +29,7 @@ properties:
       enum:
         - mmio-sram
         - atmel,sama5d2-securam
+        - rockchip,rk3288-pmu-sram
 
   reg:
     maxItems: 1
@@ -224,6 +225,19 @@ examples:
     };
 
   - |
+    // Rockchip's rk3288 SoC uses the sram of pmu to store the function of
+    // resume from maskrom(the 1st level loader). This is a common use of
+    // the "pmu-sram" because it keeps power even in low power states
+    // in the system.
+    sram@ff720000 {
+      compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
+      reg = <0xff720000 0x1000>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      ranges = <0 0xff720000 0x1000>;
+    };
+
+  - |
     // Allwinner's A80 SoC uses part of the secure sram for hotplugging of the
     // primary core (cpu0). Once the core gets powered up it checks if a magic
     // value is set at a specific location. If it is then the BROM will jump
-- 
2.11.0


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

* [RFC PATCH v3 1/2] dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml
@ 2020-03-31 12:13 ` Johan Jonker
  0 siblings, 0 replies; 7+ messages in thread
From: Johan Jonker @ 2020-03-31 12:13 UTC (permalink / raw)
  To: heiko; +Cc: devicetree, robh+dt, linux-kernel, linux-arm-kernel, linux-rockchip

Current dts files with 'rockchip-pmu-sram' compatible nodes
are now verified with sram.yaml, although the original
text document still exists. Merge rockchip-pmu-sram.txt
with sram.yaml by adding it as description with an example.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Not tested with hardware.

Changes v3:
  Document the compatible

Changed v2:
  Merge with sram.yaml
---
 .../devicetree/bindings/sram/rockchip-pmu-sram.txt       | 16 ----------------
 Documentation/devicetree/bindings/sram/sram.yaml         | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt

diff --git a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
deleted file mode 100644
index 6b42fda30..000000000
--- a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Rockchip SRAM for pmu:
-------------------------------
-
-The sram of pmu is used to store the function of resume from maskrom(the 1st
-level loader). This is a common use of the "pmu-sram" because it keeps power
-even in low power states in the system.
-
-Required node properties:
-- compatible : should be "rockchip,rk3288-pmu-sram"
-- reg : physical base address and the size of the registers window
-
-Example:
-	sram@ff720000 {
-		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
-		reg = <0xff720000 0x1000>;
-	};
diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 7b83cc6c9..605eb1460 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -29,6 +29,7 @@ properties:
       enum:
         - mmio-sram
         - atmel,sama5d2-securam
+        - rockchip,rk3288-pmu-sram
 
   reg:
     maxItems: 1
@@ -224,6 +225,19 @@ examples:
     };
 
   - |
+    // Rockchip's rk3288 SoC uses the sram of pmu to store the function of
+    // resume from maskrom(the 1st level loader). This is a common use of
+    // the "pmu-sram" because it keeps power even in low power states
+    // in the system.
+    sram@ff720000 {
+      compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
+      reg = <0xff720000 0x1000>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      ranges = <0 0xff720000 0x1000>;
+    };
+
+  - |
     // Allwinner's A80 SoC uses part of the secure sram for hotplugging of the
     // primary core (cpu0). Once the core gets powered up it checks if a magic
     // value is set at a specific location. If it is then the BROM will jump
-- 
2.11.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] 7+ messages in thread

* [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes
  2020-03-31 12:13 ` Johan Jonker
@ 2020-03-31 12:13   ` Johan Jonker
  -1 siblings, 0 replies; 7+ messages in thread
From: Johan Jonker @ 2020-03-31 12:13 UTC (permalink / raw)
  To: heiko; +Cc: robh+dt, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

A test with the command below gives for example these warnings:

arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'#address-cells' is a required property
arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'#size-cells' is a required property
arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'ranges' is a required property

Fix this error by adding '#address-cells', '#size-cells' and
'ranges' to the 'rockchip,rk3288-pmu-sram' compatible node
in rk3288.dtsi.

make ARCH=arm dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Not tested with hardware.

Changed v2:
  Fix dtsi.
---
 arch/arm/boot/dts/rk3288.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 9c8741bb1..f102fec69 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -730,6 +730,9 @@
 	pmu_sram: sram@ff720000 {
 		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
 		reg = <0x0 0xff720000 0x0 0x1000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x0 0xff720000 0x1000>;
 	};
 
 	pmu: power-management@ff730000 {
-- 
2.11.0


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

* [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes
@ 2020-03-31 12:13   ` Johan Jonker
  0 siblings, 0 replies; 7+ messages in thread
From: Johan Jonker @ 2020-03-31 12:13 UTC (permalink / raw)
  To: heiko; +Cc: devicetree, robh+dt, linux-kernel, linux-arm-kernel, linux-rockchip

A test with the command below gives for example these warnings:

arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'#address-cells' is a required property
arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'#size-cells' is a required property
arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
'ranges' is a required property

Fix this error by adding '#address-cells', '#size-cells' and
'ranges' to the 'rockchip,rk3288-pmu-sram' compatible node
in rk3288.dtsi.

make ARCH=arm dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Not tested with hardware.

Changed v2:
  Fix dtsi.
---
 arch/arm/boot/dts/rk3288.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 9c8741bb1..f102fec69 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -730,6 +730,9 @@
 	pmu_sram: sram@ff720000 {
 		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
 		reg = <0x0 0xff720000 0x0 0x1000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x0 0xff720000 0x1000>;
 	};
 
 	pmu: power-management@ff730000 {
-- 
2.11.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] 7+ messages in thread

* Re: [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes
@ 2020-04-10 17:52     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-04-10 17:52 UTC (permalink / raw)
  To: Johan Jonker
  Cc: heiko, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

On Tue, Mar 31, 2020 at 02:13:52PM +0200, Johan Jonker wrote:
> A test with the command below gives for example these warnings:
> 
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#address-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#size-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> 'ranges' is a required property
> 
> Fix this error by adding '#address-cells', '#size-cells' and
> 'ranges' to the 'rockchip,rk3288-pmu-sram' compatible node
> in rk3288.dtsi.
> 
> make ARCH=arm dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> Not tested with hardware.
> 
> Changed v2:
>   Fix dtsi.
> ---
>  arch/arm/boot/dts/rk3288.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
> index 9c8741bb1..f102fec69 100644
> --- a/arch/arm/boot/dts/rk3288.dtsi
> +++ b/arch/arm/boot/dts/rk3288.dtsi
> @@ -730,6 +730,9 @@
>  	pmu_sram: sram@ff720000 {
>  		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
>  		reg = <0x0 0xff720000 0x0 0x1000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0x0 0xff720000 0x1000>;

I think we should make these optional instead if there's no child nodes. 
And if there are child nodes, then these will be required.

Rob

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

* Re: [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes
@ 2020-04-10 17:52     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-04-10 17:52 UTC (permalink / raw)
  To: Johan Jonker
  Cc: heiko-4mtYJXux2i+zQB+pC5nmwQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 31, 2020 at 02:13:52PM +0200, Johan Jonker wrote:
> A test with the command below gives for example these warnings:
> 
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#address-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#size-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> 'ranges' is a required property
> 
> Fix this error by adding '#address-cells', '#size-cells' and
> 'ranges' to the 'rockchip,rk3288-pmu-sram' compatible node
> in rk3288.dtsi.
> 
> make ARCH=arm dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml
> 
> Signed-off-by: Johan Jonker <jbx6244-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Not tested with hardware.
> 
> Changed v2:
>   Fix dtsi.
> ---
>  arch/arm/boot/dts/rk3288.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
> index 9c8741bb1..f102fec69 100644
> --- a/arch/arm/boot/dts/rk3288.dtsi
> +++ b/arch/arm/boot/dts/rk3288.dtsi
> @@ -730,6 +730,9 @@
>  	pmu_sram: sram@ff720000 {
>  		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
>  		reg = <0x0 0xff720000 0x0 0x1000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0x0 0xff720000 0x1000>;

I think we should make these optional instead if there's no child nodes. 
And if there are child nodes, then these will be required.

Rob

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

* Re: [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes
@ 2020-04-10 17:52     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-04-10 17:52 UTC (permalink / raw)
  To: Johan Jonker
  Cc: devicetree, linux-kernel, heiko, linux-arm-kernel, linux-rockchip

On Tue, Mar 31, 2020 at 02:13:52PM +0200, Johan Jonker wrote:
> A test with the command below gives for example these warnings:
> 
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#address-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> '#size-cells' is a required property
> arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000:
> 'ranges' is a required property
> 
> Fix this error by adding '#address-cells', '#size-cells' and
> 'ranges' to the 'rockchip,rk3288-pmu-sram' compatible node
> in rk3288.dtsi.
> 
> make ARCH=arm dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> Not tested with hardware.
> 
> Changed v2:
>   Fix dtsi.
> ---
>  arch/arm/boot/dts/rk3288.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
> index 9c8741bb1..f102fec69 100644
> --- a/arch/arm/boot/dts/rk3288.dtsi
> +++ b/arch/arm/boot/dts/rk3288.dtsi
> @@ -730,6 +730,9 @@
>  	pmu_sram: sram@ff720000 {
>  		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
>  		reg = <0x0 0xff720000 0x0 0x1000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0x0 0xff720000 0x1000>;

I think we should make these optional instead if there's no child nodes. 
And if there are child nodes, then these will be required.

Rob

_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2020-04-10 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 12:13 [RFC PATCH v3 1/2] dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml Johan Jonker
2020-03-31 12:13 ` Johan Jonker
2020-03-31 12:13 ` [RFC PATCH v3 2/2] ARM: dts: rockchip: fix yaml warnings for rk3288-pmu-sram compatible nodes Johan Jonker
2020-03-31 12:13   ` Johan Jonker
2020-04-10 17:52   ` Rob Herring
2020-04-10 17:52     ` Rob Herring
2020-04-10 17:52     ` Rob Herring

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.