Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3346312rwd; Sat, 10 Jun 2023 06:11:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78YKXQRsuNFAChkMZNIBN/QuPwD5wfnG8+mJ8I8SaLFfhdQOpgD70yoa+4d3u4rSgIU1HG X-Received: by 2002:a17:907:9687:b0:96a:1ee9:4a5 with SMTP id hd7-20020a170907968700b0096a1ee904a5mr6077989ejc.8.1686402664121; Sat, 10 Jun 2023 06:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686402664; cv=none; d=google.com; s=arc-20160816; b=iVasBQXx/R78DSM2Yx9OkkoB1e5eo7wSQKYFrBZS7d5GVQUwd+ywiFNcON1FwqcNVW IY2F332xQJ1pqg+EN37pfuEMWN7guU5CFBiHrxyvcfdpK/5cZOxQ9ni1XWjc/zgbqbME Fk/4l63UH9up3Fr7nln+6AyMf1it8iMVAoM7giOEDT94U3CiCJTjUAmhbbjxV9uWrQfa spWxRZvMzG0R7NNmKBV5GIYiYg28cWX4kbtRdwlg0stu4/VIVCLL4AHXMPm4z0XODO1p Z+is+S5M9mWMxYhKLM4/B+HNT1IhJDPa8Dw4ftdUEpt0lLReU3B0RfDy4I5y1oJw7gns SBRg== 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=NfDcBM2c7RBL46+FO7R/jISsiGli0gYYtl09AucgxLg=; b=ps9fYODoPsNE/Zbj+gneZ2p+591EJU6PxKLysRtl9kVEHU0ES9NAEfKEBNrqjnOTOi +POQs6V6C2TtPmZrwLF5kNDnq5X5tr+Le6djz/0w15qs/BtUs66NSzHOeZB1FsCtBeN6 1nt6T1mFxiVF9kJEOPOxtyyDOSFAvVex0aZmTqL0zYF03aYsPLn7eBlxjg3INdTfVYQS NT+8Z80WK23FqIpgfhr4+Oo96Ch2hNJ7eg8S+opRiJ3NfmWdx55yeRFTtpVWZ4k45a5m W5t29XQ/Tr3AT+pUWNzKdJh+K22SgGKlSxCEs3aH40C5qetSPN0YZZDDaqrVjR147QE0 jB+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="Iu/CnFtm"; 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 ec23-20020a170906b6d700b00977d54350b7si2618922ejb.346.2023.06.10.06.10.40; Sat, 10 Jun 2023 06:11:04 -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="Iu/CnFtm"; 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 S233132AbjFJMa4 (ORCPT + 99 others); Sat, 10 Jun 2023 08:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232624AbjFJMaz (ORCPT ); Sat, 10 Jun 2023 08:30:55 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1463AA6; Sat, 10 Jun 2023 05:30:40 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f730c1253fso19360975e9.1; Sat, 10 Jun 2023 05:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686400238; x=1688992238; 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=NfDcBM2c7RBL46+FO7R/jISsiGli0gYYtl09AucgxLg=; b=Iu/CnFtmkrUl2AoMMS/urWo3Vc7o8e/PnfxKRP5hoOgqSv4XCYlreacBQ06snvYvKe A7ImityXOAXZTQaIXtmQ++ip7TkvzrRPqUa0FphLMH/Frl0gwVhGnmeyzaHp1QezeDl1 cT9e0Dv72/x33FTtV/fScWLwVnvF9bsjrF0oxvG5qGHQ3IK0t3gL4WaouvjgvR+nXZg0 rdBWAWGEWmHdtePaoqs65MzRS1G/kxGC1dhtDFP4lEwTblVQw32hx0UguRJv6Godnpq8 MZWRnozvKrCWk+V8AeA2tQa8WTGae4h2CBudYlLbYRblLOmsIFEQO4X8PxO3GOEmkEbN /SeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686400238; x=1688992238; 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=NfDcBM2c7RBL46+FO7R/jISsiGli0gYYtl09AucgxLg=; b=Q9yxXSR5hJkfiLjhglFGuk3JNun54hwCxUyXITSb/igVkmvAiGq7EiCxqV/yUeBCTG oVtxQGulw9NtKB7XU0PecsD5mZGXyvZXK2utSqekDLwqZqnVKXrs86SY6AXGcixkvZ4G rUk+y1dIsKnK3FYhvGbO/GqdEw6Wz+HBmBSCoFnIA2aSuXv6k9HmioR0NuGmkHYX1LNa BlXTLCqHP6umm0mj8m3ysWCIsRBEtQC0dmlT3QdscK2n2WMMojRuWdx+4044LsUHUFMI Pt0V2Kq7v30UPcXQnFhJNtz+hyyjXqVoG0qSEhtSEzRROcv/R9l2hKrDGjT/TkVG06bb Y+jQ== X-Gm-Message-State: AC+VfDxdUWRR6ppKRhz+qVeffEwmTZ/ObfwF9xmYDlIPeEEnnjtm2L5a A+kvt35Q3icdbU9cdsBvSr9vy8ZxPm3yd9ql X-Received: by 2002:a05:600c:3781:b0:3f6:3da:1603 with SMTP id o1-20020a05600c378100b003f603da1603mr2519287wmr.26.1686400238132; Sat, 10 Jun 2023 05:30:38 -0700 (PDT) Received: from user-PC.. ([178.134.198.138]) by smtp.gmail.com with ESMTPSA id v26-20020a1cf71a000000b003f80e81705asm2310487wmh.45.2023.06.10.05.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 05:30:37 -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 , Greg Kroah-Hartman , Andy Shevchenko , Cosmin Tanislav , Ulf Hansson , Arnd Bergmann , Hugo Villeneuve , William Breathitt Gray , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , ChiaEn Wu , Haibo Chen , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , 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 v4 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Sat, 10 Jun 2023 15:29:08 +0300 Message-Id: <20230610122934.953106-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230610122934.953106-1-bigunclemax@gmail.com> References: <20230610122934.953106-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..2b59844b7c07 --- /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 + + additionalProperties: false + +required: + - "#io-channel-cells" + - clocks + - compatible + - interrupts + - reg + - resets + +unevaluatedProperties: 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