linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] dt-bindings: clock: Add binding for TI clksel
@ 2022-02-03  7:39 Tony Lindgren
  2022-02-09 22:01 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, linux-arm-kernel, devicetree, linux-omap, Tero Kristo

In order to prepare for fixing lots of devicetree unique_unit_address
warnings for the TI clock nodes, let's add a binding for the TI clksel
clocks. This allows us to move the overlapping reg properties for the
component clocks to be children of the related clksel nodes. And with
that we need the reg property only for the parent clksel node making
the reg property unique like it should be.

We want to set #clock-cells = <2> in case we ever start parsing ranges
of clkcsel instances directly using a clksel driver rather than using the
existing component clock drivers and child nodes.

And before the devicetree files can be updated, we need to update the
TI clock drivers to get the IO address from the parent clksel node.

Cc: Tero Kristo <kristo@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Changes since V1:

- Set additionalProperties to type object as suggested by Rob

- Changed #clock-cells to 2 for parsing ranges of clksel instances

- Updated patch description for more info on why this is needed

 .../bindings/clock/ti/ti,clksel.yaml          | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml

diff --git a/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml b/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml
new file mode 100644
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ti/ti,clksel.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binding for TI clksel clock
+
+maintainers:
+  - Tony Lindgren <tony@atomide.com>
+
+description: |
+  The TI CLKSEL clocks consist of consist of input clock mux bits, and in some
+  cases also has divider, multiplier and gate bits.
+
+properties:
+  compatible:
+    const: ti,clksel
+
+  reg:
+    maxItems: 1
+    description: The CLKSEL register range
+
+  '#address-cells':
+    enum: [ 0, 1, 2 ]
+
+  '#size-cells':
+    enum: [ 0, 1, 2 ]
+
+  ranges: true
+
+  "#clock-cells":
+    const: 2
+    description: The CLKSEL register and bit offset
+
+required:
+  - compatible
+  - reg
+  - "#clock-cells"
+
+additionalProperties:
+  type: object
+
+examples:
+  - |
+    clksel_gfx_fclk: clock@52c {
+      compatible = "ti,clksel";
+      reg = <0x25c 0x4>;
+      #clock-cells = <2>;
+    };
+...
-- 
2.35.1

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

* Re: [PATCHv2] dt-bindings: clock: Add binding for TI clksel
  2022-02-03  7:39 [PATCHv2] dt-bindings: clock: Add binding for TI clksel Tony Lindgren
@ 2022-02-09 22:01 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2022-02-09 22:01 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, devicetree, linux-kernel, Rob Herring,
	linux-omap, Tero Kristo

On Thu, 03 Feb 2022 09:39:29 +0200, Tony Lindgren wrote:
> In order to prepare for fixing lots of devicetree unique_unit_address
> warnings for the TI clock nodes, let's add a binding for the TI clksel
> clocks. This allows us to move the overlapping reg properties for the
> component clocks to be children of the related clksel nodes. And with
> that we need the reg property only for the parent clksel node making
> the reg property unique like it should be.
> 
> We want to set #clock-cells = <2> in case we ever start parsing ranges
> of clkcsel instances directly using a clksel driver rather than using the
> existing component clock drivers and child nodes.
> 
> And before the devicetree files can be updated, we need to update the
> TI clock drivers to get the IO address from the parent clksel node.
> 
> Cc: Tero Kristo <kristo@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> Changes since V1:
> 
> - Set additionalProperties to type object as suggested by Rob
> 
> - Changed #clock-cells to 2 for parsing ranges of clksel instances
> 
> - Updated patch description for more info on why this is needed
> 
>  .../bindings/clock/ti/ti,clksel.yaml          | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml
> 

Applied, thanks!

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

end of thread, other threads:[~2022-02-09 22:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  7:39 [PATCHv2] dt-bindings: clock: Add binding for TI clksel Tony Lindgren
2022-02-09 22:01 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).