xref: /freebsd/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml (revision 535af610a4fdace6d50960c0ad9be0597eea7a1b)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/dac/adi,ad5758.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices AD5758 DAC
8
9maintainers:
10  - Michael Hennerich <Michael.Hennerich@analog.com>
11
12properties:
13  compatible:
14    const: adi,ad5758
15
16  reg:
17    maxItems: 1
18
19  spi-cpha: true
20
21  adi,dc-dc-mode:
22    $ref: /schemas/types.yaml#/definitions/uint32
23    enum: [1, 2, 3]
24    description: |
25      Mode of operation of the dc-to-dc converter
26      Dynamic Power Control (DPC)
27      In this mode, the AD5758 circuitry senses the output voltage and
28      dynamically regulates the supply voltage, VDPC+, to meet compliance
29      requirements plus an optimized headroom voltage for the output buffer.
30
31      Programmable Power Control (PPC)
32      In this mode, the VDPC+ voltage is user-programmable to a fixed level
33      that needs to accommodate the maximum output load required.
34
35      The output of the DAC core is either converted to a current or
36      voltage output at the VIOUT pin. Only one mode can be enabled at
37      any one time.
38
39      The following values are currently supported:
40      * 1: DPC current mode
41      * 2: DPC voltage mode
42      * 3: PPC current mode
43
44      Depending on the selected output mode (voltage or current) one of the
45      two properties must be present:
46
47  adi,range-microvolt:
48    description: |
49      Voltage output range specified as <minimum, maximum>
50    oneOf:
51      - items:
52          - const: 0
53          - enum: [5000000, 10000000]
54      - items:
55          - const: -5000000
56          - const: 5000000
57      - items:
58          - const: -10000000
59          - const: 10000000
60
61  adi,range-microamp:
62    description: |
63      Current output range specified as <minimum, maximum>
64    oneOf:
65      - items:
66          - const: 0
67          - enum: [20000, 24000]
68      - items:
69          - const: 4
70          - const: 24000
71      - items:
72          - const: -20000
73          - const: 20000
74      - items:
75          - const: -24000
76          - const: 24000
77      - items:
78          - const: -1000
79          - const: 22000
80
81  reset-gpios: true
82
83  adi,dc-dc-ilim-microamp:
84    enum: [150000, 200000, 250000, 300000, 350000, 400000]
85    description: |
86      The dc-to-dc converter current limit.
87
88  adi,slew-time-us:
89    description: |
90      The time it takes for the output to reach the full scale [uS]
91    minimum: 133
92    maximum: 1023984375
93
94required:
95  - compatible
96  - reg
97  - spi-cpha
98  - adi,dc-dc-mode
99
100allOf:
101  - $ref: /schemas/spi/spi-peripheral-props.yaml#
102  - if:
103      properties:
104        adi,dc-dc-mode:
105          enum: [1, 3]
106    then:
107      properties:
108        adi,range-microvolt: false
109      required:
110        - adi,range-microamp
111    else:
112      properties:
113        adi,range-microamp: false
114      required:
115        - adi,range-microvolt
116
117unevaluatedProperties: false
118
119examples:
120  - |
121    spi {
122        #address-cells = <1>;
123        #size-cells = <0>;
124
125        dac@0 {
126            compatible = "adi,ad5758";
127            reg = <0>;
128            spi-max-frequency = <1000000>;
129            spi-cpha;
130
131            reset-gpios = <&gpio 22 0>;
132
133            adi,dc-dc-mode = <2>;
134            adi,range-microvolt = <0 10000000>;
135            adi,dc-dc-ilim-microamp = <200000>;
136            adi,slew-time-us = <125000>;
137        };
138    };
139...
140