From patchwork Wed May 24 08:27:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13253463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E8C1C77B7A for ; Wed, 24 May 2023 08:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vedlEcWHGwg0HXoKTFDj2vmrocTqjYCWHG233UWlxgM=; b=ZzpSmX3upri9vA 9lSK+2VGwWa3Y2aXv+wEzi4jN1S798+99tpN+Pd6cuA8/jyPFBxC0SPOV1C9HbKsruAn6ral5wQta 71Lb+TZd7li+n4jMjdk3qkqUV2dSRiQ25etpjZ5JJ0rsQMicStN9rfZxy53tl83clErIg/JxwXEAD bkl7aySGP9fM8FH9UBJwJMR/rHZ0DsSNvwLQ3yjpaHN0G+0hxtYpXww6ILVjYHmH9GCexiPcA73P7 SZV3g3vldYfZxRNdZp3N7BuPvS4U91yz9FjhEixR7w2vYSR+dck4LkXy2zPC0PDEOHoR0vG6Va52p Aa8ngu3PqPjVsaTrAWdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1jql-00Clc6-18; Wed, 24 May 2023 08:28:03 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1jqh-00ClaA-2G; Wed, 24 May 2023 08:28:00 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f13d8f74abso550207e87.0; Wed, 24 May 2023 01:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684916876; x=1687508876; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yqn5qRBwLcinfNxv6VW9L+IL+2b4SfMx1zWHSgO399s=; b=k37Hh7n14UGVGV4NE3zQCYH3l1evQJSVPVb/+G9Fq3cASkwC273FAbYkuSHoClOScS yA70k8n8prh1aJmXgtbPAM6tF5BCuA2Y08lsRsHprvLhRH/1coP0RHOdcNoJFQ6XHFCB hrgsGRMXtTVQ2JLzKF1XZr7d4E9DL80Lz+afMRbfEv0wvO7NxfPAMu5iSn/3irBjhGbj eydEcIzBH1K33G9q2oya4vzq2Q597lx/luBgn80hMPlge5F5MvFydT7TjoCorzMzqiaf hWIAysdO/FZy4YQCtGIknBlv8ZvAS8nU+UsUdHXMK81dBH6vhDq3xM0Zr14l367gLMu6 Z0DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684916876; x=1687508876; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yqn5qRBwLcinfNxv6VW9L+IL+2b4SfMx1zWHSgO399s=; b=Gvy4ifkaB3PMFoRNhGjZTs2jDjTPGbudMXadReiuiRiTWRd4INrL0xQEqVQzlxt1gy fePxhsOSExHvDS0ITRMiBINXD7A9P7Yr9arlzvR4TP2U9Zh9jRT9WhEQxMcTzVYJsoAB y1cBFpCTD7M0ggd7ts9Et4NIGHpzPZItX+UJyxvys2uA4LDhPNpk+4EINdv70vmQUDJr etyLYnKacBvWyBXX+SPCnqrrSOkO4fsnPtKiMiFdx8QGIuAnU4s054UHvpdLaHvabRFS Tw4ibsxXPG3Q+T5QPaSx3tGItt2Dy1M6MiaBZ3oJK8CUYJYtJzJ8IKtr1pdYc2BTKNqu b9Lg== X-Gm-Message-State: AC+VfDydWGCcsWH8M/R8c72lBbcPOzgC/rqYazs+QMZubbNTJBmbgFTc 7X+2UoRJJA2qkqUJIuNQLUk= X-Google-Smtp-Source: ACHHUZ51AH1JWC4YEIhLkDzsm1fECjK/PgS5MlDO56x6XPdzEJ3P3CzbjtqR9uT3ruJll6fRYG0ydg== X-Received: by 2002:ac2:434a:0:b0:4f3:a483:557 with SMTP id o10-20020ac2434a000000b004f3a4830557mr4741266lfl.5.1684916875768; Wed, 24 May 2023 01:27:55 -0700 (PDT) Received: from pc.. (mail.pulsar-telecom.ru. [94.181.180.60]) by smtp.googlemail.com with ESMTPSA id c18-20020a197612000000b004f378fbb358sm1614049lff.112.2023.05.24.01.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 01:27:55 -0700 (PDT) From: Maxim Kiselev To: linux-iio@vger.kernel.org Cc: Maxim Kiselev , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Heiko Stuebner , Andy Shevchenko , Cosmin Tanislav , Mike Looijmans , Haibo Chen , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , William Breathitt Gray , Arnd Bergmann , =?utf-8?q?Leonard_G=C3=B6hrs?= , AngeloGioacchino Del Regno , Hugo Villeneuve , 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: [RFC PATCH v1 0/4] Add support for Allwinner GPADC on D1/T113s/R329 SoCs Date: Wed, 24 May 2023 11:27:29 +0300 Message-Id: <20230524082744.3215427-1-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_012759_743768_3102B734 X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi, This series adds support for general purpose ADC (GPADC) on new Allwinner's SoCs, such as D1, T113s and R329. The implemented driver provides basic functionality for getting ADC channels data. All of the listed SoCs have the same IP. The only difference is the number of available channels: T113 - 1 channel D1 - 2 channels R329 - 4 channels This series is just an RFC and I would be glad to see any comments about it. Maxim Kiselev (4): iio: adc: Add Allwinner D1/T113s/R329 SoCs GPADC dt-bindings: iio: adc: Add Allwinner D1/T113s/R329 SoCs GPADC ARM: dts: sun8i: t113s: Add GPADC node riscv: dts: allwinner: d1: Add GPADC node .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 52 ++++ arch/arm/boot/dts/sun8i-t113s.dtsi | 12 + arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 10 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/sun20i-gpadc-iio.c | 275 ++++++++++++++++++ 6 files changed, 360 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml create mode 100644 drivers/iio/adc/sun20i-gpadc-iio.c