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
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      - enum:
28          - allwinner,sun4i-a10-sram-controller
29          - allwinner,sun50i-a64-sram-controller
30        deprecated: true
31      - enum:
32          - allwinner,sun4i-a10-system-control
33          - allwinner,sun5i-a13-system-control
34          - allwinner,sun8i-a23-system-control
35          - allwinner,sun8i-h3-system-control
36          - allwinner,sun20i-d1-system-control
37          - allwinner,sun50i-a64-system-control
38          - allwinner,sun50i-h5-system-control
39          - allwinner,sun50i-h616-system-control
40      - items:
41          - enum:
42              - allwinner,suniv-f1c100s-system-control
43              - allwinner,sun7i-a20-system-control
44              - allwinner,sun8i-r40-system-control
45          - const: allwinner,sun4i-a10-system-control
46      - items:
47          - const: allwinner,sun8i-v3s-system-control
48          - const: allwinner,sun8i-h3-system-control
49      - items:
50          - const: allwinner,sun50i-h6-system-control
51          - const: allwinner,sun50i-a64-system-control
52
53  reg:
54    maxItems: 1
55
56  ranges: true
57
58patternProperties:
59  "^sram@[a-z0-9]+":
60    type: object
61
62    properties:
63      compatible:
64        const: mmio-sram
65
66    patternProperties:
67      "^sram-section?@[a-f0-9]+$":
68        type: object
69
70        properties:
71          compatible:
72            oneOf:
73              - const: allwinner,sun4i-a10-sram-a3-a4
74              - const: allwinner,sun4i-a10-sram-c1
75              - const: allwinner,sun4i-a10-sram-d
76              - const: allwinner,sun50i-a64-sram-c
77              - items:
78                  - enum:
79                      - allwinner,sun5i-a13-sram-a3-a4
80                      - allwinner,sun7i-a20-sram-a3-a4
81                  - const: allwinner,sun4i-a10-sram-a3-a4
82              - items:
83                  - enum:
84                      - allwinner,sun5i-a13-sram-c1
85                      - allwinner,sun7i-a20-sram-c1
86                      - allwinner,sun8i-a23-sram-c1
87                      - allwinner,sun8i-h3-sram-c1
88                      - allwinner,sun8i-r40-sram-c1
89                      - allwinner,sun50i-a64-sram-c1
90                      - allwinner,sun50i-h5-sram-c1
91                      - allwinner,sun50i-h6-sram-c1
92                  - const: allwinner,sun4i-a10-sram-c1
93              - items:
94                  - enum:
95                      - allwinner,suniv-f1c100s-sram-d
96                      - allwinner,sun5i-a13-sram-d
97                      - allwinner,sun7i-a20-sram-d
98                  - const: allwinner,sun4i-a10-sram-d
99              - items:
100                  - const: allwinner,sun50i-h6-sram-c
101                  - const: allwinner,sun50i-a64-sram-c
102
103required:
104  - "#address-cells"
105  - "#size-cells"
106  - compatible
107  - reg
108
109additionalProperties: false
110
111examples:
112  - |
113    system-control@1c00000 {
114      compatible = "allwinner,sun4i-a10-system-control";
115      reg = <0x01c00000 0x30>;
116      #address-cells = <1>;
117      #size-cells = <1>;
118      ranges;
119
120      sram_a: sram@0 {
121        compatible = "mmio-sram";
122        reg = <0x00000000 0xc000>;
123        #address-cells = <1>;
124        #size-cells = <1>;
125        ranges = <0 0x00000000 0xc000>;
126
127        emac_sram: sram-section@8000 {
128          compatible = "allwinner,sun4i-a10-sram-a3-a4";
129          reg = <0x8000 0x4000>;
130        };
131      };
132    };
133