Debian Codegraph @

Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Cadence Quad/Octal SPI controller
8
9 maintainers:
10 - Vaishnav Achath <[email protected]>
11
12 allOf:
13 - $ref: spi-controller.yaml#
14 - if:
15 properties:
16 compatible:
17 contains:
18 const: xlnx,versal-ospi-1.0
19 then:
20 required:
21 - power-domains
22 - if:
23 properties:
24 compatible:
25 contains:
26 const: starfive,jh7110-qspi
27 then:
28 properties:
29 resets:
30 minItems: 2
31 maxItems: 3
32
33 reset-names:
34 minItems: 2
35 maxItems: 3
36 items:
37 enum: [ qspi, qspi-ocp, rstc_ref ]
38
39 else:
40 properties:
41 resets:
42 maxItems: 2
43
44 reset-names:
45 minItems: 1
46 maxItems: 2
47 items:
48 enum: [ qspi, qspi-ocp ]
49 - if:
50 properties:
51 compatible:
52 contains:
53 const: amd,pensando-elba-qspi
54 then:
55 properties:
56 cdns,fifo-depth:
57 enum: [ 128, 256, 1024 ]
58 default: 1024
59 else:
60 properties:
61 cdns,fifo-depth:
62 enum: [ 128, 256 ]
63 default: 128
64 - if:
65 properties:
66 compatible:
67 contains:
68 const: renesas,rzn1-qspi
69 then:
70 properties:
71 cdns,trigger-address: false
72 cdns,fifo-depth: false
73 cdns,fifo-width: false
74 else:
75 required:
76 - cdns,trigger-address
77 - cdns,fifo-depth
78
79 properties:
80 compatible:
81 oneOf:
82 - items:
83 - enum:
84 - amd,pensando-elba-qspi
85 - amd,versal2-ospi
86 - intel,lgm-qspi
87 - intel,socfpga-qspi
88 - mobileye,eyeq5-ospi
89 - starfive,jh7110-qspi
90 - ti,am654-ospi
91 - ti,k2g-qspi
92 - xlnx,versal-ospi-1.0
93 # The compatible is qspi-nor for historical reasons but such
94 # controllers are meant to be used with flashes of all kinds,
95 # ie. also NAND flashes, not only NOR flashes.
96 - const: cdns,qspi-nor
97 - items:
98 - const: renesas,r9a06g032-qspi
99 - const: renesas,rzn1-qspi
100 - const: cdns,qspi-nor
101 deprecated: true
102
103 reg:
104 items:
105 - description: the controller register set
106 - description: the controller data area
107
108 interrupts:
109 maxItems: 1
110
111 clocks:
112 minItems: 1
113 maxItems: 3
114
115 clock-names:
116 oneOf:
117 - items:
118 - const: ref
119 - items:
120 - const: ref
121 - const: ahb
122 - const: apb
123
124 cdns,fifo-depth:
125 description:
126 Size of the data FIFO in words.
127 $ref: /schemas/types.yaml#/definitions/uint32
128
129 cdns,fifo-width:
130 $ref: /schemas/types.yaml#/definitions/uint32
131 description:
132 Bus width of the data FIFO in bytes.
133 default: 4
134
135 cdns,trigger-address:
136 $ref: /schemas/types.yaml#/definitions/uint32
137 description:
138 32-bit indirect AHB trigger address.
139
140 cdns,is-decoded-cs:
141 type: boolean
142 description:
143 Flag to indicate whether decoder is used to select different chip select
144 for different memory regions.
145
146 cdns,rclk-en:
147 type: boolean
148 description:
149 Flag to indicate that QSPI return clock is used to latch the read
150 data rather than the QSPI clock. Make sure that QSPI return clock
151 is populated on the board before using this property.
152
153 power-domains:
154 maxItems: 1
155
156 resets:
157 minItems: 2
158 maxItems: 3
159
160 reset-names:
161 minItems: 2
162 maxItems: 3
163 items:
164 enum: [ qspi, qspi-ocp, rstc_ref ]
165
166 patternProperties:
167 "^flash@[0-9a-f]+$":
168 type: object
169 $ref: cdns,qspi-nor-peripheral-props.yaml
170 additionalProperties: true
171 required:
172 - cdns,read-delay
173 - cdns,tshsl-ns
174 - cdns,tsd2d-ns
175 - cdns,tchsh-ns
176 - cdns,tslch-ns
177
178 required:
179 - compatible
180 - reg
181 - interrupts
182 - clocks
183 - '#address-cells'
184 - '#size-cells'
185
186 unevaluatedProperties: false
187
188 examples:
189 - |
190 spi@ff705000 {
191 compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
192 #address-cells = <1>;
193 #size-cells = <0>;
194 reg = <0xff705000 0x1000>,
195 <0xffa00000 0x1000>;
196 interrupts = <0 151 4>;
197 clocks = <&qspi_clk>;
198 cdns,fifo-depth = <128>;
199 cdns,fifo-width = <4>;
200 cdns,trigger-address = <0x00000000>;
201 resets = <&rst 0x1>, <&rst 0x2>;
202 reset-names = "qspi", "qspi-ocp";
203
204 flash@0 {
205 compatible = "jedec,spi-nor";
206 reg = <0x0>;
207 cdns,read-delay = <4>;
208 cdns,tshsl-ns = <60>;
209 cdns,tsd2d-ns = <60>;
210 cdns,tchsh-ns = <60>;
211 cdns,tslch-ns = <60>;
212 };
213 };