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

dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml

Convert Atmel PMC documentation to yaml. Along with it clock names
were adapted according to the current available device trees as
different controller versions accept different clock (some of them
have 3 clocks as input, some has 2 clocks as inputs and some with 2
input clocks uses different clock names).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230517094119.2894220-3-claudiu.beznea@microchip.com

+154 -28
-28
Documentation/devicetree/bindings/clock/at91-clock.txt
··· 28 28 #clock-cells = <0>; 29 29 }; 30 30 31 - Power Management Controller (PMC): 32 - 33 - Required properties: 34 - - compatible : shall be "atmel,<chip>-pmc", "syscon" or 35 - "microchip,sam9x60-pmc" 36 - <chip> can be: at91rm9200, at91sam9260, at91sam9261, 37 - at91sam9263, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9g15, 38 - at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35, at91sam9x5, 39 - sama5d2, sama5d3 or sama5d4. 40 - - #clock-cells : from common clock binding; shall be set to 2. The first entry 41 - is the type of the clock (core, system, peripheral or generated) and the 42 - second entry its index as provided by the datasheet 43 - - clocks : Must contain an entry for each entry in clock-names. 44 - - clock-names: Must include the following entries: "slow_clk", "main_xtal" 45 - 46 - Optional properties: 47 - - atmel,osc-bypass : boolean property. Set this when a clock signal is directly 48 - provided on XIN. 49 - 50 - For example: 51 - pmc: pmc@f0018000 { 52 - compatible = "atmel,sama5d4-pmc", "syscon"; 53 - reg = <0xf0018000 0x120>; 54 - interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 55 - #clock-cells = <2>; 56 - clocks = <&clk32k>, <&main_xtal>; 57 - clock-names = "slow_clk", "main_xtal"; 58 - };
+154
Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.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/atmel,at91rm9200-pmc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Atmel Power Management Controller (PMC) 8 + 9 + maintainers: 10 + - Claudiu Beznea <claudiu.beznea@microchip.com> 11 + 12 + description: 13 + The power management controller optimizes power consumption by controlling all 14 + system and user peripheral clocks. The PMC enables/disables the clock inputs 15 + to many of the peripherals and to the processor. 16 + 17 + properties: 18 + compatible: 19 + oneOf: 20 + - items: 21 + - const: atmel,at91sam9g20-pmc 22 + - const: atmel,at91sam9260-pmc 23 + - const: syscon 24 + - items: 25 + - enum: 26 + - atmel,at91sam9g15-pmc 27 + - atmel,at91sam9g25-pmc 28 + - atmel,at91sam9g35-pmc 29 + - atmel,at91sam9x25-pmc 30 + - atmel,at91sam9x35-pmc 31 + - const: atmel,at91sam9x5-pmc 32 + - const: syscon 33 + - items: 34 + - enum: 35 + - atmel,at91rm9200-pmc 36 + - atmel,at91sam9260-pmc 37 + - atmel,at91sam9g45-pmc 38 + - atmel,at91sam9n12-pmc 39 + - atmel,at91sam9rl-pmc 40 + - atmel,at91sam9x5-pmc 41 + - atmel,sama5d2-pmc 42 + - atmel,sama5d3-pmc 43 + - atmel,sama5d4-pmc 44 + - microchip,sam9x60-pmc 45 + - microchip,sama7g5-pmc 46 + - const: syscon 47 + 48 + reg: 49 + maxItems: 1 50 + 51 + interrupts: 52 + maxItems: 1 53 + 54 + "#clock-cells": 55 + description: | 56 + - 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM, 57 + PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined 58 + in <dt-bindings/clock/at91.h>) 59 + - 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h 60 + (for core clocks) or as defined in datasheet (for system, peripheral, 61 + gck and programmable clocks). 62 + const: 2 63 + 64 + clocks: 65 + minItems: 2 66 + maxItems: 3 67 + 68 + clock-names: 69 + minItems: 2 70 + maxItems: 3 71 + 72 + atmel,osc-bypass: 73 + description: set when a clock signal is directly provided on XIN 74 + type: boolean 75 + 76 + required: 77 + - compatible 78 + - reg 79 + - interrupts 80 + - "#clock-cells" 81 + - clocks 82 + - clock-names 83 + 84 + allOf: 85 + - if: 86 + properties: 87 + compatible: 88 + contains: 89 + enum: 90 + - microchip,sam9x60-pmc 91 + - microchip,sama7g5-pmc 92 + then: 93 + properties: 94 + clocks: 95 + minItems: 3 96 + maxItems: 3 97 + clock-names: 98 + items: 99 + - const: td_slck 100 + - const: md_slck 101 + - const: main_xtal 102 + 103 + - if: 104 + properties: 105 + compatible: 106 + contains: 107 + enum: 108 + - atmel,at91rm9200-pmc 109 + - atmel,at91sam9260-pmc 110 + - atmel,at91sam9g20-pmc 111 + then: 112 + properties: 113 + clocks: 114 + minItems: 2 115 + maxItems: 2 116 + clock-names: 117 + items: 118 + - const: slow_xtal 119 + - const: main_xtal 120 + 121 + - if: 122 + properties: 123 + compatible: 124 + contains: 125 + enum: 126 + - atmel,sama5d2-pmc 127 + - atmel,sama5d3-pmc 128 + - atmel,sama5d4-pmc 129 + then: 130 + properties: 131 + clocks: 132 + minItems: 2 133 + maxItems: 2 134 + clock-names: 135 + items: 136 + - const: slow_clk 137 + - const: main_xtal 138 + 139 + additionalProperties: false 140 + 141 + examples: 142 + - | 143 + #include <dt-bindings/interrupt-controller/irq.h> 144 + 145 + pmc: clock-controller@f0018000 { 146 + compatible = "atmel,sama5d4-pmc", "syscon"; 147 + reg = <0xf0018000 0x120>; 148 + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 149 + #clock-cells = <2>; 150 + clocks = <&clk32k>, <&main_xtal>; 151 + clock-names = "slow_clk", "main_xtal"; 152 + }; 153 + 154 + ...