Commit | Line | Data |
---|---|---|
4af34b57 MR |
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 : "allwinner,sun4i-a10-sram-controller" | |
13 | - reg : sram controller register offset + length | |
14 | ||
15 | SRAM nodes | |
16 | ---------- | |
17 | ||
18 | Each SRAM is described using the mmio-sram bindings documented in | |
22697acd | 19 | Documentation/devicetree/bindings/sram/sram.txt |
4af34b57 MR |
20 | |
21 | Each SRAM will have SRAM sections that are going to be handled by the | |
22 | SRAM controller as subnodes. These sections are represented following | |
23 | once again the representation described in the mmio-sram binding. | |
24 | ||
25 | The valid sections compatible are: | |
26 | - allwinner,sun4i-a10-sram-a3-a4 | |
27 | - allwinner,sun4i-a10-sram-d | |
28 | ||
29 | Devices using SRAM sections | |
30 | --------------------------- | |
31 | ||
32 | Some devices need to request to the SRAM controller to map an SRAM for | |
33 | their exclusive use. | |
34 | ||
35 | The relationship between such a device and an SRAM section is | |
36 | expressed through the allwinner,sram property, that will take a | |
37 | phandle and an argument. | |
38 | ||
39 | This valid values for this argument are: | |
40 | - 0: CPU | |
41 | - 1: Device | |
42 | ||
43 | Example | |
44 | ------- | |
45 | sram-controller@01c00000 { | |
46 | compatible = "allwinner,sun4i-a10-sram-controller"; | |
47 | reg = <0x01c00000 0x30>; | |
48 | #address-cells = <1>; | |
49 | #size-cells = <1>; | |
50 | ranges; | |
51 | ||
52 | sram_a: sram@00000000 { | |
53 | compatible = "mmio-sram"; | |
54 | reg = <0x00000000 0xc000>; | |
55 | #address-cells = <1>; | |
56 | #size-cells = <1>; | |
57 | ranges = <0 0x00000000 0xc000>; | |
58 | ||
59 | emac_sram: sram-section@8000 { | |
60 | compatible = "allwinner,sun4i-a10-sram-a3-a4"; | |
61 | reg = <0x8000 0x4000>; | |
62 | status = "disabled"; | |
63 | }; | |
64 | }; | |
65 | }; | |
66 | ||
67 | emac: ethernet@01c0b000 { | |
68 | compatible = "allwinner,sun4i-a10-emac"; | |
69 | ... | |
70 | ||
71 | allwinner,sram = <&emac_sram 1>; | |
72 | }; |