public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML
@ 2024-11-04 15:31 Ivaylo Ivanov
  2024-11-04 19:03 ` Conor Dooley
  0 siblings, 1 reply; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-11-04 15:31 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andreas Färber, Manivannan Sadhasivam
  Cc: linux-actions, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel

Convert the Actions Semi Owl CMU bindings to DT schema.

Changes during conversion:
 - Since all Actions Semi Owl SoCs utilize the internal low frequency
   oscillator as a parent for some clocks, require it.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
 .../bindings/clock/actions,owl-cmu.txt        | 52 ----------------
 .../bindings/clock/actions,owl-cmu.yaml       | 61 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 62 insertions(+), 53 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
 create mode 100644 Documentation/devicetree/bindings/clock/actions,owl-cmu.yaml

diff --git a/Documentation/devicetree/bindings/clock/actions,owl-cmu.txt b/Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
deleted file mode 100644
index d19885b7c..000000000
--- a/Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-* Actions Semi Owl Clock Management Unit (CMU)
-
-The Actions Semi Owl Clock Management Unit generates and supplies clock
-to various controllers within the SoC. The clock binding described here is
-applicable to S900, S700 and S500 SoC's.
-
-Required Properties:
-
-- compatible: should be one of the following,
-	"actions,s900-cmu"
-	"actions,s700-cmu"
-	"actions,s500-cmu"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- clocks: Reference to the parent clocks ("hosc", "losc")
-- #clock-cells: should be 1.
-- #reset-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 corresponding
-dt-bindings/clock/actions,s900-cmu.h or actions,s700-cmu.h or
-actions,s500-cmu.h header and can be used in device tree sources.
-
-External clocks:
-
-The hosc clock used as input for the plls is generated outside the SoC. It is
-expected that it is defined using standard clock bindings as "hosc".
-
-Actions Semi S900 CMU also requires one more clock:
- - "losc" - internal low frequency oscillator
-
-Example: Clock Management Unit node:
-
-        cmu: clock-controller@e0160000 {
-                compatible = "actions,s900-cmu";
-                reg = <0x0 0xe0160000 0x0 0x1000>;
-                clocks = <&hosc>, <&losc>;
-                #clock-cells = <1>;
-                #reset-cells = <1>;
-        };
-
-Example: UART controller node that consumes clock generated by the clock
-management unit:
-
-        uart: serial@e012a000 {
-                compatible = "actions,s900-uart", "actions,owl-uart";
-                reg = <0x0 0xe012a000 0x0 0x2000>;
-                interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-                clocks = <&cmu CLK_UART5>;
-        };
diff --git a/Documentation/devicetree/bindings/clock/actions,owl-cmu.yaml b/Documentation/devicetree/bindings/clock/actions,owl-cmu.yaml
new file mode 100644
index 000000000..e9c0dfb94
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/actions,owl-cmu.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/actions,owl-cmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Actions Semi Owl Clock Management Unit (CMU)
+
+maintainers:
+  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+
+description: |
+  The Actions Semi Owl Clock Management Unit generates and supplies clock
+  to various controllers within the SoC.
+
+  All available clocks are defined as preprocessor macros in
+  include/dt-bindings/clock/ headers.
+
+properties:
+  compatible:
+    enum:
+      - actions,s500-cmu
+      - actions,s700-cmu
+      - actions,s900-cmu
+
+  clocks:
+    items:
+      - description: Host oscillator source
+      - description: Internal low frequency oscillator source
+
+  "#clock-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  "#reset-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - "#clock-cells"
+  - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+        cmu: clock-controller@e0160000 {
+          compatible = "actions,s900-cmu";
+          reg = <0x0 0xe0160000 0x0 0x1000>;
+          clocks = <&hosc>, <&losc>;
+          #clock-cells = <1>;
+          #reset-cells = <1>;
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 420d06d37..652c9822a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2016,7 +2016,7 @@ L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-actions@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 F:	Documentation/devicetree/bindings/arm/actions.yaml
-F:	Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
+F:	Documentation/devicetree/bindings/clock/actions,owl-cmu.yaml
 F:	Documentation/devicetree/bindings/dma/owl-dma.yaml
 F:	Documentation/devicetree/bindings/i2c/i2c-owl.yaml
 F:	Documentation/devicetree/bindings/interrupt-controller/actions,owl-sirq.yaml
-- 
2.43.0


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

* Re: [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML
  2024-11-04 15:31 [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML Ivaylo Ivanov
@ 2024-11-04 19:03 ` Conor Dooley
  2024-11-04 20:19   ` Ivaylo Ivanov
  0 siblings, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2024-11-04 19:03 UTC (permalink / raw)
  To: Ivaylo Ivanov
  Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andreas Färber, Manivannan Sadhasivam,
	linux-actions, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel

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

On Mon, Nov 04, 2024 at 05:31:08PM +0200, Ivaylo Ivanov wrote:
> +    soc {

> +        #address-cells = <2>;
> +        #size-cells = <2>;

FWIW, you could drop these two if...

> +        cmu: clock-controller@e0160000 {
> +          compatible = "actions,s900-cmu";
> +          reg = <0x0 0xe0160000 0x0 0x1000>;

...you dropped the 0x0s from here.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

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

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

* Re: [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML
  2024-11-04 19:03 ` Conor Dooley
@ 2024-11-04 20:19   ` Ivaylo Ivanov
  2024-11-06  1:02     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Ivaylo Ivanov @ 2024-11-04 20:19 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andreas Färber, Manivannan Sadhasivam,
	linux-actions, linux-clk, devicetree, linux-arm-kernel,
	linux-kernel




On 11/4/24 21:03, Conor Dooley wrote:
> On Mon, Nov 04, 2024 at 05:31:08PM +0200, Ivaylo Ivanov wrote:
>> +    soc {
>> +        #address-cells = <2>;
>> +        #size-cells = <2>;
> FWIW, you could drop these two if...

I see, although the point of this was to keep it the example as close
to the original usage in s900.dtsi as possible. Anyways, if a v2 is
needed, I can do that.

Thanks for the review!
Best regards, Ivo.

>
>> +        cmu: clock-controller@e0160000 {
>> +          compatible = "actions,s900-cmu";
>> +          reg = <0x0 0xe0160000 0x0 0x1000>;
> ...you dropped the 0x0s from here.
>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> Cheers,
> Conor.


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

* Re: [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML
  2024-11-04 20:19   ` Ivaylo Ivanov
@ 2024-11-06  1:02     ` Stephen Boyd
  2024-11-06  1:03       ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2024-11-06  1:02 UTC (permalink / raw)
  To: Conor Dooley, Ivaylo Ivanov
  Cc: Michael Turquette, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Andreas Färber, Manivannan Sadhasivam, linux-actions,
	linux-clk, devicetree, linux-arm-kernel, linux-kernel

Quoting Ivaylo Ivanov (2024-11-04 12:19:57)
> 
> 
> 
> On 11/4/24 21:03, Conor Dooley wrote:
> > On Mon, Nov 04, 2024 at 05:31:08PM +0200, Ivaylo Ivanov wrote:
> >> +    soc {
> >> +        #address-cells = <2>;
> >> +        #size-cells = <2>;
> > FWIW, you could drop these two if...
> 
> I see, although the point of this was to keep it the example as close
> to the original usage in s900.dtsi as possible. Anyways, if a v2 is
> needed, I can do that.

Please resend with the fix.

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

* Re: [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML
  2024-11-06  1:02     ` Stephen Boyd
@ 2024-11-06  1:03       ` Stephen Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2024-11-06  1:03 UTC (permalink / raw)
  To: Conor Dooley, Ivaylo Ivanov
  Cc: Michael Turquette, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Andreas Färber, Manivannan Sadhasivam, linux-actions,
	linux-clk, devicetree, linux-arm-kernel, linux-kernel

Quoting Stephen Boyd (2024-11-05 17:02:20)
> Quoting Ivaylo Ivanov (2024-11-04 12:19:57)
> > 
> > 
> > 
> > On 11/4/24 21:03, Conor Dooley wrote:
> > > On Mon, Nov 04, 2024 at 05:31:08PM +0200, Ivaylo Ivanov wrote:
> > >> +    soc {
> > >> +        #address-cells = <2>;
> > >> +        #size-cells = <2>;
> > > FWIW, you could drop these two if...
> > 
> > I see, although the point of this was to keep it the example as close
> > to the original usage in s900.dtsi as possible. Anyways, if a v2 is
> > needed, I can do that.
> 
> Please resend with the fix.
> 

Just drop the entire soc node as well because it doesn't help.

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

end of thread, other threads:[~2024-11-06  1:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 15:31 [PATCH v1] dt-bindings: clock: actions,owl-cmu: convert to YAML Ivaylo Ivanov
2024-11-04 19:03 ` Conor Dooley
2024-11-04 20:19   ` Ivaylo Ivanov
2024-11-06  1:02     ` Stephen Boyd
2024-11-06  1:03       ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox