| 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 |
|
| 7 |
title: Allwinner A31 SPI Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Chen-Yu Tsai <[email protected]> |
| 11 |
- Maxime Ripard <[email protected]> |
| 12 |
|
| 13 |
properties: |
| 14 |
compatible: |
| 15 |
oneOf: |
| 16 |
- const: allwinner,sun50i-r329-spi |
| 17 |
- const: allwinner,sun55i-a523-spi |
| 18 |
- const: allwinner,sun6i-a31-spi |
| 19 |
- const: allwinner,sun8i-h3-spi |
| 20 |
- items: |
| 21 |
- enum: |
| 22 |
- allwinner,sun8i-r40-spi |
| 23 |
- allwinner,sun50i-h6-spi |
| 24 |
- allwinner,sun50i-h616-spi |
| 25 |
- allwinner,suniv-f1c100s-spi |
| 26 |
- const: allwinner,sun8i-h3-spi |
| 27 |
- items: |
| 28 |
- enum: |
| 29 |
- allwinner,sun20i-d1-spi |
| 30 |
- allwinner,sun50i-r329-spi-dbi |
| 31 |
- const: allwinner,sun50i-r329-spi |
| 32 |
- items: |
| 33 |
- const: allwinner,sun20i-d1-spi-dbi |
| 34 |
- const: allwinner,sun50i-r329-spi-dbi |
| 35 |
- const: allwinner,sun50i-r329-spi |
| 36 |
- items: |
| 37 |
- const: allwinner,sun55i-a523-spi-dbi |
| 38 |
- const: allwinner,sun55i-a523-spi |
| 39 |
|
| 40 |
reg: |
| 41 |
maxItems: 1 |
| 42 |
|
| 43 |
interrupts: |
| 44 |
maxItems: 1 |
| 45 |
|
| 46 |
clocks: |
| 47 |
items: |
| 48 |
- description: Bus Clock |
| 49 |
- description: Module Clock |
| 50 |
|
| 51 |
clock-names: |
| 52 |
items: |
| 53 |
- const: ahb |
| 54 |
- const: mod |
| 55 |
|
| 56 |
resets: |
| 57 |
maxItems: 1 |
| 58 |
|
| 59 |
dmas: |
| 60 |
items: |
| 61 |
- description: RX DMA Channel |
| 62 |
- description: TX DMA Channel |
| 63 |
|
| 64 |
dma-names: |
| 65 |
items: |
| 66 |
- const: rx |
| 67 |
- const: tx |
| 68 |
|
| 69 |
patternProperties: |
| 70 |
"^.*@[0-9a-f]+": |
| 71 |
type: object |
| 72 |
additionalProperties: true |
| 73 |
|
| 74 |
properties: |
| 75 |
reg: |
| 76 |
items: |
| 77 |
minimum: 0 |
| 78 |
maximum: 4 |
| 79 |
|
| 80 |
spi-rx-bus-width: |
| 81 |
items: |
| 82 |
enum: [0, 1, 2, 4] |
| 83 |
|
| 84 |
spi-tx-bus-width: |
| 85 |
items: |
| 86 |
enum: [0, 1, 2, 4] |
| 87 |
|
| 88 |
required: |
| 89 |
- compatible |
| 90 |
- reg |
| 91 |
- interrupts |
| 92 |
- clocks |
| 93 |
- clock-names |
| 94 |
|
| 95 |
allOf: |
| 96 |
- $ref: spi-controller.yaml |
| 97 |
- if: |
| 98 |
not: |
| 99 |
properties: |
| 100 |
compatible: |
| 101 |
contains: |
| 102 |
enum: |
| 103 |
- allwinner,sun50i-r329-spi |
| 104 |
- allwinner,sun55i-a523-spi |
| 105 |
then: |
| 106 |
patternProperties: |
| 107 |
"^.*@[0-9a-f]+": |
| 108 |
properties: |
| 109 |
spi-rx-bus-width: |
| 110 |
items: |
| 111 |
enum: [0, 1] |
| 112 |
|
| 113 |
spi-tx-bus-width: |
| 114 |
items: |
| 115 |
enum: [0, 1] |
| 116 |
|
| 117 |
unevaluatedProperties: false |
| 118 |
|
| 119 |
examples: |
| 120 |
- | |
| 121 |
spi1: spi@1c69000 { |
| 122 |
compatible = "allwinner,sun6i-a31-spi"; |
| 123 |
reg = <0x01c69000 0x1000>; |
| 124 |
interrupts = <0 66 4>; |
| 125 |
clocks = <&ahb1_gates 21>, <&spi1_clk>; |
| 126 |
clock-names = "ahb", "mod"; |
| 127 |
resets = <&ahb1_rst 21>; |
| 128 |
#address-cells = <1>; |
| 129 |
#size-cells = <0>; |
| 130 |
}; |
| 131 |
|
| 132 |
- | |
| 133 |
spi0: spi@1c68000 { |
| 134 |
compatible = "allwinner,sun8i-h3-spi"; |
| 135 |
reg = <0x01c68000 0x1000>; |
| 136 |
interrupts = <0 65 4>; |
| 137 |
clocks = <&ccu 30>, <&ccu 82>; |
| 138 |
clock-names = "ahb", "mod"; |
| 139 |
dmas = <&dma 23>, <&dma 23>; |
| 140 |
dma-names = "rx", "tx"; |
| 141 |
resets = <&ccu 15>; |
| 142 |
#address-cells = <1>; |
| 143 |
#size-cells = <0>; |
| 144 |
}; |
| 145 |
|
| 146 |
... |