From patchwork Wed May 24 08:27:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 685471 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7218C77B73 for ; Wed, 24 May 2023 08:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240101AbjEXI2h (ORCPT ); Wed, 24 May 2023 04:28:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240067AbjEXI2f (ORCPT ); Wed, 24 May 2023 04:28:35 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63526E4D; Wed, 24 May 2023 01:28:24 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f3bb395e69so538610e87.2; Wed, 24 May 2023 01:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684916902; x=1687508902; 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=hrS6J4pV0coQ+gQom7MH+SioGRxETEVrxo2OAGKB9UE=; b=Wp45ILdc8S9OXc+cImPVKO27PSEBOIBByFPbuQB7O2vpLLXzhnD9uRNuBXLRTxwGpU cNT4FJ+s53khsy2HEeuSuEDFVYXN5wsdg4bWxBQjrkJhK8olA725Ka1ugjODmTtI99D5 YlGn/dBPtbTwzaXM6gGBRr8W3k5vg6R1fTz3K36/IMf37xY/x2yyZXt7aCHIqyGEa1X7 fN24oiLlCoD3MuID/phya/rxexQ+buuEhUUXW8F5NBrm4m5V3yYB0sx8blcbnBMuaHMU QvKNEhoQs3clyU0/DxjEPVxWSZfGuAPiE35aZDWLb4jIBRALN9+cND3rdi/ljl1xKxQD TPdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684916902; x=1687508902; 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=hrS6J4pV0coQ+gQom7MH+SioGRxETEVrxo2OAGKB9UE=; b=X9N2NveF1qtgAEmbt5AChGAsTyKR9v5Mep1RAp7WwaFILJ4hLatfd6JGT9ME5mYLIv t02rcKeC4rnrd7n3jVBE/rCDtixQeI1HqpjQUkQkWcwFhxEXpHDbJMPFs2y8k2GKbZBO ikT9VxbJMRWzaj6X1aErU1k0AYFz7ko37SRV6c5pN5+MnXoc+8eP4Y3/o6Ue4lP1BOBS CWGfNyabsn7LBwQUeIm/SLuh+gOhN599B19Mx4k26vAZ2KnRn41HzJ4WB311GN8j+Ww/ W2LmRMAdDlaK/7RpoC8cT0GR3BY7jrNO/joxcTCt8YGpxiICLuq0by5H7pKmqCZ9DeSH m6XQ== X-Gm-Message-State: AC+VfDwE5PbB3OZzioCJCozO1Vfm9bhvH9F7feeqhi1kCNDHZnaPMKND jqA5pzg3743MiEC08xNanPOY9RYpTxMVcwgn X-Google-Smtp-Source: ACHHUZ7axExQO5CjwKA+zfRpIGZMvtRy9svKqMaQMYLrRELvYOecD6DCbAVtj4XXyKwrnSyPU4uzBg== X-Received: by 2002:ac2:5298:0:b0:4f3:b1dc:b46b with SMTP id q24-20020ac25298000000b004f3b1dcb46bmr4567055lfm.1.1684916902079; Wed, 24 May 2023 01:28:22 -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.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 01:28:21 -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 , Andre Przywara , Heiko Stuebner , Andy Shevchenko , Cosmin Tanislav , Miquel Raynal , Alexander Sverdlin , Ramona Bolboaca , William Breathitt Gray , ChiYuan Huang , Ibrahim Tilki , Caleb Connolly , Arnd Bergmann , Mike Looijmans , ChiaEn Wu , Haibo Chen , Hugo Villeneuve , 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 2/4] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329 SoCs GPADC Date: Wed, 24 May 2023 11:27:31 +0300 Message-Id: <20230524082744.3215427-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524082744.3215427-1-bigunclemax@gmail.com> References: <20230524082744.3215427-1-bigunclemax@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allwinner's D1, T113s and R329 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 | 52 +++++++++++++++++++ 1 file changed, 52 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..a79b874750dd --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml @@ -0,0 +1,52 @@ +# 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: + "#io-channel-cells": + const: 0 + + clocks: + maxItems: 1 + + compatible: + enum: + - allwinner,sun20i-d1-gpadc + - allwinner,sun8i-t113-gpadc + - allwinner,sun50i-r329-gpadc + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - "#io-channel-cells" + - clocks + - compatible + - interrupts + - reg + - resets + +additionalProperties: false + +examples: + - | + 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 = <0>; + }; + +... From patchwork Wed May 24 08:27:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 685470 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A7FEC77B7C for ; Wed, 24 May 2023 08:29:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239955AbjEXI3G (ORCPT ); Wed, 24 May 2023 04:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239027AbjEXI3E (ORCPT ); Wed, 24 May 2023 04:29:04 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7ECF132; Wed, 24 May 2023 01:28:50 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f3b9755961so582113e87.0; Wed, 24 May 2023 01:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684916928; x=1687508928; 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=odFoqtaACFFyMrXmxlrRHYMZnaIGXqlcjA/Yeo/eMSM=; b=Mvd/veDyjuxX8uDcTR8PI4Xqf4ovhcjx5jyKNU3IYsLv4K4TWPiwQuH7PXLRUsd1lc FyfsPiUqwOq7sGQfZ10bL3H78meCp0oJsj12w7ytR5d0mG3wDlkzIA9amxl0LHWmdIa0 nXTGfbb9SYE29Q/mKKsF9fX2N4Xee3qGLqoiTf3mpGpaRyyJf2VzepfVXB0Fj6tjE84u Wre8p0Iu75GJoNJ32N0Rhj8avsw8FRrCTbcV0NFk4oNtz1jQj3MslC3Ps8lUxtC0cQd/ 6c9GVZxKAzA3NmOekitk+/TRT6AuwtmWI3YkDMpKlpGigNvSnPkbhU9lCm7b0LEp42gX ThBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684916928; x=1687508928; 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=odFoqtaACFFyMrXmxlrRHYMZnaIGXqlcjA/Yeo/eMSM=; b=EC5jYU7NWyXxMSRi3jOSknkrmtqpEzRJGFF8nYPx6OOXKZ609kEhSeCWzGDgmJHAlJ LYD4XkPZL5BJGc3H705KVioQwymuP312VAEM08ogOZ2gKifxWzHqiPsPFU6Vli6iSecd fe2/Ux+6BTBjk6U8vUR5hQSt4xehG2mYwdxNzrxSPS7OkbhmF4iWGiN69VH6tzPglg8r 5r2ZOGC5L+qlwKL/8SRdStp0qTaOAVmAIxRdHhvoy1lxOX8n1qVXGp15TmbAPxy+lOfy KJa41/OGFDiN4Dj+Gwgu0DiHYUgMru1hihjFPavW7AH78AIehA1tPkF9X5hc+PyaFNQ+ 8rRQ== X-Gm-Message-State: AC+VfDzas8pptdGBS0JOkFHIXkudCHxX4hU47giKwPu6Ghhb7+aTiqB2 0bHcueyd7jMqkLKbdFap5vfVlJEAOkSvpMUw X-Google-Smtp-Source: ACHHUZ7nTj6ZzaR2KWD9boDc/9z2PyjWBCXVB7avQ4mYjB8ldUrHEw92byKyfbq/IsC5bWV5bsz3dQ== X-Received: by 2002:ac2:596a:0:b0:4f1:3ae6:20bf with SMTP id h10-20020ac2596a000000b004f13ae620bfmr5776396lfp.1.1684916928480; Wed, 24 May 2023 01:28:48 -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.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 01:28:48 -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 , Andre Przywara , Andy Shevchenko , Cosmin Tanislav , Marcus Folkesson , Alexander Sverdlin , Arnd Bergmann , Hugo Villeneuve , Mike Looijmans , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , ChiaEn Wu , William Breathitt Gray , Caleb Connolly , Haibo Chen , =?utf-8?q?Leonard_G=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: [RFC PATCH v1 4/4] riscv: dts: allwinner: d1: Add GPADC node Date: Wed, 24 May 2023 11:27:33 +0300 Message-Id: <20230524082744.3215427-5-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524082744.3215427-1-bigunclemax@gmail.com> References: <20230524082744.3215427-1-bigunclemax@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds declaration of the general purpose ADC with two channel for D1 SoC. Signed-off-by: Maxim Kiselev --- arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi b/arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi index 97e7cbb32597..b21825429cca 100644 --- a/arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi @@ -6,6 +6,16 @@ / { soc { + gpadc: adc@2009000 { + compatible = "allwinner,sun20i-d1-gpadc"; + reg = <0x2009000 0x1000>; + clocks = <&ccu CLK_BUS_GPADC>; + resets = <&ccu RST_BUS_GPADC>; + interrupts = ; + status = "disabled"; + #io-channel-cells = <0>; + }; + lradc: keys@2009800 { compatible = "allwinner,sun20i-d1-lradc", "allwinner,sun50i-r329-lradc";