Path: blob/main/sys/contrib/device-tree/Bindings/iio/dac/ad5592r.txt
48525 views
Analog Devices AD5592R/AD5593R DAC/ADC device driver12Required properties for the AD5592R:3- compatible: Must be "adi,ad5592r"4- reg: SPI chip select number for the device5- spi-max-frequency: Max SPI frequency to use (< 30000000)6- spi-cpol: The AD5592R requires inverse clock polarity (CPOL) mode78Required properties for the AD5593R:9- compatible: Must be "adi,ad5593r"10- reg: I2C address of the device1112Required properties for all supported chips:13- #address-cells: Should be 1.14- #size-cells: Should be 0.15- channel nodes:16Each child node represents one channel and has the following17Required properties:18* reg: Pin on which this channel is connected to.19* adi,mode: Mode or function of this channel.20Macros specifying the valid values21can be found in <dt-bindings/iio/adi,ad5592r.h>.2223The following values are currently supported:24* CH_MODE_UNUSED (the pin is unused)25* CH_MODE_ADC (the pin is ADC input)26* CH_MODE_DAC (the pin is DAC output)27* CH_MODE_DAC_AND_ADC (the pin is DAC output28but can be monitored by an ADC, since29there is no disadvantage this30this should be considered as the31preferred DAC mode)32* CH_MODE_GPIO (the pin is registered33with GPIOLIB)34Optional properties:35* adi,off-state: State of this channel when unused or the36device gets removed. Macros specifying the37valid values can be found in38<dt-bindings/iio/adi,ad5592r.h>.3940* CH_OFFSTATE_PULLDOWN (the pin is pulled down)41* CH_OFFSTATE_OUT_LOW (the pin is output low)42* CH_OFFSTATE_OUT_HIGH (the pin is output high)43* CH_OFFSTATE_OUT_TRISTATE (the pin is44tristated output)454647Optional properties:48- vref-supply: Phandle to the external reference voltage supply. This should49only be set if there is an external reference voltage connected to the VREF50pin. If the property is not set the internal 2.5V reference is used.51- reset-gpios : GPIO spec for the RESET pin. If specified, it will be52asserted during driver probe.53- gpio-controller: Marks the device node as a GPIO controller.54- #gpio-cells: Should be 2. The first cell is the GPIO number and the second55cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>.5657AD5592R Example:5859#include <dt-bindings/iio/adi,ad5592r.h>6061vref: regulator-vref {62compatible = "regulator-fixed";63regulator-name = "vref-ad559x";64regulator-min-microvolt = <3300000>;65regulator-max-microvolt = <3300000>;66regulator-always-on;67};6869ad5592r@0 {70#size-cells = <0>;71#address-cells = <1>;72#gpio-cells = <2>;73compatible = "adi,ad5592r";74reg = <0>;7576spi-max-frequency = <1000000>;77spi-cpol;7879vref-supply = <&vref>; /* optional */80reset-gpios = <&gpio0 86 0>; /* optional */81gpio-controller;8283channel@0 {84reg = <0>;85adi,mode = <CH_MODE_DAC>;86};87channel@1 {88reg = <1>;89adi,mode = <CH_MODE_ADC>;90};91channel@2 {92reg = <2>;93adi,mode = <CH_MODE_DAC_AND_ADC>;94};95channel@3 {96reg = <3>;97adi,mode = <CH_MODE_DAC_AND_ADC>;98adi,off-state = <CH_OFFSTATE_PULLDOWN>;99};100channel@4 {101reg = <4>;102adi,mode = <CH_MODE_UNUSED>;103adi,off-state = <CH_OFFSTATE_PULLDOWN>;104};105channel@5 {106reg = <5>;107adi,mode = <CH_MODE_GPIO>;108adi,off-state = <CH_OFFSTATE_PULLDOWN>;109};110channel@6 {111reg = <6>;112adi,mode = <CH_MODE_GPIO>;113adi,off-state = <CH_OFFSTATE_PULLDOWN>;114};115channel@7 {116reg = <7>;117adi,mode = <CH_MODE_GPIO>;118adi,off-state = <CH_OFFSTATE_PULLDOWN>;119};120};121122AD5593R Example:123124#include <dt-bindings/iio/adi,ad5592r.h>125126ad5593r@10 {127#size-cells = <0>;128#address-cells = <1>;129#gpio-cells = <2>;130compatible = "adi,ad5593r";131reg = <0x10>;132gpio-controller;133134channel@0 {135reg = <0>;136adi,mode = <CH_MODE_DAC>;137adi,off-state = <CH_OFFSTATE_PULLDOWN>;138};139channel@1 {140reg = <1>;141adi,mode = <CH_MODE_ADC>;142adi,off-state = <CH_OFFSTATE_PULLDOWN>;143};144channel@2 {145reg = <2>;146adi,mode = <CH_MODE_DAC_AND_ADC>;147adi,off-state = <CH_OFFSTATE_PULLDOWN>;148};149channel@6 {150reg = <6>;151adi,mode = <CH_MODE_GPIO>;152adi,off-state = <CH_OFFSTATE_PULLDOWN>;153};154};155156157