From patchwork Thu Aug 30 15:45:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 806EF5A4 for ; Thu, 30 Aug 2018 16:33:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DA732BFB5 for ; Thu, 30 Aug 2018 16:33:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 610C42C12A; Thu, 30 Aug 2018 16:33: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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 E045C2BFB5 for ; Thu, 30 Aug 2018 16:33: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=WmPnaxV0vTyOlhcYPTlMkfbZmHYGRmk0nB2wxSoOUUk=; b=ryPiJl7C71qkU49RM9aQM3UAHc klekEQv2yZkUv2e6ETg/OGkQ5o6JzGJsPsW/wtks4Kxla7T1AIlEMydilYzB5AtNtdvsVK5s5ZP1O BOUhX03dVk9yfcGhKehF1Dj5ecOE8cg4N14CH47bQob9+/8CiwcCJgDThetGx8VCI6qAYPlBsZKSw dXlw29Y8LVVPRYjgXE8axVlGX46nPZmpx6I5xAKInUuEzkQAlwFDBTMB8qWA/Baec85UEHytMYINz +5hL0q/ZM2QjNkebD3Cs4VrZR3WUt1ISigkO33vJr4erJLCA1VWoTWhS1py6p1J2TCmziOnKiEWWg YU7lDvhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPsN-0006o4-Fd; Thu, 30 Aug 2018 16:32:55 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvP8i-0001d2-31 for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 15:45:49 +0000 Received: by mail-wm0-x243.google.com with SMTP id o18-v6so2537149wmc.0 for ; Thu, 30 Aug 2018 08:45:34 -0700 (PDT) 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=KQMFFCtjVJMB79OboK16hKVLwCLSA0PsOx2A/8CBESc=; b=uSl/Vax1IuA+CFRUIKwTxxFUvJfRWakNh5g16Kc0q07Q68gw45yu6ugu2nZm/dMKko QadCBK52Wf+8QPU4hVqpjMsnFMfMhPxGReEQknxirOo1kHhARPI0a1btuB90dm730IkN 1OO6dsLT8qznPCn7cgcBZ93F0MWNoU2Kle15pJEe73mC8+Osqt/9YiQnijDe87Z7c7Ov AFNXVGKcDcnmBvVQyuGcR6n/G6zuYTX7MOItqnR9zmK8pmklbB0+m+sz43o2YD4D9DTF hSj+RBgWWLsMkwnaE/tcMpPG1EignyUBXHtPfw1XPE4H74HINyNmEPeZMLQkUcn57dja nHVA== 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=KQMFFCtjVJMB79OboK16hKVLwCLSA0PsOx2A/8CBESc=; b=ARQe9xb1g7zbHM4CGr6PfCJ/M3Pc3g3uXme45n5k2MLscdd4uktqn9Dh0gNljqv98m HhIClyYNFf8edF0qyq7ZEXuMZlQtBQAHdEXcydwQiUZ9QdLYyfbJD350jCe7i5V7/Bk6 HaRrqjy2urBmEt57UiNzu4zmib9bqBtH0tivg9fV6+aEQJn5AiA4VduIhj9P4smSJFiq srw92aRF7k75ouqMyM99QkZCYXK09lIklY3vL7JdIURYSXDgwC1uidv2EwT2KW0RGe8J vgFzyYC9e0ZcUZNPneNr1vjOUDpOl2DAX+k1/lD0kg29oP4zU3PViS/OCmi88QECDt8a 66bQ== X-Gm-Message-State: APzg51Dpe27j5s87ch+rWqUlZCloXXG8XTspwUQh1mIBvbuj63+dq+ZH oon801ml4yoV54GXFvXbubU= X-Google-Smtp-Source: ANB0VdYDy7wn0q0bTBfQwfLF4nhftHhBI9Gwyly1JXh4FK3AUDx60kkf66i1PFdimUNMVOn1/QjC9A== X-Received: by 2002:a1c:ba84:: with SMTP id k126-v6mr2051153wmf.96.1535643933705; Thu, 30 Aug 2018 08:45:33 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:33 -0700 (PDT) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com Subject: [PATCH v3 14/30] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T Date: Thu, 30 Aug 2018 17:45:02 +0200 Message-Id: <20180830154518.29507-15-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_084544_206084_C34C92A0 X-CRM114-Status: GOOD ( 16.50 ) 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/iio/adc/sun4i-gpadc.txt | 41 ++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/sun4i-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/sun4i-gpadc.txt index a7ef9dd21f04..9116ad308cf1 100644 --- a/Documentation/devicetree/bindings/iio/adc/sun4i-gpadc.txt +++ b/Documentation/devicetree/bindings/iio/adc/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: + Please refer , - #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" + - "allwinner,sun8i-a83t-ths" + - nvmem-cells: A phandle to the calibration data provided by a nvmem device. + - 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,18 @@ 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>; + }; + sun4i, sun5i and sun6i SoCs are also supported via these bindings: Required properties: