Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/spi/spi-rockchip.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Rockchip SPI Controller
0008 
0009 description:
0010   The Rockchip SPI controller is used to interface with various devices such
0011   as flash and display controllers using the SPI communication interface.
0012 
0013 allOf:
0014   - $ref: "spi-controller.yaml#"
0015 
0016 maintainers:
0017   - Heiko Stuebner <heiko@sntech.de>
0018 
0019 # Everything else is described in the common file
0020 properties:
0021   compatible:
0022     oneOf:
0023       - const: rockchip,rk3036-spi
0024       - const: rockchip,rk3066-spi
0025       - const: rockchip,rk3228-spi
0026       - const: rockchip,rv1108-spi
0027       - items:
0028           - enum:
0029               - rockchip,px30-spi
0030               - rockchip,rk3188-spi
0031               - rockchip,rk3288-spi
0032               - rockchip,rk3308-spi
0033               - rockchip,rk3328-spi
0034               - rockchip,rk3368-spi
0035               - rockchip,rk3399-spi
0036               - rockchip,rk3568-spi
0037               - rockchip,rv1126-spi
0038           - const: rockchip,rk3066-spi
0039 
0040   reg:
0041     maxItems: 1
0042 
0043   interrupts:
0044     maxItems: 1
0045 
0046   clocks:
0047     items:
0048       - description: transfer-clock
0049       - description: peripheral clock
0050 
0051   clock-names:
0052     items:
0053       - const: spiclk
0054       - const: apb_pclk
0055 
0056   dmas:
0057     items:
0058       - description: TX DMA Channel
0059       - description: RX DMA Channel
0060 
0061   dma-names:
0062     items:
0063       - const: tx
0064       - const: rx
0065 
0066   rx-sample-delay-ns:
0067     default: 0
0068     description:
0069       Nano seconds to delay after the SCLK edge before sampling Rx data
0070       (may need to be fine tuned for high capacitance lines).
0071       If not specified 0 will be used.
0072 
0073   pinctrl-names:
0074     minItems: 1
0075     items:
0076       - const: default
0077       - const: sleep
0078     description:
0079       Names for the pin configuration(s); may be "default" or "sleep",
0080       where the "sleep" configuration may describe the state
0081       the pins should be in during system suspend.
0082 
0083 required:
0084   - compatible
0085   - reg
0086   - interrupts
0087   - clocks
0088   - clock-names
0089 
0090 unevaluatedProperties: false
0091 
0092 examples:
0093   - |
0094     #include <dt-bindings/clock/rk3188-cru-common.h>
0095     #include <dt-bindings/interrupt-controller/arm-gic.h>
0096     #include <dt-bindings/interrupt-controller/irq.h>
0097     spi0: spi@ff110000 {
0098       compatible = "rockchip,rk3066-spi";
0099       reg = <0xff110000 0x1000>;
0100       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
0101       clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
0102       clock-names = "spiclk", "apb_pclk";
0103       dmas = <&pdma1 11>, <&pdma1 12>;
0104       dma-names = "tx", "rx";
0105       pinctrl-0 = <&spi1_pins>;
0106       pinctrl-1 = <&spi1_sleep>;
0107       pinctrl-names = "default", "sleep";
0108       rx-sample-delay-ns = <10>;
0109       #address-cells = <1>;
0110       #size-cells = <0>;
0111     };