Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp76775rwb; Tue, 4 Oct 2022 00:28:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM58gt5ZCM20YmhMGH5fzAaNiIjACqmdReI10WDztNore2OM0g2HgAZwBsOD/GmbFi1oDeYc X-Received: by 2002:a17:907:1b22:b0:741:8809:b4e6 with SMTP id mp34-20020a1709071b2200b007418809b4e6mr18214152ejc.84.1664868499517; Tue, 04 Oct 2022 00:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664868499; cv=none; d=google.com; s=arc-20160816; b=q6tvZKZHpOEyY1U24HxGp0s41tJNRL/hs1yBZe0Zti0+nIWZ1MzpJRsZs6cquHkcNf TrZSGC7rgOYDEZ6llpHHQUy2yk8u2I7MlPCXkvqNyzmuojF/6Oh+oEIqrpaTaIRWOv88 Jrbaz3m5+/kKyVx1kG9oye/5kyOrrV6rS/xXPgbnFvOGndNm4nYlKCQtrbqL7i//0/UQ 0qy5Vkn99JxAKHoD+RIvuTxRa2PFEQFXTkzyMO8/BQh/B/Kd9Ide2op5dMpoV3apD4cv wgZGXbVOwT/EtrvnxHuM6+UfN2A9qdpK9Q0Oiu5HxN983Kfj5JN67mgt9syf/pTXtXkk nfAw== 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=EU5elCHvzEJKgV2ESBS0fPvvDZuGaj1GHxaIe+0xI5A=; b=iivUvZVZj/nOQwGKuX6xb32y2ReSoYny8IAIYIn0jJqp6f+i8arTZJY8ab0/rFgKto mS5tkYlQlzRElhs59gK5Z2+C5O1bhbvixwUoKHuAKRi0iEmCGuzkbI41ph1YuD8ctuxW lDX2qO0EyryMmhI1xgK100wGKzWb2etCw0AkQ2tXpnbTR5TA5iRhg+ktfGGt0bYw4x6g +9Sj4WnCDC70uBgWhTdz2xOKCt3HVR3SBwGdSjKCAycxN8KxYRZvEhz8iRjUIEpGIhMb S5KPnuhycFrD1eFhCJCjk+S3n768WA3GJQphen/3fywxzD0hye4HlSVfOnRVJGWeeURO nbHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne25-20020a1709077b9900b0078cc8a2cf4bsi3317395ejc.614.2022.10.04.00.27.51; Tue, 04 Oct 2022 00:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229780AbiJDHVW (ORCPT + 99 others); Tue, 4 Oct 2022 03:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiJDHVS (ORCPT ); Tue, 4 Oct 2022 03:21:18 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 047791F9E4; Tue, 4 Oct 2022 00:21:17 -0700 (PDT) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2946mkgP005542; Tue, 4 Oct 2022 03:21:06 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3jxfd71k9b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Oct 2022 03:21:05 -0400 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 2947L4tx022089 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Oct 2022 03:21:04 -0400 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 4 Oct 2022 03:21:03 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) 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.986.14; Tue, 4 Oct 2022 03:21:03 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Tue, 4 Oct 2022 03:21:03 -0400 Received: from debian.ad.analog.com ([10.48.65.127]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 2947Ke1R031613; Tue, 4 Oct 2022 03:20:54 -0400 From: Ciprian Regus To: , , , , , , CC: Ciprian Regus Subject: [PATCH 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml Date: Tue, 4 Oct 2022 10:18:24 +0300 Message-ID: <20221004071825.791307-2-ciprian.regus@analog.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221004071825.791307-1-ciprian.regus@analog.com> References: <20221004071825.791307-1-ciprian.regus@analog.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: jdK6VapHAyI6_ZK-TRo0fmFLT5BaCdRW X-Proofpoint-ORIG-GUID: jdK6VapHAyI6_ZK-TRo0fmFLT5BaCdRW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-04_02,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210040046 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add devicetree bindings documentation for the AD5754 DAC driver. Signed-off-by: Ciprian Regus --- .../bindings/iio/dac/adi,ad5754.yaml | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml new file mode 100644 index 000000000000..e96112bc15d0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5754.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5754 DAC device driver + +maintainers: + - Ciprian Regus + +description: | + Bindings for the AD5754 and other chip variants digital-to-analog + converters. + + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5724_5734_5754.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ad5722_5732_5752.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ad5724r_5734r_5754r.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5722R_5732R_5752R.pdf + +properties: + compatible: + enum: + - adi,ad5722 + - adi,ad5732 + - adi,ad5752 + - adi,ad5724 + - adi,ad5734 + - adi,ad5754 + - adi,ad5722r + - adi,ad5732r + - adi,ad5752r + - adi,ad5724r + - adi,ad5734r + - adi,ad5754r + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 30000000 + + spi-cpol: true + + vref-supply: + description: + The regulator to use as an external reference. If this is not provided, + the internal reference will be used for chips that have this feature. + The external reference must be 2.5V. + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + "^channel@([0-3])$": + type: object + description: Configurations for the DAC channels + + properties: + reg: + description: Channel number + maxItems: 1 + + output-range-microvolt: + description: | + Voltage range of a channel as . + oneOf: + - items: + - const: 0 + - enum: [5000000, 10000000, 10800000] + - items: + - const: -5000000 + - const: 5000000 + - items: + - const: -10000000 + - const: 10000000 + - items: + - const: -10800000 + - const: 10800000 + + required: + - reg + - output-range-microvolt + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + + - if: + properties: + compatible: + contains: + enum: + - adi,ad5722 + - adi,ad5732 + - adi,ad5752 + - adi,ad5722r + - adi,ad5732r + - adi,ad5752r + then: + patternProperties: + "^channel@([0-3])$": + type: object + properties: + reg: + description: Channel number + enum: [0, 1] + + - if: + properties: + compatible: + contains: + enum: + - adi,ad5724 + - adi,ad5734 + - adi,ad5754 + - adi,ad5724r + - adi,ad5734r + - adi,ad5754r + then: + patternProperties: + "^channel@([0-3])$": + type: object + properties: + reg: + description: Channel number + enum: [0, 1, 2, 3] + +required: + - compatible + - reg + - spi-max-frequency + - spi-cpol + +unevaluatedProperties: false + +examples: + - | + spi { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad5754r"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + output-range-microvolt = <0 5000000>; + }; + channel@1 { + reg = <1>; + output-range-microvolt = <0 5000000>; + }; + channel@2 { + reg = <2>; + output-range-microvolt = <0 5000000>; + }; + channel@3 { + reg = <3>; + output-range-microvolt = <0 5000000>; + }; + }; + }; -- 2.30.2