Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2790084rwd; Wed, 14 Jun 2023 07:23:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ61+WgptGJG5xKYJ47pQ6bvRUvy3wFavxF7IA+BbeNPo32pkAKYXqSpUap5Gpp6EzeLepZy X-Received: by 2002:a05:6a20:8f06:b0:10d:12a8:c95b with SMTP id b6-20020a056a208f0600b0010d12a8c95bmr1993621pzk.0.1686752593798; Wed, 14 Jun 2023 07:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686752593; cv=none; d=google.com; s=arc-20160816; b=GlCVRV4kqgLIfz8L+jWinPUGqZ1o2sFFV7x9HzaQFBWOdN1kvsmt8D7AVyAwmN9FWY vZfQazYFpVanx00T4FytJDozxmqYXW+jcaZT9jh820cIHovBYVNZhLcVeaI//dvLyFHY f85hi90Pj+cj4yY/L7dTUhu/WElDV2McKnS/qcFQngHTlLpo2f+2VARf/UZxSwi/FsmE P5+w9FxGACrJWOKoyCkq7z/RWz67Diwkt4fITpnV5KB6Kx/5Ddt7dE8of1Dfw6RGcxkj jofUxEVAbVL8FJnjhH/7QfxKJsfcfUsWeSfN8vLMsMX0e2npTpBnTqfu8MM0kYv3NK2f tb6g== 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=b77Gx0dzvWdL2Ewt5vOqBtzy67fgg8OX+nEzj3LcNxc=; b=QHsv5vZP+Oj/vjGLQGHVtWNtYSFS23QRf8vRWLvL0bgXm2pcMZjXVDf8zh4amKsPy5 yKWqaJ7T2jDyE9ILcGGUneTQlL0AaT38LN4IHKal2xzaLxIdXJ6+eyE176JFc6mpGCeg XGGW3G4T7XbgbXUEqUJ9XfAxVYvBuWBzi0/YFub92GbDtAIiA5jr/q1ep/Keg0b6XGuP sPfa6DhSP3c6fWPjcgYJ5SDliAEQu/6i7pgVo/WPcgfheJU4ssVle94CEi+5TOZXPPzl GQ8aH3gsAe+UODchfcnCInqgMtH1pOg76cn/n3juvHSwUKwJuEDATEHar34LZ4UNFVAQ oMQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=eGI3aVXP; 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 x27-20020aa78f1b000000b0065b4e2b52c6si11058560pfr.341.2023.06.14.07.22.33; Wed, 14 Jun 2023 07:23:13 -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=eGI3aVXP; 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 S244982AbjFNN20 (ORCPT + 99 others); Wed, 14 Jun 2023 09:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244981AbjFNN2Y (ORCPT ); Wed, 14 Jun 2023 09:28:24 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 485CB1BE8; Wed, 14 Jun 2023 06:28:23 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f8d5262dc8so5382275e9.0; Wed, 14 Jun 2023 06:28:23 -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=hD6vDTZ4a4q3SFiKwQ/1hHrVAHTIjn3wBvGehr1K2Eud1O1SymCcaeHQUFVWPBVcf4 AT06XmUbm9U7Fc2DW0xk+ZMWWNdo1ZTIoPYs2Rf8XxyeR/qe9mU91Ezol9hKDRDoul3R 9yKgtooqgw2h8Z/7pShkSLa6eZaZm+P2Z8/vO0or/m3a5NvKLH/RQ0/yeUbe9n+hGnff hhbx64UFkfXEo2YBWeONnW/Ui0vYzR1wj/HG8pV5UTMIc583B2OwgtoEP7uf4tFBqLGc j/jzZtVZcGN9sTV7yINzdhuwzyczp2Io9SBiMdRNM+0+NQ84diw8uKASZ9+IiSHSjaqK D5zg== X-Gm-Message-State: AC+VfDz3i+lyZ0edxPb2pIp1BspS2OsQZyMP7OPm+2WWW43ZEmOC87K5 pCsZqNb0wmOXg1yplmctETRUznl9d8LzQUD1 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?Leonard=20G=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 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. 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>; + }; + }; +... -- 2.39.2