Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2323284pxb; Fri, 8 Oct 2021 05:42:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2wkFYYjy0lfB+GxMLSM6MONdku0qHk8OXGzbD+FDuccPI0KuqHEHtYA0jxROYOvs6ZkdL X-Received: by 2002:a50:be87:: with SMTP id b7mr15301184edk.382.1633696927841; Fri, 08 Oct 2021 05:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633696927; cv=none; d=google.com; s=arc-20160816; b=EOkh/VJXFXHYP9PPY4vuu+I+AQYMrF0yS9gH/GteJlE3BqsjLSvqNKWPJpaDhZWdAG tDB9Wc/8/UiKchOiBc5ytQ0PPVOK3O+tjX9A1N4ExVdcskbiJG8cWcniyBwnbt8aTU+T UyZVBfhASOVua5FiCt90PoRAedXk5cP7KnUOoR7kB515D8/c9QZGOObelMLWAvyEBDun 15BMjMp0V2lRfJFXztx3NxbnwXxzGdXLhve6gSPx7ghyg6MZkh/nuD50K+HzpZmG70DH tBgH0+tJ8N0LxhRy9+lxGeCTYdu9kpkpwY9IJgzCCHIoPYr6mg7DrDWmZAAC06qnqYKs QPUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wGw8gWGq0ElQ4L58fJhIH6+NsPEsKs/uxW5EnFEDZhc=; b=w0MpHl1s6WwSOEgoYKw6RuEc3EcAfnBeScNrpQ/JFKiQrCN4k/CObDvBY/WWatVmCn nNVbHtg+iLF/WziO2GulxKTv7ImIMGUHnau9LpVG3WyCmEZss/zCqrpXqieEOVkAU6+6 63x/bv0ITG+MAbmZPUh2A5VlRXxqivIVvR0pZ+YdUVKXdAJvVgivpHRdSc9VNgl5YwF6 e4PtBQWjc8+j7HZymXW87WjsU6Ipb3HrB3qA+Fzo3aWwDWvqa6/OB0YZzzTimn7Q/Wiy regYZepdsW4e/Gi6JpJCpboCP/IvR0XQXNi2Ng4Roz7Ru/9L3WKOFeJmivFqOj9cUslC Q7uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la20si4180390ejc.3.2021.10.08.05.41.44; Fri, 08 Oct 2021 05:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241543AbhJHMlt (ORCPT + 99 others); Fri, 8 Oct 2021 08:41:49 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:29740 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241191AbhJHMlr (ORCPT ); Fri, 8 Oct 2021 08:41:47 -0400 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1987MrUq001441; Fri, 8 Oct 2021 08:39:41 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 3bjhj11b24-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Oct 2021 08:39:41 -0400 Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 198Cdep8031725 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 8 Oct 2021 08:39:40 -0400 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.5; Fri, 8 Oct 2021 08:39:39 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.5; Fri, 8 Oct 2021 08:39:39 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.858.5 via Frontend Transport; Fri, 8 Oct 2021 08:39:39 -0400 Received: from ubuntuservermchindri.ad.analog.com ([10.32.225.109]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 198CdLdb026676; Fri, 8 Oct 2021 08:39:36 -0400 From: Mihail Chindris To: , CC: , , , , , , Mihail Chindris , Mark Brown Subject: [PATCH v2 1/2] dt-bindings: iio: dac: Add adi,ad3552r.yaml Date: Fri, 8 Oct 2021 12:39:08 +0000 Message-ID: <20211008123909.1901-2-mihail.chindris@analog.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211008123909.1901-1-mihail.chindris@analog.com> References: <20211008123909.1901-1-mihail.chindris@analog.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: aDipxKQSRrs7ci81eFJAxu1c_oCJ5Ent X-Proofpoint-GUID: aDipxKQSRrs7ci81eFJAxu1c_oCJ5Ent X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-08_03,2021-10-07_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 bulkscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110080075 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation for ad3552r Signed-off-by: Mihail Chindris --- .../bindings/iio/dac/adi,ad3552r.yaml | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml new file mode 100644 index 000000000000..1086e935d330 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2020 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad3552r.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD2552R DAC device driver + +maintainers: + - Mihail Chindris + +description: | + Bindings for the Analog Devices AD3552R DAC device. Datasheet can be + found here: + https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf + +properties: + compatible: + enum: + - adi,ad3552r + - adi,ad3542r + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 30000000 + + reset-gpios: + maxItems: 1 + + ldac-gpios: + description: | + If a LDAC gpio is specified it will generate a LDAC pulse each time the + trigger handler sends data to the chip. + maxItems: 1 + + vref-supply: + description: + The regulator to use as an external reference. If it does not exists the + internal reference will be used. External reference must be 2.5V + + adi,vref-out-en: + description: Vref I/O driven by internal vref to 2.5V. If not set, Vref pin + will be floating. + type: boolean + + adi,sdo-drive-strength: + description: | + Configure SDIO0 and SDIO1 strength levels: + - 0: low SDO drive strength. + - 1: medium low SDO drive strength. + - 2: medium high SDO drive strength. + - 3: high SDO drive strength + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + +patternProperties: + "^channel@([0-1])$": + type: object + description: Configurations of the DAC Channels + properties: + reg: + description: Channel number + enum: [0, 1] + + custom-output-range-config: + type: object + description: Configuration of custom range when + adi,output-range-microvolt is not present. + The formulas for calculation the output voltages are + Vout_fs = 2.5 + [(GainN + Offset/1024) * 2.5 * Rfbx * 1.03] + Vout_zs = 2.5 - [(GainP + Offset/1024) * 2.5 * Rfbx * 1.03] + properties: + adi,gain-offset: + description: Gain offset used in the above formula + $ref: /schemas/types.yaml#/definitions/int32 + maximum: 511 + minimum: -511 + adi,gain-scaling-p: + description: | + Scaling p: + 0: 1.0 + 1: 0.5 + 2: 0.25 + 3: 0.125 + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + adi,gain-scaling-n: + description: | + Scaling p: + 0: 1.0 + 1: 0.5 + 2: 0.25 + 3: 0.125 + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + adi,rfb-ohms: + description: Feedback Resistor + required: + - adi,gain-offset + - adi,gain-sacling-p + - adi,gain-sacling-n + - adi,rfb-ohms + required: + - reg + + oneOf: + # If adi,output-range is missing, custom-output-range-config must be used + - required: + - adi,output-range-microvolt + - required: + - custom-output-range-config + +allOf: + - if: + properties: + compatible: + contains: + const: adi,ad3542r + then: + patternProperties: + "^channel@([0-1])$": + type: object + properties: + adi,output-range-microvolt: + description: | + Voltage output range of the channel as + Required connections: + Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V; + Rfb2x for: 0 to 10 V; 2.5 to 7.5V; -5 to 5 V; + oneOf: + - items: + - const: 0 + - enum: [2500000, 3000000, 5000000, 10000000] + - items: + - const: -2500000 + - const: 7500000 + - items: + - const: -5000000 + - const: 5000000 + required: + - adi,output-range-microvolt + - if: + properties: + compatible: + contains: + const: adi,ad3552r + then: + patternProperties: + "^channel@([0-1])$": + type: object + properties: + adi,output-range-microvolt: | + Voltage output range of the channel as + Required connections: + Rfb1x for: 0 to 2.5 V; 0 to 5 V; + Rfb2x for: 0 to 10 V; -5 to 5 V; + Rfb4x for: -10 to 10V + oneOf: + - items: + - const: 0 + - enum: [2500000, 5000000, 10000000] + - items: + - const: -5000000 + - const: 5000000 + - items: + - const: -10000000 + - const: 10000000 + +required: + - compatible + - reg + - spi-max-frequency + +additionalProperties: false + +examples: + - | + ad3552r { + compatible = "adi,ad3552r"; + reg = <0>; + spi-max-frequency = <20000000>; + channel@0 { + reg = <0>; + adi,output-range-microvolt = <0 10000000>; + }; + channel@1 { + reg = <1>; + custom-output-range-config { + adi,gain-offset = <5>; + adi,gain-scaling-p = <1>; + adi,gain-scaling-n = <2>; + adi,rfb-ohms = <1>; + }; + }; + }; +... -- 2.27.0