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

dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format

Convert Amlogic AXG Audio Clock Controller binding to yaml.

Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240513224552.800153-1-jan.dakinevich@salutedevices.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

authored by

Alexander Stein and committed by
Jerome Brunet
23dc5f7e 1613e604

+201 -59
-59
Documentation/devicetree/bindings/clock/amlogic,axg-audio-clkc.txt
··· 1 - * Amlogic AXG Audio Clock Controllers 2 - 3 - The Amlogic AXG audio clock controller generates and supplies clock to the 4 - other elements of the audio subsystem, such as fifos, i2s, spdif and pdm 5 - devices. 6 - 7 - Required Properties: 8 - 9 - - compatible : should be "amlogic,axg-audio-clkc" for the A113X and A113D, 10 - "amlogic,g12a-audio-clkc" for G12A, 11 - "amlogic,sm1-audio-clkc" for S905X3. 12 - - reg : physical base address of the clock controller and length of 13 - memory mapped region. 14 - - clocks : a list of phandle + clock-specifier pairs for the clocks listed 15 - in clock-names. 16 - - clock-names : must contain the following: 17 - * "pclk" - Main peripheral bus clock 18 - may contain the following: 19 - * "mst_in[0-7]" - 8 input plls to generate clock signals 20 - * "slv_sclk[0-9]" - 10 slave bit clocks provided by external 21 - components. 22 - * "slv_lrclk[0-9]" - 10 slave sample clocks provided by external 23 - components. 24 - - resets : phandle of the internal reset line 25 - - #clock-cells : should be 1. 26 - - #reset-cells : should be 1 on the g12a (and following) soc family 27 - 28 - Each clock is assigned an identifier and client nodes can use this identifier 29 - to specify the clock which they consume. All available clocks are defined as 30 - preprocessor macros in the dt-bindings/clock/axg-audio-clkc.h header and can be 31 - used in device tree sources. 32 - 33 - Example: 34 - 35 - clkc_audio: clock-controller@0 { 36 - compatible = "amlogic,axg-audio-clkc"; 37 - reg = <0x0 0x0 0x0 0xb4>; 38 - #clock-cells = <1>; 39 - 40 - clocks = <&clkc CLKID_AUDIO>, 41 - <&clkc CLKID_MPLL0>, 42 - <&clkc CLKID_MPLL1>, 43 - <&clkc CLKID_MPLL2>, 44 - <&clkc CLKID_MPLL3>, 45 - <&clkc CLKID_HIFI_PLL>, 46 - <&clkc CLKID_FCLK_DIV3>, 47 - <&clkc CLKID_FCLK_DIV4>, 48 - <&clkc CLKID_GP0_PLL>; 49 - clock-names = "pclk", 50 - "mst_in0", 51 - "mst_in1", 52 - "mst_in2", 53 - "mst_in3", 54 - "mst_in4", 55 - "mst_in5", 56 - "mst_in6", 57 - "mst_in7"; 58 - resets = <&reset RESET_AUDIO>; 59 - };
+201
Documentation/devicetree/bindings/clock/amlogic,axg-audio-clkc.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/amlogic,axg-audio-clkc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Amlogic AXG Audio Clock Controller 8 + 9 + maintainers: 10 + - Neil Armstrong <neil.armstrong@linaro.org> 11 + - Jerome Brunet <jbrunet@baylibre.com> 12 + 13 + description: 14 + The Amlogic AXG audio clock controller generates and supplies clock to the 15 + other elements of the audio subsystem, such as fifos, i2s, spdif and pdm 16 + devices. 17 + 18 + properties: 19 + compatible: 20 + enum: 21 + - amlogic,axg-audio-clkc 22 + - amlogic,g12a-audio-clkc 23 + - amlogic,sm1-audio-clkc 24 + 25 + '#clock-cells': 26 + const: 1 27 + 28 + '#reset-cells': 29 + const: 1 30 + 31 + reg: 32 + maxItems: 1 33 + 34 + clocks: 35 + minItems: 1 36 + items: 37 + - description: main peripheral bus clock 38 + - description: input plls to generate clock signals N0 39 + - description: input plls to generate clock signals N1 40 + - description: input plls to generate clock signals N2 41 + - description: input plls to generate clock signals N3 42 + - description: input plls to generate clock signals N4 43 + - description: input plls to generate clock signals N5 44 + - description: input plls to generate clock signals N6 45 + - description: input plls to generate clock signals N7 46 + - description: slave bit clock N0 provided by external components 47 + - description: slave bit clock N1 provided by external components 48 + - description: slave bit clock N2 provided by external components 49 + - description: slave bit clock N3 provided by external components 50 + - description: slave bit clock N4 provided by external components 51 + - description: slave bit clock N5 provided by external components 52 + - description: slave bit clock N6 provided by external components 53 + - description: slave bit clock N7 provided by external components 54 + - description: slave bit clock N8 provided by external components 55 + - description: slave bit clock N9 provided by external components 56 + - description: slave sample clock N0 provided by external components 57 + - description: slave sample clock N1 provided by external components 58 + - description: slave sample clock N2 provided by external components 59 + - description: slave sample clock N3 provided by external components 60 + - description: slave sample clock N4 provided by external components 61 + - description: slave sample clock N5 provided by external components 62 + - description: slave sample clock N6 provided by external components 63 + - description: slave sample clock N7 provided by external components 64 + - description: slave sample clock N8 provided by external components 65 + - description: slave sample clock N9 provided by external components 66 + 67 + clock-names: 68 + minItems: 1 69 + items: 70 + - const: pclk 71 + - const: mst_in0 72 + - const: mst_in1 73 + - const: mst_in2 74 + - const: mst_in3 75 + - const: mst_in4 76 + - const: mst_in5 77 + - const: mst_in6 78 + - const: mst_in7 79 + - const: slv_sclk0 80 + - const: slv_sclk1 81 + - const: slv_sclk2 82 + - const: slv_sclk3 83 + - const: slv_sclk4 84 + - const: slv_sclk5 85 + - const: slv_sclk6 86 + - const: slv_sclk7 87 + - const: slv_sclk8 88 + - const: slv_sclk9 89 + - const: slv_lrclk0 90 + - const: slv_lrclk1 91 + - const: slv_lrclk2 92 + - const: slv_lrclk3 93 + - const: slv_lrclk4 94 + - const: slv_lrclk5 95 + - const: slv_lrclk6 96 + - const: slv_lrclk7 97 + - const: slv_lrclk8 98 + - const: slv_lrclk9 99 + 100 + resets: 101 + description: internal reset line 102 + 103 + required: 104 + - compatible 105 + - '#clock-cells' 106 + - reg 107 + - clocks 108 + - clock-names 109 + - resets 110 + 111 + allOf: 112 + - if: 113 + properties: 114 + compatible: 115 + contains: 116 + enum: 117 + - amlogic,g12a-audio-clkc 118 + - amlogic,sm1-audio-clkc 119 + then: 120 + required: 121 + - '#reset-cells' 122 + else: 123 + properties: 124 + '#reset-cells': false 125 + 126 + additionalProperties: false 127 + 128 + examples: 129 + - | 130 + #include <dt-bindings/clock/axg-clkc.h> 131 + #include <dt-bindings/reset/amlogic,meson-axg-reset.h> 132 + apb { 133 + #address-cells = <2>; 134 + #size-cells = <2>; 135 + 136 + clkc_audio: clock-controller@0 { 137 + compatible = "amlogic,axg-audio-clkc"; 138 + reg = <0x0 0x0 0x0 0xb4>; 139 + #clock-cells = <1>; 140 + 141 + clocks = <&clkc CLKID_AUDIO>, 142 + <&clkc CLKID_MPLL0>, 143 + <&clkc CLKID_MPLL1>, 144 + <&clkc CLKID_MPLL2>, 145 + <&clkc CLKID_MPLL3>, 146 + <&clkc CLKID_HIFI_PLL>, 147 + <&clkc CLKID_FCLK_DIV3>, 148 + <&clkc CLKID_FCLK_DIV4>, 149 + <&clkc CLKID_GP0_PLL>, 150 + <&slv_sclk0>, 151 + <&slv_sclk1>, 152 + <&slv_sclk2>, 153 + <&slv_sclk3>, 154 + <&slv_sclk4>, 155 + <&slv_sclk5>, 156 + <&slv_sclk6>, 157 + <&slv_sclk7>, 158 + <&slv_sclk8>, 159 + <&slv_sclk9>, 160 + <&slv_lrclk0>, 161 + <&slv_lrclk1>, 162 + <&slv_lrclk2>, 163 + <&slv_lrclk3>, 164 + <&slv_lrclk4>, 165 + <&slv_lrclk5>, 166 + <&slv_lrclk6>, 167 + <&slv_lrclk7>, 168 + <&slv_lrclk8>, 169 + <&slv_lrclk9>; 170 + clock-names = "pclk", 171 + "mst_in0", 172 + "mst_in1", 173 + "mst_in2", 174 + "mst_in3", 175 + "mst_in4", 176 + "mst_in5", 177 + "mst_in6", 178 + "mst_in7", 179 + "slv_sclk0", 180 + "slv_sclk1", 181 + "slv_sclk2", 182 + "slv_sclk3", 183 + "slv_sclk4", 184 + "slv_sclk5", 185 + "slv_sclk6", 186 + "slv_sclk7", 187 + "slv_sclk8", 188 + "slv_sclk9", 189 + "slv_lrclk0", 190 + "slv_lrclk1", 191 + "slv_lrclk2", 192 + "slv_lrclk3", 193 + "slv_lrclk4", 194 + "slv_lrclk5", 195 + "slv_lrclk6", 196 + "slv_lrclk7", 197 + "slv_lrclk8", 198 + "slv_lrclk9"; 199 + resets = <&reset RESET_AUDIO>; 200 + }; 201 + };