xref: /openbmc/linux/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1164c05f0SSerge Semin# SPDX-License-Identifier: GPL-2.0-only
2164c05f0SSerge Semin%YAML 1.2
3164c05f0SSerge Semin---
4164c05f0SSerge Semin$id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#
5164c05f0SSerge Semin$schema: http://devicetree.org/meta-schemas/core.yaml#
6164c05f0SSerge Semin
7164c05f0SSerge Semintitle: Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface
8164c05f0SSerge Semin
9164c05f0SSerge Seminmaintainers:
10164c05f0SSerge Semin  - Mark Brown <broonie@kernel.org>
11164c05f0SSerge Semin
12164c05f0SSerge SeminallOf:
1399a7fa0eSKrzysztof Kozlowski  - $ref: spi-controller.yaml#
14164c05f0SSerge Semin  - if:
15164c05f0SSerge Semin      properties:
16164c05f0SSerge Semin        compatible:
17164c05f0SSerge Semin          contains:
18164c05f0SSerge Semin            enum:
19164c05f0SSerge Semin              - mscc,ocelot-spi
20164c05f0SSerge Semin              - mscc,jaguar2-spi
21164c05f0SSerge Semin    then:
22164c05f0SSerge Semin      properties:
23164c05f0SSerge Semin        reg:
24164c05f0SSerge Semin          minItems: 2
25ca4e2ac2SSerge Semin  - if:
26ca4e2ac2SSerge Semin      properties:
27ca4e2ac2SSerge Semin        compatible:
28ca4e2ac2SSerge Semin          contains:
29ca4e2ac2SSerge Semin            enum:
30ca4e2ac2SSerge Semin              - baikal,bt1-sys-ssi
31ca4e2ac2SSerge Semin    then:
32ca4e2ac2SSerge Semin      properties:
33ca4e2ac2SSerge Semin        mux-controls:
34ca4e2ac2SSerge Semin          maxItems: 1
35ca4e2ac2SSerge Semin      required:
36ca4e2ac2SSerge Semin        - mux-controls
37ca4e2ac2SSerge Semin    else:
38ca4e2ac2SSerge Semin      required:
39ca4e2ac2SSerge Semin        - interrupts
40*6282a6ceSBrad Larson  - if:
41*6282a6ceSBrad Larson      properties:
42*6282a6ceSBrad Larson        compatible:
43*6282a6ceSBrad Larson          contains:
44*6282a6ceSBrad Larson            const: amd,pensando-elba-spi
45*6282a6ceSBrad Larson    then:
46*6282a6ceSBrad Larson      required:
47*6282a6ceSBrad Larson        - amd,pensando-elba-syscon
48*6282a6ceSBrad Larson    else:
49*6282a6ceSBrad Larson      properties:
50*6282a6ceSBrad Larson        amd,pensando-elba-syscon: false
51164c05f0SSerge Semin
52164c05f0SSerge Seminproperties:
53164c05f0SSerge Semin  compatible:
54164c05f0SSerge Semin    oneOf:
55164c05f0SSerge Semin      - description: Generic DW SPI Controller
56164c05f0SSerge Semin        enum:
57164c05f0SSerge Semin          - snps,dw-apb-ssi
58164c05f0SSerge Semin          - snps,dwc-ssi-1.01a
59164c05f0SSerge Semin      - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
60164c05f0SSerge Semin        items:
61164c05f0SSerge Semin          - enum:
62164c05f0SSerge Semin              - mscc,ocelot-spi
63164c05f0SSerge Semin              - mscc,jaguar2-spi
64164c05f0SSerge Semin          - const: snps,dw-apb-ssi
655ce78f44SLars Povlsen      - description: Microchip Sparx5 SoC SPI Controller
665ce78f44SLars Povlsen        const: microchip,sparx5-spi
67164c05f0SSerge Semin      - description: Amazon Alpine SPI Controller
68164c05f0SSerge Semin        const: amazon,alpine-dw-apb-ssi
69164c05f0SSerge Semin      - description: Renesas RZ/N1 SPI Controller
70164c05f0SSerge Semin        items:
71164c05f0SSerge Semin          - const: renesas,rzn1-spi
72164c05f0SSerge Semin          - const: snps,dw-apb-ssi
73164c05f0SSerge Semin      - description: Intel Keem Bay SPI Controller
74164c05f0SSerge Semin        const: intel,keembay-ssi
750d085723SNandhini Srikandan      - description: Intel Thunder Bay SPI Controller
760d085723SNandhini Srikandan        const: intel,thunderbay-ssi
77*6282a6ceSBrad Larson      - description: Intel Mount Evans Integrated Management Complex SPI Controller
78*6282a6ceSBrad Larson        const: intel,mountevans-imc-ssi
79ca4e2ac2SSerge Semin      - description: AMD Pensando Elba SoC SPI Controller
80ca4e2ac2SSerge Semin        const: amd,pensando-elba-spi
81ca4e2ac2SSerge Semin      - description: Baikal-T1 SPI Controller
82ca4e2ac2SSerge Semin        const: baikal,bt1-ssi
837b14a272SDamien Le Moal      - description: Baikal-T1 System Boot SPI Controller
847b14a272SDamien Le Moal        const: baikal,bt1-sys-ssi
85029d32a8SGeert Uytterhoeven      - description: Canaan Kendryte K210 SoS SPI Controller
86029d32a8SGeert Uytterhoeven        const: canaan,k210-spi
87029d32a8SGeert Uytterhoeven      - description: Renesas RZ/N1 SPI Controller
88029d32a8SGeert Uytterhoeven        items:
89029d32a8SGeert Uytterhoeven          - enum:
90029d32a8SGeert Uytterhoeven              - renesas,r9a06g032-spi # RZ/N1D
91164c05f0SSerge Semin              - renesas,r9a06g033-spi # RZ/N1S
92164c05f0SSerge Semin          - const: renesas,rzn1-spi   # RZ/N1
93164c05f0SSerge Semin
94164c05f0SSerge Semin  reg:
95164c05f0SSerge Semin    minItems: 1
96ca4e2ac2SSerge Semin    items:
97164c05f0SSerge Semin      - description: DW APB SSI controller memory mapped registers
98164c05f0SSerge Semin      - description: SPI MST region map or directly mapped SPI ROM
99164c05f0SSerge Semin
100164c05f0SSerge Semin  interrupts:
101164c05f0SSerge Semin    maxItems: 1
102164c05f0SSerge Semin
103164c05f0SSerge Semin  clocks:
104164c05f0SSerge Semin    minItems: 1
105164c05f0SSerge Semin    items:
106164c05f0SSerge Semin      - description: SPI Controller reference clock source
107164c05f0SSerge Semin      - description: APB interface clock source
108164c05f0SSerge Semin
109164c05f0SSerge Semin  clock-names:
110164c05f0SSerge Semin    minItems: 1
111164c05f0SSerge Semin    items:
112164c05f0SSerge Semin      - const: ssi_clk
113164c05f0SSerge Semin      - const: pclk
114164c05f0SSerge Semin
115164c05f0SSerge Semin  resets:
116164c05f0SSerge Semin    maxItems: 1
117164c05f0SSerge Semin
118164c05f0SSerge Semin  reset-names:
119164c05f0SSerge Semin    const: spi
120164c05f0SSerge Semin
121164c05f0SSerge Semin  reg-io-width:
122164c05f0SSerge Semin    description: I/O register width (in bytes) implemented by this device
123164c05f0SSerge Semin    default: 4
124164c05f0SSerge Semin    enum: [ 2, 4 ]
125164c05f0SSerge Semin
126164c05f0SSerge Semin  num-cs:
127164c05f0SSerge Semin    default: 4
128164c05f0SSerge Semin    minimum: 1
129164c05f0SSerge Semin    maximum: 4
130164c05f0SSerge Semin
131164c05f0SSerge Semin  dmas:
132164c05f0SSerge Semin    items:
133164c05f0SSerge Semin      - description: TX DMA Channel
134164c05f0SSerge Semin      - description: RX DMA Channel
135164c05f0SSerge Semin
136164c05f0SSerge Semin  dma-names:
137164c05f0SSerge Semin    items:
138164c05f0SSerge Semin      - const: tx
1395ce78f44SLars Povlsen      - const: rx
1405ce78f44SLars Povlsen
141b658be56SRob Herring  rx-sample-delay-ns:
142b658be56SRob Herring    default: 0
1435ce78f44SLars Povlsen    description: |
144b658be56SRob Herring      Default value of the rx-sample-delay-ns property.
145b658be56SRob Herring      This value will be used if the property is not explicitly defined
146b658be56SRob Herring      for a SPI slave device.
147b658be56SRob Herring
148b658be56SRob Herring      SPI Rx sample delay offset, unit is nanoseconds.
149b658be56SRob Herring      The delay from the default sample time before the actual sample of the
150b658be56SRob Herring      rxd input signal occurs. The "rx_sample_delay" is an optional feature
1515ce78f44SLars Povlsen      of the designware controller, and the upper limit is also subject to
152*6282a6ceSBrad Larson      controller configuration.
153*6282a6ceSBrad Larson
154*6282a6ceSBrad Larson  amd,pensando-elba-syscon:
155*6282a6ceSBrad Larson    $ref: /schemas/types.yaml#/definitions/phandle-array
156*6282a6ceSBrad Larson    description:
157*6282a6ceSBrad Larson      Block address to control SPI chip-selects. The Elba SoC system controller
158164c05f0SSerge Semin      provides an interface to override the native DWC SSI CS control.
159164c05f0SSerge Semin
160164c05f0SSerge SeminpatternProperties:
161164c05f0SSerge Semin  "^.*@[0-9a-f]+$":
162164c05f0SSerge Semin    type: object
163164c05f0SSerge Semin    properties:
164164c05f0SSerge Semin      reg:
165164c05f0SSerge Semin        minimum: 0
166164c05f0SSerge Semin        maximum: 3
167164c05f0SSerge Semin
168164c05f0SSerge SeminunevaluatedProperties: false
169164c05f0SSerge Semin
170164c05f0SSerge Seminrequired:
171164c05f0SSerge Semin  - compatible
172164c05f0SSerge Semin  - reg
173164c05f0SSerge Semin  - "#address-cells"
174164c05f0SSerge Semin  - "#size-cells"
175164c05f0SSerge Semin  - clocks
176164c05f0SSerge Semin
177164c05f0SSerge Seminexamples:
178164c05f0SSerge Semin  - |
179164c05f0SSerge Semin    spi@fff00000 {
180164c05f0SSerge Semin      compatible = "snps,dw-apb-ssi";
181164c05f0SSerge Semin      reg = <0xfff00000 0x1000>;
182164c05f0SSerge Semin      #address-cells = <1>;
183164c05f0SSerge Semin      #size-cells = <0>;
184164c05f0SSerge Semin      interrupts = <0 154 4>;
185164c05f0SSerge Semin      clocks = <&spi_m_clk>;
186164c05f0SSerge Semin      num-cs = <2>;
1875ce78f44SLars Povlsen      cs-gpios = <&gpio0 13 0>,
188d7a48e27SApurva Nandan                 <&gpio0 14 0>;
1895ce78f44SLars Povlsen      rx-sample-delay-ns = <3>;
1905ce78f44SLars Povlsen      flash@1 {
1915ce78f44SLars Povlsen        compatible = "spi-nand";
1925ce78f44SLars Povlsen        reg = <1>;
193164c05f0SSerge Semin        rx-sample-delay-ns = <7>;
194ca4e2ac2SSerge Semin      };
195ca4e2ac2SSerge Semin    };
196ca4e2ac2SSerge Semin  - |
197ca4e2ac2SSerge Semin    spi@1f040100 {
198ca4e2ac2SSerge Semin      compatible = "baikal,bt1-sys-ssi";
199ca4e2ac2SSerge Semin      reg = <0x1f040100 0x900>,
200ca4e2ac2SSerge Semin            <0x1c000000 0x1000000>;
201ca4e2ac2SSerge Semin      #address-cells = <1>;
202ca4e2ac2SSerge Semin      #size-cells = <0>;
203ca4e2ac2SSerge Semin      mux-controls = <&boot_mux>;
204ca4e2ac2SSerge Semin      clocks = <&ccu_sys>;
205164c05f0SSerge Semin      clock-names = "ssi_clk";
206    };
207...
208