[PATCH v2] dt-bindings: clock: ti,dm816-fapll-clock: Convert to DT schema
Bhargav Joshi <[email protected]>
| Newsgroups | org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Convert the Texas Instruments DM816 FAPLL clock binding from plain text to YAML DT schema. The text documented #clock-cells to be set as 0, while the example and existing dt and driver require it to be 1. The schema now strictly enforces #clock-cells = <1>. Properties clock-indices and clock-output-names are documented in the binding and added as required as driver strictly requires it and existing dt already use this property. Signed-off-by: Bhargav Joshi <[email protected]> --- Changes in v2: - Cleaned up binding descriptions by dropping the redundant common clock sentence and removing "phandle for" from the clock items - Link to v1: https://lore.kernel.org/r/[email protected] --- .../devicetree/bindings/clock/ti/fapll.txt | 31 ---------- .../bindings/clock/ti/ti,dm816-fapll-clock.yaml | 71 ++++++++++++++++++++++ 2 files changed, 71 insertions(+), 31 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/ti/fapll.txt b/Documentation/devicetree/bindings/clock/ti/fapll.txt deleted file mode 100644 index 88986ef39ddd..000000000000 --- a/Documentation/devicetree/bindings/clock/ti/fapll.txt +++ /dev/null @@ -1,31 +0,0 @@ -Binding for Texas Instruments FAPLL clock. - -This binding uses the common clock binding[1]. It assumes a -register-mapped FAPLL with usually two selectable input clocks -(reference clock and bypass clock), and one or more child -syntesizers. - -[1] Documentation/devicetree/bindings/clock/clock-bindings.txt - -Required properties: -- compatible : shall be "ti,dm816-fapll-clock" -- #clock-cells : from common clock binding; shall be set to 0. -- clocks : link phandles of parent clocks (clk-ref and clk-bypass) -- reg : address and length of the register set for controlling the FAPLL. - -Examples: - main_fapll: main_fapll { - #clock-cells = <1>; - compatible = "ti,dm816-fapll-clock"; - reg = <0x400 0x40>; - clocks = <&sys_clkin_ck &sys_clkin_ck>; - clock-indices = <1>, <2>, <3>, <4>, <5>, - <6>, <7>; - clock-output-names = "main_pll_clk1", - "main_pll_clk2", - "main_pll_clk3", - "main_pll_clk4", - "main_pll_clk5", - "main_pll_clk6", - "main_pll_clk7"; - }; diff --git a/Documentation/devicetree/bindings/clock/ti/ti,dm816-fapll-clock.yaml b/Documentation/devicetree/bindings/clock/ti/ti,dm816-fapll-clock.yaml new file mode 100644 index 000000000000..423b7405e398 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/ti/ti,dm816-fapll-clock.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/ti/ti,dm816-fapll-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments FAPLL clock + +maintainers: + - Tony Lindgren <[email protected]> + - Tero Kristo <[email protected]> + +description: + FAPLL is register-mapped with usually two selectable input clocks + (reference clock and bypass clock), and one or more child synthesizers. + +properties: + compatible: + const: ti,dm816-fapll-clock + + "#clock-cells": + const: 1 + + reg: + maxItems: 1 + + clocks: + items: + - description: parent clock clk-ref + - description: parent clock clk-bypass + + clock-indices: + description: + Maps child synthesizers to physical indices 1-7. Index 0 is physically + reserved for the Master PLL. + minItems: 1 + maxItems: 7 + items: + minimum: 1 + maximum: 7 + + clock-output-names: + description: + Names of the child synthesizer outputs. The length of this array must + match clock-indices. + minItems: 1 + maxItems: 7 + +required: + - compatible + - reg + - clocks + - "#clock-cells" + - clock-indices + - clock-output-names + +additionalProperties: false + +examples: + - | + clock-controller@400 { + #clock-cells = <1>; + compatible = "ti,dm816-fapll-clock"; + reg = <0x400 0x40>; + clocks = <&sys_clkin_ck &sys_clkin_ck>; + clock-indices = <1>, <2>, <3>, <4>, <5>, <6>, <7>; + clock-output-names = "main_pll_clk1", "main_pll_clk2", "main_pll_clk3", + "main_pll_clk4", "main_pll_clk5", "main_pll_clk6", + "main_pll_clk7"; + + }; --- base-commit: 0716f9b9338a86dd27796e00ed0fd560c653323a change-id: 20260629-ti-fapll-clock-57a02c264e60 Best regards, -- Bhargav