Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2885107rwd; Wed, 14 Jun 2023 08:28:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5eOfOzntP2T9/5E/C9lt3eb7Q+b3c+8vCexyIySPyZFvAC96/uyumO2V7GeJ0OGMuXlY+z X-Received: by 2002:a05:6a21:3943:b0:104:f534:6c8d with SMTP id ac3-20020a056a21394300b00104f5346c8dmr1590360pzc.33.1686756535770; Wed, 14 Jun 2023 08:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686756535; cv=none; d=google.com; s=arc-20160816; b=LIy7yHL5PEaGNKlQ/DMG9eSlQd1F1hewR7tB045pooBkmMLc1Qtw9KEzyI2t6sh7pH qx4ZhqfbJf20qko9cueF8xT0cqCcOoeJui5/2jGI7yxMVqj/rVD+BXFm+vInm5RoVkty izSlO9ghrjRPq28E+b6O2n34yKsrKuPgiCYnQiP+VQSAtNUTyn57HVwzNZ0PTDa3F+cJ KqW0sDLCKm9lLV2d09jCNrXh4H8diBLxomCAp/5v4y8BQ4SmuHkEtLAup/Om2HgUN9JJ IAst36EvOYWAJgbJaV+yHoJBFnvY0e7Z9DPL71bqVU5/EBrklWg3scgdIamqPEppD3c7 zI8Q== 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=kltQTFSDbgodlVFNADPCCHBS4croT/vbrkR88x5pRsKJxv3xy6V+BC+iyo/wWEM31a yFNxjUmloHq/3DskAG6axAHKmXfbyfOyyfuXb+gBzL0NbsPH8KYEJa4WW3ItsIC2EdAB 7i+IUa/az1GkWPW0KJS6n4LUAQ/5Q+KkH98n9pGRfb8s4xc30RdfHZLpw4C3FuemLrK3 BxRVM+O1jr5RMxJMZ6vQs5wvwJY2MxxKwjmnCtzNWnvmeoWCizHvyhTinuUnVvtcy5xL ez+sTyNQEr3i0PKkdhwBID6zZGWeNTQqU3VyhmRu0/ar+LrNpBcqyfe+QaUSPKr6njNf 1rGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gty57368; 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 f7-20020aa79687000000b006590bb60328si88835pfk.173.2023.06.14.08.28.43; Wed, 14 Jun 2023 08:28: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=gty57368; 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 S245612AbjFNO6g (ORCPT + 99 others); Wed, 14 Jun 2023 10:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245256AbjFNO6f (ORCPT ); Wed, 14 Jun 2023 10:58:35 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC6C91BF3; Wed, 14 Jun 2023 07:58:33 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f736e0c9b1so8189605e9.3; 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=fp4J4S1Mv78DtCY1MmR3iOPjJ6AMThNZ2MlqO9tdrXJLXMXyxy2+fJvosIH3Rp44jw 7cuC1D4vcsSWGe9Ozyy3VS4qLmirAsLHd8d0YToDa2TsVF8ZpPH3kfdaTmUauSCPeM4U t0WXPlXIHUN2j3bmIz0uvJrK5UVEwOHQi9WWHhyFjZn5Upk3kUnSMP6enpkzNqfmEAN0 5BOi0HVA8jbAEh9T40QfSoVSN/3PESZiXSLREcNfr6A3QSUawOs4EVIkqYhO5cnf35r6 i6fjArTG6WzyVzcY3/iFsHq6rhihnqgGbBfsVW3Z99sannno1988GV8xDVLXtouXXV09 hRKw== X-Gm-Message-State: AC+VfDzV5VApy72bGjK6D9GseAbmG7iNvpFUt/cVRObUUIWe7Y/ZqNTO JsFjVlsTx5wNG+OBRH166FutNnbBpJSYm00D 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 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, URIBL_BLOCKED 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