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: 10186377 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 6E4D260383 for ; Fri, 26 Jan 2018 15:24:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 603B929C19 for ; Fri, 26 Jan 2018 15:24:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5468A29C2A; Fri, 26 Jan 2018 15:24:27 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F261E29C19 for ; Fri, 26 Jan 2018 15:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbeAZPTv (ORCPT ); Fri, 26 Jan 2018 10:19:51 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:53493 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509AbeAZPTs (ORCPT ); Fri, 26 Jan 2018 10:19:48 -0500 Received: by mail-wm0-f66.google.com with SMTP id t74so1961300wme.3; Fri, 26 Jan 2018 07:19:47 -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=riKz+bCd4AgntNsZcSPzgJZpwGwctdm0ZMPzMj3OqFbQ7yII6psWfHkt+q6NQUTV08 GwhLZc6CJzcQKWBfkHSabMNXwSzpDwpt9LS4AFrL4UugwI7fBhTqXs4VJKpRN1fPamvG VY1qawybKFmMHpTNrTlPOGK3mcT0hk2+2fCPC5TBaa7APTEglN1g6rgoky4bTgMZH5C5 9Z5rWADt3umVSfEPgvO1hoce9bUVx0cboAsMO1/BjWBazKxWlSKGfhQvY0yS5uniKT3G rbqtLwV9sUZXDKHy9eHDaYHf28DX0My4hdKtJNSCvKiXLH4C6N23nIRDZfSpOdespNT4 f3NA== X-Gm-Message-State: AKwxytfeiYjdEGryZQJ34SyVBqYX82AmIQATjvDT2z+cyBMCmwD3KMWS kKcn2zLm3nKyd/DqZczyWp8= 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 Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.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> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.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