summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
blob: ca4c95345a49b24311802097741219d146dc80a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/allwinner,sun6i-a31-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A31 SPI Controller Device Tree Bindings

allOf:
  - $ref: "spi-controller.yaml"

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

properties:
  "#address-cells": true
  "#size-cells": true

  compatible:
    oneOf:
      - const: allwinner,sun6i-a31-spi
      - const: allwinner,sun8i-h3-spi
      - items:
          - enum:
              - allwinner,sun8i-r40-spi
              - allwinner,sun50i-h6-spi
              - allwinner,sun50i-h616-spi
              - allwinner,suniv-f1c100s-spi
          - const: allwinner,sun8i-h3-spi

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Bus Clock
      - description: Module Clock

  clock-names:
    items:
      - const: ahb
      - const: mod

  resets:
    maxItems: 1

  dmas:
    items:
      - description: RX DMA Channel
      - description: TX DMA Channel

  dma-names:
    items:
      - const: rx
      - const: tx

  num-cs: true

patternProperties:
  "^.*@[0-9a-f]+":
    type: object
    properties:
      reg:
        items:
          minimum: 0
          maximum: 4

      spi-rx-bus-width:
        const: 1

      spi-tx-bus-width:
        const: 1

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    spi1: spi@1c69000 {
        compatible = "allwinner,sun6i-a31-spi";
        reg = <0x01c69000 0x1000>;
        interrupts = <0 66 4>;
        clocks = <&ahb1_gates 21>, <&spi1_clk>;
        clock-names = "ahb", "mod";
        resets = <&ahb1_rst 21>;
        #address-cells = <1>;
        #size-cells = <0>;
    };

  - |
    spi0: spi@1c68000 {
        compatible = "allwinner,sun8i-h3-spi";
        reg = <0x01c68000 0x1000>;
        interrupts = <0 65 4>;
        clocks = <&ccu 30>, <&ccu 82>;
        clock-names = "ahb", "mod";
        dmas = <&dma 23>, <&dma 23>;
        dma-names = "rx", "tx";
        resets = <&ccu 15>;
        #address-cells = <1>;
        #size-cells = <0>;
    };

...