From patchwork Thu Oct 29 07:14:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7516851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7132B9F37F for ; Thu, 29 Oct 2015 07:19:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B57F20996 for ; Thu, 29 Oct 2015 07:19:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7F2520992 for ; Thu, 29 Oct 2015 07:19:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrhSq-0003Yv-PO; Thu, 29 Oct 2015 07:17:36 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrhQs-0006tK-Ds; Thu, 29 Oct 2015 07:15:35 +0000 Received: by padfb7 with SMTP id fb7so3435878pad.0; Thu, 29 Oct 2015 00:15:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1Zi8uahoun0CP8ANh85zvkMrvXj7K/rQKi/9ZmS7Uw8=; b=WPqwXtaHl6Y1eQ71qYtCPwnqyscgCogiaRgZw3Rv+t0/3cUFV3PXqBURx6NJAAtI1F RVbBGSxRQDQIjJ1gtykWyya9DRcTICht5OtOR9L63ED77hyuXfri9iJdcN/kxb7bk0Xk smckOgZUkuRCODbwkQTh4Sxi4MXAglJqJwVY/Xz3ImvpsWa0rF/o5CNPEDDueOrexSNK Z5VxLRv4gh2WghOlHLR8NDG+ZQzvzAXdIv5ybieEzbBp8mowbBwVeMlGJOo9Pcm+8NPi pHimAwtUT+3kDdT9Lem0u0MXw3QKvW6NcZcLzHAgR1VSJa+V7iB3ILDUJY1TMABZ1egP Sscg== X-Received: by 10.66.120.136 with SMTP id lc8mr245908pab.19.1446102917387; Thu, 29 Oct 2015 00:15:17 -0700 (PDT) Received: from localhost.localdomain ([103.46.142.44]) by smtp.gmail.com with ESMTPSA id w9sm395856pbt.29.2015.10.29.00.15.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Oct 2015 00:15:16 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner , Eduardo Valentin Subject: [PATCH v1 5/6] arm64: dts: Add main Thermal info to rk3368.dtsi Date: Thu, 29 Oct 2015 15:14:17 +0800 Message-Id: <1446102858-10116-6-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446102858-10116-1-git-send-email-wxt@rock-chips.com> References: <1446102858-10116-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151029_001534_601139_5873850F X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Lorenzo Pieralisi , Pawel Moll , Ian Campbell , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , Kumar Gala , Olof Johansson , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch add the thermal needed info on RK3368. Meanwhile, support the trips to throttle for thermal. Signed-off-by: Caesar Wang --- Changes in v1: - support the opt gpio pinctrl state arch/arm64/boot/dts/rockchip/rk3368.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi index cc093a4..7207293 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi @@ -45,6 +45,7 @@ #include #include #include +#include / { compatible = "rockchip,rk3368"; @@ -123,6 +124,8 @@ reg = <0x0 0x0>; cpu-idle-states = <&cpu_sleep>; enable-method = "psci"; + + #cooling-cells = <2>; /* min followed by max */ }; cpu_l1: cpu@1 { @@ -155,6 +158,8 @@ reg = <0x0 0x100>; cpu-idle-states = <&cpu_sleep>; enable-method = "psci"; + + #cooling-cells = <2>; /* min followed by max */ }; cpu_b1: cpu@101 { @@ -404,6 +409,27 @@ status = "disabled"; }; + thermal-zones { + #include "rk3368-thermal.dtsi" + }; + + tsadc: tsadc@ff280000 { + compatible = "rockchip,rk3368-tsadc"; + reg = <0x0 0xff280000 0x0 0x100>; + interrupts = ; + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + resets = <&cru SRST_TSADC>; + reset-names = "tsadc-apb"; + pinctrl-names = "init", "default", "sleep"; + pinctrl-0 = <&otp_gpio>; + pinctrl-1 = <&otp_out>; + pinctrl-2 = <&otp_gpio>; + #thermal-sensor-cells = <1>; + rockchip,hw-tshut-temp = <95000>; + status = "disabled"; + }; + gmac: ethernet@ff290000 { compatible = "rockchip,rk3368-gmac"; reg = <0x0 0xff290000 0x0 0x10000>; @@ -829,6 +855,16 @@ }; }; + tsadc { + otp_out: otp-gpio { + rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + otp_out: otp-out { + rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>; + }; + }; + uart0 { uart0_xfer: uart0-xfer { rockchip,pins = <2 24 RK_FUNC_1 &pcfg_pull_up>,