Merge tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / sram / sunxi-sram.txt
1 Allwinnner SoC SRAM controllers
2 -----------------------------------------------------
3
4 The SRAM controller found on most Allwinner devices is represented by
5 a regular node for the SRAM controller itself, with sub-nodes
6 reprensenting the SRAM handled by the SRAM controller.
7
8 Controller Node
9 ---------------
10
11 Required properties:
12 - compatible : should be:
13     - "allwinner,sun4i-a10-sram-controller"
14     - "allwinner,sun50i-a64-sram-controller"
15 - reg : sram controller register offset + length
16
17 SRAM nodes
18 ----------
19
20 Each SRAM is described using the mmio-sram bindings documented in
21 Documentation/devicetree/bindings/sram/sram.txt
22
23 Each SRAM will have SRAM sections that are going to be handled by the
24 SRAM controller as subnodes. These sections are represented following
25 once again the representation described in the mmio-sram binding.
26
27 The valid sections compatible for A10 are:
28     - allwinner,sun4i-a10-sram-a3-a4
29     - allwinner,sun4i-a10-sram-d
30
31 The valid sections compatible for A64 are:
32     - allwinner,sun50i-a64-sram-c
33
34 Devices using SRAM sections
35 ---------------------------
36
37 Some devices need to request to the SRAM controller to map an SRAM for
38 their exclusive use.
39
40 The relationship between such a device and an SRAM section is
41 expressed through the allwinner,sram property, that will take a
42 phandle and an argument.
43
44 This valid values for this argument are:
45   - 0: CPU
46   - 1: Device
47
48 Example
49 -------
50 sram-controller@1c00000 {
51         compatible = "allwinner,sun4i-a10-sram-controller";
52         reg = <0x01c00000 0x30>;
53         #address-cells = <1>;
54         #size-cells = <1>;
55         ranges;
56
57         sram_a: sram@00000000 {
58                 compatible = "mmio-sram";
59                 reg = <0x00000000 0xc000>;
60                 #address-cells = <1>;
61                 #size-cells = <1>;
62                 ranges = <0 0x00000000 0xc000>;
63
64                 emac_sram: sram-section@8000 {
65                         compatible = "allwinner,sun4i-a10-sram-a3-a4";
66                         reg = <0x8000 0x4000>;
67                 };
68         };
69 };
70
71 emac: ethernet@1c0b000 {
72         compatible = "allwinner,sun4i-a10-emac";
73         ...
74
75         allwinner,sram = <&emac_sram 1>;
76 };