Files
linux/Documentation/devicetree/bindings/iio/adc/adi,ad4030.yaml
David Lechner 37bb4033e4 spi: dt-bindings: change spi-{rx,tx}-bus-width to arrays
Change spi-rx-bus-width and spi-tx-bus-width properties from single
uint32 values to arrays of uint32 values. This allows describing SPI
peripherals connected to controllers that have multiple data lanes for
receiving or transmitting two or more words in parallel.

Each index in the array corresponds to a physical data lane (one or more
wires depending on the bus width). Additional mapping properties will be
needed in cases where a lane on the controller or peripheral is skipped.

Bindings that make use of this property are updated in the same commit
to avoid validation errors.

The adi,ad4030 binding can now better describe the chips multi-lane
capabilities, so that binding is refined and gets a new example.

Converting from single uint32 to array of uint32 does not break .dts/
.dtb files since there is no difference between specifying a single
uint32 value and an array with a single uint32 value in devicetree.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20260123-spi-add-multi-bus-support-v6-1-12af183c06eb@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:12:41 +00:00

151 lines
3.5 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2024 Analog Devices Inc.
# Copyright 2024 BayLibre, SAS.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad4030.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD4030 and AD4630 ADC families
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
- Nuno Sa <nuno.sa@analog.com>
description: |
Analog Devices AD4030 single channel and AD4630/AD4632 dual channel precision
SAR ADC families
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4030-24-4032-24.pdf
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4630-24_ad4632-24.pdf
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4630-16-4632-16.pdf
properties:
compatible:
enum:
- adi,ad4030-24
- adi,ad4032-24
- adi,ad4630-16
- adi,ad4630-24
- adi,ad4632-16
- adi,ad4632-24
reg:
maxItems: 1
spi-max-frequency:
maximum: 102040816
spi-rx-bus-width:
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
vio-supply: true
ref-supply:
description:
Optional External unbuffered reference. Used when refin-supply is not
connected.
refin-supply:
description:
Internal buffered Reference. Used when ref-supply is not connected.
cnv-gpios:
description:
The Convert Input (CNV). It initiates the sampling conversions.
maxItems: 1
reset-gpios:
description:
The Reset Input (/RST). Used for asynchronous device reset.
maxItems: 1
interrupts:
description:
The BUSY pin is used to signal that the conversions results are available
to be transferred when in SPI Clocking Mode. This nodes should be
connected to an interrupt that is triggered when the BUSY line goes low.
maxItems: 1
interrupt-names:
const: busy
required:
- compatible
- reg
- vdd-5v-supply
- vdd-1v8-supply
- vio-supply
- cnv-gpios
oneOf:
- required:
- ref-supply
- required:
- refin-supply
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>
spi {
#address-cells = <1>;
#size-cells = <0>;
adc@0 {
compatible = "adi,ad4030-24";
reg = <0>;
spi-max-frequency = <80000000>;
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>;
};
};
- |
#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>;
};
};