1# SPDX-License-Identifier: GPL-2.0+
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 System Control Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13description:
14  The SRAM controller found on most Allwinner devices is represented
15  by a regular node for the SRAM controller itself, with sub-nodes
16  representing the SRAM handled by the SRAM controller.
17
18properties:
19  "#address-cells":
20    const: 1
21
22  "#size-cells":
23    const: 1
24
25  compatible:
26    oneOf:
27      - const: allwinner,sun4i-a10-sram-controller
28        deprecated: true
29      - const: allwinner,sun4i-a10-system-control
30      - const: allwinner,sun5i-a13-system-control
31      - items:
32        - const: allwinner,sun7i-a20-system-control
33        - const: allwinner,sun4i-a10-system-control
34      - const: allwinner,sun8i-a23-system-control
35      - const: allwinner,sun8i-h3-system-control
36      - const: allwinner,sun50i-a64-sram-controller
37        deprecated: true
38      - const: allwinner,sun50i-a64-system-control
39      - const: allwinner,sun50i-h5-system-control
40      - items:
41        - const: allwinner,sun50i-h6-system-control
42        - const: allwinner,sun50i-a64-system-control
43      - items:
44        - const: allwinner,suniv-f1c100s-system-control
45        - const: allwinner,sun4i-a10-system-control
46
47  reg:
48    maxItems: 1
49
50  ranges: true
51
52patternProperties:
53  "^sram@[a-z0-9]+":
54    type: object
55
56    properties:
57      compatible:
58        const: mmio-sram
59
60    patternProperties:
61      "^sram-section?@[a-f0-9]+$":
62        type: object
63
64        properties:
65          compatible:
66            oneOf:
67              - const: allwinner,sun4i-a10-sram-a3-a4
68              - const: allwinner,sun4i-a10-sram-c1
69              - const: allwinner,sun4i-a10-sram-d
70              - const: allwinner,sun50i-a64-sram-c
71              - items:
72                - const: allwinner,sun5i-a13-sram-a3-a4
73                - const: allwinner,sun4i-a10-sram-a3-a4
74              - items:
75                - const: allwinner,sun7i-a20-sram-a3-a4
76                - const: allwinner,sun4i-a10-sram-a3-a4
77              - items:
78                - const: allwinner,sun5i-a13-sram-c1
79                - const: allwinner,sun4i-a10-sram-c1
80              - items:
81                - const: allwinner,sun7i-a20-sram-c1
82                - const: allwinner,sun4i-a10-sram-c1
83              - items:
84                - const: allwinner,sun8i-a23-sram-c1
85                - const: allwinner,sun4i-a10-sram-c1
86              - items:
87                - const: allwinner,sun8i-h3-sram-c1
88                - const: allwinner,sun4i-a10-sram-c1
89              - items:
90                - const: allwinner,sun50i-a64-sram-c1
91                - const: allwinner,sun4i-a10-sram-c1
92              - items:
93                - const: allwinner,sun50i-h5-sram-c1
94                - const: allwinner,sun4i-a10-sram-c1
95              - items:
96                - const: allwinner,sun50i-h6-sram-c1
97                - const: allwinner,sun4i-a10-sram-c1
98              - items:
99                - const: allwinner,sun5i-a13-sram-d
100                - const: allwinner,sun4i-a10-sram-d
101              - items:
102                - const: allwinner,sun7i-a20-sram-d
103                - const: allwinner,sun4i-a10-sram-d
104              - items:
105                - const: allwinner,suniv-f1c100s-sram-d
106                - const: allwinner,sun4i-a10-sram-d
107              - items:
108                - const: allwinner,sun50i-h6-sram-c
109                - const: allwinner,sun50i-a64-sram-c
110
111required:
112  - "#address-cells"
113  - "#size-cells"
114  - compatible
115  - reg
116
117additionalProperties: false
118
119examples:
120  - |
121    system-control@1c00000 {
122      compatible = "allwinner,sun4i-a10-system-control";
123      reg = <0x01c00000 0x30>;
124      #address-cells = <1>;
125      #size-cells = <1>;
126      ranges;
127
128      sram_a: sram@0 {
129        compatible = "mmio-sram";
130        reg = <0x00000000 0xc000>;
131        #address-cells = <1>;
132        #size-cells = <1>;
133        ranges = <0 0x00000000 0xc000>;
134
135        emac_sram: sram-section@8000 {
136          compatible = "allwinner,sun4i-a10-sram-a3-a4";
137          reg = <0x8000 0x4000>;
138        };
139      };
140    };
141