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