From patchwork Sun Jan 28 23:29:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10188529 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 7B9116056A for ; Sun, 28 Jan 2018 23:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74135286B2 for ; Sun, 28 Jan 2018 23:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67171286DF; Sun, 28 Jan 2018 23:30:03 +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=ham 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 CFB4A286B2 for ; Sun, 28 Jan 2018 23:30:02 +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=nOa7eTXES2oqbvsAb9gQ6y+XMgC3CXb07Ll5xNCGfEA=; b=MIiUnHdnXPw+7D+AH5or+wYwRY W0zWg+z2NQylr45B08sTi1tnJd3jqWQ6R8F0anP8pLPc6GRlq4OxajPtYmrANKRXjgHqb0rE3gVxs X9cvv+e2oFIJvDFF7RcIIyrI79NUh8FqhPVs4zqIpdeFf74nyzVCJ2/m0G1KirfqU9FZl1mNZWikQ pzvFqooJHSFnjfngISfWhelDInEnsrM789y7hsqgQIwTGZ+hOxhQumVOlplNmexFm7vA2UD9KqtrH klv/xgUZhL46fiBMAWE5GZcLQWDDDqw7XVwYu+RqM2JYcGwHvVJkUSzZAITcCszp+w+J6o54a0Orv dxiaf+eA==; 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 1efwOd-0004eT-O7; Sun, 28 Jan 2018 23:29:59 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1efwOH-0004JN-S8 for linux-arm-kernel@lists.infradead.org; Sun, 28 Jan 2018 23:29:39 +0000 Received: by mail-wm0-x242.google.com with SMTP id v71so30463599wmv.2 for ; Sun, 28 Jan 2018 15:29:25 -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=h9SW8obiZ2fwpI772CKWPhFZEU+9HOmw4prJnMEuq3w=; b=JM8Chptd3z001IiILKhVLXC4i4mobuJ+Eyg4jfQYxBtlfj1sdknwK/OXPjUquax9tL 3tf3Xs0qSeuTNecIJq5FDRschoexz0uMNHeEfrQFSz+CmbDa89v5Oas3R6qQVKYeIxZO nyLdZEhLK6lNwQN3bWCWDDZv5xme+QVoLxTO7kKPOM1pvS3iWxcC1kU9yQ/co5g2KvSm rTkZB1xarsrq+MYhsNO+C2hQrMQgOIUcnuvycvSDo5C4sG1QmCP07+MrbO7uMnIXSpVm jJhlLrTvo1ro+zquvieA150515L9GRhPnw3QAFVfW/X0mJ6IFknNA+A0XjdNoId3fLhz k2xw== 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=h9SW8obiZ2fwpI772CKWPhFZEU+9HOmw4prJnMEuq3w=; b=s81gUXHQt+/i3OqjHHou2nUX++agJzJsH+KMIaSfiFOgNl/Lfunkxg0wa8t8U2Z4ME EEpJpQnQ6V29CnolGMb6/peY/UzOVCL+sSZWNuG9sT09DCaK4V88DA5+hdJ21C3doLKb XF9A16OLkBpQVKIBW1DefiuPeJkB/SjZrxcLb888CjLjGOCorXFkl+5zmWvmZh5iAqnQ t6kPqVLeGqu58SW8b7sJooHUAmHGAKs3hItuciDBl+SGsd3zn2NBP4dsjs3veFmvpKxO eOoqjizLSjNeeNvyyZZenjhCmg56HP6plEy/39m8RYKXjwkg58xZ16AiOB2yW5LBmP+G Qg5w== X-Gm-Message-State: AKwxytePy72C5TzSMBmNWQt23qdwvRfSqHwqbGgK9ifGw3/z0/qtRAED SMfmdDaPaehuRuqgfgHOOGg= X-Google-Smtp-Source: AH8x224Ib4JtTwr16KayUBbSfO6wG0zbLgYrmQyrZxAEKCvdRkopmGiMxUVTJwLR/gRbCcENSZC/QQ== X-Received: by 10.28.134.140 with SMTP id i134mr18396534wmd.57.1517182164207; Sun, 28 Jan 2018 15:29:24 -0800 (PST) Received: from debian-laptop.fritz.box (p578F04D2.dip0.t-ipconnect.de. [87.143.4.210]) by smtp.gmail.com with ESMTPSA id m86sm11839223wmi.40.2018.01.28.15.29.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 15:29:23 -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 v2 01/16] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T Date: Mon, 29 Jan 2018 00:29:04 +0100 Message-Id: <20180128232919.12639-2-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180128232919.12639-1-embed3d@gmail.com> References: <20180128232919.12639-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..22df0c5c23d4 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 0x2 * sensorcount. + - 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