Skip to content

Commit 743956b

Browse files
wensbroonie
authored andcommitted
spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
Support for Dual SPI and Quad SPI was added to the Linux driver in commit 0605d9f ("spi: sun6i: add quirk for dual and quad SPI modes support") and commit 25453d7 ("spi: sun6i: add dual and quad SPI modes support for R329/D1/R528/T113s"). However the binding was never updated to allow these modes. Allow them by adding 2 and 4 to the allowed bus widths for the newer variants. While at it, also add 0 to the allowed bus widths. This signals that RX or TX is not available, i.e. the MISO or MOSI pin is disconnected. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Chen-Yu Tsai <wens@kernel.org> Link: https://patch.msgid.link/20260302153559.3199783-2-wens@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 85b731a commit 743956b

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: Allwinner A31 SPI Controller
88

9-
allOf:
10-
- $ref: spi-controller.yaml
11-
129
maintainers:
1310
- Chen-Yu Tsai <wens@csie.org>
1411
- Maxime Ripard <mripard@kernel.org>
@@ -82,11 +79,11 @@ patternProperties:
8279

8380
spi-rx-bus-width:
8481
items:
85-
- const: 1
82+
enum: [0, 1, 2, 4]
8683

8784
spi-tx-bus-width:
8885
items:
89-
- const: 1
86+
enum: [0, 1, 2, 4]
9087

9188
required:
9289
- compatible
@@ -95,6 +92,28 @@ required:
9592
- clocks
9693
- clock-names
9794

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+
98117
unevaluatedProperties: false
99118

100119
examples:

0 commit comments

Comments
 (0)