Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3441880rwp; Sat, 15 Jul 2023 02:47:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHs4jfVpAh2MwTGaYZ57I9ectRoruTxF5p63zNF0vL1+NfRKUUzlvF9fSuNF6XnbtxuG130 X-Received: by 2002:a17:906:14e:b0:989:450:e57d with SMTP id 14-20020a170906014e00b009890450e57dmr5993091ejh.73.1689414458864; Sat, 15 Jul 2023 02:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689414458; cv=none; d=google.com; s=arc-20160816; b=X9sYxaF4288ujMPmDeA2DW8MyYqSajURcM1rw8nFmr75O5dnusMJ82l749smmbSdgz YdAfD1KugSQxnFvlum5NopQGzL/mNVv/uCSoydYdqTe4Yx/bQ8qQokBe0CHYa1jLd0xB yAxpuu85WWyeqJuI2fdDqNmkXuPFNCj2uETSGWnU0r9H2DJNVNxLvQ70ycu/Lv9N4rnk NLfsgb4sIK63wr/S986c/DLHjfPq+75tIJZOogabo3xIOPDl/GI7hDrdAWtJzgGUujrf wQYIX+OSXwfYJ2abuFm+zeO/y+TeXrjzpC/Cdp3twD54VgR7T63Rx8D1dpf46QmFGI1I 6huQ== 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=aL5sq5Lugahi7hv9X9W+s9NTZzWQgnxxieVUqmZWN4k=; fh=zYY/hS7oxcn6wsuTVGo+y1QwVby9Bem7oLh5WZxTnWw=; b=CTG73dX7s2KXVsCW2fK/5bUU3lLiO2uybVy/kpXoApClvNvozXaeDuOjEJWedg4H/p 2cMbEBSefSPBpM7yNriqXSBbHntJE3lfEIwvqNyvrraiZ9fe+339RLwxXDoukpNQ4uqA sGID+wccHRz2Fj1Uy8caJPexA6ERJGoqU9EXXRwsiyy4pwYqSqeOi3kdZRyrqtn2+MsP 7hXWD50M1LbKAnbbgCOC6fVeDue1RvOlniWYt6CNFOBiYbpDWXlRZWU27idSZUBBDZIZ 063PtD34sF1qHyMQgAHJJD5hG8WuYaf5GqKyZKHVXgqJK7+7rJjW9wrsf6tyzcteBItB JiXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="hkC/l0Pq"; 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 b22-20020aa7dc16000000b005187d1b7a4asi10598004edu.552.2023.07.15.02.47.14; Sat, 15 Jul 2023 02:47:38 -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="hkC/l0Pq"; 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 S230372AbjGOJTI (ORCPT + 99 others); Sat, 15 Jul 2023 05:19:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjGOJSz (ORCPT ); Sat, 15 Jul 2023 05:18:55 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52F53A96; Sat, 15 Jul 2023 02:18:41 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b6f9edac8dso41142921fa.3; Sat, 15 Jul 2023 02:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689412720; x=1692004720; 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=aL5sq5Lugahi7hv9X9W+s9NTZzWQgnxxieVUqmZWN4k=; b=hkC/l0PqNNlvf1QawpapipLhW0ec27tqSQNF+pbnWG2amkvKgTbUy2BZj1E60f0XPw ICzQv+APS8QZRPsaVgLEcXOt+rIVfVGvX0pi8EzBH6QkCPZrKM+s2c+xMVxAaY9ArgrR bpdD3YPHN23ka/++8CxR+4ai0xmURIv54D7PdOB+VKLwZg4iI8DRef/2AE8nuIi1HvIK apn4JdSnn3J6DUqfaNhES2hrFi76pZFVgkTjRJfafjIflfRxe0wex1XWTVvNn36FO6oa vpnyImsyV+M3EAcrPucso+1ehaU3IZuFbDMDnu0zNVBEnp2payDVLW+bnqTNV2hPW9nQ esag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689412720; x=1692004720; 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=aL5sq5Lugahi7hv9X9W+s9NTZzWQgnxxieVUqmZWN4k=; b=ht/wthrFWs120ntXZmDB3Ei6CrXQv9crEDSfTaM9FiTqioT093LcO8yuXxb7xUChKB QnBwvZfkDaqj1YyG3jrrmsUSQmFNJs7Y1PBdvkyQR9RKbJxHFVL0sIa2GcpLWO8ZNUi0 IC9AYGT97U3qQvlqpBtXlQuCPMfsSoC5mJTXwtSxK14k43awcORROVCZgPPHPPrVGSRf SnMKzguPIYFFZ4wL8XMwpwsrJIuEXeACesSYXLPh5cAlppFz+aVwi15DN+LNO3jfumXb 2hT2xvcoxGdbn6SpUsuVaPrvkaX/JwJ74ySRS3RnfJEQuWVoAgjgKMYG4YfBtt+XukgP nMQQ== X-Gm-Message-State: ABy/qLb5xusfL9j5LeF5HPXUOBfCf9zoQlAE73zP9PPw2TdJ4ZsN+iX3 Z4r+19YVDQ79+gGVMVX1K9ttAbx1vJPsFQ== X-Received: by 2002:a2e:94c7:0:b0:2b6:e2aa:8fc2 with SMTP id r7-20020a2e94c7000000b002b6e2aa8fc2mr4696400ljh.46.1689412719800; Sat, 15 Jul 2023 02:18:39 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id b17-20020a2e9891000000b002b840f283a7sm561784ljj.36.2023.07.15.02.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 02:18:39 -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 , 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 v9 3/4] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Date: Sat, 15 Jul 2023 12:18:15 +0300 Message-Id: <20230715091816.3074375-4-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230715091816.3074375-1-bigunclemax@gmail.com> References: <20230715091816.3074375-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_BLOCKED,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..7ef46c90ebc8 --- /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 0x400>; + 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