xref: /freebsd/sys/contrib/device-tree/Bindings/iio/dac/ad5758.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotAnalog Devices AD5758 DAC device driver
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties for the AD5758:
4*c66ec88fSEmmanuel Vadot	- compatible: Must be "adi,ad5758"
5*c66ec88fSEmmanuel Vadot	- reg: SPI chip select number for the device
6*c66ec88fSEmmanuel Vadot	- spi-max-frequency: Max SPI frequency to use (< 50000000)
7*c66ec88fSEmmanuel Vadot	- spi-cpha: is the only mode that is supported
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotRequired properties:
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel Vadot - adi,dc-dc-mode: Mode of operation of the dc-to-dc converter
12*c66ec88fSEmmanuel Vadot		   Dynamic Power Control (DPC)
13*c66ec88fSEmmanuel Vadot		   In this mode, the AD5758 circuitry senses the output
14*c66ec88fSEmmanuel Vadot		   voltage and dynamically regulates the supply voltage,
15*c66ec88fSEmmanuel Vadot		   VDPC+, to meet compliance requirements plus an optimized
16*c66ec88fSEmmanuel Vadot		   headroom voltage for the output buffer.
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadot		   Programmable Power Control (PPC)
19*c66ec88fSEmmanuel Vadot		   In this mode, the VDPC+ voltage is user-programmable to
20*c66ec88fSEmmanuel Vadot		   a fixed level that needs to accommodate the maximum output
21*c66ec88fSEmmanuel Vadot		   load required.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot		   The output of the DAC core is either converted to a
24*c66ec88fSEmmanuel Vadot		   current or voltage output at the VIOUT pin. Only one mode
25*c66ec88fSEmmanuel Vadot		   can be enabled at any one time.
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot		   The following values are currently supported:
28*c66ec88fSEmmanuel Vadot			* 1: DPC current mode
29*c66ec88fSEmmanuel Vadot			* 2: DPC voltage mode
30*c66ec88fSEmmanuel Vadot			* 3: PPC current mode
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot Depending on the selected output mode (voltage or current) one of the
33*c66ec88fSEmmanuel Vadot two properties must
34*c66ec88fSEmmanuel Vadot be present:
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadot - adi,range-microvolt: Voltage output range
37*c66ec88fSEmmanuel Vadot		The array of voltage output ranges must contain two fields:
38*c66ec88fSEmmanuel Vadot		* <0 5000000>: 0 V to 5 V voltage range
39*c66ec88fSEmmanuel Vadot		* <0 10000000>: 0 V to 10 V voltage range
40*c66ec88fSEmmanuel Vadot		* <(-5000000) 5000000>: ±5 V voltage range
41*c66ec88fSEmmanuel Vadot		* <(-10000000) 10000000>: ±10 V voltage range
42*c66ec88fSEmmanuel Vadot - adi,range-microamp: Current output range
43*c66ec88fSEmmanuel Vadot		The array of current output ranges must contain two fields:
44*c66ec88fSEmmanuel Vadot		* <0 20000>: 0 mA to 20 mA current range
45*c66ec88fSEmmanuel Vadot		* <0 24000>: 0 mA to 24 mA current range
46*c66ec88fSEmmanuel Vadot		* <4 24000>: 4 mA to 20 mA current range
47*c66ec88fSEmmanuel Vadot		* <(-20000) 20000>: ±20 mA current range
48*c66ec88fSEmmanuel Vadot		* <(-24000) 24000>: ±24 mA current range
49*c66ec88fSEmmanuel Vadot		* <(-1000) 22000>: −1 mA to +22 mA current range
50*c66ec88fSEmmanuel Vadot
51*c66ec88fSEmmanuel VadotOptional properties:
52*c66ec88fSEmmanuel Vadot
53*c66ec88fSEmmanuel Vadot - reset-gpios : GPIO spec for the RESET pin. If specified, it will be
54*c66ec88fSEmmanuel Vadot		 asserted during driver probe.
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot - adi,dc-dc-ilim-microamp: The dc-to-dc converter current limit
57*c66ec88fSEmmanuel Vadot		   The following values are currently supported [uA]:
58*c66ec88fSEmmanuel Vadot			* 150000
59*c66ec88fSEmmanuel Vadot			* 200000
60*c66ec88fSEmmanuel Vadot			* 250000
61*c66ec88fSEmmanuel Vadot			* 300000
62*c66ec88fSEmmanuel Vadot			* 350000
63*c66ec88fSEmmanuel Vadot			* 400000
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel Vadot - adi,slew-time-us: The time it takes for the output to reach the
66*c66ec88fSEmmanuel Vadot full scale [uS]
67*c66ec88fSEmmanuel Vadot		     The supported range is between 133us up to 1023984375us
68*c66ec88fSEmmanuel Vadot
69*c66ec88fSEmmanuel VadotAD5758 Example:
70*c66ec88fSEmmanuel Vadot
71*c66ec88fSEmmanuel Vadot	dac@0 {
72*c66ec88fSEmmanuel Vadot		compatible = "adi,ad5758";
73*c66ec88fSEmmanuel Vadot		reg = <0>;
74*c66ec88fSEmmanuel Vadot		spi-max-frequency = <1000000>;
75*c66ec88fSEmmanuel Vadot		spi-cpha;
76*c66ec88fSEmmanuel Vadot
77*c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio 22 0>;
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot		adi,dc-dc-mode = <2>;
80*c66ec88fSEmmanuel Vadot		adi,range-microvolt = <0 10000000>;
81*c66ec88fSEmmanuel Vadot		adi,dc-dc-ilim-microamp = <200000>;
82*c66ec88fSEmmanuel Vadot		adi,slew-time-us = <125000>;
83*c66ec88fSEmmanuel Vadot	};
84