1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/allwinner,sun6i-a31-spi.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Allwinner A31 SPI Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel VadotallOf:
10cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotmaintainers:
13c66ec88fSEmmanuel Vadot  - Chen-Yu Tsai <wens@csie.org>
14c66ec88fSEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadotproperties:
17c66ec88fSEmmanuel Vadot  compatible:
18c66ec88fSEmmanuel Vadot    oneOf:
19f126890aSEmmanuel Vadot      - const: allwinner,sun50i-r329-spi
20c66ec88fSEmmanuel Vadot      - const: allwinner,sun6i-a31-spi
21c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-h3-spi
22c66ec88fSEmmanuel Vadot      - items:
23c66ec88fSEmmanuel Vadot          - enum:
24c66ec88fSEmmanuel Vadot              - allwinner,sun8i-r40-spi
25c66ec88fSEmmanuel Vadot              - allwinner,sun50i-h6-spi
265def4c47SEmmanuel Vadot              - allwinner,sun50i-h616-spi
27d5b0e70fSEmmanuel Vadot              - allwinner,suniv-f1c100s-spi
28c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-h3-spi
29f126890aSEmmanuel Vadot      - items:
30f126890aSEmmanuel Vadot          - enum:
31f126890aSEmmanuel Vadot              - allwinner,sun20i-d1-spi
32f126890aSEmmanuel Vadot              - allwinner,sun50i-r329-spi-dbi
33f126890aSEmmanuel Vadot          - const: allwinner,sun50i-r329-spi
34f126890aSEmmanuel Vadot      - items:
35f126890aSEmmanuel Vadot          - const: allwinner,sun20i-d1-spi-dbi
36f126890aSEmmanuel Vadot          - const: allwinner,sun50i-r329-spi-dbi
37f126890aSEmmanuel Vadot          - const: allwinner,sun50i-r329-spi
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  reg:
40c66ec88fSEmmanuel Vadot    maxItems: 1
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  interrupts:
43c66ec88fSEmmanuel Vadot    maxItems: 1
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot  clocks:
46c66ec88fSEmmanuel Vadot    items:
47c66ec88fSEmmanuel Vadot      - description: Bus Clock
48c66ec88fSEmmanuel Vadot      - description: Module Clock
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  clock-names:
51c66ec88fSEmmanuel Vadot    items:
52c66ec88fSEmmanuel Vadot      - const: ahb
53c66ec88fSEmmanuel Vadot      - const: mod
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot  resets:
56c66ec88fSEmmanuel Vadot    maxItems: 1
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  dmas:
59c66ec88fSEmmanuel Vadot    items:
60c66ec88fSEmmanuel Vadot      - description: RX DMA Channel
61c66ec88fSEmmanuel Vadot      - description: TX DMA Channel
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot  dma-names:
64c66ec88fSEmmanuel Vadot    items:
65c66ec88fSEmmanuel Vadot      - const: rx
66c66ec88fSEmmanuel Vadot      - const: tx
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel VadotpatternProperties:
69c66ec88fSEmmanuel Vadot  "^.*@[0-9a-f]+":
70c66ec88fSEmmanuel Vadot    type: object
71*84943d6fSEmmanuel Vadot    additionalProperties: true
72*84943d6fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot    properties:
74c66ec88fSEmmanuel Vadot      reg:
75c66ec88fSEmmanuel Vadot        items:
76c66ec88fSEmmanuel Vadot          minimum: 0
77c66ec88fSEmmanuel Vadot          maximum: 4
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot      spi-rx-bus-width:
80c66ec88fSEmmanuel Vadot        const: 1
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot      spi-tx-bus-width:
83c66ec88fSEmmanuel Vadot        const: 1
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel Vadotrequired:
86c66ec88fSEmmanuel Vadot  - compatible
87c66ec88fSEmmanuel Vadot  - reg
88c66ec88fSEmmanuel Vadot  - interrupts
89c66ec88fSEmmanuel Vadot  - clocks
90c66ec88fSEmmanuel Vadot  - clock-names
91c66ec88fSEmmanuel Vadot
92f126890aSEmmanuel VadotunevaluatedProperties: false
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadotexamples:
95c66ec88fSEmmanuel Vadot  - |
96c66ec88fSEmmanuel Vadot    spi1: spi@1c69000 {
97c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun6i-a31-spi";
98c66ec88fSEmmanuel Vadot        reg = <0x01c69000 0x1000>;
99c66ec88fSEmmanuel Vadot        interrupts = <0 66 4>;
100c66ec88fSEmmanuel Vadot        clocks = <&ahb1_gates 21>, <&spi1_clk>;
101c66ec88fSEmmanuel Vadot        clock-names = "ahb", "mod";
102c66ec88fSEmmanuel Vadot        resets = <&ahb1_rst 21>;
103c66ec88fSEmmanuel Vadot        #address-cells = <1>;
104c66ec88fSEmmanuel Vadot        #size-cells = <0>;
105c66ec88fSEmmanuel Vadot    };
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot  - |
108c66ec88fSEmmanuel Vadot    spi0: spi@1c68000 {
109c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-h3-spi";
110c66ec88fSEmmanuel Vadot        reg = <0x01c68000 0x1000>;
111c66ec88fSEmmanuel Vadot        interrupts = <0 65 4>;
112c66ec88fSEmmanuel Vadot        clocks = <&ccu 30>, <&ccu 82>;
113c66ec88fSEmmanuel Vadot        clock-names = "ahb", "mod";
114c66ec88fSEmmanuel Vadot        dmas = <&dma 23>, <&dma 23>;
115c66ec88fSEmmanuel Vadot        dma-names = "rx", "tx";
116c66ec88fSEmmanuel Vadot        resets = <&ccu 15>;
117c66ec88fSEmmanuel Vadot        #address-cells = <1>;
118c66ec88fSEmmanuel Vadot        #size-cells = <0>;
119c66ec88fSEmmanuel Vadot    };
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot...
122