Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4786499rwd; Sun, 4 Jun 2023 12:54:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5hoBzP88zMAkYa6xg1oiiTdStqv6aK1YvVevs0+VyxENpzjv+KZRZaidY9JssGE0pxLNJa X-Received: by 2002:a25:aa24:0:b0:bb1:6e29:a84d with SMTP id s33-20020a25aa24000000b00bb16e29a84dmr12803003ybi.53.1685908470102; Sun, 04 Jun 2023 12:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685908470; cv=none; d=google.com; s=arc-20160816; b=PzYTqAuIQzdG3HpsejG8rsu4bE3WW8qTLOHEp04L1xdsku6PeRoQXXKE8dzQwzedeD Ya1mfy/6wPCLaHDc9ol+kmkVMRg8c8fHNxEwXveUs2V3zfZr+W1cMnchyC/SGwepPGVT GwfMFJnAmqw4Mu0DGamAG2SIXMluJ7THmscYleNIqmbm8jxNAS+HL2tiMZNKNU+VLVsR lpQlt4sXWxaflXhaavkmI4q5WSy1pumKXaHkio8chWGfnpXpVthcpfYL6GSZJyu/eDij gAakVJpDQs4QfvfHr+DzNLbH59fcLnx8UYE5TWEZfqHHOS9cBVo6gqLS2sc3AwUFsgjd 7k5w== 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=rzwo7MuRNtXcUZRiLMVdnWkiH+vug12Y5tIMzd06xkc=; b=eV9jL2WzyuTwuIJ+t8+4/eOGoOw93aryAgrztiSqLwW2VMtpuhTDkS9yC8DaTCgGyH o5IQkoijmSJ0LqTMRyAITCMi89tTjpsIBSNyEFlkwAv6Rpw62kUyaOWYgmjgXN3gavYg y4Q8rUJRTamP7yvUGU3U4UdL8pLuRmb4OKpjZT4nAnFFawEQ+kkqATAlJl1f2CERKwkS UYgzg5gmVddUcaHJJfEvnzekn5tXzmDGn1POBjywa/0x1cypRXnQ25+cyWnZDifR3AGM s60xV+UzGr+Wp5LmxuG+lQPAjRxFHc9+7frD9Y8tEbeABk20UdPNQ9MEfQsS6IS/KSmA W9ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dtN7wjZa; 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 u8-20020a170902e5c800b001a59439dbfesi4554878plf.529.2023.06.04.12.54.05; Sun, 04 Jun 2023 12:54:30 -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=dtN7wjZa; 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 S232358AbjFDSzF (ORCPT + 99 others); Sun, 4 Jun 2023 14:55:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbjFDSzC (ORCPT ); Sun, 4 Jun 2023 14:55:02 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10F8F2; Sun, 4 Jun 2023 11:54:57 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30ad99fa586so4062722f8f.2; Sun, 04 Jun 2023 11:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685904896; x=1688496896; 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=rzwo7MuRNtXcUZRiLMVdnWkiH+vug12Y5tIMzd06xkc=; b=dtN7wjZaTsNocuP8paje8z4jh1t3o0zPEL3lUe7icfmKJdzzwEkLu3ZlOkLep+5h7A nQPAFEOZHswTycVAzk7lBOzxGo3fehL6FpUEajH5Xm2/+1BCoBC/AHPzAu/j4bdz/102 7+Di/Xcd29LGaB5a84q5Lz7TmgDR+53IVZbDDrAUjcH/oxOJVC9daVopBFcRYZj0LTaX 6m9zQ8SAK6EE4mS35EPZBfvvLLc++pnEWeOjG1OBLxZT+boOPJki3dUAFT7LsY3+IFUh gJQKjNfn+E/KUE1SkcLGCqrIVPFP+YSqB1hF/qaRaQVte9rvkejtlieRxSHc2vAg+uDQ DGsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685904896; x=1688496896; 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=rzwo7MuRNtXcUZRiLMVdnWkiH+vug12Y5tIMzd06xkc=; b=C8nVLgO3D4JZRm6nGHh5UTyu5/8snZUgJI667+f3xcY3u6urX+sCWV00TGXP8RN09/ fNYpaHWm0GT2BTlNqptGwWqdlY1X7O+riKTtQQNpNgKW4PTOfwOxr4LSkFTjBu6Qy38P APRyp/9ZnsEHMoJbTkKHcnuXqR73MQGt9ZLORix5Z68ahDSDyCkzQR5Xf5B/VHK4grM0 6+w1fB2PFbwn4mnqN8908bQZ/6qip0vwGAg8gpO1XIO0L+kItQgwUK8Al9WsTSBRX9Po GJRLKwLjWWyuTIpqsyGQYXl6cR4+NB+YzeTFZE/VphsRzqdgACllcNp9FBthp8/fuzFv n7/w== X-Gm-Message-State: AC+VfDxEp6RXWeoCMxlrNmHb2PQar2LteqWJskCqaBdxtD2qWpP1MjYK q5FVgyofV0ukhy+9jlN2zC/yO7z9s2OXAmhv X-Received: by 2002:a5d:65c2:0:b0:30a:edc0:c960 with SMTP id e2-20020a5d65c2000000b0030aedc0c960mr4366494wrw.26.1685904895665; Sun, 04 Jun 2023 11:54:55 -0700 (PDT) Received: from user-PC.. ([178.134.198.138]) by smtp.gmail.com with ESMTPSA id l8-20020a5d4108000000b00304adbeeabbsm7636433wrp.99.2023.06.04.11.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 11:54:55 -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 , Andre Przywara , Andy Shevchenko , Cosmin Tanislav , ChiYuan Huang , Miquel Raynal , Arnd Bergmann , Mike Looijmans , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , William Breathitt Gray , AngeloGioacchino Del Regno , ChiaEn Wu , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , Haibo Chen , 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 v3 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Sun, 4 Jun 2023 21:53:15 +0300 Message-Id: <20230604185336.1943889-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230604185336.1943889-1-bigunclemax@gmail.com> References: <20230604185336.1943889-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 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 | 90 +++++++++++++++++++ 1 file changed, 90 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..8850cd296e6d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml @@ -0,0 +1,90 @@ +# 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 + +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 + +additionalProperties: false + +examples: + - | + #include + #include + #include + #define SOC_PERIPHERAL_IRQ(nr) (nr + 16) + + gpadc: adc@2009000 { + compatible = "allwinner,sun20i-d1-gpadc"; + reg = <0x2009000 0x1000>; + clocks = <&ccu CLK_BUS_GPADC>; + resets = <&ccu RST_BUS_GPADC>; + interrupts = ; + #io-channel-cells = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + }; + + channel@1 { + reg = <1>; + }; + }; + +... -- 2.39.2