devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections
@ 2019-12-09  9:34 Maxime Ripard
  2019-12-09  9:34 ` [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles Maxime Ripard
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:34 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel, krzk,
	Maxime Ripard

The generic SRAM binding currently only allows for child nodes of an SRAM
to be called sram too. However, these are also called sections in a number
of device tree, which seems a bit more accurate.

Let's change the name pattern to allow both.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 Documentation/devicetree/bindings/sram/sram.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index ee2287a1b14d..83e3bc64d6fc 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -55,7 +55,7 @@ properties:
     type: boolean
 
 patternProperties:
-  "^([a-z]*-)?sram@[a-f0-9]+$":
+  "^([a-z]*-)?sram(-section)?@[a-f0-9]+$":
     type: object
     description:
       Each child of the sram node specifies a region of reserved memory.
-- 
2.23.0


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

* [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles
  2019-12-09  9:34 [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Maxime Ripard
@ 2019-12-09  9:34 ` Maxime Ripard
  2019-12-18  1:42   ` Rob Herring
  2019-12-09  9:34 ` [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles Maxime Ripard
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:34 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel, krzk,
	Maxime Ripard

Even though the generic mmio-sram binding has a list of the sections
compatible allowed, most device trees have more specific compatibles
attached to those generic ones.

This creates warnings at the moment, and we don't really want to cripple
the generic binding with all the vendor specific combinations that would
prove to be hard to maintain.

Let's allow additional compatibles for the sections, and then we can have
the vendor-specific bindings to reduce the scope of what's allowed exactly.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../devicetree/bindings/sram/sram.yaml        | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 83e3bc64d6fc..9ffef983510b 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -64,15 +64,16 @@ patternProperties:
         description:
           Should contain a vendor specific string in the form
           <vendor>,[<device>-]<usage>
-        enum:
-          - allwinner,sun9i-a80-smp-sram
-          - amlogic,meson8-smp-sram
-          - amlogic,meson8b-smp-sram
-          - renesas,smp-sram
-          - rockchip,rk3066-smp-sram
-          - samsung,exynos4210-sysram
-          - samsung,exynos4210-sysram-ns
-          - socionext,milbeaut-smp-sram
+        contains:
+          enum:
+            - allwinner,sun9i-a80-smp-sram
+            - amlogic,meson8-smp-sram
+            - amlogic,meson8b-smp-sram
+            - renesas,smp-sram
+            - rockchip,rk3066-smp-sram
+            - samsung,exynos4210-sysram
+            - samsung,exynos4210-sysram-ns
+            - socionext,milbeaut-smp-sram
 
       reg:
         description:
-- 
2.23.0


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

* [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles
  2019-12-09  9:34 [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Maxime Ripard
  2019-12-09  9:34 ` [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles Maxime Ripard
@ 2019-12-09  9:34 ` Maxime Ripard
  2019-12-18  1:42   ` Rob Herring
  2019-12-09  9:34 ` [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema Maxime Ripard
  2019-12-18  1:39 ` [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Rob Herring
  3 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:34 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel, krzk,
	Maxime Ripard

The mmio-sram binding was added missing a few SRAM sections compatible for
allwinner SoCs. Let's add them.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 Documentation/devicetree/bindings/sram/sram.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
index 9ffef983510b..7b83cc6c9bfa 100644
--- a/Documentation/devicetree/bindings/sram/sram.yaml
+++ b/Documentation/devicetree/bindings/sram/sram.yaml
@@ -66,7 +66,11 @@ patternProperties:
           <vendor>,[<device>-]<usage>
         contains:
           enum:
+            - allwinner,sun4i-a10-sram-a3-a4
+            - allwinner,sun4i-a10-sram-c1
+            - allwinner,sun4i-a10-sram-d
             - allwinner,sun9i-a80-smp-sram
+            - allwinner,sun50i-a64-sram-c
             - amlogic,meson8-smp-sram
             - amlogic,meson8b-smp-sram
             - renesas,smp-sram
-- 
2.23.0


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

* [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema
  2019-12-09  9:34 [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Maxime Ripard
  2019-12-09  9:34 ` [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles Maxime Ripard
  2019-12-09  9:34 ` [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles Maxime Ripard
@ 2019-12-09  9:34 ` Maxime Ripard
  2019-12-18  1:43   ` Rob Herring
  2019-12-18  1:50   ` Rob Herring
  2019-12-18  1:39 ` [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Rob Herring
  3 siblings, 2 replies; 9+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:34 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel, krzk,
	Maxime Ripard

The older Allwinner SoCs have a system controller that is supported in
Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../allwinner,sun4i-a10-system-control.yaml   | 140 ++++++++++++++++++
 .../devicetree/bindings/sram/sunxi-sram.txt   | 113 --------------
 2 files changed, 140 insertions(+), 113 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
 delete mode 100644 Documentation/devicetree/bindings/sram/sunxi-sram.txt

diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
new file mode 100644
index 000000000000..3a368fbdff58
--- /dev/null
+++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
@@ -0,0 +1,140 @@
+# SPDX-License-Identifier: GPL-2.0+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A10 System Control Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <mripard@kernel.org>
+
+description:
+  The SRAM controller found on most Allwinner devices is represented
+  by a regular node for the SRAM controller itself, with sub-nodes
+  representing the SRAM handled by the SRAM controller.
+
+properties:
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  compatible:
+    oneOf:
+      - const: allwinner,sun4i-a10-sram-controller
+        deprecated: true
+      - const: allwinner,sun4i-a10-system-control
+      - const: allwinner,sun5i-a13-system-control
+      - items:
+        - const: allwinner,sun7i-a20-system-control
+        - const: allwinner,sun4i-a10-system-control
+      - const: allwinner,sun8i-a23-system-control
+      - const: allwinner,sun8i-h3-system-control
+      - const: allwinner,sun50i-a64-sram-controller
+        deprecated: true
+      - const: allwinner,sun50i-a64-system-control
+      - const: allwinner,sun50i-h5-system-control
+      - items:
+        - const: allwinner,sun50i-h6-system-control
+        - const: allwinner,sun50i-a64-system-control
+      - items:
+        - const: allwinner,suniv-f1c100s-system-control
+        - const: allwinner,sun4i-a10-system-control
+
+  reg:
+    maxItems: 1
+
+  ranges: true
+
+patternProperties:
+  "^sram@[a-z0-9]+":
+    type: object
+
+    properties:
+      compatible:
+        const: mmio-sram
+
+    patternProperties:
+      "^sram-section?@[a-f0-9]+$":
+        type: object
+
+        compatible:
+          oneOf:
+            - const: allwinner,sun4i-a10-sram-a3-a4
+            - const: allwinner,sun4i-a10-sram-c1
+            - const: allwinner,sun4i-a10-sram-d
+            - const: allwinner,sun50i-a64-sram-c
+            - items:
+              - const: allwinner,sun5i-a13-sram-a3-a4
+              - const: allwinner,sun4i-a10-sram-a3-a4
+            - items:
+              - const: allwinner,sun7i-a20-sram-a3-a4
+              - const: allwinner,sun4i-a10-sram-a3-a4
+            - items:
+              - const: allwinner,sun5i-a13-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun7i-a20-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun8i-a23-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun8i-h3-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun50i-a64-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun50i-h5-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun50i-h6-sram-c1
+              - const: allwinner,sun4i-a10-sram-c1
+            - items:
+              - const: allwinner,sun5i-a13-sram-d
+              - const: allwinner,sun4i-a10-sram-d
+            - items:
+              - const: allwinner,sun7i-a20-sram-d
+              - const: allwinner,sun4i-a10-sram-d
+            - items:
+              - const: allwinner,suniv-f1c100s-sram-d
+              - const: allwinner,sun4i-a10-sram-d
+            - items:
+              - const: allwinner,sun50i-h6-sram-c
+              - const: allwinner,sun50i-a64-sram-c
+
+
+required:
+  - "#address-cells"
+  - "#size-cells"
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    system-control@1c00000 {
+      compatible = "allwinner,sun4i-a10-system-control";
+      reg = <0x01c00000 0x30>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      ranges;
+
+      sram_a: sram@00000000 {
+        compatible = "mmio-sram";
+        reg = <0x00000000 0xc000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0 0x00000000 0xc000>;
+
+        emac_sram: sram-section@8000 {
+          compatible = "allwinner,sun4i-a10-sram-a3-a4";
+          reg = <0x8000 0x4000>;
+        };
+      };
+    };
diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
deleted file mode 100644
index 380246a805f2..000000000000
--- a/Documentation/devicetree/bindings/sram/sunxi-sram.txt
+++ /dev/null
@@ -1,113 +0,0 @@
-Allwinnner SoC SRAM controllers
------------------------------------------------------
-
-The SRAM controller found on most Allwinner devices is represented by
-a regular node for the SRAM controller itself, with sub-nodes
-reprensenting the SRAM handled by the SRAM controller.
-
-Controller Node
----------------
-
-Required properties:
-- compatible : should be:
-    - "allwinner,sun4i-a10-sram-controller" (deprecated)
-    - "allwinner,sun4i-a10-system-control"
-    - "allwinner,sun5i-a13-system-control"
-    - "allwinner,sun7i-a20-system-control", "allwinner,sun4i-a10-system-control"
-    - "allwinner,sun8i-a23-system-control"
-    - "allwinner,sun8i-h3-system-control"
-    - "allwinner,sun50i-a64-sram-controller" (deprecated)
-    - "allwinner,sun50i-a64-system-control"
-    - "allwinner,sun50i-h5-system-control"
-    - "allwinner,sun50i-h6-system-control", "allwinner,sun50i-a64-system-control"
-    - "allwinner,suniv-f1c100s-system-control", "allwinner,sun4i-a10-system-control"
-- reg : sram controller register offset + length
-
-SRAM nodes
-----------
-
-Each SRAM is described using the mmio-sram bindings documented in
-Documentation/devicetree/bindings/sram/sram.txt
-
-Each SRAM will have SRAM sections that are going to be handled by the
-SRAM controller as subnodes. These sections are represented following
-once again the representation described in the mmio-sram binding.
-
-The valid sections compatible for A10 are:
-    - allwinner,sun4i-a10-sram-a3-a4
-    - allwinner,sun4i-a10-sram-c1
-    - allwinner,sun4i-a10-sram-d
-
-The valid sections compatible for A13 are:
-    - allwinner,sun5i-a13-sram-a3-a4, allwinner,sun4i-a10-sram-a3-a4
-    - allwinner,sun5i-a13-sram-c1, allwinner,sun4i-a10-sram-c1
-    - allwinner,sun5i-a13-sram-d, allwinner,sun4i-a10-sram-d
-
-The valid sections compatible for A20 are:
-    - allwinner,sun7i-a20-sram-a3-a4, allwinner,sun4i-a10-sram-a3-a4
-    - allwinner,sun7i-a20-sram-c1, allwinner,sun4i-a10-sram-c1
-    - allwinner,sun7i-a20-sram-d, allwinner,sun4i-a10-sram-d
-
-The valid sections compatible for A23/A33 are:
-    - allwinner,sun8i-a23-sram-c1, allwinner,sun4i-a10-sram-c1
-
-The valid sections compatible for H3 are:
-    - allwinner,sun8i-h3-sram-c1, allwinner,sun4i-a10-sram-c1
-
-The valid sections compatible for A64 are:
-    - allwinner,sun50i-a64-sram-c
-    - allwinner,sun50i-a64-sram-c1, allwinner,sun4i-a10-sram-c1
-
-The valid sections compatible for H5 are:
-    - allwinner,sun50i-h5-sram-c1, allwinner,sun4i-a10-sram-c1
-
-The valid sections compatible for H6 are:
-    - allwinner,sun50i-h6-sram-c, allwinner,sun50i-a64-sram-c
-    - allwinner,sun50i-h6-sram-c1, allwinner,sun4i-a10-sram-c1
-
-The valid sections compatible for F1C100s are:
-    - allwinner,suniv-f1c100s-sram-d, allwinner,sun4i-a10-sram-d
-
-Devices using SRAM sections
----------------------------
-
-Some devices need to request to the SRAM controller to map an SRAM for
-their exclusive use.
-
-The relationship between such a device and an SRAM section is
-expressed through the allwinner,sram property, that will take a
-phandle and an argument.
-
-This valid values for this argument are:
-  - 0: CPU
-  - 1: Device
-
-Example
--------
-system-control@1c00000 {
-	compatible = "allwinner,sun4i-a10-system-control";
-	reg = <0x01c00000 0x30>;
-	#address-cells = <1>;
-	#size-cells = <1>;
-	ranges;
-
-	sram_a: sram@00000000 {
-		compatible = "mmio-sram";
-		reg = <0x00000000 0xc000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0 0x00000000 0xc000>;
-
-		emac_sram: sram-section@8000 {
-			compatible = "allwinner,sun4i-a10-sram-a3-a4";
-			reg = <0x8000 0x4000>;
-		};
-	};
-};
-
-emac: ethernet@1c0b000 {
-	compatible = "allwinner,sun4i-a10-emac";
-	...
-
-	allwinner,sram = <&emac_sram 1>;
-};
-- 
2.23.0


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

* Re: [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections
  2019-12-09  9:34 [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Maxime Ripard
                   ` (2 preceding siblings ...)
  2019-12-09  9:34 ` [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema Maxime Ripard
@ 2019-12-18  1:39 ` Rob Herring
  3 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-18  1:39 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Frank Rowand, Chen-Yu Tsai, Maxime Ripard,
	devicetree, linux-arm-kernel, krzk, Maxime Ripard

On Mon,  9 Dec 2019 10:34:38 +0100, Maxime Ripard wrote:
> The generic SRAM binding currently only allows for child nodes of an SRAM
> to be called sram too. However, these are also called sections in a number
> of device tree, which seems a bit more accurate.
> 
> Let's change the name pattern to allow both.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  Documentation/devicetree/bindings/sram/sram.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks.

Rob

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

* Re: [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles
  2019-12-09  9:34 ` [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles Maxime Ripard
@ 2019-12-18  1:42   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-18  1:42 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Frank Rowand, Chen-Yu Tsai, Maxime Ripard,
	devicetree, linux-arm-kernel, krzk, Maxime Ripard

On Mon,  9 Dec 2019 10:34:39 +0100, Maxime Ripard wrote:
> Even though the generic mmio-sram binding has a list of the sections
> compatible allowed, most device trees have more specific compatibles
> attached to those generic ones.
> 
> This creates warnings at the moment, and we don't really want to cripple
> the generic binding with all the vendor specific combinations that would
> prove to be hard to maintain.
> 
> Let's allow additional compatibles for the sections, and then we can have
> the vendor-specific bindings to reduce the scope of what's allowed exactly.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../devicetree/bindings/sram/sram.yaml        | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 

Applied, thanks.

Rob

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

* Re: [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles
  2019-12-09  9:34 ` [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles Maxime Ripard
@ 2019-12-18  1:42   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-18  1:42 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Frank Rowand, Chen-Yu Tsai, Maxime Ripard,
	devicetree, linux-arm-kernel, krzk, Maxime Ripard

On Mon,  9 Dec 2019 10:34:40 +0100, Maxime Ripard wrote:
> The mmio-sram binding was added missing a few SRAM sections compatible for
> allwinner SoCs. Let's add them.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  Documentation/devicetree/bindings/sram/sram.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Applied, thanks.

Rob

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

* Re: [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema
  2019-12-09  9:34 ` [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema Maxime Ripard
@ 2019-12-18  1:43   ` Rob Herring
  2019-12-18  1:50   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-18  1:43 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Frank Rowand, Chen-Yu Tsai, Maxime Ripard,
	devicetree, linux-arm-kernel, krzk, Maxime Ripard

On Mon,  9 Dec 2019 10:34:41 +0100, Maxime Ripard wrote:
> The older Allwinner SoCs have a system controller that is supported in
> Linux, with a matching Device Tree binding.
> 
> Now that we have the DT validation in place, let's convert the device tree
> bindings for that controller over to a YAML schemas.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../allwinner,sun4i-a10-system-control.yaml   | 140 ++++++++++++++++++
>  .../devicetree/bindings/sram/sunxi-sram.txt   | 113 --------------
>  2 files changed, 140 insertions(+), 113 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
>  delete mode 100644 Documentation/devicetree/bindings/sram/sunxi-sram.txt
> 

Applied, thanks.

Rob

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

* Re: [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema
  2019-12-09  9:34 ` [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema Maxime Ripard
  2019-12-18  1:43   ` Rob Herring
@ 2019-12-18  1:50   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-18  1:50 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Frank Rowand, Chen-Yu Tsai, Maxime Ripard,
	devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Krzysztof Kozlowski

On Mon, Dec 9, 2019 at 3:34 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> The older Allwinner SoCs have a system controller that is supported in
> Linux, with a matching Device Tree binding.
>
> Now that we have the DT validation in place, let's convert the device tree
> bindings for that controller over to a YAML schemas.
>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../allwinner,sun4i-a10-system-control.yaml   | 140 ++++++++++++++++++
>  .../devicetree/bindings/sram/sunxi-sram.txt   | 113 --------------
>  2 files changed, 140 insertions(+), 113 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
>  delete mode 100644 Documentation/devicetree/bindings/sram/sunxi-sram.txt
>
> diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
> new file mode 100644
> index 000000000000..3a368fbdff58
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
> @@ -0,0 +1,140 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Allwinner A10 System Control Device Tree Bindings
> +
> +maintainers:
> +  - Chen-Yu Tsai <wens@csie.org>
> +  - Maxime Ripard <mripard@kernel.org>
> +
> +description:
> +  The SRAM controller found on most Allwinner devices is represented
> +  by a regular node for the SRAM controller itself, with sub-nodes
> +  representing the SRAM handled by the SRAM controller.
> +
> +properties:
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  compatible:
> +    oneOf:
> +      - const: allwinner,sun4i-a10-sram-controller
> +        deprecated: true
> +      - const: allwinner,sun4i-a10-system-control
> +      - const: allwinner,sun5i-a13-system-control
> +      - items:
> +        - const: allwinner,sun7i-a20-system-control
> +        - const: allwinner,sun4i-a10-system-control
> +      - const: allwinner,sun8i-a23-system-control
> +      - const: allwinner,sun8i-h3-system-control
> +      - const: allwinner,sun50i-a64-sram-controller
> +        deprecated: true
> +      - const: allwinner,sun50i-a64-system-control
> +      - const: allwinner,sun50i-h5-system-control
> +      - items:
> +        - const: allwinner,sun50i-h6-system-control
> +        - const: allwinner,sun50i-a64-system-control
> +      - items:
> +        - const: allwinner,suniv-f1c100s-system-control
> +        - const: allwinner,sun4i-a10-system-control
> +
> +  reg:
> +    maxItems: 1
> +
> +  ranges: true
> +
> +patternProperties:
> +  "^sram@[a-z0-9]+":
> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: mmio-sram
> +
> +    patternProperties:
> +      "^sram-section?@[a-f0-9]+$":
> +        type: object
> +
> +        compatible:

This should be under 'properties'. I fixed it up.

I think this should have triggered an error before, but I reworked the
meta-schema a bit today as there were several cases where we weren't
descending levels correctly.

Rob

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

end of thread, other threads:[~2019-12-18  1:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09  9:34 [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Maxime Ripard
2019-12-09  9:34 ` [PATCH 2/4] dt-bindings: sram: Allow for more specific compatibles Maxime Ripard
2019-12-18  1:42   ` Rob Herring
2019-12-09  9:34 ` [PATCH 3/4] dt-bindings: sram: Add Allwinner SRAM compatibles Maxime Ripard
2019-12-18  1:42   ` Rob Herring
2019-12-09  9:34 ` [PATCH 4/4] dt-bindings: sram: Convert Allwinner A10 system controller to a schema Maxime Ripard
2019-12-18  1:43   ` Rob Herring
2019-12-18  1:50   ` Rob Herring
2019-12-18  1:39 ` [PATCH 1/4] dt-bindings: sram: Allow for the childs nodes to be called sections Rob Herring

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