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

dt-bindings: clock: sprd,sc9860-clk: convert to YAML

Convert the Spreadtrum SC9860 clock bindings to DT schema.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/ZobghvwZAyMjl4eB@standask-GA-A55M-S2HP
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Stanislav Jakubek and committed by
Stephen Boyd
db469084 0d796569

+159 -63
-63
Documentation/devicetree/bindings/clock/sprd,sc9860-clk.txt
··· 1 - Spreadtrum SC9860 Clock Binding 2 - ------------------------ 3 - 4 - Required properties: 5 - - compatible: should contain the following compatible strings: 6 - - "sprd,sc9860-pmu-gate" 7 - - "sprd,sc9860-pll" 8 - - "sprd,sc9860-ap-clk" 9 - - "sprd,sc9860-aon-prediv" 10 - - "sprd,sc9860-apahb-gate" 11 - - "sprd,sc9860-aon-gate" 12 - - "sprd,sc9860-aonsecure-clk" 13 - - "sprd,sc9860-agcp-gate" 14 - - "sprd,sc9860-gpu-clk" 15 - - "sprd,sc9860-vsp-clk" 16 - - "sprd,sc9860-vsp-gate" 17 - - "sprd,sc9860-cam-clk" 18 - - "sprd,sc9860-cam-gate" 19 - - "sprd,sc9860-disp-clk" 20 - - "sprd,sc9860-disp-gate" 21 - - "sprd,sc9860-apapb-gate" 22 - 23 - - #clock-cells: must be 1 24 - 25 - - clocks : Should be the input parent clock(s) phandle for the clock, this 26 - property here just simply shows which clock group the clocks' 27 - parents are in, since each clk node would represent many clocks 28 - which are defined in the driver. The detailed dependency 29 - relationship (i.e. how many parents and which are the parents) 30 - are implemented in driver code. 31 - 32 - Optional properties: 33 - 34 - - reg: Contain the registers base address and length. It must be configured 35 - only if no 'sprd,syscon' under the node. 36 - 37 - - sprd,syscon: phandle to the syscon which is in the same address area with 38 - the clock, and so we can get regmap for the clocks from the 39 - syscon device. 40 - 41 - Example: 42 - 43 - pmu_gate: pmu-gate { 44 - compatible = "sprd,sc9860-pmu-gate"; 45 - sprd,syscon = <&pmu_regs>; 46 - clocks = <&ext_26m>; 47 - #clock-cells = <1>; 48 - }; 49 - 50 - pll: pll { 51 - compatible = "sprd,sc9860-pll"; 52 - sprd,syscon = <&ana_regs>; 53 - clocks = <&pmu_gate 0>; 54 - #clock-cells = <1>; 55 - }; 56 - 57 - ap_clk: clock-controller@20000000 { 58 - compatible = "sprd,sc9860-ap-clk"; 59 - reg = <0 0x20000000 0 0x400>; 60 - clocks = <&ext_26m>, <&pll 0>, 61 - <&pmu_gate 0>; 62 - #clock-cells = <1>; 63 - };
+159
Documentation/devicetree/bindings/clock/sprd,sc9860-clk.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/sprd,sc9860-clk.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SC9860 clock 8 + 9 + maintainers: 10 + - Orson Zhai <orsonzhai@gmail.com> 11 + - Baolin Wang <baolin.wang7@gmail.com> 12 + - Chunyan Zhang <zhang.lyra@gmail.com> 13 + 14 + properties: 15 + compatible: 16 + enum: 17 + - sprd,sc9860-agcp-gate 18 + - sprd,sc9860-aonsecure-clk 19 + - sprd,sc9860-aon-gate 20 + - sprd,sc9860-aon-prediv 21 + - sprd,sc9860-apahb-gate 22 + - sprd,sc9860-apapb-gate 23 + - sprd,sc9860-ap-clk 24 + - sprd,sc9860-cam-clk 25 + - sprd,sc9860-cam-gate 26 + - sprd,sc9860-disp-clk 27 + - sprd,sc9860-disp-gate 28 + - sprd,sc9860-gpu-clk 29 + - sprd,sc9860-pll 30 + - sprd,sc9860-pmu-gate 31 + - sprd,sc9860-vsp-clk 32 + - sprd,sc9860-vsp-gate 33 + 34 + reg: 35 + maxItems: 1 36 + 37 + clocks: 38 + minItems: 1 39 + maxItems: 3 40 + 41 + '#clock-cells': 42 + const: 1 43 + 44 + sprd,syscon: 45 + $ref: /schemas/types.yaml#/definitions/phandle 46 + description: 47 + phandle to the syscon which is in the same address area with the 48 + clock, and so we can get regmap for the clocks from the syscon device 49 + 50 + required: 51 + - compatible 52 + - clocks 53 + - '#clock-cells' 54 + 55 + allOf: 56 + - if: 57 + properties: 58 + compatible: 59 + contains: 60 + enum: 61 + - sprd,sc9860-agcp-gate 62 + - sprd,sc9860-aon-gate 63 + - sprd,sc9860-apahb-gate 64 + - sprd,sc9860-apapb-gate 65 + - sprd,sc9860-cam-gate 66 + - sprd,sc9860-disp-gate 67 + - sprd,sc9860-gpu-clk 68 + - sprd,sc9860-pll 69 + - sprd,sc9860-pmu-gate 70 + - sprd,sc9860-vsp-gate 71 + then: 72 + properties: 73 + clocks: 74 + maxItems: 1 75 + - if: 76 + properties: 77 + compatible: 78 + contains: 79 + enum: 80 + - sprd,sc9860-aonsecure-clk 81 + - sprd,sc9860-cam-clk 82 + - sprd,sc9860-disp-clk 83 + - sprd,sc9860-vsp-clk 84 + then: 85 + properties: 86 + clocks: 87 + minItems: 2 88 + maxItems: 2 89 + - if: 90 + properties: 91 + compatible: 92 + contains: 93 + enum: 94 + - sprd,sc9860-aon-prediv 95 + - sprd,sc9860-ap-clk 96 + then: 97 + properties: 98 + clocks: 99 + minItems: 3 100 + - if: 101 + properties: 102 + compatible: 103 + contains: 104 + enum: 105 + - sprd,sc9860-aonsecure-clk 106 + - sprd,sc9860-aon-prediv 107 + - sprd,sc9860-ap-clk 108 + - sprd,sc9860-cam-clk 109 + - sprd,sc9860-disp-clk 110 + - sprd,sc9860-gpu-clk 111 + - sprd,sc9860-vsp-clk 112 + then: 113 + required: 114 + - reg 115 + properties: 116 + sprd,syscon: false 117 + - if: 118 + properties: 119 + compatible: 120 + contains: 121 + enum: 122 + - sprd,sc9860-agcp-gate 123 + - sprd,sc9860-aon-gate 124 + - sprd,sc9860-apahb-gate 125 + - sprd,sc9860-apapb-gate 126 + - sprd,sc9860-cam-gate 127 + - sprd,sc9860-disp-gate 128 + - sprd,sc9860-pll 129 + - sprd,sc9860-pmu-gate 130 + - sprd,sc9860-vsp-gate 131 + then: 132 + required: 133 + - sprd,syscon 134 + properties: 135 + reg: false 136 + 137 + additionalProperties: false 138 + 139 + examples: 140 + - | 141 + soc { 142 + #address-cells = <2>; 143 + #size-cells = <2>; 144 + 145 + pmu-gate { 146 + compatible = "sprd,sc9860-pmu-gate"; 147 + clocks = <&ext_26m>; 148 + #clock-cells = <1>; 149 + sprd,syscon = <&pmu_regs>; 150 + }; 151 + 152 + clock-controller@20000000 { 153 + compatible = "sprd,sc9860-ap-clk"; 154 + reg = <0 0x20000000 0 0x400>; 155 + clocks = <&ext_26m>, <&pll 0>, <&pmu_gate 0>; 156 + #clock-cells = <1>; 157 + }; 158 + }; 159 + ...