All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings
@ 2023-07-05 11:41 ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Batch conversion of the following bindings:
- amlogic,gxbb-clkc.txt
- amlogic,gxbb-aoclkc.txt

And in addition document the System Control registers top node.

DT fixups will be posted once those conversion are fully reviewed.

With this serie, the in-review and applied bindings documentation, the
the following arm64 compatible are yet to be documented in dt-schema:
 ['amlogic,axg-audio-clkc']
 ['amlogic,g12a-audio-clkc']
 ['amlogic,sm1-audio-clkc']
 ['amlogic,g12a-tohdmitx']
 ['amlogic,sm1-tohdmitx', 'amlogic,g12a-tohdmitx']
 ['everest,es7154']
 ['everest,es7241']
 ['ti,tas5707']
 ['linux,spdif-dir']
 ['gpio-fan']
 ['pwm-fan']

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- rebased on next-20230705
- dropped applied patches
- dropped example in clk bindings
- fixed clk bindings
- fixed sysctrl bindings and moved patch to the end
- Link to v1: https://lore.kernel.org/r/20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org

---
Neil Armstrong (3):
      dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
      dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
      dt-bindings: soc: amlogic: document System Control registers

 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 ---------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++
 .../bindings/clock/amlogic,gxbb-clkc.txt           |  53 -------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          |  37 +++++
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 5 files changed, 298 insertions(+), 117 deletions(-)
---
base-commit: e1f6a8eaf1c271a0158114a03e3605f4fba059ad
change-id: 20230209-b4-amlogic-bindings-convert-take2-e2caf8e1c13f

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


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

* [PATCH v2 0/3] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings
@ 2023-07-05 11:41 ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Batch conversion of the following bindings:
- amlogic,gxbb-clkc.txt
- amlogic,gxbb-aoclkc.txt

And in addition document the System Control registers top node.

DT fixups will be posted once those conversion are fully reviewed.

With this serie, the in-review and applied bindings documentation, the
the following arm64 compatible are yet to be documented in dt-schema:
 ['amlogic,axg-audio-clkc']
 ['amlogic,g12a-audio-clkc']
 ['amlogic,sm1-audio-clkc']
 ['amlogic,g12a-tohdmitx']
 ['amlogic,sm1-tohdmitx', 'amlogic,g12a-tohdmitx']
 ['everest,es7154']
 ['everest,es7241']
 ['ti,tas5707']
 ['linux,spdif-dir']
 ['gpio-fan']
 ['pwm-fan']

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- rebased on next-20230705
- dropped applied patches
- dropped example in clk bindings
- fixed clk bindings
- fixed sysctrl bindings and moved patch to the end
- Link to v1: https://lore.kernel.org/r/20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org

---
Neil Armstrong (3):
      dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
      dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
      dt-bindings: soc: amlogic: document System Control registers

 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 ---------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++
 .../bindings/clock/amlogic,gxbb-clkc.txt           |  53 -------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          |  37 +++++
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 5 files changed, 298 insertions(+), 117 deletions(-)
---
base-commit: e1f6a8eaf1c271a0158114a03e3605f4fba059ad
change-id: 20230209-b4-amlogic-bindings-convert-take2-e2caf8e1c13f

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


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

* [PATCH v2 0/3] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings
@ 2023-07-05 11:41 ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Batch conversion of the following bindings:
- amlogic,gxbb-clkc.txt
- amlogic,gxbb-aoclkc.txt

And in addition document the System Control registers top node.

DT fixups will be posted once those conversion are fully reviewed.

With this serie, the in-review and applied bindings documentation, the
the following arm64 compatible are yet to be documented in dt-schema:
 ['amlogic,axg-audio-clkc']
 ['amlogic,g12a-audio-clkc']
 ['amlogic,sm1-audio-clkc']
 ['amlogic,g12a-tohdmitx']
 ['amlogic,sm1-tohdmitx', 'amlogic,g12a-tohdmitx']
 ['everest,es7154']
 ['everest,es7241']
 ['ti,tas5707']
 ['linux,spdif-dir']
 ['gpio-fan']
 ['pwm-fan']

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- rebased on next-20230705
- dropped applied patches
- dropped example in clk bindings
- fixed clk bindings
- fixed sysctrl bindings and moved patch to the end
- Link to v1: https://lore.kernel.org/r/20230209-b4-amlogic-bindings-convert-take2-v1-0-c4fe9049def9@linaro.org

---
Neil Armstrong (3):
      dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
      dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
      dt-bindings: soc: amlogic: document System Control registers

 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 ---------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++
 .../bindings/clock/amlogic,gxbb-clkc.txt           |  53 -------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          |  37 +++++
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 5 files changed, 298 insertions(+), 117 deletions(-)
---
base-commit: e1f6a8eaf1c271a0158114a03e3605f4fba059ad
change-id: 20230209-b4-amlogic-bindings-convert-take2-e2caf8e1c13f

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


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

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

* [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
  2023-07-05 11:41 ` Neil Armstrong
  (?)
@ 2023-07-05 11:41   ` Neil Armstrong
  -1 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
 2 files changed, 37 insertions(+), 53 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
deleted file mode 100644
index 7ccecd5c02c1..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-* Amlogic GXBB Clock and Reset Unit
-
-The Amlogic GXBB clock controller generates and supplies clock to various
-controllers within the SoC.
-
-Required Properties:
-
-- compatible: should be:
-		"amlogic,gxbb-clkc" for GXBB SoC,
-		"amlogic,gxl-clkc" for GXL and GXM SoC,
-		"amlogic,axg-clkc" for AXG SoC.
-		"amlogic,g12a-clkc" for G12A SoC.
-		"amlogic,g12b-clkc" for G12B SoC.
-		"amlogic,sm1-clkc" for SM1 SoC.
-- clocks : list of clock phandle, one for each entry clock-names.
-- clock-names : should contain the following:
-  * "xtal": the platform xtal
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-clkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "syscon", "simple-mfd, and "amlogic,meson-gx-hhi-sysctrl" or
-              "amlogic,meson-axg-hhi-sysctrl"
-- reg: base address and size of the HHI system control register space.
-
-Example: Clock controller node:
-
-sysctrl: system-controller@0 {
-	compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
-	reg = <0 0 0 0x400>;
-
-	clkc: clock-controller {
-		#clock-cells = <1>;
-		compatible = "amlogic,gxbb-clkc";
-		clocks = <&xtal>;
-		clock-names = "xtal";
-	};
-};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller:
-
-	uart_AO: serial@c81004c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0xc81004c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc CLKID_CLK81>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
new file mode 100644
index 000000000000..63246f1cb539
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    enum:
+      - amlogic,gxbb-clkc
+      - amlogic,gxl-clkc
+      - amlogic,axg-clkc
+      - amlogic,g12a-clkc
+      - amlogic,g12b-clkc
+      - amlogic,sm1-clkc
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xtal
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+additionalProperties: false

-- 
2.34.1


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

* [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
 2 files changed, 37 insertions(+), 53 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
deleted file mode 100644
index 7ccecd5c02c1..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-* Amlogic GXBB Clock and Reset Unit
-
-The Amlogic GXBB clock controller generates and supplies clock to various
-controllers within the SoC.
-
-Required Properties:
-
-- compatible: should be:
-		"amlogic,gxbb-clkc" for GXBB SoC,
-		"amlogic,gxl-clkc" for GXL and GXM SoC,
-		"amlogic,axg-clkc" for AXG SoC.
-		"amlogic,g12a-clkc" for G12A SoC.
-		"amlogic,g12b-clkc" for G12B SoC.
-		"amlogic,sm1-clkc" for SM1 SoC.
-- clocks : list of clock phandle, one for each entry clock-names.
-- clock-names : should contain the following:
-  * "xtal": the platform xtal
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-clkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "syscon", "simple-mfd, and "amlogic,meson-gx-hhi-sysctrl" or
-              "amlogic,meson-axg-hhi-sysctrl"
-- reg: base address and size of the HHI system control register space.
-
-Example: Clock controller node:
-
-sysctrl: system-controller@0 {
-	compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
-	reg = <0 0 0 0x400>;
-
-	clkc: clock-controller {
-		#clock-cells = <1>;
-		compatible = "amlogic,gxbb-clkc";
-		clocks = <&xtal>;
-		clock-names = "xtal";
-	};
-};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller:
-
-	uart_AO: serial@c81004c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0xc81004c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc CLKID_CLK81>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
new file mode 100644
index 000000000000..63246f1cb539
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    enum:
+      - amlogic,gxbb-clkc
+      - amlogic,gxl-clkc
+      - amlogic,axg-clkc
+      - amlogic,g12a-clkc
+      - amlogic,g12b-clkc
+      - amlogic,sm1-clkc
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xtal
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+additionalProperties: false

-- 
2.34.1


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

* [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
 .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
 2 files changed, 37 insertions(+), 53 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
deleted file mode 100644
index 7ccecd5c02c1..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-* Amlogic GXBB Clock and Reset Unit
-
-The Amlogic GXBB clock controller generates and supplies clock to various
-controllers within the SoC.
-
-Required Properties:
-
-- compatible: should be:
-		"amlogic,gxbb-clkc" for GXBB SoC,
-		"amlogic,gxl-clkc" for GXL and GXM SoC,
-		"amlogic,axg-clkc" for AXG SoC.
-		"amlogic,g12a-clkc" for G12A SoC.
-		"amlogic,g12b-clkc" for G12B SoC.
-		"amlogic,sm1-clkc" for SM1 SoC.
-- clocks : list of clock phandle, one for each entry clock-names.
-- clock-names : should contain the following:
-  * "xtal": the platform xtal
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-clkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "syscon", "simple-mfd, and "amlogic,meson-gx-hhi-sysctrl" or
-              "amlogic,meson-axg-hhi-sysctrl"
-- reg: base address and size of the HHI system control register space.
-
-Example: Clock controller node:
-
-sysctrl: system-controller@0 {
-	compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
-	reg = <0 0 0 0x400>;
-
-	clkc: clock-controller {
-		#clock-cells = <1>;
-		compatible = "amlogic,gxbb-clkc";
-		clocks = <&xtal>;
-		clock-names = "xtal";
-	};
-};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller:
-
-	uart_AO: serial@c81004c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0xc81004c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc CLKID_CLK81>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
new file mode 100644
index 000000000000..63246f1cb539
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    enum:
+      - amlogic,gxbb-clkc
+      - amlogic,gxl-clkc
+      - amlogic,axg-clkc
+      - amlogic,g12a-clkc
+      - amlogic,g12b-clkc
+      - amlogic,sm1-clkc
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xtal
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+additionalProperties: false

-- 
2.34.1


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

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

* [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
  2023-07-05 11:41 ` Neil Armstrong
  (?)
@ 2023-07-05 11:41   ` Neil Armstrong
  -1 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Always-On Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
 2 files changed, 101 insertions(+), 64 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
deleted file mode 100644
index c41f0be5d438..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-* Amlogic GXBB AO Clock and Reset Unit
-
-The Amlogic GXBB AO clock controller generates and supplies clock to various
-controllers within the Always-On part of the SoC.
-
-Required Properties:
-
-- compatible: value should be different for each SoC family as :
-	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
-	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
-	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
-	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
-	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
-	followed by the common "amlogic,meson-gx-aoclkc"
-- clocks: list of clock phandle, one for each entry clock-names.
-- clock-names: should contain the following:
-  * "xtal"     : the platform xtal
-  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
-  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
-  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
-  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-- #reset-cells: should be 1.
-
-Each reset is assigned an identifier and client nodes can use this identifier
-to specify the reset which they consume. All available resets are defined as
-preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
-- reg: base address and size of the AO system control register space.
-
-Example: AO Clock controller node:
-
-ao_sysctrl: sys-ctrl@0 {
-	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
-	reg =  <0x0 0x0 0x0 0x100>;
-
-	clkc_AO: clock-controller {
-		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-		clocks = <&xtal>, <&clkc CLKID_CLK81>;
-		clock-names = "xtal", "mpeg-clk";
-	};
-
-Example: UART controller node that consumes the clock and reset generated
-  by the clock controller:
-
-	uart_AO: serial@4c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0x4c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc_AO CLKID_AO_UART1>;
-		resets = <&clkc_AO RESET_AO_UART1>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
new file mode 100644
index 000000000000..0adcfbcf5c85
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Always-On Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,meson-gxbb-aoclkc
+              - amlogic,meson-gxl-aoclkc
+              - amlogic,meson-gxm-aoclkc
+              - amlogic,meson-axg-aoclkc
+          - const: amlogic,meson-gx-aoclkc
+      - enum:
+          - amlogic,meson-axg-aoclkc
+          - amlogic,meson-g12a-aoclkc
+
+  clocks:
+    minItems: 2
+    maxItems: 5
+
+  clock-names:
+    minItems: 2
+    maxItems: 5
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+  - '#reset-cells'
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxbb-aoclkc
+
+    then:
+      properties:
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+            - const: ext-32k-1
+            - const: ext-32k-2
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-g12a-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxl-aoclkc
+            - amlogic,meson-gxm-aoclkc
+            - amlogic,meson-axg-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+
+        clock-names:
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+
+additionalProperties: false

-- 
2.34.1


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

* [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Always-On Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
 2 files changed, 101 insertions(+), 64 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
deleted file mode 100644
index c41f0be5d438..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-* Amlogic GXBB AO Clock and Reset Unit
-
-The Amlogic GXBB AO clock controller generates and supplies clock to various
-controllers within the Always-On part of the SoC.
-
-Required Properties:
-
-- compatible: value should be different for each SoC family as :
-	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
-	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
-	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
-	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
-	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
-	followed by the common "amlogic,meson-gx-aoclkc"
-- clocks: list of clock phandle, one for each entry clock-names.
-- clock-names: should contain the following:
-  * "xtal"     : the platform xtal
-  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
-  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
-  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
-  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-- #reset-cells: should be 1.
-
-Each reset is assigned an identifier and client nodes can use this identifier
-to specify the reset which they consume. All available resets are defined as
-preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
-- reg: base address and size of the AO system control register space.
-
-Example: AO Clock controller node:
-
-ao_sysctrl: sys-ctrl@0 {
-	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
-	reg =  <0x0 0x0 0x0 0x100>;
-
-	clkc_AO: clock-controller {
-		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-		clocks = <&xtal>, <&clkc CLKID_CLK81>;
-		clock-names = "xtal", "mpeg-clk";
-	};
-
-Example: UART controller node that consumes the clock and reset generated
-  by the clock controller:
-
-	uart_AO: serial@4c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0x4c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc_AO CLKID_AO_UART1>;
-		resets = <&clkc_AO RESET_AO_UART1>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
new file mode 100644
index 000000000000..0adcfbcf5c85
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Always-On Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,meson-gxbb-aoclkc
+              - amlogic,meson-gxl-aoclkc
+              - amlogic,meson-gxm-aoclkc
+              - amlogic,meson-axg-aoclkc
+          - const: amlogic,meson-gx-aoclkc
+      - enum:
+          - amlogic,meson-axg-aoclkc
+          - amlogic,meson-g12a-aoclkc
+
+  clocks:
+    minItems: 2
+    maxItems: 5
+
+  clock-names:
+    minItems: 2
+    maxItems: 5
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+  - '#reset-cells'
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxbb-aoclkc
+
+    then:
+      properties:
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+            - const: ext-32k-1
+            - const: ext-32k-2
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-g12a-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxl-aoclkc
+            - amlogic,meson-gxm-aoclkc
+            - amlogic,meson-axg-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+
+        clock-names:
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+
+additionalProperties: false

-- 
2.34.1


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

* [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Convert the Amlogic Always-On Clock Controller bindings to dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
 .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
 2 files changed, 101 insertions(+), 64 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
deleted file mode 100644
index c41f0be5d438..000000000000
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-* Amlogic GXBB AO Clock and Reset Unit
-
-The Amlogic GXBB AO clock controller generates and supplies clock to various
-controllers within the Always-On part of the SoC.
-
-Required Properties:
-
-- compatible: value should be different for each SoC family as :
-	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
-	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
-	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
-	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
-	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
-	followed by the common "amlogic,meson-gx-aoclkc"
-- clocks: list of clock phandle, one for each entry clock-names.
-- clock-names: should contain the following:
-  * "xtal"     : the platform xtal
-  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
-  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
-  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
-  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-- #reset-cells: should be 1.
-
-Each reset is assigned an identifier and client nodes can use this identifier
-to specify the reset which they consume. All available resets are defined as
-preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
-- reg: base address and size of the AO system control register space.
-
-Example: AO Clock controller node:
-
-ao_sysctrl: sys-ctrl@0 {
-	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
-	reg =  <0x0 0x0 0x0 0x100>;
-
-	clkc_AO: clock-controller {
-		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
-		#clock-cells = <1>;
-		#reset-cells = <1>;
-		clocks = <&xtal>, <&clkc CLKID_CLK81>;
-		clock-names = "xtal", "mpeg-clk";
-	};
-
-Example: UART controller node that consumes the clock and reset generated
-  by the clock controller:
-
-	uart_AO: serial@4c0 {
-		compatible = "amlogic,meson-uart";
-		reg = <0x4c0 0x14>;
-		interrupts = <0 90 1>;
-		clocks = <&clkc_AO CLKID_AO_UART1>;
-		resets = <&clkc_AO RESET_AO_UART1>;
-	};
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
new file mode 100644
index 000000000000..0adcfbcf5c85
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Always-On Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,meson-gxbb-aoclkc
+              - amlogic,meson-gxl-aoclkc
+              - amlogic,meson-gxm-aoclkc
+              - amlogic,meson-axg-aoclkc
+          - const: amlogic,meson-gx-aoclkc
+      - enum:
+          - amlogic,meson-axg-aoclkc
+          - amlogic,meson-g12a-aoclkc
+
+  clocks:
+    minItems: 2
+    maxItems: 5
+
+  clock-names:
+    minItems: 2
+    maxItems: 5
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+  - '#reset-cells'
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxbb-aoclkc
+
+    then:
+      properties:
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+            - const: ext-32k-1
+            - const: ext-32k-2
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-g12a-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+
+        clock-names:
+          minItems: 2
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+            - const: ext-32k-0
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxl-aoclkc
+            - amlogic,meson-gxm-aoclkc
+            - amlogic,meson-axg-aoclkc
+
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+
+        clock-names:
+          items:
+            - const: xtal 
+            - const: mpeg-clk
+
+additionalProperties: false

-- 
2.34.1


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

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

* [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
  2023-07-05 11:41 ` Neil Armstrong
  (?)
@ 2023-07-05 11:41   ` Neil Armstrong
  -1 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Document the System Control registers regions found on all Amlogic
SoC families and it's clock, power, pinctrl and phy subnodes.

The regions has various independent registers tied to other
hardware devices, thus the syscon compatible.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
new file mode 100644
index 000000000000..16977e4e4357
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson System Control registers
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - amlogic,meson-gx-hhi-sysctrl
+          - amlogic,meson-gx-ao-sysctrl
+          - amlogic,meson-axg-hhi-sysctrl
+          - amlogic,meson-axg-ao-sysctrl
+      - const: simple-mfd
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml
+
+  pinctrl:
+    type: object
+
+  phy:
+    type: object
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-clkc.yaml#
+
+      required:
+        - power-controller
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-ao-sysctrl
+            - amlogic,meson-axg-ao-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml#
+
+        power-controller: false
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+    then:
+      properties:
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        phy:
+          oneOf:
+            - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
+            - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+
+required:
+  - compatible
+  - reg
+  - clock-controller
+
+additionalProperties: false
+
+examples:
+  - |
+    bus@c883c000 {
+        compatible = "simple-bus";
+        reg = <0xc883c000 0x2000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc883c000 0x2000>;
+
+        sysctrl: system-controller@0 {
+            compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x400>;
+
+            clock-controller {
+                compatible = "amlogic,gxbb-clkc";
+                #clock-cells = <1>;
+                clocks = <&xtal>;
+                clock-names = "xtal";
+            };
+
+            power-controller {
+                compatible = "amlogic,meson-gxbb-pwrc";
+                #power-domain-cells = <1>;
+                amlogic,ao-sysctrl = <&sysctrl_AO>;
+
+                resets = <&reset_viu>,
+                         <&reset_venc>,
+                         <&reset_vcbus>,
+                         <&reset_bt656>,
+                         <&reset_dvin>,
+                         <&reset_rdma>,
+                         <&reset_venci>,
+                         <&reset_vencp>,
+                         <&reset_vdac>,
+                         <&reset_vdi6>,
+                         <&reset_vencl>,
+                         <&reset_vid_lock>;
+                reset-names = "viu", "venc", "vcbus", "bt656", "dvin",
+                              "rdma", "venci", "vencp", "vdac", "vdi6",
+                              "vencl", "vid_lock";
+                clocks = <&clk_vpu>, <&clk_vapb>;
+                clock-names = "vpu", "vapb";
+            };
+        };
+    };
+
+    bus@c8100000 {
+        compatible = "simple-bus";
+        reg = <0xc8100000 0x100000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc8100000 0x100000>;
+
+        sysctrl_AO: system-controller@0 {
+            compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x100>;
+
+            clock-controller {
+                compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
+                #clock-cells = <1>;
+                #reset-cells = <1>;
+                clocks = <&xtal>, <&clk81>;
+                clock-names = "xtal", "mpeg-clk";
+            };
+        };
+    };

-- 
2.34.1


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

* [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Document the System Control registers regions found on all Amlogic
SoC families and it's clock, power, pinctrl and phy subnodes.

The regions has various independent registers tied to other
hardware devices, thus the syscon compatible.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
new file mode 100644
index 000000000000..16977e4e4357
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson System Control registers
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - amlogic,meson-gx-hhi-sysctrl
+          - amlogic,meson-gx-ao-sysctrl
+          - amlogic,meson-axg-hhi-sysctrl
+          - amlogic,meson-axg-ao-sysctrl
+      - const: simple-mfd
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml
+
+  pinctrl:
+    type: object
+
+  phy:
+    type: object
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-clkc.yaml#
+
+      required:
+        - power-controller
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-ao-sysctrl
+            - amlogic,meson-axg-ao-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml#
+
+        power-controller: false
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+    then:
+      properties:
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        phy:
+          oneOf:
+            - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
+            - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+
+required:
+  - compatible
+  - reg
+  - clock-controller
+
+additionalProperties: false
+
+examples:
+  - |
+    bus@c883c000 {
+        compatible = "simple-bus";
+        reg = <0xc883c000 0x2000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc883c000 0x2000>;
+
+        sysctrl: system-controller@0 {
+            compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x400>;
+
+            clock-controller {
+                compatible = "amlogic,gxbb-clkc";
+                #clock-cells = <1>;
+                clocks = <&xtal>;
+                clock-names = "xtal";
+            };
+
+            power-controller {
+                compatible = "amlogic,meson-gxbb-pwrc";
+                #power-domain-cells = <1>;
+                amlogic,ao-sysctrl = <&sysctrl_AO>;
+
+                resets = <&reset_viu>,
+                         <&reset_venc>,
+                         <&reset_vcbus>,
+                         <&reset_bt656>,
+                         <&reset_dvin>,
+                         <&reset_rdma>,
+                         <&reset_venci>,
+                         <&reset_vencp>,
+                         <&reset_vdac>,
+                         <&reset_vdi6>,
+                         <&reset_vencl>,
+                         <&reset_vid_lock>;
+                reset-names = "viu", "venc", "vcbus", "bt656", "dvin",
+                              "rdma", "venci", "vencp", "vdac", "vdi6",
+                              "vencl", "vid_lock";
+                clocks = <&clk_vpu>, <&clk_vapb>;
+                clock-names = "vpu", "vapb";
+            };
+        };
+    };
+
+    bus@c8100000 {
+        compatible = "simple-bus";
+        reg = <0xc8100000 0x100000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc8100000 0x100000>;
+
+        sysctrl_AO: system-controller@0 {
+            compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x100>;
+
+            clock-controller {
+                compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
+                #clock-cells = <1>;
+                #reset-cells = <1>;
+                clocks = <&xtal>, <&clk81>;
+                clock-names = "xtal", "mpeg-clk";
+            };
+        };
+    };

-- 
2.34.1


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

* [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
@ 2023-07-05 11:41   ` Neil Armstrong
  0 siblings, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2023-07-05 11:41 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, Neil Armstrong

Document the System Control registers regions found on all Amlogic
SoC families and it's clock, power, pinctrl and phy subnodes.

The regions has various independent registers tied to other
hardware devices, thus the syscon compatible.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
new file mode 100644
index 000000000000..16977e4e4357
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson System Control registers
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - amlogic,meson-gx-hhi-sysctrl
+          - amlogic,meson-gx-ao-sysctrl
+          - amlogic,meson-axg-hhi-sysctrl
+          - amlogic,meson-axg-ao-sysctrl
+      - const: simple-mfd
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml
+
+  pinctrl:
+    type: object
+
+  phy:
+    type: object
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-clkc.yaml#
+
+      required:
+        - power-controller
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-ao-sysctrl
+            - amlogic,meson-axg-ao-sysctrl
+    then:
+      properties:
+        clock-controller:
+          $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml#
+
+        power-controller: false
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gx-hhi-sysctrl
+    then:
+      properties:
+        phy: false
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-axg-hhi-sysctrl
+    then:
+      properties:
+        phy:
+          oneOf:
+            - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
+            - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+
+required:
+  - compatible
+  - reg
+  - clock-controller
+
+additionalProperties: false
+
+examples:
+  - |
+    bus@c883c000 {
+        compatible = "simple-bus";
+        reg = <0xc883c000 0x2000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc883c000 0x2000>;
+
+        sysctrl: system-controller@0 {
+            compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x400>;
+
+            clock-controller {
+                compatible = "amlogic,gxbb-clkc";
+                #clock-cells = <1>;
+                clocks = <&xtal>;
+                clock-names = "xtal";
+            };
+
+            power-controller {
+                compatible = "amlogic,meson-gxbb-pwrc";
+                #power-domain-cells = <1>;
+                amlogic,ao-sysctrl = <&sysctrl_AO>;
+
+                resets = <&reset_viu>,
+                         <&reset_venc>,
+                         <&reset_vcbus>,
+                         <&reset_bt656>,
+                         <&reset_dvin>,
+                         <&reset_rdma>,
+                         <&reset_venci>,
+                         <&reset_vencp>,
+                         <&reset_vdac>,
+                         <&reset_vdi6>,
+                         <&reset_vencl>,
+                         <&reset_vid_lock>;
+                reset-names = "viu", "venc", "vcbus", "bt656", "dvin",
+                              "rdma", "venci", "vencp", "vdac", "vdi6",
+                              "vencl", "vid_lock";
+                clocks = <&clk_vpu>, <&clk_vapb>;
+                clock-names = "vpu", "vapb";
+            };
+        };
+    };
+
+    bus@c8100000 {
+        compatible = "simple-bus";
+        reg = <0xc8100000 0x100000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0xc8100000 0x100000>;
+
+        sysctrl_AO: system-controller@0 {
+            compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
+            reg = <0 0x100>;
+
+            clock-controller {
+                compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
+                #clock-cells = <1>;
+                #reset-cells = <1>;
+                clocks = <&xtal>, <&clk81>;
+                clock-names = "xtal", "mpeg-clk";
+            };
+        };
+    };

-- 
2.34.1


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

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

* Re: [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
  2023-07-05 11:41   ` Neil Armstrong
  (?)
@ 2023-07-05 19:53     ` Rob Herring
  -1 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:53 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-kernel, Stephen Boyd, Martin Blumenstingl,
	Michael Turquette, linux-amlogic, devicetree, linux-clk,
	Krzysztof Kozlowski, Conor Dooley, Jerome Brunet, Rob Herring,
	linux-arm-kernel, Kevin Hilman


On Wed, 05 Jul 2023 13:41:51 +0200, Neil Armstrong wrote:
> Convert the Amlogic Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
>  .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
>  2 files changed, 37 insertions(+), 53 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
@ 2023-07-05 19:53     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:53 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-kernel, Stephen Boyd, Martin Blumenstingl,
	Michael Turquette, linux-amlogic, devicetree, linux-clk,
	Krzysztof Kozlowski, Conor Dooley, Jerome Brunet, Rob Herring,
	linux-arm-kernel, Kevin Hilman


On Wed, 05 Jul 2023 13:41:51 +0200, Neil Armstrong wrote:
> Convert the Amlogic Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
>  .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
>  2 files changed, 37 insertions(+), 53 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
@ 2023-07-05 19:53     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:53 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-kernel, Stephen Boyd, Martin Blumenstingl,
	Michael Turquette, linux-amlogic, devicetree, linux-clk,
	Krzysztof Kozlowski, Conor Dooley, Jerome Brunet, Rob Herring,
	linux-arm-kernel, Kevin Hilman


On Wed, 05 Jul 2023 13:41:51 +0200, Neil Armstrong wrote:
> Convert the Amlogic Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-clkc.txt           | 53 ----------------------
>  .../bindings/clock/amlogic,gxbb-clkc.yaml          | 37 +++++++++++++++
>  2 files changed, 37 insertions(+), 53 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
  2023-07-05 11:41   ` Neil Armstrong
  (?)
@ 2023-07-05 19:56     ` Rob Herring
  -1 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:56 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Michael Turquette, Stephen Boyd,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl, linux-amlogic, linux-clk, devicetree,
	linux-kernel, linux-arm-kernel

On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>  2 files changed, 101 insertions(+), 64 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> deleted file mode 100644
> index c41f0be5d438..000000000000
> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -* Amlogic GXBB AO Clock and Reset Unit
> -
> -The Amlogic GXBB AO clock controller generates and supplies clock to various
> -controllers within the Always-On part of the SoC.
> -
> -Required Properties:
> -
> -- compatible: value should be different for each SoC family as :
> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
> -	followed by the common "amlogic,meson-gx-aoclkc"
> -- clocks: list of clock phandle, one for each entry clock-names.
> -- clock-names: should contain the following:
> -  * "xtal"     : the platform xtal
> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
> -
> -- #clock-cells: should be 1.
> -
> -Each clock is assigned an identifier and client nodes can use this identifier
> -to specify the clock which they consume. All available clocks are defined as
> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -- #reset-cells: should be 1.
> -
> -Each reset is assigned an identifier and client nodes can use this identifier
> -to specify the reset which they consume. All available resets are defined as
> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -Parent node should have the following properties :
> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
> -- reg: base address and size of the AO system control register space.
> -
> -Example: AO Clock controller node:
> -
> -ao_sysctrl: sys-ctrl@0 {
> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
> -	reg =  <0x0 0x0 0x0 0x100>;
> -
> -	clkc_AO: clock-controller {
> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
> -		#clock-cells = <1>;
> -		#reset-cells = <1>;
> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
> -		clock-names = "xtal", "mpeg-clk";
> -	};
> -
> -Example: UART controller node that consumes the clock and reset generated
> -  by the clock controller:
> -
> -	uart_AO: serial@4c0 {
> -		compatible = "amlogic,meson-uart";
> -		reg = <0x4c0 0x14>;
> -		interrupts = <0 90 1>;
> -		clocks = <&clkc_AO CLKID_AO_UART1>;
> -		resets = <&clkc_AO RESET_AO_UART1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> new file mode 100644
> index 000000000000..0adcfbcf5c85
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Always-On Clock Controller
> +
> +maintainers:
> +  - Neil Armstrong <neil.armstrong@linaro.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,meson-gxbb-aoclkc
> +              - amlogic,meson-gxl-aoclkc
> +              - amlogic,meson-gxm-aoclkc
> +              - amlogic,meson-axg-aoclkc
> +          - const: amlogic,meson-gx-aoclkc
> +      - enum:
> +          - amlogic,meson-axg-aoclkc
> +          - amlogic,meson-g12a-aoclkc
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 5
> +
> +  clock-names:
> +    minItems: 2
> +    maxItems: 5
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +  - '#reset-cells'
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxbb-aoclkc
> +
> +    then:
> +      properties:
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0
> +            - const: ext-32k-1
> +            - const: ext-32k-2

As the names are always the same, move this to top-level and just set 
the length here (except the constraints are the same as top-level, so 
you can just drop this if/then).

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-g12a-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0

Just 'maxItems: 3'

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxl-aoclkc
> +            - amlogic,meson-gxm-aoclkc
> +            - amlogic,meson-axg-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 2
> +
> +        clock-names:
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk

maxItems: 2

> +
> +additionalProperties: false
> 
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-05 19:56     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:56 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Michael Turquette, Stephen Boyd,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl, linux-amlogic, linux-clk, devicetree,
	linux-kernel, linux-arm-kernel

On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>  2 files changed, 101 insertions(+), 64 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> deleted file mode 100644
> index c41f0be5d438..000000000000
> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -* Amlogic GXBB AO Clock and Reset Unit
> -
> -The Amlogic GXBB AO clock controller generates and supplies clock to various
> -controllers within the Always-On part of the SoC.
> -
> -Required Properties:
> -
> -- compatible: value should be different for each SoC family as :
> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
> -	followed by the common "amlogic,meson-gx-aoclkc"
> -- clocks: list of clock phandle, one for each entry clock-names.
> -- clock-names: should contain the following:
> -  * "xtal"     : the platform xtal
> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
> -
> -- #clock-cells: should be 1.
> -
> -Each clock is assigned an identifier and client nodes can use this identifier
> -to specify the clock which they consume. All available clocks are defined as
> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -- #reset-cells: should be 1.
> -
> -Each reset is assigned an identifier and client nodes can use this identifier
> -to specify the reset which they consume. All available resets are defined as
> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -Parent node should have the following properties :
> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
> -- reg: base address and size of the AO system control register space.
> -
> -Example: AO Clock controller node:
> -
> -ao_sysctrl: sys-ctrl@0 {
> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
> -	reg =  <0x0 0x0 0x0 0x100>;
> -
> -	clkc_AO: clock-controller {
> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
> -		#clock-cells = <1>;
> -		#reset-cells = <1>;
> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
> -		clock-names = "xtal", "mpeg-clk";
> -	};
> -
> -Example: UART controller node that consumes the clock and reset generated
> -  by the clock controller:
> -
> -	uart_AO: serial@4c0 {
> -		compatible = "amlogic,meson-uart";
> -		reg = <0x4c0 0x14>;
> -		interrupts = <0 90 1>;
> -		clocks = <&clkc_AO CLKID_AO_UART1>;
> -		resets = <&clkc_AO RESET_AO_UART1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> new file mode 100644
> index 000000000000..0adcfbcf5c85
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Always-On Clock Controller
> +
> +maintainers:
> +  - Neil Armstrong <neil.armstrong@linaro.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,meson-gxbb-aoclkc
> +              - amlogic,meson-gxl-aoclkc
> +              - amlogic,meson-gxm-aoclkc
> +              - amlogic,meson-axg-aoclkc
> +          - const: amlogic,meson-gx-aoclkc
> +      - enum:
> +          - amlogic,meson-axg-aoclkc
> +          - amlogic,meson-g12a-aoclkc
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 5
> +
> +  clock-names:
> +    minItems: 2
> +    maxItems: 5
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +  - '#reset-cells'
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxbb-aoclkc
> +
> +    then:
> +      properties:
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0
> +            - const: ext-32k-1
> +            - const: ext-32k-2

As the names are always the same, move this to top-level and just set 
the length here (except the constraints are the same as top-level, so 
you can just drop this if/then).

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-g12a-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0

Just 'maxItems: 3'

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxl-aoclkc
> +            - amlogic,meson-gxm-aoclkc
> +            - amlogic,meson-axg-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 2
> +
> +        clock-names:
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk

maxItems: 2

> +
> +additionalProperties: false
> 
> -- 
> 2.34.1
> 

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

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-05 19:56     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:56 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Michael Turquette, Stephen Boyd,
	Krzysztof Kozlowski, Conor Dooley, Kevin Hilman,
	Martin Blumenstingl, linux-amlogic, linux-clk, devicetree,
	linux-kernel, linux-arm-kernel

On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>  2 files changed, 101 insertions(+), 64 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> deleted file mode 100644
> index c41f0be5d438..000000000000
> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -* Amlogic GXBB AO Clock and Reset Unit
> -
> -The Amlogic GXBB AO clock controller generates and supplies clock to various
> -controllers within the Always-On part of the SoC.
> -
> -Required Properties:
> -
> -- compatible: value should be different for each SoC family as :
> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
> -	followed by the common "amlogic,meson-gx-aoclkc"
> -- clocks: list of clock phandle, one for each entry clock-names.
> -- clock-names: should contain the following:
> -  * "xtal"     : the platform xtal
> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
> -
> -- #clock-cells: should be 1.
> -
> -Each clock is assigned an identifier and client nodes can use this identifier
> -to specify the clock which they consume. All available clocks are defined as
> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -- #reset-cells: should be 1.
> -
> -Each reset is assigned an identifier and client nodes can use this identifier
> -to specify the reset which they consume. All available resets are defined as
> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
> -used in device tree sources.
> -
> -Parent node should have the following properties :
> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
> -- reg: base address and size of the AO system control register space.
> -
> -Example: AO Clock controller node:
> -
> -ao_sysctrl: sys-ctrl@0 {
> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
> -	reg =  <0x0 0x0 0x0 0x100>;
> -
> -	clkc_AO: clock-controller {
> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
> -		#clock-cells = <1>;
> -		#reset-cells = <1>;
> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
> -		clock-names = "xtal", "mpeg-clk";
> -	};
> -
> -Example: UART controller node that consumes the clock and reset generated
> -  by the clock controller:
> -
> -	uart_AO: serial@4c0 {
> -		compatible = "amlogic,meson-uart";
> -		reg = <0x4c0 0x14>;
> -		interrupts = <0 90 1>;
> -		clocks = <&clkc_AO CLKID_AO_UART1>;
> -		resets = <&clkc_AO RESET_AO_UART1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> new file mode 100644
> index 000000000000..0adcfbcf5c85
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Always-On Clock Controller
> +
> +maintainers:
> +  - Neil Armstrong <neil.armstrong@linaro.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,meson-gxbb-aoclkc
> +              - amlogic,meson-gxl-aoclkc
> +              - amlogic,meson-gxm-aoclkc
> +              - amlogic,meson-axg-aoclkc
> +          - const: amlogic,meson-gx-aoclkc
> +      - enum:
> +          - amlogic,meson-axg-aoclkc
> +          - amlogic,meson-g12a-aoclkc
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 5
> +
> +  clock-names:
> +    minItems: 2
> +    maxItems: 5
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +  - '#reset-cells'
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxbb-aoclkc
> +
> +    then:
> +      properties:
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0
> +            - const: ext-32k-1
> +            - const: ext-32k-2

As the names are always the same, move this to top-level and just set 
the length here (except the constraints are the same as top-level, so 
you can just drop this if/then).

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-g12a-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +
> +        clock-names:
> +          minItems: 2
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk
> +            - const: ext-32k-0

Just 'maxItems: 3'

> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - amlogic,meson-gxl-aoclkc
> +            - amlogic,meson-gxm-aoclkc
> +            - amlogic,meson-axg-aoclkc
> +
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 2
> +
> +        clock-names:
> +          items:
> +            - const: xtal 
> +            - const: mpeg-clk

maxItems: 2

> +
> +additionalProperties: false
> 
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
  2023-07-05 11:41   ` Neil Armstrong
  (?)
@ 2023-07-05 19:58     ` Rob Herring
  -1 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:58 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Conor Dooley, devicetree, Kevin Hilman,
	Michael Turquette, Krzysztof Kozlowski, Stephen Boyd,
	Martin Blumenstingl, Rob Herring, linux-arm-kernel, linux-clk,
	linux-kernel, linux-amlogic


On Wed, 05 Jul 2023 13:41:53 +0200, Neil Armstrong wrote:
> Document the System Control registers regions found on all Amlogic
> SoC families and it's clock, power, pinctrl and phy subnodes.
> 
> The regions has various independent registers tied to other
> hardware devices, thus the syscon compatible.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
>  1 file changed, 160 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
@ 2023-07-05 19:58     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:58 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Conor Dooley, devicetree, Kevin Hilman,
	Michael Turquette, Krzysztof Kozlowski, Stephen Boyd,
	Martin Blumenstingl, Rob Herring, linux-arm-kernel, linux-clk,
	linux-kernel, linux-amlogic


On Wed, 05 Jul 2023 13:41:53 +0200, Neil Armstrong wrote:
> Document the System Control registers regions found on all Amlogic
> SoC families and it's clock, power, pinctrl and phy subnodes.
> 
> The regions has various independent registers tied to other
> hardware devices, thus the syscon compatible.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
>  1 file changed, 160 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers
@ 2023-07-05 19:58     ` Rob Herring
  0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-07-05 19:58 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, Conor Dooley, devicetree, Kevin Hilman,
	Michael Turquette, Krzysztof Kozlowski, Stephen Boyd,
	Martin Blumenstingl, Rob Herring, linux-arm-kernel, linux-clk,
	linux-kernel, linux-amlogic


On Wed, 05 Jul 2023 13:41:53 +0200, Neil Armstrong wrote:
> Document the System Control registers regions found on all Amlogic
> SoC families and it's clock, power, pinctrl and phy subnodes.
> 
> The regions has various independent registers tied to other
> hardware devices, thus the syscon compatible.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml  | 160 +++++++++++++++++++++
>  1 file changed, 160 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
  2023-07-05 19:56     ` Rob Herring
  (?)
@ 2023-07-06  7:15       ` Jerome Brunet
  -1 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  7:15 UTC (permalink / raw)
  To: Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Wed 05 Jul 2023 at 13:56, Rob Herring <robh@kernel.org> wrote:

> On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
>> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
>> 
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>>  2 files changed, 101 insertions(+), 64 deletions(-)
>> 
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> deleted file mode 100644
>> index c41f0be5d438..000000000000
>> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> +++ /dev/null
>> @@ -1,64 +0,0 @@
>> -* Amlogic GXBB AO Clock and Reset Unit
>> -
>> -The Amlogic GXBB AO clock controller generates and supplies clock to various
>> -controllers within the Always-On part of the SoC.
>> -
>> -Required Properties:
>> -
>> -- compatible: value should be different for each SoC family as :
>> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
>> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
>> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
>> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
>> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
>> -	followed by the common "amlogic,meson-gx-aoclkc"
>> -- clocks: list of clock phandle, one for each entry clock-names.
>> -- clock-names: should contain the following:
>> -  * "xtal"     : the platform xtal
>> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
>> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
>> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
>> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
>> -
>> -- #clock-cells: should be 1.
>> -
>> -Each clock is assigned an identifier and client nodes can use this identifier
>> -to specify the clock which they consume. All available clocks are defined as
>> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -- #reset-cells: should be 1.
>> -
>> -Each reset is assigned an identifier and client nodes can use this identifier
>> -to specify the reset which they consume. All available resets are defined as
>> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -Parent node should have the following properties :
>> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
>> -- reg: base address and size of the AO system control register space.
>> -
>> -Example: AO Clock controller node:
>> -
>> -ao_sysctrl: sys-ctrl@0 {
>> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> -	reg =  <0x0 0x0 0x0 0x100>;
>> -
>> -	clkc_AO: clock-controller {
>> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
>> -		#clock-cells = <1>;
>> -		#reset-cells = <1>;
>> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
>> -		clock-names = "xtal", "mpeg-clk";
>> -	};
>> -
>> -Example: UART controller node that consumes the clock and reset generated
>> -  by the clock controller:
>> -
>> -	uart_AO: serial@4c0 {
>> -		compatible = "amlogic,meson-uart";
>> -		reg = <0x4c0 0x14>;
>> -		interrupts = <0 90 1>;
>> -		clocks = <&clkc_AO CLKID_AO_UART1>;
>> -		resets = <&clkc_AO RESET_AO_UART1>;
>> -	};
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> new file mode 100644
>> index 000000000000..0adcfbcf5c85
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> @@ -0,0 +1,101 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Amlogic Always-On Clock Controller
>> +
>> +maintainers:
>> +  - Neil Armstrong <neil.armstrong@linaro.org>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - enum:
>> +              - amlogic,meson-gxbb-aoclkc
>> +              - amlogic,meson-gxl-aoclkc
>> +              - amlogic,meson-gxm-aoclkc
>> +              - amlogic,meson-axg-aoclkc
>> +          - const: amlogic,meson-gx-aoclkc
>> +      - enum:
>> +          - amlogic,meson-axg-aoclkc
>> +          - amlogic,meson-g12a-aoclkc
>> +
>> +  clocks:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  clock-names:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - clock-names
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxbb-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>> +            - const: ext-32k-1
>> +            - const: ext-32k-2
>
> As the names are always the same, move this to top-level and just set 
> the length here (except the constraints are the same as top-level, so 
> you can just drop this if/then).

If this is done, aren't we losing information ?

For example, "ext-32k-1" would become valid with a g12a as long as the
number of clocks is alright, which it is not.

I'm not concerned by the automated verification, more the information
provided to the users, which we used to have in the txt format.

>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-g12a-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 3
>> +
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>
> Just 'maxItems: 3'
>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxl-aoclkc
>> +            - amlogic,meson-gxm-aoclkc
>> +            - amlogic,meson-axg-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 2
>> +
>> +        clock-names:
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>
> maxItems: 2
>
>> +
>> +additionalProperties: false
>> 
>> -- 
>> 2.34.1
>> 


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  7:15       ` Jerome Brunet
  0 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  7:15 UTC (permalink / raw)
  To: Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Wed 05 Jul 2023 at 13:56, Rob Herring <robh@kernel.org> wrote:

> On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
>> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
>> 
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>>  2 files changed, 101 insertions(+), 64 deletions(-)
>> 
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> deleted file mode 100644
>> index c41f0be5d438..000000000000
>> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> +++ /dev/null
>> @@ -1,64 +0,0 @@
>> -* Amlogic GXBB AO Clock and Reset Unit
>> -
>> -The Amlogic GXBB AO clock controller generates and supplies clock to various
>> -controllers within the Always-On part of the SoC.
>> -
>> -Required Properties:
>> -
>> -- compatible: value should be different for each SoC family as :
>> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
>> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
>> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
>> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
>> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
>> -	followed by the common "amlogic,meson-gx-aoclkc"
>> -- clocks: list of clock phandle, one for each entry clock-names.
>> -- clock-names: should contain the following:
>> -  * "xtal"     : the platform xtal
>> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
>> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
>> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
>> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
>> -
>> -- #clock-cells: should be 1.
>> -
>> -Each clock is assigned an identifier and client nodes can use this identifier
>> -to specify the clock which they consume. All available clocks are defined as
>> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -- #reset-cells: should be 1.
>> -
>> -Each reset is assigned an identifier and client nodes can use this identifier
>> -to specify the reset which they consume. All available resets are defined as
>> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -Parent node should have the following properties :
>> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
>> -- reg: base address and size of the AO system control register space.
>> -
>> -Example: AO Clock controller node:
>> -
>> -ao_sysctrl: sys-ctrl@0 {
>> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> -	reg =  <0x0 0x0 0x0 0x100>;
>> -
>> -	clkc_AO: clock-controller {
>> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
>> -		#clock-cells = <1>;
>> -		#reset-cells = <1>;
>> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
>> -		clock-names = "xtal", "mpeg-clk";
>> -	};
>> -
>> -Example: UART controller node that consumes the clock and reset generated
>> -  by the clock controller:
>> -
>> -	uart_AO: serial@4c0 {
>> -		compatible = "amlogic,meson-uart";
>> -		reg = <0x4c0 0x14>;
>> -		interrupts = <0 90 1>;
>> -		clocks = <&clkc_AO CLKID_AO_UART1>;
>> -		resets = <&clkc_AO RESET_AO_UART1>;
>> -	};
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> new file mode 100644
>> index 000000000000..0adcfbcf5c85
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> @@ -0,0 +1,101 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Amlogic Always-On Clock Controller
>> +
>> +maintainers:
>> +  - Neil Armstrong <neil.armstrong@linaro.org>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - enum:
>> +              - amlogic,meson-gxbb-aoclkc
>> +              - amlogic,meson-gxl-aoclkc
>> +              - amlogic,meson-gxm-aoclkc
>> +              - amlogic,meson-axg-aoclkc
>> +          - const: amlogic,meson-gx-aoclkc
>> +      - enum:
>> +          - amlogic,meson-axg-aoclkc
>> +          - amlogic,meson-g12a-aoclkc
>> +
>> +  clocks:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  clock-names:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - clock-names
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxbb-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>> +            - const: ext-32k-1
>> +            - const: ext-32k-2
>
> As the names are always the same, move this to top-level and just set 
> the length here (except the constraints are the same as top-level, so 
> you can just drop this if/then).

If this is done, aren't we losing information ?

For example, "ext-32k-1" would become valid with a g12a as long as the
number of clocks is alright, which it is not.

I'm not concerned by the automated verification, more the information
provided to the users, which we used to have in the txt format.

>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-g12a-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 3
>> +
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>
> Just 'maxItems: 3'
>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxl-aoclkc
>> +            - amlogic,meson-gxm-aoclkc
>> +            - amlogic,meson-axg-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 2
>> +
>> +        clock-names:
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>
> maxItems: 2
>
>> +
>> +additionalProperties: false
>> 
>> -- 
>> 2.34.1
>> 


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  7:15       ` Jerome Brunet
  0 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  7:15 UTC (permalink / raw)
  To: Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Wed 05 Jul 2023 at 13:56, Rob Herring <robh@kernel.org> wrote:

> On Wed, Jul 05, 2023 at 01:41:52PM +0200, Neil Armstrong wrote:
>> Convert the Amlogic Always-On Clock Controller bindings to dt-schema.
>> 
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>  .../bindings/clock/amlogic,gxbb-aoclkc.txt         |  64 -------------
>>  .../bindings/clock/amlogic,gxbb-aoclkc.yaml        | 101 +++++++++++++++++++++
>>  2 files changed, 101 insertions(+), 64 deletions(-)
>> 
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> deleted file mode 100644
>> index c41f0be5d438..000000000000
>> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
>> +++ /dev/null
>> @@ -1,64 +0,0 @@
>> -* Amlogic GXBB AO Clock and Reset Unit
>> -
>> -The Amlogic GXBB AO clock controller generates and supplies clock to various
>> -controllers within the Always-On part of the SoC.
>> -
>> -Required Properties:
>> -
>> -- compatible: value should be different for each SoC family as :
>> -	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
>> -	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
>> -	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
>> -	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
>> -	- G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc"
>> -	followed by the common "amlogic,meson-gx-aoclkc"
>> -- clocks: list of clock phandle, one for each entry clock-names.
>> -- clock-names: should contain the following:
>> -  * "xtal"     : the platform xtal
>> -  * "mpeg-clk" : the main clock controller mother clock (aka clk81)
>> -  * "ext-32k-0"  : external 32kHz reference #0 if any (optional)
>> -  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
>> -  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
>> -
>> -- #clock-cells: should be 1.
>> -
>> -Each clock is assigned an identifier and client nodes can use this identifier
>> -to specify the clock which they consume. All available clocks are defined as
>> -preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -- #reset-cells: should be 1.
>> -
>> -Each reset is assigned an identifier and client nodes can use this identifier
>> -to specify the reset which they consume. All available resets are defined as
>> -preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
>> -used in device tree sources.
>> -
>> -Parent node should have the following properties :
>> -- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
>> -- reg: base address and size of the AO system control register space.
>> -
>> -Example: AO Clock controller node:
>> -
>> -ao_sysctrl: sys-ctrl@0 {
>> -	compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
>> -	reg =  <0x0 0x0 0x0 0x100>;
>> -
>> -	clkc_AO: clock-controller {
>> -		compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
>> -		#clock-cells = <1>;
>> -		#reset-cells = <1>;
>> -		clocks = <&xtal>, <&clkc CLKID_CLK81>;
>> -		clock-names = "xtal", "mpeg-clk";
>> -	};
>> -
>> -Example: UART controller node that consumes the clock and reset generated
>> -  by the clock controller:
>> -
>> -	uart_AO: serial@4c0 {
>> -		compatible = "amlogic,meson-uart";
>> -		reg = <0x4c0 0x14>;
>> -		interrupts = <0 90 1>;
>> -		clocks = <&clkc_AO CLKID_AO_UART1>;
>> -		resets = <&clkc_AO RESET_AO_UART1>;
>> -	};
>> diff --git
>> a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> new file mode 100644
>> index 000000000000..0adcfbcf5c85
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.yaml
>> @@ -0,0 +1,101 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Amlogic Always-On Clock Controller
>> +
>> +maintainers:
>> +  - Neil Armstrong <neil.armstrong@linaro.org>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - enum:
>> +              - amlogic,meson-gxbb-aoclkc
>> +              - amlogic,meson-gxl-aoclkc
>> +              - amlogic,meson-gxm-aoclkc
>> +              - amlogic,meson-axg-aoclkc
>> +          - const: amlogic,meson-gx-aoclkc
>> +      - enum:
>> +          - amlogic,meson-axg-aoclkc
>> +          - amlogic,meson-g12a-aoclkc
>> +
>> +  clocks:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  clock-names:
>> +    minItems: 2
>> +    maxItems: 5
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - clock-names
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxbb-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>> +            - const: ext-32k-1
>> +            - const: ext-32k-2
>
> As the names are always the same, move this to top-level and just set 
> the length here (except the constraints are the same as top-level, so 
> you can just drop this if/then).

If this is done, aren't we losing information ?

For example, "ext-32k-1" would become valid with a g12a as long as the
number of clocks is alright, which it is not.

I'm not concerned by the automated verification, more the information
provided to the users, which we used to have in the txt format.

>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-g12a-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 3
>> +
>> +        clock-names:
>> +          minItems: 2
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>> +            - const: ext-32k-0
>
> Just 'maxItems: 3'
>
>> +
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - amlogic,meson-gxl-aoclkc
>> +            - amlogic,meson-gxm-aoclkc
>> +            - amlogic,meson-axg-aoclkc
>> +
>> +    then:
>> +      properties:
>> +        clocks:
>> +          maxItems: 2
>> +
>> +        clock-names:
>> +          items:
>> +            - const: xtal 
>> +            - const: mpeg-clk
>
> maxItems: 2
>
>> +
>> +additionalProperties: false
>> 
>> -- 
>> 2.34.1
>> 


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

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
  2023-07-06  7:15       ` Jerome Brunet
  (?)
@ 2023-07-06  7:51         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-06  7:51 UTC (permalink / raw)
  To: Jerome Brunet, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

On 06/07/2023 09:15, Jerome Brunet wrote:
>>> +    then:
>>> +      properties:
>>> +        clock-names:
>>> +          minItems: 2
>>> +          items:
>>> +            - const: xtal 
>>> +            - const: mpeg-clk
>>> +            - const: ext-32k-0
>>> +            - const: ext-32k-1
>>> +            - const: ext-32k-2
>>
>> As the names are always the same, move this to top-level and just set 
>> the length here (except the constraints are the same as top-level, so 
>> you can just drop this if/then).
> 
> If this is done, aren't we losing information ?
> 
> For example, "ext-32k-1" would become valid with a g12a as long as the
> number of clocks is alright, which it is not.

How it would be valid? It would be fourth item but only three are allowed.

> 
> I'm not concerned by the automated verification, more the information
> provided to the users, which we used to have in the txt format.

No information is lost here, unless you claim that entries are entirely
different?


Best regards,
Krzysztof


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  7:51         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-06  7:51 UTC (permalink / raw)
  To: Jerome Brunet, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

On 06/07/2023 09:15, Jerome Brunet wrote:
>>> +    then:
>>> +      properties:
>>> +        clock-names:
>>> +          minItems: 2
>>> +          items:
>>> +            - const: xtal 
>>> +            - const: mpeg-clk
>>> +            - const: ext-32k-0
>>> +            - const: ext-32k-1
>>> +            - const: ext-32k-2
>>
>> As the names are always the same, move this to top-level and just set 
>> the length here (except the constraints are the same as top-level, so 
>> you can just drop this if/then).
> 
> If this is done, aren't we losing information ?
> 
> For example, "ext-32k-1" would become valid with a g12a as long as the
> number of clocks is alright, which it is not.

How it would be valid? It would be fourth item but only three are allowed.

> 
> I'm not concerned by the automated verification, more the information
> provided to the users, which we used to have in the txt format.

No information is lost here, unless you claim that entries are entirely
different?


Best regards,
Krzysztof


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  7:51         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-06  7:51 UTC (permalink / raw)
  To: Jerome Brunet, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel

On 06/07/2023 09:15, Jerome Brunet wrote:
>>> +    then:
>>> +      properties:
>>> +        clock-names:
>>> +          minItems: 2
>>> +          items:
>>> +            - const: xtal 
>>> +            - const: mpeg-clk
>>> +            - const: ext-32k-0
>>> +            - const: ext-32k-1
>>> +            - const: ext-32k-2
>>
>> As the names are always the same, move this to top-level and just set 
>> the length here (except the constraints are the same as top-level, so 
>> you can just drop this if/then).
> 
> If this is done, aren't we losing information ?
> 
> For example, "ext-32k-1" would become valid with a g12a as long as the
> number of clocks is alright, which it is not.

How it would be valid? It would be fourth item but only three are allowed.

> 
> I'm not concerned by the automated verification, more the information
> provided to the users, which we used to have in the txt format.

No information is lost here, unless you claim that entries are entirely
different?


Best regards,
Krzysztof


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

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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
  2023-07-06  7:51         ` Krzysztof Kozlowski
  (?)
@ 2023-07-06  8:03           ` Jerome Brunet
  -1 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  8:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Thu 06 Jul 2023 at 09:51, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 06/07/2023 09:15, Jerome Brunet wrote:
>>>> +    then:
>>>> +      properties:
>>>> +        clock-names:
>>>> +          minItems: 2
>>>> +          items:
>>>> +            - const: xtal 
>>>> +            - const: mpeg-clk
>>>> +            - const: ext-32k-0
>>>> +            - const: ext-32k-1
>>>> +            - const: ext-32k-2
>>>
>>> As the names are always the same, move this to top-level and just set 
>>> the length here (except the constraints are the same as top-level, so 
>>> you can just drop this if/then).
>> 
>> If this is done, aren't we losing information ?
>> 
>> For example, "ext-32k-1" would become valid with a g12a as long as the
>> number of clocks is alright, which it is not.
>
> How it would be valid? It would be fourth item but only three are allowed.
>

I missed that the order in 'items' mattered. Thanks for the
clarification.

>> 
>> I'm not concerned by the automated verification, more the information
>> provided to the users, which we used to have in the txt format.
>
> No information is lost here, unless you claim that entries are entirely
> different?
>
>
> Best regards,
> Krzysztof


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  8:03           ` Jerome Brunet
  0 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  8:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Thu 06 Jul 2023 at 09:51, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 06/07/2023 09:15, Jerome Brunet wrote:
>>>> +    then:
>>>> +      properties:
>>>> +        clock-names:
>>>> +          minItems: 2
>>>> +          items:
>>>> +            - const: xtal 
>>>> +            - const: mpeg-clk
>>>> +            - const: ext-32k-0
>>>> +            - const: ext-32k-1
>>>> +            - const: ext-32k-2
>>>
>>> As the names are always the same, move this to top-level and just set 
>>> the length here (except the constraints are the same as top-level, so 
>>> you can just drop this if/then).
>> 
>> If this is done, aren't we losing information ?
>> 
>> For example, "ext-32k-1" would become valid with a g12a as long as the
>> number of clocks is alright, which it is not.
>
> How it would be valid? It would be fourth item but only three are allowed.
>

I missed that the order in 'items' mattered. Thanks for the
clarification.

>> 
>> I'm not concerned by the automated verification, more the information
>> provided to the users, which we used to have in the txt format.
>
> No information is lost here, unless you claim that entries are entirely
> different?
>
>
> Best regards,
> Krzysztof


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

* Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema
@ 2023-07-06  8:03           ` Jerome Brunet
  0 siblings, 0 replies; 30+ messages in thread
From: Jerome Brunet @ 2023-07-06  8:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Neil Armstrong
  Cc: Michael Turquette, Stephen Boyd, Krzysztof Kozlowski,
	Conor Dooley, Kevin Hilman, Martin Blumenstingl, linux-amlogic,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel


On Thu 06 Jul 2023 at 09:51, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 06/07/2023 09:15, Jerome Brunet wrote:
>>>> +    then:
>>>> +      properties:
>>>> +        clock-names:
>>>> +          minItems: 2
>>>> +          items:
>>>> +            - const: xtal 
>>>> +            - const: mpeg-clk
>>>> +            - const: ext-32k-0
>>>> +            - const: ext-32k-1
>>>> +            - const: ext-32k-2
>>>
>>> As the names are always the same, move this to top-level and just set 
>>> the length here (except the constraints are the same as top-level, so 
>>> you can just drop this if/then).
>> 
>> If this is done, aren't we losing information ?
>> 
>> For example, "ext-32k-1" would become valid with a g12a as long as the
>> number of clocks is alright, which it is not.
>
> How it would be valid? It would be fourth item but only three are allowed.
>

I missed that the order in 'items' mattered. Thanks for the
clarification.

>> 
>> I'm not concerned by the automated verification, more the information
>> provided to the users, which we used to have in the txt format.
>
> No information is lost here, unless you claim that entries are entirely
> different?
>
>
> Best regards,
> Krzysztof


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

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

end of thread, other threads:[~2023-07-06  8:06 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 11:41 [PATCH v2 0/3] dt-bindings: second batch of dt-schema conversions for Amlogic Meson bindings Neil Armstrong
2023-07-05 11:41 ` Neil Armstrong
2023-07-05 11:41 ` Neil Armstrong
2023-07-05 11:41 ` [PATCH v2 1/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 19:53   ` Rob Herring
2023-07-05 19:53     ` Rob Herring
2023-07-05 19:53     ` Rob Herring
2023-07-05 11:41 ` [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt " Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 19:56   ` Rob Herring
2023-07-05 19:56     ` Rob Herring
2023-07-05 19:56     ` Rob Herring
2023-07-06  7:15     ` Jerome Brunet
2023-07-06  7:15       ` Jerome Brunet
2023-07-06  7:15       ` Jerome Brunet
2023-07-06  7:51       ` Krzysztof Kozlowski
2023-07-06  7:51         ` Krzysztof Kozlowski
2023-07-06  7:51         ` Krzysztof Kozlowski
2023-07-06  8:03         ` Jerome Brunet
2023-07-06  8:03           ` Jerome Brunet
2023-07-06  8:03           ` Jerome Brunet
2023-07-05 11:41 ` [PATCH v2 3/3] dt-bindings: soc: amlogic: document System Control registers Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 11:41   ` Neil Armstrong
2023-07-05 19:58   ` Rob Herring
2023-07-05 19:58     ` Rob Herring
2023-07-05 19:58     ` 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.