From patchwork Fri Jan 26 15:19:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10186283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96E6160383 for ; Fri, 26 Jan 2018 15:20:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85FFE29CB7 for ; Fri, 26 Jan 2018 15:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7854529CBA; Fri, 26 Jan 2018 15:20:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A05B929A80 for ; Fri, 26 Jan 2018 15:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HLJN/LfxZ6xu4y5ff7CJgTgG8aJraqFjTHbZzlPR4Mk=; b=m0cAGW+Mu2cRIIvAH41Gwmd1Kp 1R/C8GMjYPpH8d3xgpN+hI9PtvyE/uK0vZOKRjX5dQpYrM6x2DuWqHobwxrhsCmfffqcps4cwMCO6 Bxf5IEkNCZ4z0BW7XmR/ZnM2QomOLyrdMVNH06cIW9T8x4NqSgVjGSvzKDXYgxT/Oj+B9sBHXAoIN h2AAdd6Tc3loTQnyKIKABUTqHZM4j5ChBbtTLiCTrIpR/gPWn32fWlgSlfNMoE+Wn62Dp/mTprh3K mTSfU5LlwPomcF9dZQYm3XMnQnbGf64Ee2V6heZPl2EE/fLzzIiniz91fs9sfrnHl7aSo8OgThxbS 6D2VAYZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ef5nQ-0000rq-D2; Fri, 26 Jan 2018 15:20:04 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ef5nL-0000Xj-Jh for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2018 15:20:01 +0000 Received: by mail-wm0-x241.google.com with SMTP id r71so1959491wmd.1 for ; Fri, 26 Jan 2018 07:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1M/VpV8R28titrkS7yFZIQsP43vVR7WlUu1ONg7/3hI=; b=hHqR+76QW77+IMSELU5sB4vgg6yet02Ey4oAihHlJv7D1BvMAqgTs6OeEbeXwcCl+r ZX3oU1QwAeG9F2iuAAQ+O5r0SOF5K9HI1LSGEzlxTaOQNjdfsLeIyZko8+of/wL2O3Zn GqxBbawKt0WQ2AGWLyBkNM84JCbWhAHs9AP/dun1mbwocPyKCmDXK43HLparjhf46GF2 w6duBcLWko+QHJ+uhiNlvMSdsmyUiocb/12abkSN9H+D1D944WekN13XUpWxunx1A38q C55FBgoO004zExRL01fMDQU2dnSjI/SBxuMxgHx86NCjoIu7I/KLOvD7By/U/VT0JQTm 6h+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1M/VpV8R28titrkS7yFZIQsP43vVR7WlUu1ONg7/3hI=; b=CviE8jYvW5y5yGHF/oYiiEmlwmIJD9v342Y/z0xfTeLqr7muiKIRixTAnpQ5DI5r/k a83ZyoL9pfFATuEN9RRhm6iAa4yMdSl0Qzl8UfzcNNBEkhRE8LK26Sto0NxUQnOWyf2Z EIHepqiVmRygZ3zY9IChaj229Z5U2HNneTfbyp1xQOQFSucViBto6EiHCpCDUX7Z+CnJ lXT58n3W2NPB7o4rXhSUqeO7w1ItFHQw+4AZfOD8jMG6sBJNTnbekZRFT4S4kE2juZYg wSDS2I6l5hS1ZkXoTYk87R0gAgskMSfq6MTZ6yJaZSANSvRzhDvSrzMLfhsLWehwuHd1 +BGA== X-Gm-Message-State: AKwxytddAg08jGs/T2jGI4HTY6nmlji4gIAK5TeMK70VmRZI2CWsjdy6 ZOcm+MfUZx59NQulyJjlwzE= X-Google-Smtp-Source: AH8x224GwbrvrOO0eVE8h1XXqTYl2eMDfbMBBsK+xCmsU4INeiB/RGXH8EyYIfik0JzMyaYuIp2H0Q== X-Received: by 10.28.84.14 with SMTP id i14mr10189634wmb.30.1516979986797; Fri, 26 Jan 2018 07:19:46 -0800 (PST) Received: from debian-laptop.fritz.box (p578F04D2.dip0.t-ipconnect.de. [87.143.4.210]) by smtp.gmail.com with ESMTPSA id e15sm4586130wmd.26.2018.01.26.07.19.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 07:19:46 -0800 (PST) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, davem@davemloft.net, hans.verkuil@cisco.com, mchehab@kernel.org, rask@formelder.dk, clabbe.montjoie@gmail.com, sean@mess.org, krzk@kernel.org, quentin.schulz@free-electrons.com, icenowy@aosc.io, edu.molinas@gmail.com, singhalsimran0@gmail.com Subject: [PATCH 01/16] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T Date: Fri, 26 Jan 2018 16:19:26 +0100 Message-Id: <20180126151941.12183-2-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126151941.12183-1-embed3d@gmail.com> References: <20180126151941.12183-1-embed3d@gmail.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner H3 features a thermal sensor like the one in A33, but has its register re-arranged, the clock divider moved to CCU (originally the clock divider is in ADC) and added a pair of bus clock and reset. Allwinner A83T features a thermal sensor similar to the H3, the ths clock, the bus clock and the reset was removed from the CCU. The THS in A83T has a clock that is directly connected and runs with 24 MHz. Update the binding document to cover H3 and A83T. Signed-off-by: Philipp Rossak --- .../devicetree/bindings/mfd/sun4i-gpadc.txt | 50 ++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt index 86dd8191b04c..f6b939617a6d 100644 --- a/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt +++ b/Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt @@ -4,12 +4,35 @@ The Allwinner SoCs all have an ADC that can also act as a thermal sensor and sometimes as a touchscreen controller. Required properties: - - compatible: "allwinner,sun8i-a33-ths", + - compatible: must contain one of the following compatibles: + - "allwinner,sun8i-a33-ths" + - "allwinner,sun8i-h3-ths" + - "allwinner,sun8i-a83t-ths" - reg: mmio address range of the chip, - - #thermal-sensor-cells: shall be 0, + - #thermal-sensor-cells: shall be 0 or 1, - #io-channel-cells: shall be 0, -Example: +Required properties for the following compatibles: + - "allwinner,sun8i-h3-ths" + - "allwinner,sun8i-a83t-ths" + - interrupts: the sampling interrupt of the ADC, + +Required properties for the following compatibles: + - "allwinner,sun8i-h3-ths" + - clocks: the bus clock and the input clock of the ADC, + - clock-names: should be "bus" and "mod", + - resets: the bus reset of the ADC, + +Optional properties for the following compatibles: + - "allwinner,sun8i-h3-ths" + - nvmem-cells: A phandle to the calibration data provided by a nvmem device. + If unspecified default values shall be used. The size should + be 0x4 or 0x8, depending on the amount of CDATA registers. + - nvmem-cell-names: Should be "calibration". + +Details see: bindings/nvmem/nvmem.txt + +Example for A33: ths: ths@1c25000 { compatible = "allwinner,sun8i-a33-ths"; reg = <0x01c25000 0x100>; @@ -17,6 +40,27 @@ Example: #io-channel-cells = <0>; }; +Example for H3: + ths: thermal-sensor@1c25000 { + compatible = "allwinner,sun8i-h3-ths"; + reg = <0x01c25000 0x400>; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_THS>; + interrupts = ; + #thermal-sensor-cells = <0>; + #io-channel-cells = <0>; + }; + +Example for A83T: + ths: thermal-sensor@1f04000 { + compatible = "allwinner,sun8i-a83t-ths"; + reg = <0x01f04000 0x100>; + interrupts = ; + #thermal-sensor-cells = <1>; + #io-channel-cells = <0>; + }; + sun4i, sun5i and sun6i SoCs are also supported via the older binding: sun4i resistive touchscreen controller