devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema
@ 2019-12-09  9:35 Maxime Ripard
  2019-12-09  9:35 ` [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB " Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:35 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

The newer Allwinner SoCs have a DE2 clocks 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>
---
 .../clock/allwinner,sun8i-a83t-de2-clk.yaml   | 76 +++++++++++++++++++
 .../devicetree/bindings/clock/sun8i-de2.txt   | 34 ---------
 2 files changed, 76 insertions(+), 34 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/sun8i-de2.txt

diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
new file mode 100644
index 000000000000..3f995d2b30eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/allwinner,sun8i-a83t-de2-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A83t Display Engine 2/3 Clock Controller Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <mripard@kernel.org>
+
+properties:
+  "#clock-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  compatible:
+    oneOf:
+      - const: allwinner,sun8i-a83t-de2-clk
+      - const: allwinner,sun8i-h3-de2-clk
+      - const: allwinner,sun8i-v3s-de2-clk
+      - const: allwinner,sun50i-a64-de2-clk
+      - const: allwinner,sun50i-h5-de2-clk
+      - const: allwinner,sun50i-h6-de2-clk
+      - items:
+          - const: allwinner,sun8i-r40-de2-clk
+          - const: allwinner,sun8i-h3-de2-clk
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: Module Clock
+
+  clock-names:
+    items:
+      - const: bus
+      - const: mod
+
+  resets:
+    maxItems: 1
+
+required:
+  - "#clock-cells"
+  - "#reset-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/sun8i-h3-ccu.h>
+    #include <dt-bindings/reset/sun8i-h3-ccu.h>
+
+    de2_clocks: clock@1000000 {
+        compatible = "allwinner,sun8i-h3-de2-clk";
+        reg = <0x01000000 0x100000>;
+        clocks = <&ccu CLK_BUS_DE>,
+                 <&ccu CLK_DE>;
+        clock-names = "bus",
+                      "mod";
+        resets = <&ccu RST_BUS_DE>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/clock/sun8i-de2.txt b/Documentation/devicetree/bindings/clock/sun8i-de2.txt
deleted file mode 100644
index 41a52c2acffd..000000000000
--- a/Documentation/devicetree/bindings/clock/sun8i-de2.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Allwinner Display Engine 2.0/3.0 Clock Control Binding
-------------------------------------------------------
-
-Required properties :
-- compatible: must contain one of the following compatibles:
-		- "allwinner,sun8i-a83t-de2-clk"
-		- "allwinner,sun8i-h3-de2-clk"
-		- "allwinner,sun8i-v3s-de2-clk"
-		- "allwinner,sun50i-a64-de2-clk"
-		- "allwinner,sun50i-h5-de2-clk"
-		- "allwinner,sun50i-h6-de3-clk"
-
-- reg: Must contain the registers base address and length
-- clocks: phandle to the clocks feeding the display engine subsystem.
-	  Three are needed:
-  - "mod": the display engine module clock (on A83T it's the DE PLL)
-  - "bus": the bus clock for the whole display engine subsystem
-- clock-names: Must contain the clock names described just above
-- resets: phandle to the reset control for the display engine subsystem.
-- #clock-cells : must contain 1
-- #reset-cells : must contain 1
-
-Example:
-de2_clocks: clock@1000000 {
-	compatible = "allwinner,sun8i-h3-de2-clk";
-	reg = <0x01000000 0x100000>;
-	clocks = <&ccu CLK_BUS_DE>,
-		 <&ccu CLK_DE>;
-	clock-names = "bus",
-		      "mod";
-	resets = <&ccu RST_BUS_DE>;
-	#clock-cells = <1>;
-	#reset-cells = <1>;
-};
-- 
2.23.0


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

* [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB clocks to a schema
  2019-12-09  9:35 [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema Maxime Ripard
@ 2019-12-09  9:35 ` Maxime Ripard
  2019-12-12 22:12   ` Stephen Boyd
  2019-12-09  9:35 ` [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE " Maxime Ripard
  2019-12-12 22:12 ` [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 " Stephen Boyd
  2 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:35 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

The Allwinner A80 SoC has a USB clocks 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>
---
 .../clock/allwinner,sun9i-a80-usb-clocks.yaml | 59 +++++++++++++++++++
 .../devicetree/bindings/clock/sun9i-usb.txt   | 24 --------
 2 files changed, 59 insertions(+), 24 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/sun9i-usb.txt

diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
new file mode 100644
index 000000000000..fa0ee03a527f
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/allwinner,sun9i-a80-usb-clocks.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A80 USB Clock Controller Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <mripard@kernel.org>
+
+properties:
+  "#clock-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  compatible:
+    const: allwinner,sun9i-a80-usb-clocks
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: High Frequency Oscillator
+
+  clock-names:
+    items:
+      - const: bus
+      - const: hosc
+
+required:
+  - "#clock-cells"
+  - "#reset-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/sun9i-a80-ccu.h>
+
+    usb_clocks: clock@a08000 {
+        compatible = "allwinner,sun9i-a80-usb-clks";
+        reg = <0x00a08000 0x8>;
+        clocks = <&ccu CLK_BUS_USB>, <&osc24M>;
+        clock-names = "bus", "hosc";
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/clock/sun9i-usb.txt b/Documentation/devicetree/bindings/clock/sun9i-usb.txt
deleted file mode 100644
index 3564bd4f2a20..000000000000
--- a/Documentation/devicetree/bindings/clock/sun9i-usb.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Allwinner A80 USB Clock Control Binding
----------------------------------------
-
-Required properties :
-- compatible: must contain one of the following compatibles:
-		- "allwinner,sun9i-a80-usb-clocks"
-
-- reg: Must contain the registers base address and length
-- clocks: phandle to the clocks feeding the USB subsystem. Two are needed:
-  - "bus": the bus clock for the whole USB subsystem
-  - "hosc": the high frequency oscillator (usually at 24MHz)
-- clock-names: Must contain the clock names described just above
-- #clock-cells : must contain 1
-- #reset-cells : must contain 1
-
-Example:
-usb_clocks: clock@a08000 {
-	compatible = "allwinner,sun9i-a80-usb-clks";
-	reg = <0x00a08000 0x8>;
-	clocks = <&ccu CLK_BUS_USB>, <&osc24M>;
-	clock-names = "bus", "hosc";
-	#clock-cells = <1>;
-	#reset-cells = <1>;
-};
-- 
2.23.0


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

* [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE clocks to a schema
  2019-12-09  9:35 [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema Maxime Ripard
  2019-12-09  9:35 ` [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB " Maxime Ripard
@ 2019-12-09  9:35 ` Maxime Ripard
  2019-12-12 22:12   ` Stephen Boyd
  2019-12-16 17:08   ` Maxime Ripard
  2019-12-12 22:12 ` [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 " Stephen Boyd
  2 siblings, 2 replies; 7+ messages in thread
From: Maxime Ripard @ 2019-12-09  9:35 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

The Allwinner A80 SoC has a display clocks 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>
---
 .../clock/allwinner,sun9i-a80-de-clks.yaml    | 67 +++++++++++++++++++
 .../devicetree/bindings/clock/sun9i-de.txt    | 28 --------
 2 files changed, 67 insertions(+), 28 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-de-clks.yaml
 delete mode 100644 Documentation/devicetree/bindings/clock/sun9i-de.txt

diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-de-clks.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-de-clks.yaml
new file mode 100644
index 000000000000..a82c7c7e942b
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-de-clks.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: GPL-2.0+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/allwinner,sun9i-a80-de-clks.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A80 Display Engine Clock Controller Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <mripard@kernel.org>
+
+properties:
+  "#clock-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  compatible:
+    const: allwinner,sun9i-a80-de-clks
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: RAM Bus Clock
+      - description: Module Clock
+
+  clock-names:
+    items:
+      - const: mod
+      - const: dram
+      - const: bus
+
+  resets:
+    maxItems: 1
+
+required:
+  - "#clock-cells"
+  - "#reset-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/sun9i-a80-ccu.h>
+    #include <dt-bindings/reset/sun9i-a80-ccu.h>
+
+    de_clocks: clock@3000000 {
+        compatible = "allwinner,sun9i-a80-de-clks";
+        reg = <0x03000000 0x30>;
+        clocks = <&ccu CLK_DE>, <&ccu CLK_SDRAM>, <&ccu CLK_BUS_DE>;
+        clock-names = "mod", "dram", "bus";
+        resets = <&ccu RST_BUS_DE>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/clock/sun9i-de.txt b/Documentation/devicetree/bindings/clock/sun9i-de.txt
deleted file mode 100644
index fb18f327b97a..000000000000
--- a/Documentation/devicetree/bindings/clock/sun9i-de.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Allwinner A80 Display Engine Clock Control Binding
---------------------------------------------------
-
-Required properties :
-- compatible: must contain one of the following compatibles:
-		- "allwinner,sun9i-a80-de-clks"
-
-- reg: Must contain the registers base address and length
-- clocks: phandle to the clocks feeding the display engine subsystem.
-	  Three are needed:
-  - "mod": the display engine module clock
-  - "dram": the DRAM bus clock for the system
-  - "bus": the bus clock for the whole display engine subsystem
-- clock-names: Must contain the clock names described just above
-- resets: phandle to the reset control for the display engine subsystem.
-- #clock-cells : must contain 1
-- #reset-cells : must contain 1
-
-Example:
-de_clocks: clock@3000000 {
-	compatible = "allwinner,sun9i-a80-de-clks";
-	reg = <0x03000000 0x30>;
-	clocks = <&ccu CLK_DE>, <&ccu CLK_SDRAM>, <&ccu CLK_BUS_DE>;
-	clock-names = "mod", "dram", "bus";
-	resets = <&ccu RST_BUS_DE>;
-	#clock-cells = <1>;
-	#reset-cells = <1>;
-};
-- 
2.23.0


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

* Re: [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema
  2019-12-09  9:35 [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema Maxime Ripard
  2019-12-09  9:35 ` [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB " Maxime Ripard
  2019-12-09  9:35 ` [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE " Maxime Ripard
@ 2019-12-12 22:12 ` Stephen Boyd
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2019-12-12 22:12 UTC (permalink / raw)
  To: Frank Rowand, Mark Rutland, Maxime Ripard, Rob Herring
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

Quoting Maxime Ripard (2019-12-09 01:35:56)
> The newer Allwinner SoCs have a DE2 clocks 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>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>


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

* Re: [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB clocks to a schema
  2019-12-09  9:35 ` [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB " Maxime Ripard
@ 2019-12-12 22:12   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2019-12-12 22:12 UTC (permalink / raw)
  To: Frank Rowand, Mark Rutland, Maxime Ripard, Rob Herring
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

Quoting Maxime Ripard (2019-12-09 01:35:57)
> The Allwinner A80 SoC has a USB clocks 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>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>


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

* Re: [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE clocks to a schema
  2019-12-09  9:35 ` [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE " Maxime Ripard
@ 2019-12-12 22:12   ` Stephen Boyd
  2019-12-16 17:08   ` Maxime Ripard
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2019-12-12 22:12 UTC (permalink / raw)
  To: Frank Rowand, Mark Rutland, Maxime Ripard, Rob Herring
  Cc: Chen-Yu Tsai, Maxime Ripard, devicetree, linux-arm-kernel,
	Mike Turquette, Stephen Boyd, linux-clk, Maxime Ripard

Quoting Maxime Ripard (2019-12-09 01:35:58)
> The Allwinner A80 SoC has a display clocks 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>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>


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

* Re: [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE clocks to a schema
  2019-12-09  9:35 ` [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE " Maxime Ripard
  2019-12-12 22:12   ` Stephen Boyd
@ 2019-12-16 17:08   ` Maxime Ripard
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2019-12-16 17:08 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Frank Rowand
  Cc: Chen-Yu Tsai, devicetree, linux-arm-kernel, Mike Turquette,
	Stephen Boyd, linux-clk

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

On Mon, Dec 09, 2019 at 10:35:58AM +0100, Maxime Ripard wrote:
> The Allwinner A80 SoC has a display clocks 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>

Applied all three.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2019-12-16 17:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09  9:35 [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema Maxime Ripard
2019-12-09  9:35 ` [PATCH 2/3] dt-bindings: clocks: Convert Allwinner A80 USB " Maxime Ripard
2019-12-12 22:12   ` Stephen Boyd
2019-12-09  9:35 ` [PATCH 3/3] dt-bindings: clocks: Convert Allwinner A80 DE " Maxime Ripard
2019-12-12 22:12   ` Stephen Boyd
2019-12-16 17:08   ` Maxime Ripard
2019-12-12 22:12 ` [PATCH 1/3] dt-bindings: clocks: Convert Allwinner DE2 " Stephen Boyd

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