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

dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema

Convert the Amlogic Always-On Clock Controller bindings to dt-schema.

[jbrunet: Fixed whitespace checkpatch warning]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230706-b4-amlogic-bindings-convert-take2-v3-2-f63de6f12dcc@linaro.org
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

authored by

Neil Armstrong and committed by
Jerome Brunet
74f3d867 2ad72b1e

+85 -64
-64
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
··· 1 - * Amlogic GXBB AO Clock and Reset Unit 2 - 3 - The Amlogic GXBB AO clock controller generates and supplies clock to various 4 - controllers within the Always-On part of the SoC. 5 - 6 - Required Properties: 7 - 8 - - compatible: value should be different for each SoC family as : 9 - - GXBB (S905) : "amlogic,meson-gxbb-aoclkc" 10 - - GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc" 11 - - GXM (S912) : "amlogic,meson-gxm-aoclkc" 12 - - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc" 13 - - G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc" 14 - followed by the common "amlogic,meson-gx-aoclkc" 15 - - clocks: list of clock phandle, one for each entry clock-names. 16 - - clock-names: should contain the following: 17 - * "xtal" : the platform xtal 18 - * "mpeg-clk" : the main clock controller mother clock (aka clk81) 19 - * "ext-32k-0" : external 32kHz reference #0 if any (optional) 20 - * "ext-32k-1" : external 32kHz reference #1 if any (optional - gx only) 21 - * "ext-32k-2" : external 32kHz reference #2 if any (optional - gx only) 22 - 23 - - #clock-cells: should be 1. 24 - 25 - Each clock is assigned an identifier and client nodes can use this identifier 26 - to specify the clock which they consume. All available clocks are defined as 27 - preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be 28 - used in device tree sources. 29 - 30 - - #reset-cells: should be 1. 31 - 32 - Each reset is assigned an identifier and client nodes can use this identifier 33 - to specify the reset which they consume. All available resets are defined as 34 - preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be 35 - used in device tree sources. 36 - 37 - Parent node should have the following properties : 38 - - compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd" 39 - - reg: base address and size of the AO system control register space. 40 - 41 - Example: AO Clock controller node: 42 - 43 - ao_sysctrl: sys-ctrl@0 { 44 - compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"; 45 - reg = <0x0 0x0 0x0 0x100>; 46 - 47 - clkc_AO: clock-controller { 48 - compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; 49 - #clock-cells = <1>; 50 - #reset-cells = <1>; 51 - clocks = <&xtal>, <&clkc CLKID_CLK81>; 52 - clock-names = "xtal", "mpeg-clk"; 53 - }; 54 - 55 - Example: UART controller node that consumes the clock and reset generated 56 - by the clock controller: 57 - 58 - uart_AO: serial@4c0 { 59 - compatible = "amlogic,meson-uart"; 60 - reg = <0x4c0 0x14>; 61 - interrupts = <0 90 1>; 62 - clocks = <&clkc_AO CLKID_AO_UART1>; 63 - resets = <&clkc_AO RESET_AO_UART1>; 64 - };
+85
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.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,gxbb-aoclkc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Amlogic Always-On Clock Controller 8 + 9 + maintainers: 10 + - Neil Armstrong <neil.armstrong@linaro.org> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - items: 16 + - enum: 17 + - amlogic,meson-gxbb-aoclkc 18 + - amlogic,meson-gxl-aoclkc 19 + - amlogic,meson-gxm-aoclkc 20 + - amlogic,meson-axg-aoclkc 21 + - const: amlogic,meson-gx-aoclkc 22 + - enum: 23 + - amlogic,meson-axg-aoclkc 24 + - amlogic,meson-g12a-aoclkc 25 + 26 + clocks: 27 + minItems: 2 28 + maxItems: 5 29 + 30 + clock-names: 31 + minItems: 2 32 + items: 33 + - const: xtal 34 + - const: mpeg-clk 35 + - const: ext-32k-0 36 + - const: ext-32k-1 37 + - const: ext-32k-2 38 + 39 + '#clock-cells': 40 + const: 1 41 + 42 + '#reset-cells': 43 + const: 1 44 + 45 + required: 46 + - compatible 47 + - clocks 48 + - clock-names 49 + - '#clock-cells' 50 + - '#reset-cells' 51 + 52 + allOf: 53 + - if: 54 + properties: 55 + compatible: 56 + enum: 57 + - amlogic,meson-g12a-aoclkc 58 + 59 + then: 60 + properties: 61 + clocks: 62 + minItems: 2 63 + maxItems: 3 64 + 65 + clock-names: 66 + minItems: 2 67 + maxItems: 3 68 + 69 + - if: 70 + properties: 71 + compatible: 72 + enum: 73 + - amlogic,meson-gxl-aoclkc 74 + - amlogic,meson-gxm-aoclkc 75 + - amlogic,meson-axg-aoclkc 76 + 77 + then: 78 + properties: 79 + clocks: 80 + maxItems: 2 81 + 82 + clock-names: 83 + maxItems: 2 84 + 85 + additionalProperties: false