Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4260632pxb; Tue, 31 Aug 2021 00:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf615scXbgNN5baz86vySPa3WZNzyS9tJqm1igeEUi/yzYbc0frZLroRzt175E2nx5eKMk X-Received: by 2002:a92:d3cf:: with SMTP id c15mr19092109ilh.131.1630394263510; Tue, 31 Aug 2021 00:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630394263; cv=none; d=google.com; s=arc-20160816; b=X77dwFBOTViGMSvXIN3DVCeQ5nReuhHjdtF5d2zwhYlUW8T5Kh0Qk73H8pw+xVipym MTCbW3X089oZgEyTmcpRZmOyg121Cpv9/8w6+kbzYkTpndieJ2X1ZoWj7w3C+a5qihr4 MjCaT6DYzYiJKTS8hakAs2SWxZO496ZXRQGFcBJX/2/JHEQUlBqq1kBDFzKY/HH7HfNv U3jGyQITpQUCXlFFUx1TWCBtTEaNOtntDaFCgAEMOkW4v2o+14BGV0GN+oByOlm9+fap lIkzbk353ISo+KrounISegwjOblE2WVLwCO+xDJEsA9xVBv4j0t4g3/XlAnsZf3yv52h bteQ== 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=tNU8CfSIro4V9dAvE6kT1c2RjWh2FBn36NfvpEqMMg8=; b=H9/blF7kP3iqNs/Z3dU5pofkPrBhbx+7mzJ5NfUJpezexC+DYkjTng6CAU/ef65ZTd +Vn7f9ke5sBzW4qzUlKvSqN0MOuLtUCSsGUHhz+d2g62dE6elc76Joq7RJTEV8PktW1r THde6HUMZfIEaCo519Oc9meixNJCylZGShJSCJmj4ABPPaxQ2kX40jb+Xl4j5DR/drvY TFbodR4i16P0aqr1GTuUVYTMc9wslnILiwFXclDAI4FXTogs5uiRNOXa6p11YKBk3WM4 N4SV0k4bqp2SVd6TQ3KToxxrWUqN0sozPWJb1vEoE/vFOd30qLY3J0Bz4Owuz9wR9buW JzgQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si22476190iof.69.2021.08.31.00.17.32; Tue, 31 Aug 2021 00:17:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239720AbhHaHQt (ORCPT + 99 others); Tue, 31 Aug 2021 03:16:49 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:47246 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239550AbhHaHQ1 (ORCPT ); Tue, 31 Aug 2021 03:16:27 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 17V6sbmt028256; Tue, 31 Aug 2021 14:54:37 +0800 (GMT-8) (envelope-from billy_tsai@aspeedtech.com) Received: from BillyTsai-pc.aspeed.com (192.168.2.149) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 15:13:34 +0800 From: Billy Tsai To: , , , , , , , , , , , , , CC: Subject: [v5 02/15] dt-bindings: iio: adc: Add ast2600-adc bindings Date: Tue, 31 Aug 2021 15:14:45 +0800 Message-ID: <20210831071458.2334-3-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210831071458.2334-1-billy_tsai@aspeedtech.com> References: <20210831071458.2334-1-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [192.168.2.149] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 17V6sbmt028256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add device tree bindings document for the aspeed ast2600 adc device driver. Signed-off-by: Billy Tsai --- .../bindings/iio/adc/aspeed,ast2600-adc.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/aspeed,ast2600-adc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2600-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2600-adc.yaml new file mode 100644 index 000000000000..b283c8ca2bbf --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2600-adc.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADC that forms part of an ASPEED server management processor. + +maintainers: + - Billy Tsai + +description: | + • 10-bits resolution for 16 voltage channels. + • The device split into two individual engine and each contains 8 voltage + channels. + • Channel scanning can be non-continuous. + • Programmable ADC clock frequency. + • Programmable upper and lower threshold for each channels. + • Interrupt when larger or less than threshold for each channels. + • Support hysteresis for each channels. + • Built-in a compensating method. + • Built-in a register to trim internal reference voltage. + • Internal or External reference voltage. + • Support 2 Internal reference voltage 1.2v or 2.5v. + • Integrate dividing circuit for battery sensing. + +properties: + compatible: + enum: + - aspeed,ast2600-adc0 + - aspeed,ast2600-adc1 + description: + Their trimming data, which is used to calibrate internal reference volage, + locates in different address of OTP. + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: + Input clock used to derive the sample clock. Expected to be the + SoC's APB clock. + + resets: + maxItems: 1 + + "#io-channel-cells": + const: 1 + + vref-supply: + description: + The external regulator supply ADC reference voltage. + + aspeed,int-vref-microvolt: + enum: [1200000, 2500000] + description: + ADC internal reference voltage in microvolts. + + aspeed,battery-sensing: + type: boolean + description: + Inform the driver that last channel will be used to sensor battery. + + aspeed,trim-data-valid: + type: boolean + description: | + The ADC reference voltage can be calibrated to obtain the trimming + data which will be stored in otp. This property informs the driver that + the data store in the otp is valid. + +required: + - compatible + - reg + - clocks + - resets + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + #include + adc0: adc@1e6e9000 { + compatible = "aspeed,ast2600-adc0"; + reg = <0x1e6e9000 0x100>; + clocks = <&syscon ASPEED_CLK_APB2>; + resets = <&syscon ASPEED_RESET_ADC>; + #io-channel-cells = <1>; + aspeed,int-vref-microvolt = <2500000>; + }; + adc1: adc@1e6e9100 { + compatible = "aspeed,ast2600-adc1"; + reg = <0x1e6e9100 0x100>; + clocks = <&syscon ASPEED_CLK_APB2>; + resets = <&syscon ASPEED_RESET_ADC>; + #io-channel-cells = <1>; + aspeed,int-vref-microvolt = <2500000>; + }; +... -- 2.25.1