Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ properties:
spi-cpol: true

spi-rx-bus-width:
minimum: 0
maximum: 1
items:
minimum: 0
maximum: 1

dc-gpios:
maxItems: 1
Expand Down
42 changes: 41 additions & 1 deletion Documentation/devicetree/bindings/iio/adc/adi,ad4030.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2024 Analog Devices Inc.
# Copyright 2024 BayLibre, SAS.
Expand Down Expand Up @@ -37,7 +37,15 @@
maximum: 102040816

spi-rx-bus-width:
enum: [1, 2, 4]
maxItems: 2
# all lanes must have the same width
oneOf:
- contains:
const: 1
- contains:
const: 2
- contains:
const: 4

vdd-5v-supply: true
vdd-1v8-supply: true
Expand Down Expand Up @@ -88,6 +96,18 @@

unevaluatedProperties: false

allOf:
- if:
properties:
compatible:
enum:
- adi,ad4030-24
- adi,ad4032-24
then:
properties:
spi-rx-bus-width:
maxItems: 1

examples:
- |
#include <dt-bindings/gpio/gpio.h>
Expand All @@ -108,3 +128,23 @@
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>

spi {
#address-cells = <1>;
#size-cells = <0>;

adc@0 {
compatible = "adi,ad4630-24";
reg = <0>;
spi-max-frequency = <80000000>;
spi-rx-bus-width = <4>, <4>;
vdd-5v-supply = <&supply_5V>;
vdd-1v8-supply = <&supply_1_8V>;
vio-supply = <&supply_1_8V>;
ref-supply = <&supply_5V>;
cnv-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
};
5 changes: 3 additions & 2 deletions Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ properties:
spi-cpha: true

spi-rx-bus-width:
minimum: 1
maximum: 4
items:
minimum: 1
maximum: 4

avdd-supply:
description: Analog power supply.
Expand Down
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ properties:
spi-cpol: true
spi-cpha: true

spi-rx-bus-width:
maxItems: 4
items:
maximum: 1

vcc-supply:
description: A 3V to 3.6V supply that powers the chip.

Expand Down Expand Up @@ -161,6 +166,23 @@ patternProperties:
unevaluatedProperties: false

allOf:
# 2-channel chips only have two SDO lines
- if:
properties:
compatible:
enum:
- adi,ad7380
- adi,ad7381
- adi,ad7383
- adi,ad7384
- adi,ad7386
- adi,ad7387
- adi,ad7388
then:
properties:
spi-rx-bus-width:
maxItems: 2

# pseudo-differential chips require common mode voltage supplies,
# true differential chips don't use them
- if:
Expand Down Expand Up @@ -285,6 +307,7 @@ examples:
spi-cpol;
spi-cpha;
spi-max-frequency = <80000000>;
spi-rx-bus-width = <1>, <1>, <1>, <1>;

interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio0>;
Expand Down
15 changes: 15 additions & 0 deletions Documentation/devicetree/bindings/spi/adi,axi-spi-engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ required:

unevaluatedProperties: false

patternProperties:
"^.*@[0-9a-f]+":
type: object

properties:
spi-rx-bus-width:
maxItems: 8
items:
enum: [0, 1]

spi-tx-bus-width:
maxItems: 8
items:
enum: [0, 1]

examples:
- |
spi@44a00000 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ patternProperties:
maximum: 4

spi-rx-bus-width:
const: 1
items:
- const: 1

spi-tx-bus-width:
const: 1
items:
- const: 1

required:
- compatible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ patternProperties:
maximum: 4

spi-rx-bus-width:
const: 1
items:
- const: 1

spi-tx-bus-width:
const: 1
items:
- const: 1

required:
- compatible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ patternProperties:

properties:
spi-rx-bus-width:
enum: [1, 2, 4]
items:
- enum: [1, 2, 4]

spi-tx-bus-width:
enum: [1, 2, 4]
items:
- enum: [1, 2, 4]

required:
- compatible
Expand Down
40 changes: 34 additions & 6 deletions Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,23 @@ properties:
description:
Bus width to the SPI bus used for read transfers.
If 0 is provided, then no RX will be possible on this device.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 4, 8]
default: 1

Some SPI peripherals and controllers may have multiple data lanes for
receiving two or more words at the same time. If this is the case, each
index in the array represents the lane on both the SPI peripheral and
controller. Additional mapping properties may be needed if a lane is
skipped on either side.
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
enum: [0, 1, 2, 4, 8]
default: [1]

spi-rx-lane-map:
description: Mapping of peripheral SDO lanes to controller SDI lanes.
Each index in the array represents a peripheral SDO lane, and the value
at that index represents the corresponding controller SDI lane.
$ref: /schemas/types.yaml#/definitions/uint32-array
default: [0, 1, 2, 3, 4, 5, 6, 7]

spi-rx-delay-us:
description:
Expand All @@ -80,9 +94,23 @@ properties:
description:
Bus width to the SPI bus used for write transfers.
If 0 is provided, then no TX will be possible on this device.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 4, 8]
default: 1

Some SPI peripherals and controllers may have multiple data lanes for
transmitting two or more words at the same time. If this is the case, each
index in the array represents the lane on both the SPI peripheral and
controller. Additional mapping properties may be needed if a lane is
skipped on either side.
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
enum: [0, 1, 2, 4, 8]
default: [1]

spi-tx-lane-map:
description: Mapping of peripheral SDI lanes to controller SDO lanes.
Each index in the array represents a peripheral SDI lane, and the value
at that index represents the corresponding controller SDO lane.
$ref: /schemas/types.yaml#/definitions/uint32-array
default: [0, 1, 2, 3, 4, 5, 6, 7]

spi-tx-delay-us:
description:
Expand Down
1 change: 1 addition & 0 deletions Documentation/spi/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Serial Peripheral Interface (SPI)

spi-summary
spidev
multiple-data-lanes
butterfly
spi-lm70llp
spi-sc18is602
Expand Down
Loading
Loading