Merge branch 'rework/fixup-for-5.15' into for-linus
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / memory-controllers / arm,pl353-smc.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/memory-controllers/arm,pl353-smc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: ARM PL353 Static Memory Controller (SMC) device-tree bindings
8
9 maintainers:
10   - Miquel Raynal <miquel.raynal@bootlin.com>
11   - Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
12
13 description:
14   The PL353 Static Memory Controller is a bus where you can connect two kinds
15   of memory interfaces, which are NAND and memory mapped interfaces (such as
16   SRAM or NOR).
17
18 # We need a select here so we don't match all nodes with 'arm,primecell'
19 select:
20   properties:
21     compatible:
22       contains:
23         const: arm,pl353-smc-r2p1
24   required:
25     - compatible
26
27 properties:
28   $nodename:
29     pattern: "^memory-controller@[0-9a-f]+$"
30
31   compatible:
32     items:
33       - const: arm,pl353-smc-r2p1
34       - const: arm,primecell
35
36   "#address-cells":
37     const: 2
38
39   "#size-cells":
40     const: 1
41
42   reg:
43     items:
44       - description:
45           Configuration registers for the host and sub-controllers.
46           The three chip select regions are defined in 'ranges'.
47
48   clocks:
49     items:
50       - description: clock for the memory device bus
51       - description: main clock of the SMC
52
53   clock-names:
54     items:
55       - const: memclk
56       - const: apb_pclk
57
58   ranges:
59     minItems: 1
60     maxItems: 3
61     description: |
62       Memory bus areas for interacting with the devices. Reflects
63       the memory layout with four integer values following:
64       <cs-number> 0 <offset> <size>
65     items:
66       - description: NAND bank 0
67       - description: NOR/SRAM bank 0
68       - description: NOR/SRAM bank 1
69
70   interrupts: true
71
72 patternProperties:
73   "@[0-3],[a-f0-9]+$":
74     type: object
75     description: |
76       The child device node represents the controller connected to the SMC
77       bus. The controller can be a NAND controller or a pair of any memory
78       mapped controllers such as NOR and SRAM controllers.
79
80     properties:
81       compatible:
82         description:
83           Compatible of memory controller.
84
85       reg:
86         items:
87           - items:
88               - description: |
89                   Chip-select ID, as in the parent range property.
90                 minimum: 0
91                 maximum: 2
92               - description: |
93                   Offset of the memory region requested by the device.
94               - description: |
95                   Length of the memory region requested by the device.
96
97     required:
98       - compatible
99       - reg
100
101 required:
102   - compatible
103   - reg
104   - clock-names
105   - clocks
106   - "#address-cells"
107   - "#size-cells"
108   - ranges
109
110 additionalProperties: false
111
112 examples:
113   - |
114     smcc: memory-controller@e000e000 {
115       compatible = "arm,pl353-smc-r2p1", "arm,primecell";
116       reg = <0xe000e000 0x0001000>;
117       clock-names = "memclk", "apb_pclk";
118       clocks = <&clkc 11>, <&clkc 44>;
119       ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
120                 0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
121                 0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
122       #address-cells = <2>;
123       #size-cells = <1>;
124
125       nfc0: nand-controller@0,0 {
126         compatible = "arm,pl353-nand-r2p1";
127         reg = <0 0 0x1000000>;
128         #address-cells = <1>;
129         #size-cells = <0>;
130       };
131     };