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

Convert the OMAP gate 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.
Clean up the examples during conversion to meet modern standards and
remove examples with no additional value.
Due to usage in code and existing devicetree binding, add the
ti,set-rate-parent property.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://lore.kernel.org/r/20250105170854.408875-2-andreas@kemnade.info
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by Andreas Kemnade and committed by Stephen Boyd be7638a0 ef94ea4f

+125 -105
-105
Documentation/devicetree/bindings/clock/ti/gate.txt
··· 1 - Binding for Texas Instruments gate clock. 2 - 3 - This binding uses the common clock binding[1]. This clock is 4 - quite much similar to the basic gate-clock [2], however, 5 - it supports a number of additional features. If no register 6 - is provided for this clock, the code assumes that a clockdomain 7 - will be controlled instead and the corresponding hw-ops for 8 - that is used. 9 - 10 - [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 11 - [2] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml 12 - [3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt 13 - 14 - Required properties: 15 - - compatible : shall be one of: 16 - "ti,gate-clock" - basic gate clock 17 - "ti,wait-gate-clock" - gate clock which waits until clock is active before 18 - returning from clk_enable() 19 - "ti,dss-gate-clock" - gate clock with DSS specific hardware handling 20 - "ti,am35xx-gate-clock" - gate clock with AM35xx specific hardware handling 21 - "ti,clkdm-gate-clock" - clockdomain gate clock, which derives its functional 22 - clock directly from a clockdomain, see [3] how 23 - to map clockdomains properly 24 - "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling, 25 - required for a hardware errata 26 - "ti,composite-gate-clock" - composite gate clock, to be part of composite 27 - clock 28 - "ti,composite-no-wait-gate-clock" - composite gate clock that does not wait 29 - for clock to be active before returning 30 - from clk_enable() 31 - - #clock-cells : from common clock binding; shall be set to 0 32 - - clocks : link to phandle of parent clock 33 - - reg : offset for register controlling adjustable gate, not needed for 34 - ti,clkdm-gate-clock type 35 - 36 - Optional properties: 37 - - clock-output-names : from common clock binding. 38 - - ti,bit-shift : bit shift for programming the clock gate, invalid for 39 - ti,clkdm-gate-clock type 40 - - ti,set-bit-to-disable : inverts default gate programming. Setting the bit 41 - gates the clock and clearing the bit ungates the clock. 42 - 43 - Examples: 44 - mmchs2_fck: mmchs2_fck@48004a00 { 45 - #clock-cells = <0>; 46 - compatible = "ti,gate-clock"; 47 - clocks = <&core_96m_fck>; 48 - reg = <0x0a00>; 49 - ti,bit-shift = <25>; 50 - }; 51 - 52 - uart4_fck_am35xx: uart4_fck_am35xx { 53 - #clock-cells = <0>; 54 - compatible = "ti,wait-gate-clock"; 55 - clocks = <&core_48m_fck>; 56 - reg = <0x0a00>; 57 - ti,bit-shift = <23>; 58 - }; 59 - 60 - dss1_alwon_fck_3430es2: dss1_alwon_fck_3430es2@48004e00 { 61 - #clock-cells = <0>; 62 - compatible = "ti,dss-gate-clock"; 63 - clocks = <&dpll4_m4x2_ck>; 64 - reg = <0x0e00>; 65 - ti,bit-shift = <0>; 66 - }; 67 - 68 - emac_ick: emac_ick@4800259c { 69 - #clock-cells = <0>; 70 - compatible = "ti,am35xx-gate-clock"; 71 - clocks = <&ipss_ick>; 72 - reg = <0x059c>; 73 - ti,bit-shift = <1>; 74 - }; 75 - 76 - emu_src_ck: emu_src_ck { 77 - #clock-cells = <0>; 78 - compatible = "ti,clkdm-gate-clock"; 79 - clocks = <&emu_src_mux_ck>; 80 - }; 81 - 82 - dpll4_m2x2_ck: dpll4_m2x2_ck@48004d00 { 83 - #clock-cells = <0>; 84 - compatible = "ti,hsdiv-gate-clock"; 85 - clocks = <&dpll4_m2x2_mul_ck>; 86 - ti,bit-shift = <0x1b>; 87 - reg = <0x0d00>; 88 - ti,set-bit-to-disable; 89 - }; 90 - 91 - vlynq_gate_fck: vlynq_gate_fck { 92 - #clock-cells = <0>; 93 - compatible = "ti,composite-gate-clock"; 94 - clocks = <&core_ck>; 95 - ti,bit-shift = <3>; 96 - reg = <0x0200>; 97 - }; 98 - 99 - sys_clkout2_src_gate: sys_clkout2_src_gate { 100 - #clock-cells = <0>; 101 - compatible = "ti,composite-no-wait-gate-clock"; 102 - clocks = <&core_ck>; 103 - ti,bit-shift = <15>; 104 - reg = <0x0070>; 105 - };
+125
Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/ti/ti,gate-clock.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments gate clock 8 + 9 + maintainers: 10 + - Tero Kristo <kristo@kernel.org> 11 + 12 + description: | 13 + *Deprecated design pattern: one node per clock* 14 + 15 + This clock is quite much similar to the basic gate-clock [1], however, 16 + it supports a number of additional features. If no register 17 + is provided for this clock, the code assumes that a clockdomain 18 + will be controlled instead and the corresponding hw-ops for 19 + that is used. 20 + 21 + [1] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml 22 + [2] Documentation/devicetree/bindings/clock/ti/clockdomain.txt 23 + 24 + properties: 25 + compatible: 26 + enum: 27 + - ti,gate-clock # basic gate clock 28 + - ti,wait-gate-clock # gate clock which waits until clock is 29 + # active before returning from clk_enable() 30 + - ti,dss-gate-clock # gate clock with DSS specific hardware 31 + # handling 32 + - ti,am35xx-gate-clock # gate clock with AM35xx specific hardware 33 + # handling 34 + - ti,clkdm-gate-clock # clockdomain gate clock, which derives its 35 + # functional clock directly from a 36 + # clockdomain, see [2] how to map 37 + # clockdomains properly 38 + - ti,hsdiv-gate-clock # gate clock with OMAP36xx specific hardware 39 + # handling, required for a hardware errata 40 + - ti,composite-gate-clock # composite gate clock, to be part of 41 + # composite clock 42 + - ti,composite-no-wait-gate-clock # composite gate clock that does not 43 + # wait for clock to be active before 44 + # returning from clk_enable() 45 + "#clock-cells": 46 + const: 0 47 + 48 + clocks: true 49 + 50 + clock-output-names: 51 + maxItems: 1 52 + 53 + reg: 54 + maxItems: 1 55 + 56 + ti,bit-shift: 57 + $ref: /schemas/types.yaml#/definitions/uint32 58 + description: 59 + Number of bits to shift the bit-mask 60 + maximum: 31 61 + default: 0 62 + 63 + ti,set-bit-to-disable: 64 + type: boolean 65 + description: 66 + Inverts default gate programming. Setting the bit 67 + gates the clock and clearing the bit ungates the clock. 68 + 69 + ti,set-rate-parent: 70 + type: boolean 71 + description: 72 + clk_set_rate is propagated to parent clock, 73 + 74 + if: 75 + properties: 76 + compatible: 77 + contains: 78 + const: ti,clkdm-gate-clock 79 + then: 80 + properties: 81 + reg: false 82 + required: 83 + - compatible 84 + - "#clock-cells" 85 + - clocks 86 + else: 87 + required: 88 + - compatible 89 + - "#clock-cells" 90 + - clocks 91 + - reg 92 + 93 + additionalProperties: false 94 + 95 + examples: 96 + - | 97 + bus { 98 + #address-cells = <1>; 99 + #size-cells = <0>; 100 + 101 + clock-controller@a00 { 102 + #clock-cells = <0>; 103 + compatible = "ti,gate-clock"; 104 + clocks = <&core_96m_fck>; 105 + reg = <0x0a00>; 106 + ti,bit-shift = <25>; 107 + }; 108 + 109 + clock-controller@d00 { 110 + compatible = "ti,hsdiv-gate-clock"; 111 + reg = <0x0d00>; 112 + #clock-cells = <0>; 113 + clocks = <&dpll4_m2x2_mul_ck>; 114 + ti,bit-shift = <0x1b>; 115 + ti,set-bit-to-disable; 116 + }; 117 + }; 118 + 119 + - | 120 + clock-controller { 121 + #clock-cells = <0>; 122 + compatible = "ti,clkdm-gate-clock"; 123 + clocks = <&emu_src_mux_ck>; 124 + }; 125 +