Path: blob/main/sys/contrib/device-tree/Bindings/iio/dac/adi,ad3552r.yaml
48525 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1# Copyright 2020 Analog Devices Inc.2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/dac/adi,ad3552r.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: Analog Devices AD2552R DAC device driver89maintainers:10- Nuno Sá <nuno.sa@analog.com>1112description: |13Bindings for the Analog Devices AD3552R DAC device and similar.14Datasheet can be found here:15https://www.analog.com/media/en/technical-documentation/data-sheets/ad3541r.pdf16https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf17https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf18https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf1920properties:21compatible:22enum:23- adi,ad3541r24- adi,ad3542r25- adi,ad3551r26- adi,ad3552r2728reg:29maxItems: 13031spi-max-frequency:32maximum: 300000003334reset-gpios:35maxItems: 13637ldac-gpios:38description: |39LDAC pin to be used as a hardware trigger to update the DAC channels.40maxItems: 14142vref-supply:43description:44The regulator to use as an external reference. If it does not exists the45internal reference will be used. External reference must be 2.5V4647adi,vref-out-en:48description: Vref I/O driven by internal vref to 2.5V. If not set, Vref pin49will be floating.50type: boolean5152adi,sdo-drive-strength:53description: |54Configure SDIO0 and SDIO1 strength levels:55- 0: low SDO drive strength.56- 1: medium low SDO drive strength.57- 2: medium high SDO drive strength.58- 3: high SDO drive strength59$ref: /schemas/types.yaml#/definitions/uint3260enum: [0, 1, 2, 3]6162'#address-cells':63const: 16465'#size-cells':66const: 06768patternProperties:69"^channel@([0-1])$":70type: object71description: Configurations of the DAC Channels7273additionalProperties: false7475properties:76reg:77description: Channel number78enum: [0, 1]7980adi,output-range-microvolt: true8182custom-output-range-config:83type: object84additionalProperties: false85description: Configuration of custom range when86adi,output-range-microvolt is not present.87The formulas for calculation the output voltages are88Vout_fs = 2.5 + [(GainN + Offset/1024) * 2.5 * Rfbx * 1.03]89Vout_zs = 2.5 - [(GainP + Offset/1024) * 2.5 * Rfbx * 1.03]9091properties:92adi,gain-offset:93description: Gain offset used in the above formula94$ref: /schemas/types.yaml#/definitions/int3295maximum: 51196minimum: -5119798adi,gain-scaling-p:99description: GainP = 1 / ( 2 ^ adi,gain-scaling-p)100$ref: /schemas/types.yaml#/definitions/uint32101enum: [0, 1, 2, 3]102103adi,gain-scaling-n:104description: GainN = 1 / ( 2 ^ adi,gain-scaling-n)105$ref: /schemas/types.yaml#/definitions/uint32106enum: [0, 1, 2, 3]107108adi,rfb-ohms:109description: Feedback Resistor110111required:112- adi,gain-offset113- adi,gain-scaling-p114- adi,gain-scaling-n115- adi,rfb-ohms116117required:118- reg119120oneOf:121# If adi,output-range-microvolt is missing,122# custom-output-range-config must be used123- required:124- adi,output-range-microvolt125126- required:127- custom-output-range-config128129allOf:130- if:131properties:132compatible:133contains:134enum:135- adi,ad3541r136- adi,ad3542r137then:138patternProperties:139"^channel@([0-1])$":140type: object141properties:142adi,output-range-microvolt:143description: |144Voltage output range of the channel as <minimum, maximum>145Required connections:146Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V;147Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V;148oneOf:149- items:150- const: 0151- enum: [2500000, 3000000, 5000000, 10000000]152- items:153- const: -2500000154- const: 7500000155- items:156- const: -5000000157- const: 5000000158159required:160- adi,output-range-microvolt161162- if:163properties:164compatible:165contains:166enum:167- adi,ad3551r168- adi,ad3552r169then:170patternProperties:171"^channel@([0-1])$":172type: object173properties:174adi,output-range-microvolt:175description: |176Voltage output range of the channel as <minimum, maximum>177Required connections:178Rfb1x for: 0 to 2.5 V; 0 to 5 V;179Rfb2x for: 0 to 10 V; -5 to 5 V;180Rfb4x for: -10 to 10V181oneOf:182- items:183- const: 0184- enum: [2500000, 5000000, 10000000]185- items:186- const: -5000000187- const: 5000000188- items:189- const: -10000000190- const: 10000000191192- if:193properties:194compatible:195contains:196enum:197- adi,ad3541r198- adi,ad3551r199then:200properties:201channel@1: false202channel@0:203properties:204reg:205const: 0206207required:208- compatible209- reg210- spi-max-frequency211212additionalProperties: false213214examples:215- |216spi {217#address-cells = <1>;218#size-cells = <0>;219ad3552r@0 {220compatible = "adi,ad3552r";221reg = <0>;222spi-max-frequency = <20000000>;223#address-cells = <1>;224#size-cells = <0>;225channel@0 {226reg = <0>;227adi,output-range-microvolt = <0 10000000>;228};229channel@1 {230reg = <1>;231custom-output-range-config {232adi,gain-offset = <5>;233adi,gain-scaling-p = <1>;234adi,gain-scaling-n = <2>;235adi,rfb-ohms = <1>;236};237};238};239};240...241242243