xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0+
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/allwinner,sun8i-a23-prcm.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: Allwinner A23 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,sun8i-a23-prcm
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadot  reg:
20c66ec88fSEmmanuel Vadot    maxItems: 1
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel VadotpatternProperties:
23c66ec88fSEmmanuel Vadot  "^.*(clk|rst|codec).*$":
24c66ec88fSEmmanuel Vadot    type: object
25*7ef62cebSEmmanuel Vadot    unevaluatedProperties: false
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot    properties:
28c66ec88fSEmmanuel Vadot      compatible:
29c66ec88fSEmmanuel Vadot        enum:
30c66ec88fSEmmanuel Vadot          - fixed-factor-clock
31c66ec88fSEmmanuel Vadot          - allwinner,sun8i-a23-apb0-clk
32c66ec88fSEmmanuel Vadot          - allwinner,sun8i-a23-apb0-gates-clk
33c66ec88fSEmmanuel Vadot          - allwinner,sun6i-a31-clock-reset
34c66ec88fSEmmanuel Vadot          - allwinner,sun8i-a23-codec-analog
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot    required:
37c66ec88fSEmmanuel Vadot      - compatible
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot    allOf:
40c66ec88fSEmmanuel Vadot      - if:
41c66ec88fSEmmanuel Vadot          properties:
42c66ec88fSEmmanuel Vadot            compatible:
43c66ec88fSEmmanuel Vadot              contains:
44*7ef62cebSEmmanuel Vadot                const: fixed-factor-clock
45*7ef62cebSEmmanuel Vadot
46*7ef62cebSEmmanuel Vadot        then:
47*7ef62cebSEmmanuel Vadot          $ref: /schemas/clock/fixed-factor-clock.yaml#
48*7ef62cebSEmmanuel Vadot
49*7ef62cebSEmmanuel Vadot      - if:
50*7ef62cebSEmmanuel Vadot          properties:
51*7ef62cebSEmmanuel Vadot            compatible:
52*7ef62cebSEmmanuel Vadot              contains:
53c66ec88fSEmmanuel Vadot                const: allwinner,sun8i-a23-apb0-clk
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot        then:
56c66ec88fSEmmanuel Vadot          properties:
57c66ec88fSEmmanuel Vadot            "#clock-cells":
58c66ec88fSEmmanuel Vadot              const: 0
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot            clocks:
61c66ec88fSEmmanuel Vadot              maxItems: 1
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot            clock-output-names:
64c66ec88fSEmmanuel Vadot              maxItems: 1
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot          required:
67c66ec88fSEmmanuel Vadot            - "#clock-cells"
68c66ec88fSEmmanuel Vadot            - clocks
69c66ec88fSEmmanuel Vadot            - clock-output-names
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot      - if:
72c66ec88fSEmmanuel Vadot          properties:
73c66ec88fSEmmanuel Vadot            compatible:
74c66ec88fSEmmanuel Vadot              contains:
75c66ec88fSEmmanuel Vadot                const: allwinner,sun8i-a23-apb0-gates-clk
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel Vadot        then:
78c66ec88fSEmmanuel Vadot          properties:
79c66ec88fSEmmanuel Vadot            "#clock-cells":
80c66ec88fSEmmanuel Vadot              const: 1
81c66ec88fSEmmanuel Vadot              description: >
82c66ec88fSEmmanuel Vadot                This additional argument passed to that clock is the
83c66ec88fSEmmanuel Vadot                offset of the bit controlling this particular gate in
84c66ec88fSEmmanuel Vadot                the register.
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot            clocks:
87c66ec88fSEmmanuel Vadot              maxItems: 1
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot            clock-output-names:
90c66ec88fSEmmanuel Vadot              minItems: 1
91c66ec88fSEmmanuel Vadot              maxItems: 32
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot          required:
94c66ec88fSEmmanuel Vadot            - "#clock-cells"
95c66ec88fSEmmanuel Vadot            - clocks
96c66ec88fSEmmanuel Vadot            - clock-output-names
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot      - if:
99c66ec88fSEmmanuel Vadot          properties:
100c66ec88fSEmmanuel Vadot            compatible:
101c66ec88fSEmmanuel Vadot              contains:
102c66ec88fSEmmanuel Vadot                const: allwinner,sun6i-a31-clock-reset
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadot        then:
105c66ec88fSEmmanuel Vadot          properties:
106c66ec88fSEmmanuel Vadot            "#reset-cells":
107c66ec88fSEmmanuel Vadot              const: 1
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel Vadot          required:
110c66ec88fSEmmanuel Vadot            - "#reset-cells"
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel Vadotrequired:
113c66ec88fSEmmanuel Vadot  - compatible
114c66ec88fSEmmanuel Vadot  - reg
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel VadotadditionalProperties: false
117c66ec88fSEmmanuel Vadot
118c66ec88fSEmmanuel Vadotexamples:
119c66ec88fSEmmanuel Vadot  - |
120c66ec88fSEmmanuel Vadot    prcm@1f01400 {
121c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-a23-prcm";
122c66ec88fSEmmanuel Vadot        reg = <0x01f01400 0x200>;
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel Vadot        ar100: ar100_clk {
125c66ec88fSEmmanuel Vadot            compatible = "fixed-factor-clock";
126c66ec88fSEmmanuel Vadot            #clock-cells = <0>;
127c66ec88fSEmmanuel Vadot            clock-div = <1>;
128c66ec88fSEmmanuel Vadot            clock-mult = <1>;
129c66ec88fSEmmanuel Vadot            clocks = <&osc24M>;
130c66ec88fSEmmanuel Vadot            clock-output-names = "ar100";
131c66ec88fSEmmanuel Vadot        };
132c66ec88fSEmmanuel Vadot
133c66ec88fSEmmanuel Vadot        ahb0: ahb0_clk {
134c66ec88fSEmmanuel Vadot            compatible = "fixed-factor-clock";
135c66ec88fSEmmanuel Vadot            #clock-cells = <0>;
136c66ec88fSEmmanuel Vadot            clock-div = <1>;
137c66ec88fSEmmanuel Vadot            clock-mult = <1>;
138c66ec88fSEmmanuel Vadot            clocks = <&ar100>;
139c66ec88fSEmmanuel Vadot            clock-output-names = "ahb0";
140c66ec88fSEmmanuel Vadot        };
141c66ec88fSEmmanuel Vadot
142c66ec88fSEmmanuel Vadot        apb0: apb0_clk {
143c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-a23-apb0-clk";
144c66ec88fSEmmanuel Vadot            #clock-cells = <0>;
145c66ec88fSEmmanuel Vadot            clocks = <&ahb0>;
146c66ec88fSEmmanuel Vadot            clock-output-names = "apb0";
147c66ec88fSEmmanuel Vadot        };
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot        apb0_gates: apb0_gates_clk {
150c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-a23-apb0-gates-clk";
151c66ec88fSEmmanuel Vadot            #clock-cells = <1>;
152c66ec88fSEmmanuel Vadot            clocks = <&apb0>;
153c66ec88fSEmmanuel Vadot            clock-output-names = "apb0_pio", "apb0_timer",
154c66ec88fSEmmanuel Vadot                                 "apb0_rsb", "apb0_uart",
155c66ec88fSEmmanuel Vadot                                 "apb0_i2c";
156c66ec88fSEmmanuel Vadot        };
157c66ec88fSEmmanuel Vadot
158c66ec88fSEmmanuel Vadot        apb0_rst: apb0_rst {
159c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun6i-a31-clock-reset";
160c66ec88fSEmmanuel Vadot            #reset-cells = <1>;
161c66ec88fSEmmanuel Vadot        };
162c66ec88fSEmmanuel Vadot
163c66ec88fSEmmanuel Vadot        codec_analog: codec-analog {
164c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-a23-codec-analog";
165c66ec88fSEmmanuel Vadot        };
166c66ec88fSEmmanuel Vadot    };
167c66ec88fSEmmanuel Vadot
168c66ec88fSEmmanuel Vadot...
169