Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1685447rwd; Thu, 15 Jun 2023 14:13:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dFyB9a7ANmSwEd/8SG3kTxBeYaPOfZWt1fekYNH9fl7kma2dtCVHhAeg4XMkzqKFicPnW X-Received: by 2002:aa7:d5c6:0:b0:515:46f2:d3bf with SMTP id d6-20020aa7d5c6000000b0051546f2d3bfmr15080eds.40.1686863635647; Thu, 15 Jun 2023 14:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686863635; cv=none; d=google.com; s=arc-20160816; b=U3UxiuQ/+WkTURmrIVr9+R1gmbvQSMjMpsUnNOqJ3bj/DVaz2bta22FLMUcl0ed//A A1queLDI2qjrwhWH2NmzmXESocoESCclJ4HKkz69sGHdKIwewAx+sRsSaGJhQmOulG3C AEltKln2YBr4E2AWIxIZhmLeNUj/2cLnZbYm3RiddNGKXsGgt5NMPuRIH0SeTHz2iE4C g9lTbiu1jBOrZ8NaJKWYlULU0S4BOUFFneH4nKXnIooryFLTXxubISsdGfp/hm0YFBOU tM3R52FBFXwdFoTlLlCnqSEcjRsHoeyFQ2COv1F0hkp7hiPuKP9V+X695FaaKSbAJXtc ofEQ== 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=z5rIbWUvXPqdJJgOnGLL8m8IBmG8tIePJ5zzh46kuSM=; b=OaQThy6zO/eGMGydEJ/kyq8yeuTI3rZUhW5dGxSENki/z7AzNum3PDvur9p1l4yfbH SYoObp8e/rXaYbntsu2TiYugZt2CeHspu84pncEYZAPcXVV4AR+/Krx3GA3NRhz2lPQ5 MajkhDmQKTDNzWQYGGvj1+sdKijP45zTzZ0xL8lPjH4S2119ONUfFrDZv3/HTSlquMHb rqe/tP7t1G7p+2ELtcuiRo+/k/w9LoG0+YM4/7Mt2MM5IGiO8FfskcImS0emULy37w8y qIOBnzv8+LLIPtWjoYGfpnak4S+nYnuGmQWKg26GnFSCYWfvDbi7T9Junzi/PtK2Ch1l ATmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="nX/f79n3"; 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 d17-20020a05640208d100b005163b432853si10784713edz.487.2023.06.15.14.13.31; Thu, 15 Jun 2023 14:13:55 -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="nX/f79n3"; 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 S230440AbjFOU5T (ORCPT + 99 others); Thu, 15 Jun 2023 16:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjFOU5S (ORCPT ); Thu, 15 Jun 2023 16:57:18 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43CB526AA; Thu, 15 Jun 2023 13:57:15 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f739ec88b2so21153565e9.1; Thu, 15 Jun 2023 13:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686862633; x=1689454633; 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=z5rIbWUvXPqdJJgOnGLL8m8IBmG8tIePJ5zzh46kuSM=; b=nX/f79n3CU6wg9P7tabFSVT2oNPbzNQCmL2F7glG7yGWlgNzZR1PvS6lOEvcWflUkl Vl16WFUR/ZMny7l8zXcJz4mzUhDH7HlcO5jAhtpN3eIXUa4JPCJnAdLKhz733x+Qx3iV t2KUCdmSl/rJ7Etb/lDFDMkDo+3/+joioZFWGWUpnCGSh+fQSwu+dX5KItGWraPe0elR WqcFuAQPdCi1ejcFAygi3kM1Qos6VeVfXga/Za4jpbMUEe1nSI0Lma1fW/J2jFTYzRes 02KSmpvE4AFQt+79g9D11Z4s6eSo7WLl/bb/4TxAvw3c1Nxtnd3kh7mIPUH/TkesFCI2 sJWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686862633; x=1689454633; 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=z5rIbWUvXPqdJJgOnGLL8m8IBmG8tIePJ5zzh46kuSM=; b=HrKVTxj4oLIzeC20nuviU/5A50AyJEgRZieP4gBaZd76eOMS9TAwd5AO2Nu5XySEIU A0ix35UepssYmVDa1fGrji1L9Vz7i6V4X7L33qZ7APmhigwkI0ShmbI2Hyahd6FO4/Ls uVW9scOXfBgU9fA60Uy1ZDq8NjYAuYbojKAYEq+yD5U5iiBDImF71tiQN5tUaaS3XdCY P7V8BiVEH83eOwhP9s6/oWq1pXf8zgHbBupTNxuvb9EMLC6Llq5/zZqdz1GBueKO1Xav ykdhVG5n2xT7VPobGTiJofQw6g1ZMdqMFcDbI9YJ+QDOdusEnj0CXlTuJ/sZLEaqXD8k DHYA== X-Gm-Message-State: AC+VfDx6xfDzlbD4N+3x+xH2ZAcrLweTQnEyqsH5phndPTkdwQxdoklr 8h1jEO4B4mGU7JJN0/+KLFZZCXSO3i3iTgrh X-Received: by 2002:a7b:ca4a:0:b0:3f8:afe:5c39 with SMTP id m10-20020a7bca4a000000b003f80afe5c39mr298289wml.2.1686862633077; Thu, 15 Jun 2023 13:57:13 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id k24-20020a7bc318000000b003f733c1129fsm176372wmj.33.2023.06.15.13.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 13:57:12 -0700 (PDT) From: Maksim Kiselev To: linux-iio@vger.kernel.org Cc: Maksim Kiselev , Conor Dooley , 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 , Andy Shevchenko , Cosmin Tanislav , Marcus Folkesson , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , William Breathitt Gray , Haibo Chen , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , Arnd Bergmann , ChiaEn Wu , 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 v7 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Thu, 15 Jun 2023 23:55:21 +0300 Message-Id: <20230615205540.1803975-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615205540.1803975-1-bigunclemax@gmail.com> References: <20230615205540.1803975-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 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. Reviewed-by: Conor Dooley Signed-off-by: Maksim 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..23c584f5a6e6 --- /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-9a-f]+$": + $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