From patchwork Wed Jun 14 13:26:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13280063 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 1AE31EB64D9 for ; Wed, 14 Jun 2023 13:28:31 +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:References:In-Reply-To: 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: List-Owner; bh=vv7rOuWkiRr5AsvCCYpG5q72L0OyN7HG3hs1Ut4ZTsk=; b=sSRqcUU44fbcHU QAh7eEd2oS9iKrOq6SfgEUhXBQsF33QuwXbDeINiX0WJBupMZ4Yq7tIyT1vutjV8W+xXffIZpTkKf ZtQZptCDge6Y5SLIbXisYZPUbP57TJGWC53FAjl/VLrp/ASEdnPE/L7xIgNKxH+qBrg3WCv+zcjO/ qKDjDXPxHUrgI4Lk9S8oVbpC1wgrOn+OKui5t/cftNHXIY/4D+qw7OV3D8SOga9+Z18xO6oCxZIeh PpQ7iNkKmb4UwmahaIH5iUxpR9+0r+KNRJpn9XFm1IxG9QXMkA1BtC1B9qqxC9e6Ztehweaeb3oLi 5IvMxf1XNK0/uKFpr63Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9QXz-00BkTJ-0w; Wed, 14 Jun 2023 13:28:27 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9QXv-00BkQT-1j; Wed, 14 Jun 2023 13:28:25 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f7fcdc7f7fso5125505e9.0; Wed, 14 Jun 2023 06:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686749301; x=1689341301; 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=b77Gx0dzvWdL2Ewt5vOqBtzy67fgg8OX+nEzj3LcNxc=; b=eGI3aVXPIExyJXocmigotKZcTTF+2K07Awv16Ea4pLVi1nZXq3IWbUSc62UAcRGWDf wfo3D/BRmZwfbThLYbHFSQ8fj3Rko+ILaamZ0O76grO8EiOqCv/Ri0gH6k496St542WU 4DWeldP131+b7A7JWV6BEPATdcdBDMlHM1kNDo+/kxMUSFS8nIWI7REwDHf0xxTkp5Kr 2RmPCacCTF7E4OQ3FD5LcdSnGXFUvi/IKHPbdJzmtM4VV2B+i6bqfKgDqBPVMu5vozfX T0RFmq5PoZuxJTPrbZWYm+YpNbHLjeSxBLA8mUbTUjQuB8Ye8ObY2v0IFYLOgUnO4S5H GDTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686749301; x=1689341301; 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=b77Gx0dzvWdL2Ewt5vOqBtzy67fgg8OX+nEzj3LcNxc=; b=hw/YNyOb5gZrtCxmfuPjGCC5yqAlwa7EfEWRrlF6sEB0SZqzRqOIJT22EB5E+kQfNW nI1rkkLTiCCsU/1DD/3spUbqQpss7o5ovSW4CN8iPTjPgaMaWg33JtEek3Vh36VFyX5A cwzAOI6v3c5SJbULn/7ieFlGDdMMy6joeWE3CSCZ5Vf6e5XXyuxJWDqpmC0ysQpHxRPp c8sqKq/3ilv7eCmiCC2xWJ8P62vScFsfQ+B5TpanJnAROKzt/3spPFl1dtEMyHF1MEyi /rAdeu0W2QqP/T4uU2t9qayYiXrIO90cHwM71ZjnhsevWAwr8MSe6OjLaLlCEpevjywi IY/A== X-Gm-Message-State: AC+VfDz4+lORENT8T1IO/6aWfajV4zPgA7tlwwCicphPt3610H4D9Xje bXuLcGI7ikwf73pUPXyC55Q= X-Google-Smtp-Source: ACHHUZ4PW5hwIltSw2AlRcUvhdSuuPFBq2RV2rxrZZ8MBHLc3PORtG+ybj3h2gADj3GHmqAWVGc4SA== X-Received: by 2002:a05:600c:2281:b0:3f7:a20a:561d with SMTP id 1-20020a05600c228100b003f7a20a561dmr1619452wmf.8.1686749301236; Wed, 14 Jun 2023 06:28:21 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id l6-20020a5d4bc6000000b003047ae72b14sm18295017wrt.82.2023.06.14.06.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 06:28:20 -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 , Andre Przywara , Andy Shevchenko , Cosmin Tanislav , Miquel Raynal , Mike Looijmans , Ramona Bolboaca , Caleb Connolly , ChiYuan Huang , Ibrahim Tilki , ChiaEn Wu , William Breathitt Gray , Arnd Bergmann , Haibo Chen , =?utf-8?q?L?= =?utf-8?q?eonard_G=C3=B6hrs?= , 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: [PATCH v6 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Wed, 14 Jun 2023 16:26:26 +0300 Message-Id: <20230614132644.699425-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230614132644.699425-1-bigunclemax@gmail.com> References: <20230614132644.699425-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_062823_575756_6A470AEC X-CRM114-Status: GOOD ( 13.13 ) 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 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: Maksim Kiselev Reviewed-by: Conor Dooley --- .../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 + Maksimum: 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>; + }; + }; +...