0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface
0008
0009 maintainers:
0010 - Mark Brown <broonie@kernel.org>
0011
0012 allOf:
0013 - $ref: "spi-controller.yaml#"
0014 - if:
0015 properties:
0016 compatible:
0017 contains:
0018 enum:
0019 - mscc,ocelot-spi
0020 - mscc,jaguar2-spi
0021 then:
0022 properties:
0023 reg:
0024 minItems: 2
0025 - if:
0026 properties:
0027 compatible:
0028 contains:
0029 enum:
0030 - baikal,bt1-sys-ssi
0031 then:
0032 properties:
0033 mux-controls:
0034 maxItems: 1
0035 required:
0036 - mux-controls
0037 else:
0038 required:
0039 - interrupts
0040
0041 properties:
0042 compatible:
0043 oneOf:
0044 - description: Generic DW SPI Controller
0045 enum:
0046 - snps,dw-apb-ssi
0047 - snps,dwc-ssi-1.01a
0048 - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
0049 items:
0050 - enum:
0051 - mscc,ocelot-spi
0052 - mscc,jaguar2-spi
0053 - const: snps,dw-apb-ssi
0054 - description: Microchip Sparx5 SoC SPI Controller
0055 const: microchip,sparx5-spi
0056 - description: Amazon Alpine SPI Controller
0057 const: amazon,alpine-dw-apb-ssi
0058 - description: Renesas RZ/N1 SPI Controller
0059 items:
0060 - const: renesas,rzn1-spi
0061 - const: snps,dw-apb-ssi
0062 - description: Intel Keem Bay SPI Controller
0063 const: intel,keembay-ssi
0064 - description: Intel Thunder Bay SPI Controller
0065 const: intel,thunderbay-ssi
0066 - description: Baikal-T1 SPI Controller
0067 const: baikal,bt1-ssi
0068 - description: Baikal-T1 System Boot SPI Controller
0069 const: baikal,bt1-sys-ssi
0070 - description: Canaan Kendryte K210 SoS SPI Controller
0071 const: canaan,k210-spi
0072 - description: Renesas RZ/N1 SPI Controller
0073 items:
0074 - enum:
0075 - renesas,r9a06g032-spi # RZ/N1D
0076 - renesas,r9a06g033-spi # RZ/N1S
0077 - const: renesas,rzn1-spi # RZ/N1
0078
0079 reg:
0080 minItems: 1
0081 items:
0082 - description: DW APB SSI controller memory mapped registers
0083 - description: SPI MST region map or directly mapped SPI ROM
0084
0085 interrupts:
0086 maxItems: 1
0087
0088 clocks:
0089 minItems: 1
0090 items:
0091 - description: SPI Controller reference clock source
0092 - description: APB interface clock source
0093
0094 clock-names:
0095 minItems: 1
0096 items:
0097 - const: ssi_clk
0098 - const: pclk
0099
0100 resets:
0101 maxItems: 1
0102
0103 reset-names:
0104 const: spi
0105
0106 reg-io-width:
0107 $ref: /schemas/types.yaml#/definitions/uint32
0108 description: I/O register width (in bytes) implemented by this device
0109 default: 4
0110 enum: [ 2, 4 ]
0111
0112 num-cs:
0113 default: 4
0114 minimum: 1
0115 maximum: 4
0116
0117 dmas:
0118 items:
0119 - description: TX DMA Channel
0120 - description: RX DMA Channel
0121
0122 dma-names:
0123 items:
0124 - const: tx
0125 - const: rx
0126
0127 rx-sample-delay-ns:
0128 default: 0
0129 description: |
0130 Default value of the rx-sample-delay-ns property.
0131 This value will be used if the property is not explicitly defined
0132 for a SPI slave device.
0133
0134 SPI Rx sample delay offset, unit is nanoseconds.
0135 The delay from the default sample time before the actual sample of the
0136 rxd input signal occurs. The "rx_sample_delay" is an optional feature
0137 of the designware controller, and the upper limit is also subject to
0138 controller configuration.
0139
0140 patternProperties:
0141 "^.*@[0-9a-f]+$":
0142 type: object
0143 properties:
0144 reg:
0145 minimum: 0
0146 maximum: 3
0147
0148 unevaluatedProperties: false
0149
0150 required:
0151 - compatible
0152 - reg
0153 - "#address-cells"
0154 - "#size-cells"
0155 - clocks
0156
0157 examples:
0158 - |
0159 spi@fff00000 {
0160 compatible = "snps,dw-apb-ssi";
0161 reg = <0xfff00000 0x1000>;
0162 #address-cells = <1>;
0163 #size-cells = <0>;
0164 interrupts = <0 154 4>;
0165 clocks = <&spi_m_clk>;
0166 num-cs = <2>;
0167 cs-gpios = <&gpio0 13 0>,
0168 <&gpio0 14 0>;
0169 rx-sample-delay-ns = <3>;
0170 flash@1 {
0171 compatible = "spi-nand";
0172 reg = <1>;
0173 rx-sample-delay-ns = <7>;
0174 };
0175 };
0176 - |
0177 spi@1f040100 {
0178 compatible = "baikal,bt1-sys-ssi";
0179 reg = <0x1f040100 0x900>,
0180 <0x1c000000 0x1000000>;
0181 #address-cells = <1>;
0182 #size-cells = <0>;
0183 mux-controls = <&boot_mux>;
0184 clocks = <&ccu_sys>;
0185 clock-names = "ssi_clk";
0186 };
0187 ...