From patchwork Sat Jun 10 12:29:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kiselev X-Patchwork-Id: 1793333 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=Iu/CnFtm; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4QdckC1NSRz20Vx for ; Sat, 10 Jun 2023 22:30:59 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234484AbjFJMa4 (ORCPT ); Sat, 10 Jun 2023 08:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232624AbjFJMaz (ORCPT ); Sat, 10 Jun 2023 08:30:55 -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 3A1463AA6; Sat, 10 Jun 2023 05:30:40 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f730c1253fso19360975e9.1; Sat, 10 Jun 2023 05:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686400238; x=1688992238; 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=NfDcBM2c7RBL46+FO7R/jISsiGli0gYYtl09AucgxLg=; b=Iu/CnFtmkrUl2AoMMS/urWo3Vc7o8e/PnfxKRP5hoOgqSv4XCYlreacBQ06snvYvKe A7ImityXOAXZTQaIXtmQ++ip7TkvzrRPqUa0FphLMH/Frl0gwVhGnmeyzaHp1QezeDl1 cT9e0Dv72/x33FTtV/fScWLwVnvF9bsjrF0oxvG5qGHQ3IK0t3gL4WaouvjgvR+nXZg0 rdBWAWGEWmHdtePaoqs65MzRS1G/kxGC1dhtDFP4lEwTblVQw32hx0UguRJv6Godnpq8 MZWRnozvKrCWk+V8AeA2tQa8WTGae4h2CBudYlLbYRblLOmsIFEQO4X8PxO3GOEmkEbN /SeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686400238; x=1688992238; 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=NfDcBM2c7RBL46+FO7R/jISsiGli0gYYtl09AucgxLg=; b=Q9yxXSR5hJkfiLjhglFGuk3JNun54hwCxUyXITSb/igVkmvAiGq7EiCxqV/yUeBCTG oVtxQGulw9NtKB7XU0PecsD5mZGXyvZXK2utSqekDLwqZqnVKXrs86SY6AXGcixkvZ4G rUk+y1dIsKnK3FYhvGbO/GqdEw6Wz+HBmBSCoFnIA2aSuXv6k9HmioR0NuGmkHYX1LNa BlXTLCqHP6umm0mj8m3ysWCIsRBEtQC0dmlT3QdscK2n2WMMojRuWdx+4044LsUHUFMI Pt0V2Kq7v30UPcXQnFhJNtz+hyyjXqVoG0qSEhtSEzRROcv/R9l2hKrDGjT/TkVG06bb Y+jQ== X-Gm-Message-State: AC+VfDxdUWRR6ppKRhz+qVeffEwmTZ/ObfwF9xmYDlIPeEEnnjtm2L5a A+kvt35Q3icdbU9cdsBvSr9vy8ZxPm3yd9ql X-Google-Smtp-Source: ACHHUZ7nTuQo+6D8RPzjAFAhg6ChK2h8iQcHeoxZbNMPPPBS+SpwTRfDgQtcppgJQE4kZmGDEo4e/g== X-Received: by 2002:a05:600c:3781:b0:3f6:3da:1603 with SMTP id o1-20020a05600c378100b003f603da1603mr2519287wmr.26.1686400238132; Sat, 10 Jun 2023 05:30:38 -0700 (PDT) Received: from user-PC.. ([178.134.198.138]) by smtp.gmail.com with ESMTPSA id v26-20020a1cf71a000000b003f80e81705asm2310487wmh.45.2023.06.10.05.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 05:30:37 -0700 (PDT) From: Maksim Kiselev To: linux-iio@vger.kernel.org Cc: Maxim Kiselev , 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 , Greg Kroah-Hartman , Andy Shevchenko , Cosmin Tanislav , Ulf Hansson , Arnd Bergmann , Hugo Villeneuve , William Breathitt Gray , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , ChiaEn Wu , Haibo Chen , =?utf-8?q?Leonard_G=C3=B6hrs?= , 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 v4 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Sat, 10 Jun 2023 15:29:08 +0300 Message-Id: <20230610122934.953106-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230610122934.953106-1-bigunclemax@gmail.com> References: <20230610122934.953106-1-bigunclemax@gmail.com> MIME-Version: 1.0 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: devicetree@vger.kernel.org From: Maxim Kiselev 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: Maxim 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..2b59844b7c07 --- /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-15])$": + $ref: adc.yaml + type: object + description: + Represents the internal channels of the ADC. + + properties: + reg: + items: + minimum: 0 + maximum: 15 + + required: + - reg + + additionalProperties: false + +required: + - "#io-channel-cells" + - clocks + - compatible + - interrupts + - reg + - resets + +unevaluatedProperties: 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>; + }; + }; +...