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: 13164c05f0SSerge Semin - $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 40164c05f0SSerge Semin 41164c05f0SSerge Seminproperties: 42164c05f0SSerge Semin compatible: 43164c05f0SSerge Semin oneOf: 44164c05f0SSerge Semin - description: Generic DW SPI Controller 45164c05f0SSerge Semin enum: 46164c05f0SSerge Semin - snps,dw-apb-ssi 47164c05f0SSerge Semin - snps,dwc-ssi-1.01a 48164c05f0SSerge Semin - description: Microsemi Ocelot/Jaguar2 SoC SPI Controller 49164c05f0SSerge Semin items: 50164c05f0SSerge Semin - enum: 51164c05f0SSerge Semin - mscc,ocelot-spi 52164c05f0SSerge Semin - mscc,jaguar2-spi 53164c05f0SSerge Semin - const: snps,dw-apb-ssi 545ce78f44SLars Povlsen - description: Microchip Sparx5 SoC SPI Controller 555ce78f44SLars Povlsen const: microchip,sparx5-spi 56164c05f0SSerge Semin - description: Amazon Alpine SPI Controller 57164c05f0SSerge Semin const: amazon,alpine-dw-apb-ssi 58164c05f0SSerge Semin - description: Renesas RZ/N1 SPI Controller 59164c05f0SSerge Semin items: 60164c05f0SSerge Semin - const: renesas,rzn1-spi 61164c05f0SSerge Semin - const: snps,dw-apb-ssi 62164c05f0SSerge Semin - description: Intel Keem Bay SPI Controller 63164c05f0SSerge Semin const: intel,keembay-ssi 64ca4e2ac2SSerge Semin - description: Baikal-T1 SPI Controller 65ca4e2ac2SSerge Semin const: baikal,bt1-ssi 66ca4e2ac2SSerge Semin - description: Baikal-T1 System Boot SPI Controller 67ca4e2ac2SSerge Semin const: baikal,bt1-sys-ssi 68*7b14a272SDamien Le Moal - description: Canaan Kendryte K210 SoS SPI Controller 69*7b14a272SDamien Le Moal const: canaan,k210-spi 70164c05f0SSerge Semin 71164c05f0SSerge Semin reg: 72164c05f0SSerge Semin minItems: 1 73164c05f0SSerge Semin items: 74164c05f0SSerge Semin - description: DW APB SSI controller memory mapped registers 75ca4e2ac2SSerge Semin - description: SPI MST region map or directly mapped SPI ROM 76164c05f0SSerge Semin 77164c05f0SSerge Semin interrupts: 78164c05f0SSerge Semin maxItems: 1 79164c05f0SSerge Semin 80164c05f0SSerge Semin clocks: 81164c05f0SSerge Semin minItems: 1 82164c05f0SSerge Semin items: 83164c05f0SSerge Semin - description: SPI Controller reference clock source 84164c05f0SSerge Semin - description: APB interface clock source 85164c05f0SSerge Semin 86164c05f0SSerge Semin clock-names: 87164c05f0SSerge Semin minItems: 1 88164c05f0SSerge Semin items: 89164c05f0SSerge Semin - const: ssi_clk 90164c05f0SSerge Semin - const: pclk 91164c05f0SSerge Semin 92164c05f0SSerge Semin resets: 93164c05f0SSerge Semin maxItems: 1 94164c05f0SSerge Semin 95164c05f0SSerge Semin reset-names: 96164c05f0SSerge Semin const: spi 97164c05f0SSerge Semin 98164c05f0SSerge Semin reg-io-width: 99164c05f0SSerge Semin $ref: /schemas/types.yaml#/definitions/uint32 100164c05f0SSerge Semin description: I/O register width (in bytes) implemented by this device 101164c05f0SSerge Semin default: 4 102164c05f0SSerge Semin enum: [ 2, 4 ] 103164c05f0SSerge Semin 104164c05f0SSerge Semin num-cs: 105164c05f0SSerge Semin default: 4 106164c05f0SSerge Semin minimum: 1 107164c05f0SSerge Semin maximum: 4 108164c05f0SSerge Semin 109164c05f0SSerge Semin dmas: 110164c05f0SSerge Semin items: 111164c05f0SSerge Semin - description: TX DMA Channel 112164c05f0SSerge Semin - description: RX DMA Channel 113164c05f0SSerge Semin 114164c05f0SSerge Semin dma-names: 115164c05f0SSerge Semin items: 116164c05f0SSerge Semin - const: tx 117164c05f0SSerge Semin - const: rx 118164c05f0SSerge Semin 1195ce78f44SLars Povlsen rx-sample-delay-ns: 1205ce78f44SLars Povlsen default: 0 1215ce78f44SLars Povlsen description: Default value of the rx-sample-delay-ns property. 1225ce78f44SLars Povlsen This value will be used if the property is not explicitly defined 1235ce78f44SLars Povlsen for a SPI slave device. See below. 1245ce78f44SLars Povlsen 125164c05f0SSerge SeminpatternProperties: 126164c05f0SSerge Semin "^.*@[0-9a-f]+$": 127164c05f0SSerge Semin type: object 128164c05f0SSerge Semin properties: 129164c05f0SSerge Semin reg: 130164c05f0SSerge Semin minimum: 0 131164c05f0SSerge Semin maximum: 3 132164c05f0SSerge Semin 133164c05f0SSerge Semin spi-rx-bus-width: 134164c05f0SSerge Semin const: 1 135164c05f0SSerge Semin 136164c05f0SSerge Semin spi-tx-bus-width: 137164c05f0SSerge Semin const: 1 138164c05f0SSerge Semin 1395ce78f44SLars Povlsen rx-sample-delay-ns: 1405ce78f44SLars Povlsen description: SPI Rx sample delay offset, unit is nanoseconds. 1415ce78f44SLars Povlsen The delay from the default sample time before the actual 1425ce78f44SLars Povlsen sample of the rxd input signal occurs. The "rx_sample_delay" 1435ce78f44SLars Povlsen is an optional feature of the designware controller, and the 1445ce78f44SLars Povlsen upper limit is also subject to controller configuration. 1455ce78f44SLars Povlsen 146164c05f0SSerge SeminunevaluatedProperties: false 147164c05f0SSerge Semin 148164c05f0SSerge Seminrequired: 149164c05f0SSerge Semin - compatible 150164c05f0SSerge Semin - reg 151164c05f0SSerge Semin - "#address-cells" 152164c05f0SSerge Semin - "#size-cells" 153164c05f0SSerge Semin - clocks 154164c05f0SSerge Semin 155164c05f0SSerge Seminexamples: 156164c05f0SSerge Semin - | 157164c05f0SSerge Semin spi@fff00000 { 158164c05f0SSerge Semin compatible = "snps,dw-apb-ssi"; 159164c05f0SSerge Semin reg = <0xfff00000 0x1000>; 160164c05f0SSerge Semin #address-cells = <1>; 161164c05f0SSerge Semin #size-cells = <0>; 162164c05f0SSerge Semin interrupts = <0 154 4>; 163164c05f0SSerge Semin clocks = <&spi_m_clk>; 164164c05f0SSerge Semin num-cs = <2>; 165164c05f0SSerge Semin cs-gpios = <&gpio0 13 0>, 166164c05f0SSerge Semin <&gpio0 14 0>; 1675ce78f44SLars Povlsen rx-sample-delay-ns = <3>; 1685ce78f44SLars Povlsen spi-flash@1 { 1695ce78f44SLars Povlsen compatible = "spi-nand"; 1705ce78f44SLars Povlsen reg = <1>; 1715ce78f44SLars Povlsen rx-sample-delay-ns = <7>; 1725ce78f44SLars Povlsen }; 173164c05f0SSerge Semin }; 174ca4e2ac2SSerge Semin - | 175ca4e2ac2SSerge Semin spi@1f040100 { 176ca4e2ac2SSerge Semin compatible = "baikal,bt1-sys-ssi"; 177ca4e2ac2SSerge Semin reg = <0x1f040100 0x900>, 178ca4e2ac2SSerge Semin <0x1c000000 0x1000000>; 179ca4e2ac2SSerge Semin #address-cells = <1>; 180ca4e2ac2SSerge Semin #size-cells = <0>; 181ca4e2ac2SSerge Semin mux-controls = <&boot_mux>; 182ca4e2ac2SSerge Semin clocks = <&ccu_sys>; 183ca4e2ac2SSerge Semin clock-names = "ssi_clk"; 184ca4e2ac2SSerge Semin }; 185164c05f0SSerge Semin... 186