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