Kyle Swenson | 8d8f654 | 2021-03-15 11:02:55 -0600 | [diff] [blame^] | 1 | Generic on-chip SRAM |
| 2 | |
| 3 | Simple IO memory regions to be managed by the genalloc API. |
| 4 | |
| 5 | Required properties: |
| 6 | |
| 7 | - compatible : mmio-sram |
| 8 | |
| 9 | - reg : SRAM iomem address range |
| 10 | |
| 11 | Reserving sram areas: |
| 12 | --------------------- |
| 13 | |
| 14 | Each child of the sram node specifies a region of reserved memory. Each |
| 15 | child node should use a 'reg' property to specify a specific range of |
| 16 | reserved memory. |
| 17 | |
| 18 | Following the generic-names recommended practice, node names should |
| 19 | reflect the purpose of the node. Unit address (@<address>) should be |
| 20 | appended to the name. |
| 21 | |
| 22 | Required properties in the sram node: |
| 23 | |
| 24 | - #address-cells, #size-cells : should use the same values as the root node |
| 25 | - ranges : standard definition, should translate from local addresses |
| 26 | within the sram to bus addresses |
| 27 | |
| 28 | Required properties in the area nodes: |
| 29 | |
| 30 | - reg : iomem address range, relative to the SRAM range |
| 31 | |
| 32 | Optional properties in the area nodes: |
| 33 | |
| 34 | - compatible : standard definition, should contain a vendor specific string |
| 35 | in the form <vendor>,[<device>-]<usage> |
| 36 | - pool : indicates that the particular reserved SRAM area is addressable |
| 37 | and in use by another device or devices |
| 38 | - export : indicates that the reserved SRAM area may be accessed outside |
| 39 | of the kernel, e.g. by bootloader or userspace |
| 40 | - label : the name for the reserved partition, if omitted, the label |
| 41 | is taken from the node name excluding the unit address. |
| 42 | |
| 43 | Example: |
| 44 | |
| 45 | sram: sram@5c000000 { |
| 46 | compatible = "mmio-sram"; |
| 47 | reg = <0x5c000000 0x40000>; /* 256 KiB SRAM at address 0x5c000000 */ |
| 48 | |
| 49 | #adress-cells = <1>; |
| 50 | #size-cells = <1>; |
| 51 | ranges = <0 0x5c000000 0x40000>; |
| 52 | |
| 53 | smp-sram@100 { |
| 54 | compatible = "socvendor,smp-sram"; |
| 55 | reg = <0x100 0x50>; |
| 56 | }; |
| 57 | |
| 58 | device-sram@1000 { |
| 59 | reg = <0x1000 0x1000>; |
| 60 | pool; |
| 61 | }; |
| 62 | |
| 63 | exported@20000 { |
| 64 | reg = <0x20000 0x20000>; |
| 65 | export; |
| 66 | }; |
| 67 | }; |