Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: clock: ti: Convert mux.txt to json-schema

Convert the OMAP mux clock device tree binding to json-schema.
Specify the creator of the original binding as a maintainer.
Choose GPL-only license because original binding was also GPL.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20241112162618.400194-1-andreas@kemnade.info
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Andreas Kemnade and committed by
Stephen Boyd
5fbe6f51 0fcd5849

+126 -79
+1 -1
Documentation/devicetree/bindings/clock/ti/composite.txt
··· 16 16 "ti,*composite*-clock" types. 17 17 18 18 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 19 - [2] Documentation/devicetree/bindings/clock/ti/mux.txt 19 + [2] Documentation/devicetree/bindings/clock/ti/ti,mux-clock.yaml 20 20 [3] Documentation/devicetree/bindings/clock/ti/ti,divider-clock.yaml 21 21 [4] Documentation/devicetree/bindings/clock/ti/gate.txt 22 22
-78
Documentation/devicetree/bindings/clock/ti/mux.txt
··· 1 - Binding for TI mux clock. 2 - 3 - This binding uses the common clock binding[1]. It assumes a 4 - register-mapped multiplexer with multiple input clock signals or 5 - parents, one of which can be selected as output. This clock does not 6 - gate or adjust the parent rate via a divider or multiplier. 7 - 8 - By default the "clocks" property lists the parents in the same order 9 - as they are programmed into the register. E.g: 10 - 11 - clocks = <&foo_clock>, <&bar_clock>, <&baz_clock>; 12 - 13 - results in programming the register as follows: 14 - 15 - register value selected parent clock 16 - 0 foo_clock 17 - 1 bar_clock 18 - 2 baz_clock 19 - 20 - Some clock controller IPs do not allow a value of zero to be programmed 21 - into the register, instead indexing begins at 1. The optional property 22 - "index-starts-at-one" modified the scheme as follows: 23 - 24 - register value selected clock parent 25 - 1 foo_clock 26 - 2 bar_clock 27 - 3 baz_clock 28 - 29 - The binding must provide the register to control the mux. Optionally 30 - the number of bits to shift the control field in the register can be 31 - supplied. If the shift value is missing it is the same as supplying 32 - a zero shift. 33 - 34 - [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 35 - 36 - Required properties: 37 - - compatible : shall be "ti,mux-clock" or "ti,composite-mux-clock". 38 - - #clock-cells : from common clock binding; shall be set to 0. 39 - - clocks : link phandles of parent clocks 40 - - reg : register offset for register controlling adjustable mux 41 - 42 - Optional properties: 43 - - clock-output-names : from common clock binding. 44 - - ti,bit-shift : number of bits to shift the bit-mask, defaults to 45 - 0 if not present 46 - - ti,index-starts-at-one : valid input select programming starts at 1, not 47 - zero 48 - - ti,set-rate-parent : clk_set_rate is propagated to parent clock, 49 - not supported by the composite-mux-clock subtype 50 - - ti,latch-bit : latch the mux value to HW, only needed if the register 51 - access requires this. As an example, dra7x DPLL_GMAC H14 muxing 52 - implements such behavior. 53 - 54 - Examples: 55 - 56 - sys_clkin_ck: sys_clkin_ck@4a306110 { 57 - #clock-cells = <0>; 58 - compatible = "ti,mux-clock"; 59 - clocks = <&virt_12000000_ck>, <&virt_13000000_ck>, <&virt_16800000_ck>, <&virt_19200000_ck>, <&virt_26000000_ck>, <&virt_27000000_ck>, <&virt_38400000_ck>; 60 - reg = <0x0110>; 61 - ti,index-starts-at-one; 62 - }; 63 - 64 - abe_dpll_bypass_clk_mux_ck: abe_dpll_bypass_clk_mux_ck@4a306108 { 65 - #clock-cells = <0>; 66 - compatible = "ti,mux-clock"; 67 - clocks = <&sys_clkin_ck>, <&sys_32k_ck>; 68 - ti,bit-shift = <24>; 69 - reg = <0x0108>; 70 - }; 71 - 72 - mcbsp5_mux_fck: mcbsp5_mux_fck { 73 - #clock-cells = <0>; 74 - compatible = "ti,composite-mux-clock"; 75 - clocks = <&core_96m_fck>, <&mcbsp_clks>; 76 - ti,bit-shift = <4>; 77 - reg = <0x02d8>; 78 - };
+125
Documentation/devicetree/bindings/clock/ti/ti,mux-clock.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/ti/ti,mux-clock.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments mux clock 8 + 9 + maintainers: 10 + - Tero Kristo <kristo@kernel.org> 11 + 12 + description: | 13 + This clock assumes a register-mapped multiplexer with multiple inpt clock 14 + signals or parents, one of which can be selected as output. This clock does 15 + not gate or adjust the parent rate via a divider or multiplier. 16 + 17 + By default the "clocks" property lists the parents in the same order 18 + as they are programmed into the register. E.g: 19 + 20 + clocks = <&foo_clock>, <&bar_clock>, <&baz_clock>; 21 + 22 + Results in programming the register as follows: 23 + 24 + register value selected parent clock 25 + 0 foo_clock 26 + 1 bar_clock 27 + 2 baz_clock 28 + 29 + Some clock controller IPs do not allow a value of zero to be programmed 30 + into the register, instead indexing begins at 1. The optional property 31 + "index-starts-at-one" modified the scheme as follows: 32 + 33 + register value selected clock parent 34 + 1 foo_clock 35 + 2 bar_clock 36 + 3 baz_clock 37 + 38 + The binding must provide the register to control the mux. Optionally 39 + the number of bits to shift the control field in the register can be 40 + supplied. If the shift value is missing it is the same as supplying 41 + a zero shift. 42 + 43 + properties: 44 + compatible: 45 + enum: 46 + - ti,mux-clock 47 + - ti,composite-mux-clock 48 + 49 + "#clock-cells": 50 + const: 0 51 + 52 + clocks: true 53 + 54 + clock-output-names: 55 + maxItems: 1 56 + 57 + reg: 58 + maxItems: 1 59 + 60 + ti,bit-shift: 61 + $ref: /schemas/types.yaml#/definitions/uint32 62 + description: 63 + Number of bits to shift the bit-mask 64 + maximum: 31 65 + default: 0 66 + 67 + ti,index-starts-at-one: 68 + type: boolean 69 + description: 70 + Valid input select programming starts at 1, not zero 71 + 72 + ti,set-rate-parent: 73 + type: boolean 74 + description: 75 + clk_set_rate is propagated to parent clock, 76 + not supported by the composite-mux-clock subtype. 77 + 78 + ti,latch-bit: 79 + $ref: /schemas/types.yaml#/definitions/uint32 80 + description: 81 + Latch the mux value to HW, only needed if the register 82 + access requires this. As an example, dra7x DPLL_GMAC H14 muxing 83 + implements such behavior. 84 + maximum: 31 85 + 86 + if: 87 + properties: 88 + compatible: 89 + contains: 90 + const: ti,composite-mux-clock 91 + then: 92 + properties: 93 + ti,set-rate-parent: false 94 + 95 + required: 96 + - compatible 97 + - "#clock-cells" 98 + - clocks 99 + - reg 100 + 101 + additionalProperties: false 102 + 103 + examples: 104 + - | 105 + bus { 106 + #address-cells = <1>; 107 + #size-cells = <0>; 108 + 109 + clock-controller@110 { 110 + compatible = "ti,mux-clock"; 111 + reg = <0x0110>; 112 + #clock-cells = <0>; 113 + clocks = <&virt_12000000_ck>, <&virt_13000000_ck>, <&virt_16800000_ck>; 114 + ti,index-starts-at-one; 115 + ti,set-rate-parent; 116 + }; 117 + 118 + clock-controller@120 { 119 + compatible = "ti,composite-mux-clock"; 120 + reg = <0x0120>; 121 + #clock-cells = <0>; 122 + clocks = <&core_96m_fck>, <&mcbsp_clks>; 123 + ti,bit-shift = <4>; 124 + }; 125 + };