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

dt-bindings: clock: Convert img,pistachio-clk to DT schema

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Link: https://lore.kernel.org/r/20250521210712.59742-1-robh@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Rob Herring (Arm) and committed by
Stephen Boyd
46dba2e6 100026f4

+136 -123
+136
Documentation/devicetree/bindings/clock/img,pistachio-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/img,pistachio-clk.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Imagination Technologies Pistachio SoC clock controllers 8 + 9 + maintainers: 10 + - Andrew Bresticker <abrestic@chromium.org> 11 + 12 + description: | 13 + Pistachio has four clock controllers (core clock, peripheral clock, peripheral 14 + general control, and top general control) which are instantiated individually 15 + from the device-tree. 16 + 17 + Core clock controller: 18 + 19 + The core clock controller generates clocks for the CPU, RPU (WiFi + BT 20 + co-processor), audio, and several peripherals. 21 + 22 + Peripheral clock controller: 23 + 24 + The peripheral clock controller generates clocks for the DDR, ROM, and other 25 + peripherals. The peripheral system clock ("periph_sys") generated by the core 26 + clock controller is the input clock to the peripheral clock controller. 27 + 28 + Peripheral general control: 29 + 30 + The peripheral general control block generates system interface clocks and 31 + resets for various peripherals. It also contains miscellaneous peripheral 32 + control registers. 33 + 34 + Top-level general control: 35 + 36 + The top-level general control block contains miscellaneous control registers 37 + and gates for the external clocks "audio_clk_in" and "enet_clk_in". 38 + 39 + properties: 40 + compatible: 41 + items: 42 + - enum: 43 + - img,pistachio-clk 44 + - img,pistachio-clk-periph 45 + - img,pistachio-cr-periph 46 + - img,pistachio-cr-top 47 + 48 + reg: 49 + maxItems: 1 50 + 51 + '#clock-cells': 52 + const: 1 53 + 54 + clocks: 55 + minItems: 1 56 + maxItems: 3 57 + 58 + clock-names: 59 + minItems: 1 60 + maxItems: 3 61 + 62 + required: 63 + - compatible 64 + - reg 65 + - '#clock-cells' 66 + - clocks 67 + - clock-names 68 + 69 + allOf: 70 + - if: 71 + properties: 72 + compatible: 73 + contains: 74 + const: img,pistachio-clk 75 + then: 76 + properties: 77 + clocks: 78 + items: 79 + - description: External 52Mhz oscillator 80 + - description: Alternate audio reference clock 81 + - description: Alternate ethernet PHY clock 82 + 83 + clock-names: 84 + items: 85 + - const: xtal 86 + - const: audio_refclk_ext_gate 87 + - const: ext_enet_in_gate 88 + 89 + - if: 90 + properties: 91 + compatible: 92 + contains: 93 + const: img,pistachio-clk-periph 94 + then: 95 + properties: 96 + clocks: 97 + items: 98 + - description: Peripheral system clock 99 + 100 + clock-names: 101 + items: 102 + - const: periph_sys_core 103 + 104 + - if: 105 + properties: 106 + compatible: 107 + contains: 108 + const: img,pistachio-cr-periph 109 + then: 110 + properties: 111 + clocks: 112 + items: 113 + - description: System interface clock 114 + 115 + clock-names: 116 + items: 117 + - const: sys 118 + 119 + - if: 120 + properties: 121 + compatible: 122 + contains: 123 + const: img,pistachio-cr-top 124 + then: 125 + properties: 126 + clocks: 127 + items: 128 + - description: External audio reference clock 129 + - description: External ethernet PHY clock 130 + 131 + clock-names: 132 + items: 133 + - const: audio_clk_in 134 + - const: enet_clk_in 135 + 136 + additionalProperties: false
-123
Documentation/devicetree/bindings/clock/pistachio-clock.txt
··· 1 - Imagination Technologies Pistachio SoC clock controllers 2 - ======================================================== 3 - 4 - Pistachio has four clock controllers (core clock, peripheral clock, peripheral 5 - general control, and top general control) which are instantiated individually 6 - from the device-tree. 7 - 8 - External clocks: 9 - ---------------- 10 - 11 - There are three external inputs to the clock controllers which should be 12 - defined with the following clock-output-names: 13 - - "xtal": External 52Mhz oscillator (required) 14 - - "audio_clk_in": Alternate audio reference clock (optional) 15 - - "enet_clk_in": Alternate ethernet PHY clock (optional) 16 - 17 - Core clock controller: 18 - ---------------------- 19 - 20 - The core clock controller generates clocks for the CPU, RPU (WiFi + BT 21 - co-processor), audio, and several peripherals. 22 - 23 - Required properties: 24 - - compatible: Must be "img,pistachio-clk". 25 - - reg: Must contain the base address and length of the core clock controller. 26 - - #clock-cells: Must be 1. The single cell is the clock identifier. 27 - See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 28 - - clocks: Must contain an entry for each clock in clock-names. 29 - - clock-names: Must include "xtal" (see "External clocks") and 30 - "audio_clk_in_gate", "enet_clk_in_gate" which are generated by the 31 - top-level general control. 32 - 33 - Example: 34 - clk_core: clock-controller@18144000 { 35 - compatible = "img,pistachio-clk"; 36 - reg = <0x18144000 0x800>; 37 - clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>, 38 - <&cr_top EXT_CLK_ENET_IN>; 39 - clock-names = "xtal", "audio_clk_in_gate", "enet_clk_in_gate"; 40 - 41 - #clock-cells = <1>; 42 - }; 43 - 44 - Peripheral clock controller: 45 - ---------------------------- 46 - 47 - The peripheral clock controller generates clocks for the DDR, ROM, and other 48 - peripherals. The peripheral system clock ("periph_sys") generated by the core 49 - clock controller is the input clock to the peripheral clock controller. 50 - 51 - Required properties: 52 - - compatible: Must be "img,pistachio-periph-clk". 53 - - reg: Must contain the base address and length of the peripheral clock 54 - controller. 55 - - #clock-cells: Must be 1. The single cell is the clock identifier. 56 - See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 57 - - clocks: Must contain an entry for each clock in clock-names. 58 - - clock-names: Must include "periph_sys", the peripheral system clock generated 59 - by the core clock controller. 60 - 61 - Example: 62 - clk_periph: clock-controller@18144800 { 63 - compatible = "img,pistachio-clk-periph"; 64 - reg = <0x18144800 0x800>; 65 - clocks = <&clk_core CLK_PERIPH_SYS>; 66 - clock-names = "periph_sys"; 67 - 68 - #clock-cells = <1>; 69 - }; 70 - 71 - Peripheral general control: 72 - --------------------------- 73 - 74 - The peripheral general control block generates system interface clocks and 75 - resets for various peripherals. It also contains miscellaneous peripheral 76 - control registers. The system clock ("sys") generated by the peripheral clock 77 - controller is the input clock to the system clock controller. 78 - 79 - Required properties: 80 - - compatible: Must include "img,pistachio-periph-cr" and "syscon". 81 - - reg: Must contain the base address and length of the peripheral general 82 - control registers. 83 - - #clock-cells: Must be 1. The single cell is the clock identifier. 84 - See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 85 - - clocks: Must contain an entry for each clock in clock-names. 86 - - clock-names: Must include "sys", the system clock generated by the peripheral 87 - clock controller. 88 - 89 - Example: 90 - cr_periph: syscon@18144800 { 91 - compatible = "img,pistachio-cr-periph", "syscon"; 92 - reg = <0x18148000 0x1000>; 93 - clocks = <&clock_periph PERIPH_CLK_PERIPH_SYS>; 94 - clock-names = "sys"; 95 - 96 - #clock-cells = <1>; 97 - }; 98 - 99 - Top-level general control: 100 - -------------------------- 101 - 102 - The top-level general control block contains miscellaneous control registers and 103 - gates for the external clocks "audio_clk_in" and "enet_clk_in". 104 - 105 - Required properties: 106 - - compatible: Must include "img,pistachio-cr-top" and "syscon". 107 - - reg: Must contain the base address and length of the top-level 108 - control registers. 109 - - clocks: Must contain an entry for each clock in clock-names. 110 - - clock-names: Two optional clocks, "audio_clk_in" and "enet_clk_in" (see 111 - "External clocks"). 112 - - #clock-cells: Must be 1. The single cell is the clock identifier. 113 - See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 114 - 115 - Example: 116 - cr_top: syscon@18144800 { 117 - compatible = "img,pistachio-cr-top", "syscon"; 118 - reg = <0x18149000 0x200>; 119 - clocks = <&audio_refclk>, <&ext_enet_in>; 120 - clock-names = "audio_clk_in", "enet_clk_in"; 121 - 122 - #clock-cells = <1>; 123 - };