Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/dac/adi,ad5755.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Analog Devices AD5755 Multi-Channel DAC
0008 
0009 maintainers:
0010   - Sean Nyekjaer <sean.nyekjaer@prevas.dk>
0011 
0012 properties:
0013   compatible:
0014     enum:
0015       - adi,ad5755
0016       - adi,ad5755-1
0017       - adi,ad5757
0018       - adi,ad5735
0019       - adi,ad5737
0020 
0021   reg:
0022     maxItems: 1
0023 
0024   spi-cpha:
0025     description: Either this or spi-cpol but not both.
0026   spi-cpol: true
0027 
0028   spi-max-frequency: true
0029 
0030   adi,ext-dc-dc-compenstation-resistor:
0031     $ref: /schemas/types.yaml#/definitions/flag
0032     description:
0033       Set if the hardware have an external resistor and thereby bypasses
0034       the internal compensation resistor.
0035 
0036   adi,dc-dc-phase:
0037     $ref: /schemas/types.yaml#/definitions/uint32
0038     enum: [0, 1, 2, 3]
0039     description: |
0040       Valid values for DC DC Phase control is:
0041       0: All dc-to-dc converters clock on the same edge.
0042       1: Channel A and Channel B clock on the same edge,
0043          Channel C and Channel D clock on opposite edges.
0044       2: Channel A and Channel C clock on the same edge,
0045          Channel B and Channel D clock on opposite edges.
0046       3: Channel A, Channel B, Channel C, and Channel D
0047          clock 90 degrees out of phase from each other.
0048 
0049   adi,dc-dc-freq-hz:
0050     enum: [250000, 410000, 650000]
0051 
0052   adi,dc-dc-max-microvolt:
0053     description:
0054       Maximum allowed Vboost voltage supplied by the dc-to-dc converter.
0055     enum: [23000000, 24500000, 27000000, 29500000]
0056 
0057   "#address-cells":
0058     const: 1
0059 
0060   "#size-cells":
0061     const: 0
0062 
0063   "#io-channel-cells":
0064     const: 1
0065 
0066 required:
0067   - compatible
0068   - reg
0069 
0070 additionalProperties: false
0071 
0072 patternProperties:
0073   "^channel@[0-7]$":
0074     type: object
0075     description: Child node to describe a channel
0076     properties:
0077       reg:
0078         maxItems: 1
0079 
0080       adi,mode:
0081         $ref: /schemas/types.yaml#/definitions/uint32
0082         minimum: 0
0083         maximum: 6
0084         description: |
0085           Valid values for DAC modes is:
0086           0: 0 V to 5 V voltage range.
0087           1: 0 V to 10 V voltage range.
0088           2: Plus minus 5 V voltage range.
0089           3: Plus minus 10 V voltage range.
0090           4: 4 mA to 20 mA current range.
0091           5: 0 mA to 20 mA current range.
0092           6: 0 mA to 24 mA current range.
0093 
0094       adi,ext-current-sense-resistor:
0095         $ref: /schemas/types.yaml#/definitions/flag
0096         description:
0097           Set if the hardware has an external current sense resistor
0098 
0099       adi,enable-voltage-overrange:
0100         $ref: /schemas/types.yaml#/definitions/flag
0101         description: Enable voltage overrange
0102 
0103       adi,slew:
0104         $ref: /schemas/types.yaml#/definitions/uint32-array
0105         description: |
0106           Array of slewrate settings should contain 3 fields:
0107           1: Should be either 0 or 1 in order to enable or disable slewrate.
0108           2: Slew rate update frequency
0109           3: Slew step size
0110         items:
0111           - enum: [0, 1]
0112           - enum: [64000, 32000, 16000, 8000, 4000, 2000, 1000, 500, 250, 125, 64, 32, 16, 8, 4, 0]
0113           - enum: [1, 2, 4, 16, 32, 64, 128, 256]
0114 
0115     required:
0116       - reg
0117 
0118     additionalProperties: false
0119 
0120 oneOf:
0121   - required:
0122       - spi-cpha
0123   - required:
0124       - spi-cpol
0125 
0126 examples:
0127   - |
0128     spi {
0129         #address-cells = <1>;
0130         #size-cells = <0>;
0131 
0132         dac@0 {
0133             #address-cells = <1>;
0134             #size-cells = <0>;
0135             compatible = "adi,ad5755";
0136             reg = <0>;
0137             spi-max-frequency = <1000000>;
0138             spi-cpha;
0139             adi,dc-dc-phase = <0>;
0140             adi,dc-dc-freq-hz = <410000>;
0141             adi,dc-dc-max-microvolt = <23000000>;
0142             channel@0 {
0143                 reg = <0>;
0144                 adi,mode = <4>;
0145                 adi,ext-current-sense-resistor;
0146                 adi,slew = <0 64000 1>;
0147             };
0148             channel@1 {
0149                 reg = <1>;
0150                 adi,mode = <4>;
0151                 adi,ext-current-sense-resistor;
0152                 adi,slew = <0 64000 1>;
0153             };
0154             channel@2 {
0155                 reg = <2>;
0156                 adi,mode = <4>;
0157                 adi,ext-current-sense-resistor;
0158                 adi,slew = <0 64000 1>;
0159             };
0160             channel@3 {
0161                 reg = <3>;
0162                 adi,mode = <4>;
0163                 adi,ext-current-sense-resistor;
0164                 adi,slew = <0 64000 1>;
0165             };
0166         };
0167     };
0168 ...