1Allwinnner SoC SRAM controllers
2-----------------------------------------------------
3
4The SRAM controller found on most Allwinner devices is represented by
5a regular node for the SRAM controller itself, with sub-nodes
6reprensenting the SRAM handled by the SRAM controller.
7
8Controller Node
9---------------
10
11Required properties:
12- compatible : should be:
13    - "allwinner,sun4i-a10-sram-controller" (deprecated)
14    - "allwinner,sun4i-a10-system-control"
15    - "allwinner,sun5i-a13-system-control"
16    - "allwinner,sun7i-a20-system-control", "allwinner,sun4i-a10-system-control"
17    - "allwinner,sun8i-a23-system-control"
18    - "allwinner,sun8i-h3-system-control"
19    - "allwinner,sun50i-a64-sram-controller" (deprecated)
20    - "allwinner,sun50i-a64-system-control"
21- reg : sram controller register offset + length
22
23SRAM nodes
24----------
25
26Each SRAM is described using the mmio-sram bindings documented in
27Documentation/devicetree/bindings/sram/sram.txt
28
29Each SRAM will have SRAM sections that are going to be handled by the
30SRAM controller as subnodes. These sections are represented following
31once again the representation described in the mmio-sram binding.
32
33The valid sections compatible for A10 are:
34    - allwinner,sun4i-a10-sram-a3-a4
35    - allwinner,sun4i-a10-sram-c1
36    - allwinner,sun4i-a10-sram-d
37
38The valid sections compatible for A13 are:
39    - allwinner,sun5i-a13-sram-a3-a4, allwinner,sun4i-a10-sram-a3-a4
40    - allwinner,sun5i-a13-sram-c1, allwinner,sun4i-a10-sram-c1
41    - allwinner,sun5i-a13-sram-d, allwinner,sun4i-a10-sram-d
42
43The valid sections compatible for A20 are:
44    - allwinner,sun7i-a20-sram-a3-a4, allwinner,sun4i-a10-sram-a3-a4
45    - allwinner,sun7i-a20-sram-c1, allwinner,sun4i-a10-sram-c1
46    - allwinner,sun7i-a20-sram-d, allwinner,sun4i-a10-sram-d
47
48The valid sections compatible for A23/A33 are:
49    - allwinner,sun8i-a23-sram-c1, allwinner,sun4i-a10-sram-c1
50
51The valid sections compatible for H3 are:
52    - allwinner,sun8i-h3-sram-c1, allwinner,sun4i-a10-sram-c1
53
54The valid sections compatible for A64 are:
55    - allwinner,sun50i-a64-sram-c
56
57Devices using SRAM sections
58---------------------------
59
60Some devices need to request to the SRAM controller to map an SRAM for
61their exclusive use.
62
63The relationship between such a device and an SRAM section is
64expressed through the allwinner,sram property, that will take a
65phandle and an argument.
66
67This valid values for this argument are:
68  - 0: CPU
69  - 1: Device
70
71Example
72-------
73system-control@1c00000 {
74	compatible = "allwinner,sun4i-a10-system-control";
75	reg = <0x01c00000 0x30>;
76	#address-cells = <1>;
77	#size-cells = <1>;
78	ranges;
79
80	sram_a: sram@00000000 {
81		compatible = "mmio-sram";
82		reg = <0x00000000 0xc000>;
83		#address-cells = <1>;
84		#size-cells = <1>;
85		ranges = <0 0x00000000 0xc000>;
86
87		emac_sram: sram-section@8000 {
88			compatible = "allwinner,sun4i-a10-sram-a3-a4";
89			reg = <0x8000 0x4000>;
90		};
91	};
92};
93
94emac: ethernet@1c0b000 {
95	compatible = "allwinner,sun4i-a10-emac";
96	...
97
98	allwinner,sram = <&emac_sram 1>;
99};
100