1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/spi/spi-rockchip.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Rockchip SPI Controller 8 9description: 10 The Rockchip SPI controller is used to interface with various devices such 11 as flash and display controllers using the SPI communication interface. 12 13allOf: 14 - $ref: "spi-controller.yaml#" 15 16maintainers: 17 - Heiko Stuebner <heiko@sntech.de> 18 19# Everything else is described in the common file 20properties: 21 compatible: 22 oneOf: 23 - const: rockchip,rk3036-spi 24 - const: rockchip,rk3066-spi 25 - const: rockchip,rk3228-spi 26 - const: rockchip,rv1108-spi 27 - items: 28 - enum: 29 - rockchip,px30-spi 30 - rockchip,rk3188-spi 31 - rockchip,rk3288-spi 32 - rockchip,rk3308-spi 33 - rockchip,rk3368-spi 34 - rockchip,rk3399-spi 35 - const: rockchip,rk3066-spi 36 37 reg: 38 maxItems: 1 39 40 interrupts: 41 maxItems: 1 42 43 clocks: 44 items: 45 - description: transfer-clock 46 - description: peripheral clock 47 48 clock-names: 49 items: 50 - const: spiclk 51 - const: apb_pclk 52 53 dmas: 54 items: 55 - description: TX DMA Channel 56 - description: RX DMA Channel 57 58 dma-names: 59 items: 60 - const: tx 61 - const: rx 62 63 rx-sample-delay-ns: 64 default: 0 65 description: 66 Nano seconds to delay after the SCLK edge before sampling Rx data 67 (may need to be fine tuned for high capacitance lines). 68 If not specified 0 will be used. 69 70 pinctrl-names: 71 minItems: 1 72 items: 73 - const: default 74 - const: sleep 75 description: 76 Names for the pin configuration(s); may be "default" or "sleep", 77 where the "sleep" configuration may describe the state 78 the pins should be in during system suspend. 79 80required: 81 - compatible 82 - reg 83 - interrupts 84 - clocks 85 - clock-names 86 87examples: 88 - | 89 #include <dt-bindings/clock/rk3188-cru-common.h> 90 #include <dt-bindings/interrupt-controller/arm-gic.h> 91 #include <dt-bindings/interrupt-controller/irq.h> 92 spi0: spi@ff110000 { 93 compatible = "rockchip,rk3066-spi"; 94 reg = <0xff110000 0x1000>; 95 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; 96 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>; 97 clock-names = "spiclk", "apb_pclk"; 98 dmas = <&pdma1 11>, <&pdma1 12>; 99 dma-names = "tx", "rx"; 100 pinctrl-0 = <&spi1_pins>; 101 pinctrl-1 = <&spi1_sleep>; 102 pinctrl-names = "default", "sleep"; 103 rx-sample-delay-ns = <10>; 104 #address-cells = <1>; 105 #size-cells = <0>; 106 }; 107