Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3728800rwd; Sat, 10 Jun 2023 13:33:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4tKDj0sQ2+9CKwWDskdSTfQDnJiu8aZLyU26mYr8nUjqvqeIGeVG3iUwYm9J/KRBDakmA5 X-Received: by 2002:a17:903:1ce:b0:1af:bbfd:1c07 with SMTP id e14-20020a17090301ce00b001afbbfd1c07mr2765712plh.57.1686429183517; Sat, 10 Jun 2023 13:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686429183; cv=none; d=google.com; s=arc-20160816; b=vJTZioGPBXTdvMnLtEDb7r6yixS6VmTOotfTtq+CL3L5F3MXf5KuhSbgiBZJ32LlDM nxj3eMpSH93t3NKhjnp9EMuA/Gyw1eRzepEN4YLasPEhhZskSzsiyEixViOW+zfwFHky 5ICeQJMxxJrIgOLIkH0BbmFOeZX95iKe+NRZ2vF+2fLICXjF7+Y1ZYHLws3almeNeMLN Di7G5oK3rVw1qneTxRwlji/7d506iEQWETTNO3SLVE//KOPS/H/LL6B096pwrY86RkbI wQnwZRJZIfO7nS+xglRr5LE+BQXsXtCSlt9RBGa6bEp0xojfkpBfSZELe2+u/11Q9LWk RkUg== 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 :dkim-signature; bh=HwlNr/WLM3KKZTrIdFCLg61Yoj39feXOCHJbchF+mgM=; b=Whsqu5/WofQGMhRLQWWVs714lg5Ji/OKo8fMML4W4KXHQ7b6zRWkOgnk5mzD9NRPeI asMXEMa2aaEovYpHPAiScrt1Nbczx9E4hB81MSjDQlDI3k0DK+hjKxaPeghVutEh6ar8 dKiYb4e65ZNgfDRMnBTmT7zoveLx2QD4Gk5ynSQSjmezfHZXXDs2FtPEdUUdjtX30jPv yw2Ki0FFIXO/Q/r4/w6JxLZcvvnFhG4zqG0k8Nbec+nQsrsaYWNQ7sHGkaZHfeBjijLs MPPi0cx5QpPPSxP4qYLWnBpWx8uh13deEP91BdTT/ezLjgFCUbo3YHJjeCx6itF6O2RI 9yDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fTmAmr+5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kv13-20020a17090328cd00b001afe110eb66si4628486plb.532.2023.06.10.13.32.49; Sat, 10 Jun 2023 13:33:03 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fTmAmr+5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231968AbjFJUVL (ORCPT + 99 others); Sat, 10 Jun 2023 16:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231767AbjFJUVJ (ORCPT ); Sat, 10 Jun 2023 16:21:09 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5D9D35BE; Sat, 10 Jun 2023 13:21:07 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3094910b150so2910936f8f.0; Sat, 10 Jun 2023 13:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686428465; x=1689020465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HwlNr/WLM3KKZTrIdFCLg61Yoj39feXOCHJbchF+mgM=; b=fTmAmr+5to5leCNYnFTwILHcBPZQ0ECfy4oFDnIx8zo01PmKgZS8EA9eQE2dC20MJZ +PHKS78ldecBv8GsOho8+FIhN+xHHn1p3oCs8maUhXxkCeNI+Bq685OMQpxZPyxnJzch suCfpswQDaJQuRGPpAb5RiTy7k+9omxLHsLkhV52AxXK7gFzpawSlUvi7oLy3mo9ph6T uYcGZIOn3/yIxSNkXkVamU1i0VGoFXXNClE17vSdO9fpKoDVtx7EnsWQLNEEaaUk5lSE ouRnvtXahKdqDsp52J3KrKmKzmpE6WIyZTVxIidD+ovRNBBmA4tDaX2joovcA3WmDRLE 25AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686428465; x=1689020465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HwlNr/WLM3KKZTrIdFCLg61Yoj39feXOCHJbchF+mgM=; b=VeVcj9TKC99c+Lrw97xdLdzb1meCd/YvzuYQtMo77aSXd7OGJAcA3S3e+Kx7cmMwvZ nfiqgisDuOB3wKdc/FiIAUWLHn7XxKZmbVShv2nLe9CqLRySnAVkiz4gGrzzhohyqEhN rJdqNqXXl2xBWubf7dlRWLuy6U4+DW35L/OjKETkNwVzixBBay//aeOPbSvlGEAkVmcs iCF7/1sQ1TCT7wqTiHXV6zcfocU4Mgp5C3X1urauuibPw6cQjm/1XDXxnxtL5jMd/3fu KhKKleca6Q6Mwk1ommXYlEYNMRebfb0n55FJAR+Al2qDFsaIEYceEgdY9daOAzbnQyPh pTPw== X-Gm-Message-State: AC+VfDwTUAIBT+qkwESwc/zQuYq7TGjiurRdOsEVFiaLqRKqBrT/lwBs KmZOiG03TpiPu0werf1ceVCgbCiWvR8uVwqp X-Received: by 2002:a5d:4e84:0:b0:306:27db:16c3 with SMTP id e4-20020a5d4e84000000b0030627db16c3mr1980878wru.50.1686428465475; Sat, 10 Jun 2023 13:21:05 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id m11-20020a5d6a0b000000b0030b5d203e7esm7878116wru.97.2023.06.10.13.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 13:21:05 -0700 (PDT) From: Maksim Kiselev To: linux-iio@vger.kernel.org Cc: Maxim Kiselev , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Cristian Ciocaltea , Heiko Stuebner , Andy Shevchenko , Cosmin Tanislav , Hugo Villeneuve , Ulf Hansson , Arnd Bergmann , ChiaEn Wu , Ibrahim Tilki , ChiYuan Huang , Ramona Bolboaca , William Breathitt Gray , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , Caleb Connolly , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v5 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Sat, 10 Jun 2023 23:19:49 +0300 Message-Id: <20230610202005.1118049-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230610202005.1118049-1-bigunclemax@gmail.com> References: <20230610202005.1118049-1-bigunclemax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 From: Maxim Kiselev Allwinner's D1/T113s/R329/T507 SoCs have a new general purpose ADC. This ADC is the same for all of this SoCs. The only difference is the number of available channels. Signed-off-by: Maxim Kiselev --- .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml new file mode 100644 index 000000000000..43256ad2b7ed --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner D1 General Purpose ADC + +maintainers: + - Maksim Kiselev + +properties: + compatible: + enum: + - allwinner,sun20i-d1-gpadc + + "#io-channel-cells": + const: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +patternProperties: + "^channel@([0-15])$": + $ref: adc.yaml + type: object + description: + Represents the internal channels of the ADC. + + properties: + reg: + items: + minimum: 0 + maximum: 15 + + required: + - reg + + unevaluatedProperties: false + +required: + - "#io-channel-cells" + - clocks + - compatible + - interrupts + - reg + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + + gpadc: adc@2009000 { + compatible = "allwinner,sun20i-d1-gpadc"; + reg = <0x2009000 0x1000>; + clocks = <&ccu CLK_BUS_GPADC>; + resets = <&ccu RST_BUS_GPADC>; + interrupts = <73 IRQ_TYPE_LEVEL_HIGH>; + #io-channel-cells = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + }; + + channel@1 { + reg = <1>; + }; + }; +... -- 2.39.2