From patchwork Wed Jun 14 14:58:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13280139 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 6B5D2EB64D9 for ; Wed, 14 Jun 2023 14:58:57 +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=cjl9OJavFcnTE5+t8nKZSOouf5WDPfK8nXXTmCqRFuA=; b=YmVbxuEx00HpkR bG8ims5UTZ0vCYt6ID+Dnv3xWLnBTEQPQ3NZIbVxLBbYkyfoxUu/VQV3lHsim8U9i5Ox7VsvZ64ZS qhMh3QzMtu2PdWcNIdf2fT6F0cVUJbDs196TMPZ9e8meViLVbMjc1TtEffHk/cETeeStFioSXIqZR 6ERLgZtVIpA/4hdYNbUsF1NwTHllQRID9lYGNTbOGS8nBZOM5le2mtoltW4Ip5yehIGh1bGdnOSzh gV+NENORmzrbnqP9SYKaoIwfJaiysLyXsdQjHT5wihkuMZpcSwp0kTrsnhyrXVOZBQwXKIE/16lK7 PGJh4UqP4F+KkBvkAIMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9RxF-00ByiT-2w; Wed, 14 Jun 2023 14:58:37 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9RxC-00Byh4-0V for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 14:58:36 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f736e0c9b1so8189425e9.3 for ; Wed, 14 Jun 2023 07:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686754712; x=1689346712; 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=gty57368/fa7vKW7lrPBjqsR/LePRAKGyODtM5uxdwHaI7Gm4mq6DViWi8rtWT6cK9 siC+ErDiBt+2R43VZMb77ffV7v7cJ6/K9IEDCOlKW0yhUQIelbYn1D3FMP26qvmFjZ8l IFZzk0MHhw6df/N9XAxmjf7l5jH8i+jjiFYB7k5CU35bB2/9oIYiKFrrr8hGVAmciJJW UBnlXs9k46PbK3umeOzK4xhHqWAWL5MktLpcS57BuooVfuVzX3KZ2bhuXPeTicMOO6AP BKmWKAEleEpujvKcY4e4vpLVqbdcATcP6NZCaPfnl+HJwOoYFtRjOZihyIAPZ736YONF Y1WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686754712; x=1689346712; 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=ONV/AEhrtOjf2J/K8Wn9dVj+QG6YITvsY2zEqGqE+0xIivXU1uOKKP6Jznha20rhLc E2ewSdhccZThpdIBW0ooO8ARy55xn2ym4Wn6vDc/SIa6rqJSPL31Hha4Gll7nLlUDQAx yP0lB/IaSENKDeGlBoKSSp4Vi5Fbvt4otwXkw6rZlx+KT5HnWm22rFqJyrDSuwFChecF M8piw3S/JlnS60kR3dAYliey+fYDeDuul1h1n/JAWjv0MSN2t/tho1t7mBWKVtp7LOet oELtkOp1+8AD+fCxn6S9p6f09euIxl8bJeZcN8t1Q7A0RrZiMBASgPpj3VYEwihHCWGz tC7A== X-Gm-Message-State: AC+VfDymysv7/YYxFlZulcGtdIjs9VtcZVJT2abnCipEvvUxjOdFAW7+ Z9WYgUTwG1RuO+3EL+r9i/I= X-Google-Smtp-Source: ACHHUZ7sGHwo0QaqenkPlnGntCuKuuIntMmPKJT5OwE2wTn3nCw5SPx9Qh8dOVyu7xm5gT9oLppxzQ== X-Received: by 2002:a1c:4c0b:0:b0:3f7:fcca:5e32 with SMTP id z11-20020a1c4c0b000000b003f7fcca5e32mr11806264wmf.17.1686754711716; Wed, 14 Jun 2023 07:58:31 -0700 (PDT) Received: from user-PC.. ([178.134.198.138]) by smtp.gmail.com with ESMTPSA id y22-20020a7bcd96000000b003f7f2a1484csm17778706wmj.5.2023.06.14.07.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 07:58:31 -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 , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Wed, 14 Jun 2023 17:58:16 +0300 Message-Id: <20230614145826.777870-1-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230614132644.699425-3-bigunclemax@gmail.com> References: <20230614132644.699425-3-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_075834_193012_7936F3AB X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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. 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>; + }; + }; +...