xref: /freebsd/sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Mark Brown <broonie@kernel.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotallOf:
13cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml#
14c66ec88fSEmmanuel Vadot  - if:
15c66ec88fSEmmanuel Vadot      properties:
16c66ec88fSEmmanuel Vadot        compatible:
17c66ec88fSEmmanuel Vadot          contains:
18c66ec88fSEmmanuel Vadot            enum:
19c66ec88fSEmmanuel Vadot              - mscc,ocelot-spi
20c66ec88fSEmmanuel Vadot              - mscc,jaguar2-spi
21c66ec88fSEmmanuel Vadot    then:
22c66ec88fSEmmanuel Vadot      properties:
23c66ec88fSEmmanuel Vadot        reg:
24c66ec88fSEmmanuel Vadot          minItems: 2
256be33864SEmmanuel Vadot  - if:
266be33864SEmmanuel Vadot      properties:
276be33864SEmmanuel Vadot        compatible:
286be33864SEmmanuel Vadot          contains:
296be33864SEmmanuel Vadot            enum:
306be33864SEmmanuel Vadot              - baikal,bt1-sys-ssi
316be33864SEmmanuel Vadot    then:
326be33864SEmmanuel Vadot      properties:
336be33864SEmmanuel Vadot        mux-controls:
346be33864SEmmanuel Vadot          maxItems: 1
356be33864SEmmanuel Vadot      required:
366be33864SEmmanuel Vadot        - mux-controls
376be33864SEmmanuel Vadot    else:
386be33864SEmmanuel Vadot      required:
396be33864SEmmanuel Vadot        - interrupts
40fac71e4eSEmmanuel Vadot  - if:
41fac71e4eSEmmanuel Vadot      properties:
42fac71e4eSEmmanuel Vadot        compatible:
43fac71e4eSEmmanuel Vadot          contains:
44fac71e4eSEmmanuel Vadot            const: amd,pensando-elba-spi
45fac71e4eSEmmanuel Vadot    then:
46fac71e4eSEmmanuel Vadot      required:
47fac71e4eSEmmanuel Vadot        - amd,pensando-elba-syscon
48fac71e4eSEmmanuel Vadot    else:
49fac71e4eSEmmanuel Vadot      properties:
50fac71e4eSEmmanuel Vadot        amd,pensando-elba-syscon: false
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadotproperties:
53c66ec88fSEmmanuel Vadot  compatible:
54c66ec88fSEmmanuel Vadot    oneOf:
55c66ec88fSEmmanuel Vadot      - description: Generic DW SPI Controller
56c66ec88fSEmmanuel Vadot        enum:
57c66ec88fSEmmanuel Vadot          - snps,dw-apb-ssi
58c66ec88fSEmmanuel Vadot          - snps,dwc-ssi-1.01a
59c66ec88fSEmmanuel Vadot      - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
60c66ec88fSEmmanuel Vadot        items:
61c66ec88fSEmmanuel Vadot          - enum:
62c66ec88fSEmmanuel Vadot              - mscc,ocelot-spi
63c66ec88fSEmmanuel Vadot              - mscc,jaguar2-spi
64c66ec88fSEmmanuel Vadot          - const: snps,dw-apb-ssi
656be33864SEmmanuel Vadot      - description: Microchip Sparx5 SoC SPI Controller
666be33864SEmmanuel Vadot        const: microchip,sparx5-spi
67c66ec88fSEmmanuel Vadot      - description: Amazon Alpine SPI Controller
68c66ec88fSEmmanuel Vadot        const: amazon,alpine-dw-apb-ssi
69c66ec88fSEmmanuel Vadot      - description: Renesas RZ/N1 SPI Controller
70c66ec88fSEmmanuel Vadot        items:
71c66ec88fSEmmanuel Vadot          - const: renesas,rzn1-spi
72c66ec88fSEmmanuel Vadot          - const: snps,dw-apb-ssi
73c66ec88fSEmmanuel Vadot      - description: Intel Keem Bay SPI Controller
74c66ec88fSEmmanuel Vadot        const: intel,keembay-ssi
75f126890aSEmmanuel Vadot      - description: Intel Mount Evans Integrated Management Complex SPI Controller
76f126890aSEmmanuel Vadot        const: intel,mountevans-imc-ssi
77fac71e4eSEmmanuel Vadot      - description: AMD Pensando Elba SoC SPI Controller
78fac71e4eSEmmanuel Vadot        const: amd,pensando-elba-spi
796be33864SEmmanuel Vadot      - description: Baikal-T1 SPI Controller
806be33864SEmmanuel Vadot        const: baikal,bt1-ssi
816be33864SEmmanuel Vadot      - description: Baikal-T1 System Boot SPI Controller
826be33864SEmmanuel Vadot        const: baikal,bt1-sys-ssi
835def4c47SEmmanuel Vadot      - description: Canaan Kendryte K210 SoS SPI Controller
845def4c47SEmmanuel Vadot        const: canaan,k210-spi
855956d97fSEmmanuel Vadot      - description: Renesas RZ/N1 SPI Controller
865956d97fSEmmanuel Vadot        items:
875956d97fSEmmanuel Vadot          - enum:
885956d97fSEmmanuel Vadot              - renesas,r9a06g032-spi # RZ/N1D
895956d97fSEmmanuel Vadot              - renesas,r9a06g033-spi # RZ/N1S
905956d97fSEmmanuel Vadot          - const: renesas,rzn1-spi   # RZ/N1
91c66ec88fSEmmanuel Vadot
92c66ec88fSEmmanuel Vadot  reg:
93c66ec88fSEmmanuel Vadot    minItems: 1
94c66ec88fSEmmanuel Vadot    items:
95c66ec88fSEmmanuel Vadot      - description: DW APB SSI controller memory mapped registers
966be33864SEmmanuel Vadot      - description: SPI MST region map or directly mapped SPI ROM
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot  interrupts:
99c66ec88fSEmmanuel Vadot    maxItems: 1
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot  clocks:
102c66ec88fSEmmanuel Vadot    minItems: 1
103c66ec88fSEmmanuel Vadot    items:
104c66ec88fSEmmanuel Vadot      - description: SPI Controller reference clock source
105c66ec88fSEmmanuel Vadot      - description: APB interface clock source
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot  clock-names:
108c66ec88fSEmmanuel Vadot    minItems: 1
109c66ec88fSEmmanuel Vadot    items:
110c66ec88fSEmmanuel Vadot      - const: ssi_clk
111c66ec88fSEmmanuel Vadot      - const: pclk
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot  resets:
114c66ec88fSEmmanuel Vadot    maxItems: 1
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadot  reset-names:
117c66ec88fSEmmanuel Vadot    const: spi
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot  reg-io-width:
120c66ec88fSEmmanuel Vadot    description: I/O register width (in bytes) implemented by this device
121c66ec88fSEmmanuel Vadot    default: 4
122c66ec88fSEmmanuel Vadot    enum: [ 2, 4 ]
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel Vadot  num-cs:
125c66ec88fSEmmanuel Vadot    default: 4
126c66ec88fSEmmanuel Vadot    minimum: 1
127c66ec88fSEmmanuel Vadot    maximum: 4
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot  dmas:
130c66ec88fSEmmanuel Vadot    items:
131c66ec88fSEmmanuel Vadot      - description: TX DMA Channel
132c66ec88fSEmmanuel Vadot      - description: RX DMA Channel
133c66ec88fSEmmanuel Vadot
134c66ec88fSEmmanuel Vadot  dma-names:
135c66ec88fSEmmanuel Vadot    items:
136c66ec88fSEmmanuel Vadot      - const: tx
137c66ec88fSEmmanuel Vadot      - const: rx
138c66ec88fSEmmanuel Vadot
1396be33864SEmmanuel Vadot  rx-sample-delay-ns:
1406be33864SEmmanuel Vadot    default: 0
141b97ee269SEmmanuel Vadot    description: |
142b97ee269SEmmanuel Vadot      Default value of the rx-sample-delay-ns property.
1436be33864SEmmanuel Vadot      This value will be used if the property is not explicitly defined
144b97ee269SEmmanuel Vadot      for a SPI slave device.
145b97ee269SEmmanuel Vadot
146b97ee269SEmmanuel Vadot      SPI Rx sample delay offset, unit is nanoseconds.
147b97ee269SEmmanuel Vadot      The delay from the default sample time before the actual sample of the
148b97ee269SEmmanuel Vadot      rxd input signal occurs. The "rx_sample_delay" is an optional feature
149b97ee269SEmmanuel Vadot      of the designware controller, and the upper limit is also subject to
150b97ee269SEmmanuel Vadot      controller configuration.
1516be33864SEmmanuel Vadot
152fac71e4eSEmmanuel Vadot  amd,pensando-elba-syscon:
153fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
154fac71e4eSEmmanuel Vadot    description:
155fac71e4eSEmmanuel Vadot      Block address to control SPI chip-selects. The Elba SoC system controller
156fac71e4eSEmmanuel Vadot      provides an interface to override the native DWC SSI CS control.
157fac71e4eSEmmanuel Vadot
158c66ec88fSEmmanuel VadotpatternProperties:
159c66ec88fSEmmanuel Vadot  "^.*@[0-9a-f]+$":
160c66ec88fSEmmanuel Vadot    type: object
161*84943d6fSEmmanuel Vadot    additionalProperties: true
162*84943d6fSEmmanuel Vadot
163c66ec88fSEmmanuel Vadot    properties:
164c66ec88fSEmmanuel Vadot      reg:
165c66ec88fSEmmanuel Vadot        minimum: 0
166c66ec88fSEmmanuel Vadot        maximum: 3
167c66ec88fSEmmanuel Vadot
168c66ec88fSEmmanuel VadotunevaluatedProperties: false
169c66ec88fSEmmanuel Vadot
170c66ec88fSEmmanuel Vadotrequired:
171c66ec88fSEmmanuel Vadot  - compatible
172c66ec88fSEmmanuel Vadot  - reg
173c66ec88fSEmmanuel Vadot  - "#address-cells"
174c66ec88fSEmmanuel Vadot  - "#size-cells"
175c66ec88fSEmmanuel Vadot  - clocks
176c66ec88fSEmmanuel Vadot
177c66ec88fSEmmanuel Vadotexamples:
178c66ec88fSEmmanuel Vadot  - |
179c66ec88fSEmmanuel Vadot    spi@fff00000 {
180c66ec88fSEmmanuel Vadot      compatible = "snps,dw-apb-ssi";
181c66ec88fSEmmanuel Vadot      reg = <0xfff00000 0x1000>;
182c66ec88fSEmmanuel Vadot      #address-cells = <1>;
183c66ec88fSEmmanuel Vadot      #size-cells = <0>;
184c66ec88fSEmmanuel Vadot      interrupts = <0 154 4>;
185c66ec88fSEmmanuel Vadot      clocks = <&spi_m_clk>;
186c66ec88fSEmmanuel Vadot      num-cs = <2>;
187c66ec88fSEmmanuel Vadot      cs-gpios = <&gpio0 13 0>,
188c66ec88fSEmmanuel Vadot                 <&gpio0 14 0>;
1896be33864SEmmanuel Vadot      rx-sample-delay-ns = <3>;
190354d7675SEmmanuel Vadot      flash@1 {
1916be33864SEmmanuel Vadot        compatible = "spi-nand";
1926be33864SEmmanuel Vadot        reg = <1>;
1936be33864SEmmanuel Vadot        rx-sample-delay-ns = <7>;
1946be33864SEmmanuel Vadot      };
1956be33864SEmmanuel Vadot    };
1966be33864SEmmanuel Vadot  - |
1976be33864SEmmanuel Vadot    spi@1f040100 {
1986be33864SEmmanuel Vadot      compatible = "baikal,bt1-sys-ssi";
1996be33864SEmmanuel Vadot      reg = <0x1f040100 0x900>,
2006be33864SEmmanuel Vadot            <0x1c000000 0x1000000>;
2016be33864SEmmanuel Vadot      #address-cells = <1>;
2026be33864SEmmanuel Vadot      #size-cells = <0>;
2036be33864SEmmanuel Vadot      mux-controls = <&boot_mux>;
2046be33864SEmmanuel Vadot      clocks = <&ccu_sys>;
2056be33864SEmmanuel Vadot      clock-names = "ssi_clk";
206c66ec88fSEmmanuel Vadot    };
207c66ec88fSEmmanuel Vadot...
208