Skip to contentSkip to conversation

schemas: clock: Add assigned-clocks description

PATCH In review Rob Herring 3 participants 3 messages Apr 28, 2022 – Apr 29, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 schemas: clock: Add assigned-clocks description

Add description for assigned-clocks properties from clock-binding.txt in the Linux kernel.

This is relicensed from GPL-2.0 (the default) to BSD-2-Clause. The Cc list are the original authors.

Cc Sylwester Nawrocki <[email protected]>
Cc Stephen Boyd <[email protected]>

---
Please ack for the license change.

 dtschema/schemas/clock/clock.yaml | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
dtschema/schemas/clock/clock.yaml +38 -0
index 2416d046087c..5299653b80b6 100644
@@ -19,6 +19,44 @@ description: |
   output on a device.  The length of a clock specifier is defined by the
   value of a #clock-cells property in the clock provider node.
 
+  Assigned clock parents and rates
+  --------------------------------
+
+  Some platforms may require initial configuration of default parent clocks
+  and clock frequencies. Such a configuration can be specified in a device tree
+  node through assigned-clocks, assigned-clock-parents and assigned-clock-rates
+  properties. The assigned-clock-parents property should contain a list of parent
+  clocks in the form of a phandle and clock specifier pair and the
+  assigned-clock-rates property should contain a list of frequencies in Hz. Both
+  these properties should correspond to the clocks listed in the assigned-clocks
+  property.
+
+  To skip setting parent or rate of a clock its corresponding entry should be
+  set to 0, or can be omitted if it is not followed by any non-zero entry.
+
+      serial@a000 {
+          compatible = "fsl,imx-uart";
+          reg = <0xa000 0x1000>;
+          ...
+          clocks = <&osc 0>, <&pll 1>;
+          clock-names = "baud", "register";
+
+          assigned-clocks = <&clkcon 0>, <&pll 2>;
+          assigned-clock-parents = <&pll 2>;
+          assigned-clock-rates = <0>, <460800>;
+      };
+
+  In this example the <&pll 2> clock is set as parent of clock <&clkcon 0> and
+  the <&pll 2> clock is assigned a frequency value of 460800 Hz.
+
+  Configuring a clock's parent and rate through the device node that consumes
+  the clock can be done only for clocks that have a single user. Specifying
+  conflicting parent or rate configuration in multiple consumer nodes for
+  a shared clock is forbidden.
+
+  Configuration of common clocks, which affect multiple consumer devices can
+  be similarly specified in the clock provider node.
+
 # always select the core schema
 select: true
 
Signature · 1 line
2.34.1

A message that is not in the archive (sent off-list or not yet received): 20220428152633.2261979-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Reviewed-by
#3 lore raw
In reply to a message not in the archive

Quoting Rob Herring (2022-04-28 08:26:33)

Quoted 10 lines

Add description for assigned-clocks properties from clock-binding.txt in the Linux kernel.

This is relicensed from GPL-2.0 (the default) to BSD-2-Clause. The Cc list are the original authors.

Cc Sylwester Nawrocki <[email protected]>
Cc Stephen Boyd <[email protected]>

---