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 685def4c47SEmmanuel Vadot - description: Canaan Kendryte K210 SoS SPI Controller 695def4c47SEmmanuel Vadot const: canaan,k210-spi 70*5956d97fSEmmanuel Vadot - description: Renesas RZ/N1 SPI Controller 71*5956d97fSEmmanuel Vadot items: 72*5956d97fSEmmanuel Vadot - enum: 73*5956d97fSEmmanuel Vadot - renesas,r9a06g032-spi # RZ/N1D 74*5956d97fSEmmanuel Vadot - renesas,r9a06g033-spi # RZ/N1S 75*5956d97fSEmmanuel Vadot - const: renesas,rzn1-spi # RZ/N1 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot reg: 78c66ec88fSEmmanuel Vadot minItems: 1 79c66ec88fSEmmanuel Vadot items: 80c66ec88fSEmmanuel Vadot - description: DW APB SSI controller memory mapped registers 816be33864SEmmanuel Vadot - description: SPI MST region map or directly mapped SPI ROM 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot interrupts: 84c66ec88fSEmmanuel Vadot maxItems: 1 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot clocks: 87c66ec88fSEmmanuel Vadot minItems: 1 88c66ec88fSEmmanuel Vadot items: 89c66ec88fSEmmanuel Vadot - description: SPI Controller reference clock source 90c66ec88fSEmmanuel Vadot - description: APB interface clock source 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot clock-names: 93c66ec88fSEmmanuel Vadot minItems: 1 94c66ec88fSEmmanuel Vadot items: 95c66ec88fSEmmanuel Vadot - const: ssi_clk 96c66ec88fSEmmanuel Vadot - const: pclk 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadot resets: 99c66ec88fSEmmanuel Vadot maxItems: 1 100c66ec88fSEmmanuel Vadot 101c66ec88fSEmmanuel Vadot reset-names: 102c66ec88fSEmmanuel Vadot const: spi 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot reg-io-width: 105c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 106c66ec88fSEmmanuel Vadot description: I/O register width (in bytes) implemented by this device 107c66ec88fSEmmanuel Vadot default: 4 108c66ec88fSEmmanuel Vadot enum: [ 2, 4 ] 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel Vadot num-cs: 111c66ec88fSEmmanuel Vadot default: 4 112c66ec88fSEmmanuel Vadot minimum: 1 113c66ec88fSEmmanuel Vadot maximum: 4 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot dmas: 116c66ec88fSEmmanuel Vadot items: 117c66ec88fSEmmanuel Vadot - description: TX DMA Channel 118c66ec88fSEmmanuel Vadot - description: RX DMA Channel 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot dma-names: 121c66ec88fSEmmanuel Vadot items: 122c66ec88fSEmmanuel Vadot - const: tx 123c66ec88fSEmmanuel Vadot - const: rx 124c66ec88fSEmmanuel Vadot 1256be33864SEmmanuel Vadot rx-sample-delay-ns: 1266be33864SEmmanuel Vadot default: 0 1276be33864SEmmanuel Vadot description: Default value of the rx-sample-delay-ns property. 1286be33864SEmmanuel Vadot This value will be used if the property is not explicitly defined 1296be33864SEmmanuel Vadot for a SPI slave device. See below. 1306be33864SEmmanuel Vadot 131c66ec88fSEmmanuel VadotpatternProperties: 132c66ec88fSEmmanuel Vadot "^.*@[0-9a-f]+$": 133c66ec88fSEmmanuel Vadot type: object 134c66ec88fSEmmanuel Vadot properties: 135c66ec88fSEmmanuel Vadot reg: 136c66ec88fSEmmanuel Vadot minimum: 0 137c66ec88fSEmmanuel Vadot maximum: 3 138c66ec88fSEmmanuel Vadot 139c66ec88fSEmmanuel Vadot spi-rx-bus-width: 140c66ec88fSEmmanuel Vadot const: 1 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot spi-tx-bus-width: 143c66ec88fSEmmanuel Vadot const: 1 144c66ec88fSEmmanuel Vadot 1456be33864SEmmanuel Vadot rx-sample-delay-ns: 1466be33864SEmmanuel Vadot description: SPI Rx sample delay offset, unit is nanoseconds. 1476be33864SEmmanuel Vadot The delay from the default sample time before the actual 1486be33864SEmmanuel Vadot sample of the rxd input signal occurs. The "rx_sample_delay" 1496be33864SEmmanuel Vadot is an optional feature of the designware controller, and the 1506be33864SEmmanuel Vadot upper limit is also subject to controller configuration. 1516be33864SEmmanuel Vadot 152c66ec88fSEmmanuel VadotunevaluatedProperties: false 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadotrequired: 155c66ec88fSEmmanuel Vadot - compatible 156c66ec88fSEmmanuel Vadot - reg 157c66ec88fSEmmanuel Vadot - "#address-cells" 158c66ec88fSEmmanuel Vadot - "#size-cells" 159c66ec88fSEmmanuel Vadot - clocks 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadotexamples: 162c66ec88fSEmmanuel Vadot - | 163c66ec88fSEmmanuel Vadot spi@fff00000 { 164c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-ssi"; 165c66ec88fSEmmanuel Vadot reg = <0xfff00000 0x1000>; 166c66ec88fSEmmanuel Vadot #address-cells = <1>; 167c66ec88fSEmmanuel Vadot #size-cells = <0>; 168c66ec88fSEmmanuel Vadot interrupts = <0 154 4>; 169c66ec88fSEmmanuel Vadot clocks = <&spi_m_clk>; 170c66ec88fSEmmanuel Vadot num-cs = <2>; 171c66ec88fSEmmanuel Vadot cs-gpios = <&gpio0 13 0>, 172c66ec88fSEmmanuel Vadot <&gpio0 14 0>; 1736be33864SEmmanuel Vadot rx-sample-delay-ns = <3>; 1746be33864SEmmanuel Vadot spi-flash@1 { 1756be33864SEmmanuel Vadot compatible = "spi-nand"; 1766be33864SEmmanuel Vadot reg = <1>; 1776be33864SEmmanuel Vadot rx-sample-delay-ns = <7>; 1786be33864SEmmanuel Vadot }; 1796be33864SEmmanuel Vadot }; 1806be33864SEmmanuel Vadot - | 1816be33864SEmmanuel Vadot spi@1f040100 { 1826be33864SEmmanuel Vadot compatible = "baikal,bt1-sys-ssi"; 1836be33864SEmmanuel Vadot reg = <0x1f040100 0x900>, 1846be33864SEmmanuel Vadot <0x1c000000 0x1000000>; 1856be33864SEmmanuel Vadot #address-cells = <1>; 1866be33864SEmmanuel Vadot #size-cells = <0>; 1876be33864SEmmanuel Vadot mux-controls = <&boot_mux>; 1886be33864SEmmanuel Vadot clocks = <&ccu_sys>; 1896be33864SEmmanuel Vadot clock-names = "ssi_clk"; 190c66ec88fSEmmanuel Vadot }; 191c66ec88fSEmmanuel Vadot... 192