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: 13c66ec88fSEmmanuel 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 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadotproperties: 42c66ec88fSEmmanuel Vadot compatible: 43c66ec88fSEmmanuel Vadot oneOf: 44c66ec88fSEmmanuel Vadot - description: Generic DW SPI Controller 45c66ec88fSEmmanuel Vadot enum: 46c66ec88fSEmmanuel Vadot - snps,dw-apb-ssi 47c66ec88fSEmmanuel Vadot - snps,dwc-ssi-1.01a 48c66ec88fSEmmanuel Vadot - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller 49c66ec88fSEmmanuel Vadot items: 50c66ec88fSEmmanuel Vadot - enum: 51c66ec88fSEmmanuel Vadot - mscc,ocelot-spi 52c66ec88fSEmmanuel Vadot - mscc,jaguar2-spi 53c66ec88fSEmmanuel Vadot - const: snps,dw-apb-ssi 546be33864SEmmanuel Vadot - description: Microchip Sparx5 SoC SPI Controller 556be33864SEmmanuel Vadot const: microchip,sparx5-spi 56c66ec88fSEmmanuel Vadot - description: Amazon Alpine SPI Controller 57c66ec88fSEmmanuel Vadot const: amazon,alpine-dw-apb-ssi 58c66ec88fSEmmanuel Vadot - description: Renesas RZ/N1 SPI Controller 59c66ec88fSEmmanuel Vadot items: 60c66ec88fSEmmanuel Vadot - const: renesas,rzn1-spi 61c66ec88fSEmmanuel Vadot - const: snps,dw-apb-ssi 62c66ec88fSEmmanuel Vadot - description: Intel Keem Bay SPI Controller 63c66ec88fSEmmanuel Vadot const: intel,keembay-ssi 646be33864SEmmanuel Vadot - description: Baikal-T1 SPI Controller 656be33864SEmmanuel Vadot const: baikal,bt1-ssi 666be33864SEmmanuel Vadot - description: Baikal-T1 System Boot SPI Controller 676be33864SEmmanuel Vadot const: baikal,bt1-sys-ssi 68*5def4c47SEmmanuel Vadot - description: Canaan Kendryte K210 SoS SPI Controller 69*5def4c47SEmmanuel Vadot const: canaan,k210-spi 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot reg: 72c66ec88fSEmmanuel Vadot minItems: 1 73c66ec88fSEmmanuel Vadot items: 74c66ec88fSEmmanuel Vadot - description: DW APB SSI controller memory mapped registers 756be33864SEmmanuel Vadot - description: SPI MST region map or directly mapped SPI ROM 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot interrupts: 78c66ec88fSEmmanuel Vadot maxItems: 1 79c66ec88fSEmmanuel Vadot 80c66ec88fSEmmanuel Vadot clocks: 81c66ec88fSEmmanuel Vadot minItems: 1 82c66ec88fSEmmanuel Vadot items: 83c66ec88fSEmmanuel Vadot - description: SPI Controller reference clock source 84c66ec88fSEmmanuel Vadot - description: APB interface clock source 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot clock-names: 87c66ec88fSEmmanuel Vadot minItems: 1 88c66ec88fSEmmanuel Vadot items: 89c66ec88fSEmmanuel Vadot - const: ssi_clk 90c66ec88fSEmmanuel Vadot - const: pclk 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot resets: 93c66ec88fSEmmanuel Vadot maxItems: 1 94c66ec88fSEmmanuel Vadot 95c66ec88fSEmmanuel Vadot reset-names: 96c66ec88fSEmmanuel Vadot const: spi 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadot reg-io-width: 99c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 100c66ec88fSEmmanuel Vadot description: I/O register width (in bytes) implemented by this device 101c66ec88fSEmmanuel Vadot default: 4 102c66ec88fSEmmanuel Vadot enum: [ 2, 4 ] 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot num-cs: 105c66ec88fSEmmanuel Vadot default: 4 106c66ec88fSEmmanuel Vadot minimum: 1 107c66ec88fSEmmanuel Vadot maximum: 4 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel Vadot dmas: 110c66ec88fSEmmanuel Vadot items: 111c66ec88fSEmmanuel Vadot - description: TX DMA Channel 112c66ec88fSEmmanuel Vadot - description: RX DMA Channel 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadot dma-names: 115c66ec88fSEmmanuel Vadot items: 116c66ec88fSEmmanuel Vadot - const: tx 117c66ec88fSEmmanuel Vadot - const: rx 118c66ec88fSEmmanuel Vadot 1196be33864SEmmanuel Vadot rx-sample-delay-ns: 1206be33864SEmmanuel Vadot default: 0 1216be33864SEmmanuel Vadot description: Default value of the rx-sample-delay-ns property. 1226be33864SEmmanuel Vadot This value will be used if the property is not explicitly defined 1236be33864SEmmanuel Vadot for a SPI slave device. See below. 1246be33864SEmmanuel Vadot 125c66ec88fSEmmanuel VadotpatternProperties: 126c66ec88fSEmmanuel Vadot "^.*@[0-9a-f]+$": 127c66ec88fSEmmanuel Vadot type: object 128c66ec88fSEmmanuel Vadot properties: 129c66ec88fSEmmanuel Vadot reg: 130c66ec88fSEmmanuel Vadot minimum: 0 131c66ec88fSEmmanuel Vadot maximum: 3 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel Vadot spi-rx-bus-width: 134c66ec88fSEmmanuel Vadot const: 1 135c66ec88fSEmmanuel Vadot 136c66ec88fSEmmanuel Vadot spi-tx-bus-width: 137c66ec88fSEmmanuel Vadot const: 1 138c66ec88fSEmmanuel Vadot 1396be33864SEmmanuel Vadot rx-sample-delay-ns: 1406be33864SEmmanuel Vadot description: SPI Rx sample delay offset, unit is nanoseconds. 1416be33864SEmmanuel Vadot The delay from the default sample time before the actual 1426be33864SEmmanuel Vadot sample of the rxd input signal occurs. The "rx_sample_delay" 1436be33864SEmmanuel Vadot is an optional feature of the designware controller, and the 1446be33864SEmmanuel Vadot upper limit is also subject to controller configuration. 1456be33864SEmmanuel Vadot 146c66ec88fSEmmanuel VadotunevaluatedProperties: false 147c66ec88fSEmmanuel Vadot 148c66ec88fSEmmanuel Vadotrequired: 149c66ec88fSEmmanuel Vadot - compatible 150c66ec88fSEmmanuel Vadot - reg 151c66ec88fSEmmanuel Vadot - "#address-cells" 152c66ec88fSEmmanuel Vadot - "#size-cells" 153c66ec88fSEmmanuel Vadot - clocks 154c66ec88fSEmmanuel Vadot 155c66ec88fSEmmanuel Vadotexamples: 156c66ec88fSEmmanuel Vadot - | 157c66ec88fSEmmanuel Vadot spi@fff00000 { 158c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-ssi"; 159c66ec88fSEmmanuel Vadot reg = <0xfff00000 0x1000>; 160c66ec88fSEmmanuel Vadot #address-cells = <1>; 161c66ec88fSEmmanuel Vadot #size-cells = <0>; 162c66ec88fSEmmanuel Vadot interrupts = <0 154 4>; 163c66ec88fSEmmanuel Vadot clocks = <&spi_m_clk>; 164c66ec88fSEmmanuel Vadot num-cs = <2>; 165c66ec88fSEmmanuel Vadot cs-gpios = <&gpio0 13 0>, 166c66ec88fSEmmanuel Vadot <&gpio0 14 0>; 1676be33864SEmmanuel Vadot rx-sample-delay-ns = <3>; 1686be33864SEmmanuel Vadot spi-flash@1 { 1696be33864SEmmanuel Vadot compatible = "spi-nand"; 1706be33864SEmmanuel Vadot reg = <1>; 1716be33864SEmmanuel Vadot rx-sample-delay-ns = <7>; 1726be33864SEmmanuel Vadot }; 1736be33864SEmmanuel Vadot }; 1746be33864SEmmanuel Vadot - | 1756be33864SEmmanuel Vadot spi@1f040100 { 1766be33864SEmmanuel Vadot compatible = "baikal,bt1-sys-ssi"; 1776be33864SEmmanuel Vadot reg = <0x1f040100 0x900>, 1786be33864SEmmanuel Vadot <0x1c000000 0x1000000>; 1796be33864SEmmanuel Vadot #address-cells = <1>; 1806be33864SEmmanuel Vadot #size-cells = <0>; 1816be33864SEmmanuel Vadot mux-controls = <&boot_mux>; 1826be33864SEmmanuel Vadot clocks = <&ccu_sys>; 1836be33864SEmmanuel Vadot clock-names = "ssi_clk"; 184c66ec88fSEmmanuel Vadot }; 185c66ec88fSEmmanuel Vadot... 186