Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 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: |
Icenowy Zheng | 189f028 | 2017-08-09 16:56:24 +0800 | [diff] [blame] | 12 | - compatible : should be: |
| 13 | - "allwinner,sun4i-a10-sram-controller" |
| 14 | - "allwinner,sun50i-a64-sram-controller" |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 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 |
Krzysztof Kozlowski | 22697ac | 2015-11-19 09:42:49 +0900 | [diff] [blame] | 21 | Documentation/devicetree/bindings/sram/sram.txt |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 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 | |
Icenowy Zheng | 189f028 | 2017-08-09 16:56:24 +0800 | [diff] [blame] | 27 | The valid sections compatible for A10 are: |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 28 | - allwinner,sun4i-a10-sram-a3-a4 |
| 29 | - allwinner,sun4i-a10-sram-d |
| 30 | |
Icenowy Zheng | 189f028 | 2017-08-09 16:56:24 +0800 | [diff] [blame] | 31 | The valid sections compatible for A64 are: |
| 32 | - allwinner,sun50i-a64-sram-c |
| 33 | |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 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 | ------- |
Marco Franchi | 48c926c | 2017-11-08 14:27:48 -0200 | [diff] [blame^] | 50 | sram-controller@1c00000 { |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 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>; |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 67 | }; |
| 68 | }; |
| 69 | }; |
| 70 | |
Marco Franchi | 48c926c | 2017-11-08 14:27:48 -0200 | [diff] [blame^] | 71 | emac: ethernet@1c0b000 { |
Maxime Ripard | 4af34b5 | 2015-06-01 11:04:26 +0200 | [diff] [blame] | 72 | compatible = "allwinner,sun4i-a10-emac"; |
| 73 | ... |
| 74 | |
| 75 | allwinner,sram = <&emac_sram 1>; |
| 76 | }; |