Message ID | 20230524082744.3215427-3-bigunclemax@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2692428vqo; Wed, 24 May 2023 01:48:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5384FPHOABmT0Ww7rePGwSBXNVTxuEHil4XgkGz+2RUDZ05Bfk4alKnnD7Zn20Sltl2nL0 X-Received: by 2002:a05:6a00:a17:b0:638:7e00:3737 with SMTP id p23-20020a056a000a1700b006387e003737mr2439362pfh.23.1684918121616; Wed, 24 May 2023 01:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684918121; cv=none; d=google.com; s=arc-20160816; b=VEQFZ6/8Q+578NGv6x2VweZysR0swbekJdB4apcZa9XRhbTEYVv47UbemyzPxqK0oE k2Fe+TjMDNzVvacdSXjPFTJoBdbFdFnU5gF7jt+/DC2Ti3itkOkPzLVNUM2hmJJUrNfV rC+tG97YyPjfPVoUSaank9AP4VzEqAjqnjx/Tfh/R2HZM2D0YLp5sjEOtpo173+2Zlk5 pGOxfqrMlAfvSja+lJMPQIec1xaXwu+diF83iIPFGR092RD8Jio8wiVS0gzUufVosA1h 2Ee4rQsTSSO+ffDqWQxXMx5s/WvKEdx37lzNxX++XJe/n9FYujyGYAZr/CANeOvXkZ71 xj2A== 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=hrS6J4pV0coQ+gQom7MH+SioGRxETEVrxo2OAGKB9UE=; b=rObufQ+Bgyy+gaUvLGmItkL7bAeGLXIfyr0R1JwN8kOMAGcG+/c9iot4KxtAeeHyPJ hfo6vXIi6v9YlRfRMyA8kw1I6fhnBY/E7Gz3LMrN+ptlgrFNem+88dZEdYXPZh4noACR UwDuZXqn4TDAxNdskkMh3N6fRkPtDwo1pdxEOrkwJhW92XkPtHi7nje87fBpLFA8j1er Uxu4pj2mQYfPVU9iF4bE0qW+rn09atR+1WjgY93kkf0XZGh+TXjdSEW7SmeF16VGrDcE 2VElKGAdwbxERqViO81pTdcFqBW6va06HxMz4u5iqbxP5ZGYDoBWV6OSIbIpG4uRrXZs pl4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Wp45ILdc; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k24-20020a63f018000000b005309f24f940si686926pgh.586.2023.05.24.01.48.26; Wed, 24 May 2023 01:48:41 -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=Wp45ILdc; 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 S233637AbjEXI2i (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 04:28:38 -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 <rfc822;linux-kernel@vger.kernel.org>); 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-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 <bigunclemax@gmail.com> To: linux-iio@vger.kernel.org Cc: Maxim Kiselev <bigunclemax@gmail.com>, Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Conor Dooley <conor@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Philipp Zabel <p.zabel@pengutronix.de>, Andre Przywara <andre.przywara@arm.com>, Heiko Stuebner <heiko.stuebner@vrull.eu>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Cosmin Tanislav <demonsingur@gmail.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Alexander Sverdlin <alexander.sverdlin@gmail.com>, Ramona Bolboaca <ramona.bolboaca@analog.com>, William Breathitt Gray <william.gray@linaro.org>, ChiYuan Huang <cy_huang@richtek.com>, Ibrahim Tilki <Ibrahim.Tilki@analog.com>, Caleb Connolly <caleb.connolly@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Mike Looijmans <mike.looijmans@topic.nl>, ChiaEn Wu <chiaen_wu@richtek.com>, Haibo Chen <haibo.chen@nxp.com>, Hugo Villeneuve <hvilleneuve@dimonoff.com>, 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 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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766764704508322451?= X-GMAIL-MSGID: =?utf-8?q?1766764704508322451?= |
Series |
Add support for Allwinner GPADC on D1/T113s/R329 SoCs
|
|
Commit Message
Maxim Kiselev
May 24, 2023, 8:27 a.m. UTC
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 <bigunclemax@gmail.com>
---
.../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
Comments
On Wed, 24 May 2023 11:27:31 +0300, Maxim Kiselev wrote: > 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 <bigunclemax@gmail.com> > --- > .../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 > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml: 'maintainers' is a required property hint: Metaschema for devicetree binding documentation from schema $id: http://devicetree.org/meta-schemas/base.yaml# Error: Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.example.dts:27.28-29 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1512: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230524082744.3215427-3-bigunclemax@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Wed, 24 May 2023 11:27:31 +0300 Maxim Kiselev <bigunclemax@gmail.com> wrote: > 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 <bigunclemax@gmail.com> > --- > .../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 That's odd for a device with more than one channel. How do you reference which channel you want to consume? > + > + 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 = <SOC_PERIPHERAL_IRQ(57) IRQ_TYPE_LEVEL_HIGH>; I guess the bot probably got this, but to use these macros you need some includes. > + #io-channel-cells = <0>; > + }; > + > +...
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 = <SOC_PERIPHERAL_IRQ(57) IRQ_TYPE_LEVEL_HIGH>; + #io-channel-cells = <0>; + }; + +...