1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/allwinner,sun6i-a31-prcm.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Allwinner A31 PRCM 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdeprecated: true 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadotproperties: 16c66ec88fSEmmanuel Vadot compatible: 17c66ec88fSEmmanuel Vadot const: allwinner,sun6i-a31-prcm 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot reg: 20c66ec88fSEmmanuel Vadot maxItems: 1 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel VadotpatternProperties: 23c66ec88fSEmmanuel Vadot "^.*_(clk|rst)$": 24c66ec88fSEmmanuel Vadot type: object 257ef62cebSEmmanuel Vadot unevaluatedProperties: false 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot properties: 28c66ec88fSEmmanuel Vadot compatible: 29c66ec88fSEmmanuel Vadot enum: 30c66ec88fSEmmanuel Vadot - allwinner,sun4i-a10-mod0-clk 31c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-apb0-clk 32c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-apb0-gates-clk 33c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-ar100-clk 34c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-clock-reset 35c66ec88fSEmmanuel Vadot - fixed-factor-clock 36c66ec88fSEmmanuel Vadot 37*aa1a8ff2SEmmanuel Vadot required: 38*aa1a8ff2SEmmanuel Vadot - compatible 39*aa1a8ff2SEmmanuel Vadot 40c66ec88fSEmmanuel Vadot allOf: 41c66ec88fSEmmanuel Vadot - if: 42c66ec88fSEmmanuel Vadot properties: 43c66ec88fSEmmanuel Vadot compatible: 44c66ec88fSEmmanuel Vadot contains: 457ef62cebSEmmanuel Vadot const: fixed-factor-clock 467ef62cebSEmmanuel Vadot 477ef62cebSEmmanuel Vadot then: 487ef62cebSEmmanuel Vadot $ref: /schemas/clock/fixed-factor-clock.yaml# 497ef62cebSEmmanuel Vadot 507ef62cebSEmmanuel Vadot - if: 517ef62cebSEmmanuel Vadot properties: 527ef62cebSEmmanuel Vadot compatible: 537ef62cebSEmmanuel Vadot contains: 547ef62cebSEmmanuel Vadot const: allwinner,sun4i-a10-mod0-clk 557ef62cebSEmmanuel Vadot 567ef62cebSEmmanuel Vadot then: 577ef62cebSEmmanuel Vadot properties: 587ef62cebSEmmanuel Vadot "#clock-cells": 597ef62cebSEmmanuel Vadot const: 0 607ef62cebSEmmanuel Vadot 617ef62cebSEmmanuel Vadot clocks: 627ef62cebSEmmanuel Vadot maxItems: 2 637ef62cebSEmmanuel Vadot 647ef62cebSEmmanuel Vadot clock-output-names: 657ef62cebSEmmanuel Vadot maxItems: 1 667ef62cebSEmmanuel Vadot 677ef62cebSEmmanuel Vadot required: 687ef62cebSEmmanuel Vadot - "#clock-cells" 697ef62cebSEmmanuel Vadot - clocks 707ef62cebSEmmanuel Vadot - clock-output-names 717ef62cebSEmmanuel Vadot 727ef62cebSEmmanuel Vadot - if: 737ef62cebSEmmanuel Vadot properties: 747ef62cebSEmmanuel Vadot compatible: 757ef62cebSEmmanuel Vadot contains: 76c66ec88fSEmmanuel Vadot const: allwinner,sun6i-a31-apb0-clk 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot then: 79c66ec88fSEmmanuel Vadot properties: 80c66ec88fSEmmanuel Vadot "#clock-cells": 81c66ec88fSEmmanuel Vadot const: 0 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot clocks: 84c66ec88fSEmmanuel Vadot maxItems: 1 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot clock-output-names: 87c66ec88fSEmmanuel Vadot maxItems: 1 88c66ec88fSEmmanuel Vadot 89c66ec88fSEmmanuel Vadot required: 90c66ec88fSEmmanuel Vadot - "#clock-cells" 91c66ec88fSEmmanuel Vadot - clocks 92c66ec88fSEmmanuel Vadot - clock-output-names 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel Vadot - if: 95c66ec88fSEmmanuel Vadot properties: 96c66ec88fSEmmanuel Vadot compatible: 97c66ec88fSEmmanuel Vadot contains: 98c66ec88fSEmmanuel Vadot const: allwinner,sun6i-a31-apb0-gates-clk 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot then: 101c66ec88fSEmmanuel Vadot properties: 102c66ec88fSEmmanuel Vadot "#clock-cells": 103c66ec88fSEmmanuel Vadot const: 1 104c66ec88fSEmmanuel Vadot description: > 105c66ec88fSEmmanuel Vadot This additional argument passed to that clock is the 106c66ec88fSEmmanuel Vadot offset of the bit controlling this particular gate in 107c66ec88fSEmmanuel Vadot the register. 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel Vadot clocks: 110c66ec88fSEmmanuel Vadot maxItems: 1 111c66ec88fSEmmanuel Vadot 112c66ec88fSEmmanuel Vadot clock-output-names: 113c66ec88fSEmmanuel Vadot minItems: 1 114c66ec88fSEmmanuel Vadot maxItems: 32 115c66ec88fSEmmanuel Vadot 116c66ec88fSEmmanuel Vadot required: 117c66ec88fSEmmanuel Vadot - "#clock-cells" 118c66ec88fSEmmanuel Vadot - clocks 119c66ec88fSEmmanuel Vadot - clock-output-names 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot - if: 122c66ec88fSEmmanuel Vadot properties: 123c66ec88fSEmmanuel Vadot compatible: 124c66ec88fSEmmanuel Vadot contains: 125c66ec88fSEmmanuel Vadot const: allwinner,sun6i-a31-ar100-clk 126c66ec88fSEmmanuel Vadot 127c66ec88fSEmmanuel Vadot then: 128c66ec88fSEmmanuel Vadot properties: 129c66ec88fSEmmanuel Vadot "#clock-cells": 130c66ec88fSEmmanuel Vadot const: 0 131c66ec88fSEmmanuel Vadot 132c66ec88fSEmmanuel Vadot clocks: 133c66ec88fSEmmanuel Vadot maxItems: 4 134c66ec88fSEmmanuel Vadot description: > 135c66ec88fSEmmanuel Vadot The parent order must match the hardware programming 136c66ec88fSEmmanuel Vadot order. 137c66ec88fSEmmanuel Vadot 138c66ec88fSEmmanuel Vadot clock-output-names: 139c66ec88fSEmmanuel Vadot maxItems: 1 140c66ec88fSEmmanuel Vadot 141c66ec88fSEmmanuel Vadot required: 142c66ec88fSEmmanuel Vadot - "#clock-cells" 143c66ec88fSEmmanuel Vadot - clocks 144c66ec88fSEmmanuel Vadot - clock-output-names 145c66ec88fSEmmanuel Vadot 146c66ec88fSEmmanuel Vadot - if: 147c66ec88fSEmmanuel Vadot properties: 148c66ec88fSEmmanuel Vadot compatible: 149c66ec88fSEmmanuel Vadot contains: 150c66ec88fSEmmanuel Vadot const: allwinner,sun6i-a31-clock-reset 151c66ec88fSEmmanuel Vadot 152c66ec88fSEmmanuel Vadot then: 153c66ec88fSEmmanuel Vadot properties: 154c66ec88fSEmmanuel Vadot "#reset-cells": 155c66ec88fSEmmanuel Vadot const: 1 156c66ec88fSEmmanuel Vadot 157c66ec88fSEmmanuel Vadot required: 158c66ec88fSEmmanuel Vadot - "#reset-cells" 159c66ec88fSEmmanuel Vadot 160c66ec88fSEmmanuel Vadotrequired: 161c66ec88fSEmmanuel Vadot - compatible 162c66ec88fSEmmanuel Vadot - reg 163c66ec88fSEmmanuel Vadot 164c66ec88fSEmmanuel VadotadditionalProperties: false 165c66ec88fSEmmanuel Vadot 166c66ec88fSEmmanuel Vadotexamples: 167c66ec88fSEmmanuel Vadot - | 168c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun6i-a31-ccu.h> 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel Vadot prcm@1f01400 { 171c66ec88fSEmmanuel Vadot compatible = "allwinner,sun6i-a31-prcm"; 172c66ec88fSEmmanuel Vadot reg = <0x01f01400 0x200>; 173c66ec88fSEmmanuel Vadot 174c66ec88fSEmmanuel Vadot ar100: ar100_clk { 175c66ec88fSEmmanuel Vadot compatible = "allwinner,sun6i-a31-ar100-clk"; 176c66ec88fSEmmanuel Vadot #clock-cells = <0>; 177c66ec88fSEmmanuel Vadot clocks = <&rtc 0>, <&osc24M>, 178c66ec88fSEmmanuel Vadot <&ccu CLK_PLL_PERIPH>, 179c66ec88fSEmmanuel Vadot <&ccu CLK_PLL_PERIPH>; 180c66ec88fSEmmanuel Vadot clock-output-names = "ar100"; 181c66ec88fSEmmanuel Vadot }; 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot ahb0: ahb0_clk { 184c66ec88fSEmmanuel Vadot compatible = "fixed-factor-clock"; 185c66ec88fSEmmanuel Vadot #clock-cells = <0>; 186c66ec88fSEmmanuel Vadot clock-div = <1>; 187c66ec88fSEmmanuel Vadot clock-mult = <1>; 188c66ec88fSEmmanuel Vadot clocks = <&ar100>; 189c66ec88fSEmmanuel Vadot clock-output-names = "ahb0"; 190c66ec88fSEmmanuel Vadot }; 191c66ec88fSEmmanuel Vadot 192c66ec88fSEmmanuel Vadot apb0: apb0_clk { 193c66ec88fSEmmanuel Vadot compatible = "allwinner,sun6i-a31-apb0-clk"; 194c66ec88fSEmmanuel Vadot #clock-cells = <0>; 195c66ec88fSEmmanuel Vadot clocks = <&ahb0>; 196c66ec88fSEmmanuel Vadot clock-output-names = "apb0"; 197c66ec88fSEmmanuel Vadot }; 198c66ec88fSEmmanuel Vadot 199c66ec88fSEmmanuel Vadot apb0_gates: apb0_gates_clk { 200c66ec88fSEmmanuel Vadot compatible = "allwinner,sun6i-a31-apb0-gates-clk"; 201c66ec88fSEmmanuel Vadot #clock-cells = <1>; 202c66ec88fSEmmanuel Vadot clocks = <&apb0>; 203c66ec88fSEmmanuel Vadot clock-output-names = "apb0_pio", "apb0_ir", 204c66ec88fSEmmanuel Vadot "apb0_timer", "apb0_p2wi", 205c66ec88fSEmmanuel Vadot "apb0_uart", "apb0_1wire", 206c66ec88fSEmmanuel Vadot "apb0_i2c"; 207c66ec88fSEmmanuel Vadot }; 208c66ec88fSEmmanuel Vadot 209c66ec88fSEmmanuel Vadot ir_clk: ir_clk { 210c66ec88fSEmmanuel Vadot #clock-cells = <0>; 211c66ec88fSEmmanuel Vadot compatible = "allwinner,sun4i-a10-mod0-clk"; 212c66ec88fSEmmanuel Vadot clocks = <&rtc 0>, <&osc24M>; 213c66ec88fSEmmanuel Vadot clock-output-names = "ir"; 214c66ec88fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot 216c66ec88fSEmmanuel Vadot apb0_rst: apb0_rst { 217c66ec88fSEmmanuel Vadot compatible = "allwinner,sun6i-a31-clock-reset"; 218c66ec88fSEmmanuel Vadot #reset-cells = <1>; 219c66ec88fSEmmanuel Vadot }; 220c66ec88fSEmmanuel Vadot }; 221c66ec88fSEmmanuel Vadot 222c66ec88fSEmmanuel Vadot... 223