xref: /linux/Documentation/devicetree/bindings/spi/spi-rockchip.yaml (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
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,rk3128-spi
31              - rockchip,rk3188-spi
32              - rockchip,rk3288-spi
33              - rockchip,rk3308-spi
34              - rockchip,rk3328-spi
35              - rockchip,rk3368-spi
36              - rockchip,rk3399-spi
37              - rockchip,rk3528-spi
38              - rockchip,rk3562-spi
39              - rockchip,rk3568-spi
40              - rockchip,rk3576-spi
41              - rockchip,rk3588-spi
42              - rockchip,rv1126-spi
43          - const: rockchip,rk3066-spi
44
45  reg:
46    maxItems: 1
47
48  interrupts:
49    maxItems: 1
50
51  clocks:
52    items:
53      - description: transfer-clock
54      - description: peripheral clock
55
56  clock-names:
57    items:
58      - const: spiclk
59      - const: apb_pclk
60
61  dmas:
62    items:
63      - description: TX DMA Channel
64      - description: RX DMA Channel
65
66  dma-names:
67    items:
68      - const: tx
69      - const: rx
70
71  rx-sample-delay-ns:
72    default: 0
73    description:
74      Nano seconds to delay after the SCLK edge before sampling Rx data
75      (may need to be fine tuned for high capacitance lines).
76      If not specified 0 will be used.
77
78  pinctrl-names:
79    minItems: 1
80    items:
81      - const: default
82      - const: sleep
83    description:
84      Names for the pin configuration(s); may be "default" or "sleep",
85      where the "sleep" configuration may describe the state
86      the pins should be in during system suspend.
87
88  power-domains:
89    maxItems: 1
90
91required:
92  - compatible
93  - reg
94  - interrupts
95  - clocks
96  - clock-names
97
98unevaluatedProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/clock/rk3188-cru-common.h>
103    #include <dt-bindings/interrupt-controller/arm-gic.h>
104    #include <dt-bindings/interrupt-controller/irq.h>
105    spi0: spi@ff110000 {
106      compatible = "rockchip,rk3066-spi";
107      reg = <0xff110000 0x1000>;
108      interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
109      clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
110      clock-names = "spiclk", "apb_pclk";
111      dmas = <&pdma1 11>, <&pdma1 12>;
112      dma-names = "tx", "rx";
113      pinctrl-0 = <&spi1_pins>;
114      pinctrl-1 = <&spi1_sleep>;
115      pinctrl-names = "default", "sleep";
116      rx-sample-delay-ns = <10>;
117      #address-cells = <1>;
118      #size-cells = <0>;
119    };
120