arm64: dts: qcom: sm8550: add TRNG node
[linux-modified.git] / Documentation / devicetree / bindings / spi / snps,dw-apb-ssi.yaml
1 # SPDX-License-Identifier: GPL-2.0-only
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface
8
9 maintainers:
10   - Mark Brown <broonie@kernel.org>
11
12 allOf:
13   - $ref: spi-controller.yaml#
14   - if:
15       properties:
16         compatible:
17           contains:
18             enum:
19               - mscc,ocelot-spi
20               - mscc,jaguar2-spi
21     then:
22       properties:
23         reg:
24           minItems: 2
25   - if:
26       properties:
27         compatible:
28           contains:
29             enum:
30               - baikal,bt1-sys-ssi
31     then:
32       properties:
33         mux-controls:
34           maxItems: 1
35       required:
36         - mux-controls
37     else:
38       required:
39         - interrupts
40   - if:
41       properties:
42         compatible:
43           contains:
44             const: amd,pensando-elba-spi
45     then:
46       required:
47         - amd,pensando-elba-syscon
48     else:
49       properties:
50         amd,pensando-elba-syscon: false
51
52 properties:
53   compatible:
54     oneOf:
55       - description: Generic DW SPI Controller
56         enum:
57           - snps,dw-apb-ssi
58           - snps,dwc-ssi-1.01a
59       - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
60         items:
61           - enum:
62               - mscc,ocelot-spi
63               - mscc,jaguar2-spi
64           - const: snps,dw-apb-ssi
65       - description: Microchip Sparx5 SoC SPI Controller
66         const: microchip,sparx5-spi
67       - description: Amazon Alpine SPI Controller
68         const: amazon,alpine-dw-apb-ssi
69       - description: Renesas RZ/N1 SPI Controller
70         items:
71           - const: renesas,rzn1-spi
72           - const: snps,dw-apb-ssi
73       - description: Intel Keem Bay SPI Controller
74         const: intel,keembay-ssi
75       - description: Intel Thunder Bay SPI Controller
76         const: intel,thunderbay-ssi
77       - description: Intel Mount Evans Integrated Management Complex SPI Controller
78         const: intel,mountevans-imc-ssi
79       - description: AMD Pensando Elba SoC SPI Controller
80         const: amd,pensando-elba-spi
81       - description: Baikal-T1 SPI Controller
82         const: baikal,bt1-ssi
83       - description: Baikal-T1 System Boot SPI Controller
84         const: baikal,bt1-sys-ssi
85       - description: Canaan Kendryte K210 SoS SPI Controller
86         const: canaan,k210-spi
87       - description: Renesas RZ/N1 SPI Controller
88         items:
89           - enum:
90               - renesas,r9a06g032-spi # RZ/N1D
91               - renesas,r9a06g033-spi # RZ/N1S
92           - const: renesas,rzn1-spi   # RZ/N1
93
94   reg:
95     minItems: 1
96     items:
97       - description: DW APB SSI controller memory mapped registers
98       - description: SPI MST region map or directly mapped SPI ROM
99
100   interrupts:
101     maxItems: 1
102
103   clocks:
104     minItems: 1
105     items:
106       - description: SPI Controller reference clock source
107       - description: APB interface clock source
108
109   clock-names:
110     minItems: 1
111     items:
112       - const: ssi_clk
113       - const: pclk
114
115   resets:
116     maxItems: 1
117
118   reset-names:
119     const: spi
120
121   reg-io-width:
122     description: I/O register width (in bytes) implemented by this device
123     default: 4
124     enum: [ 2, 4 ]
125
126   num-cs:
127     default: 4
128     minimum: 1
129     maximum: 4
130
131   dmas:
132     items:
133       - description: TX DMA Channel
134       - description: RX DMA Channel
135
136   dma-names:
137     items:
138       - const: tx
139       - const: rx
140
141   rx-sample-delay-ns:
142     default: 0
143     description: |
144       Default value of the rx-sample-delay-ns property.
145       This value will be used if the property is not explicitly defined
146       for a SPI slave device.
147
148       SPI Rx sample delay offset, unit is nanoseconds.
149       The delay from the default sample time before the actual sample of the
150       rxd input signal occurs. The "rx_sample_delay" is an optional feature
151       of the designware controller, and the upper limit is also subject to
152       controller configuration.
153
154   amd,pensando-elba-syscon:
155     $ref: /schemas/types.yaml#/definitions/phandle-array
156     description:
157       Block address to control SPI chip-selects. The Elba SoC system controller
158       provides an interface to override the native DWC SSI CS control.
159
160 patternProperties:
161   "^.*@[0-9a-f]+$":
162     type: object
163     additionalProperties: true
164
165     properties:
166       reg:
167         minimum: 0
168         maximum: 3
169
170 unevaluatedProperties: false
171
172 required:
173   - compatible
174   - reg
175   - "#address-cells"
176   - "#size-cells"
177   - clocks
178
179 examples:
180   - |
181     spi@fff00000 {
182       compatible = "snps,dw-apb-ssi";
183       reg = <0xfff00000 0x1000>;
184       #address-cells = <1>;
185       #size-cells = <0>;
186       interrupts = <0 154 4>;
187       clocks = <&spi_m_clk>;
188       num-cs = <2>;
189       cs-gpios = <&gpio0 13 0>,
190                  <&gpio0 14 0>;
191       rx-sample-delay-ns = <3>;
192       flash@1 {
193         compatible = "spi-nand";
194         reg = <1>;
195         rx-sample-delay-ns = <7>;
196       };
197     };
198   - |
199     spi@1f040100 {
200       compatible = "baikal,bt1-sys-ssi";
201       reg = <0x1f040100 0x900>,
202             <0x1c000000 0x1000000>;
203       #address-cells = <1>;
204       #size-cells = <0>;
205       mux-controls = <&boot_mux>;
206       clocks = <&ccu_sys>;
207       clock-names = "ssi_clk";
208     };
209 ...