From patchwork Tue Aug 11 13:15:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 6992291 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 BCE269F358 for ; Tue, 11 Aug 2015 13:15:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04DE820549 for ; Tue, 11 Aug 2015 13:15:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 701D12054C for ; Tue, 11 Aug 2015 13:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965036AbbHKNPg (ORCPT ); Tue, 11 Aug 2015 09:15:36 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:52196 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964807AbbHKNPf (ORCPT ); Tue, 11 Aug 2015 09:15:35 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSX002GK65XA3D0@mailout1.samsung.com>; Tue, 11 Aug 2015 22:15:33 +0900 (KST) X-AuditID: cbfee61b-f79706d000001b96-40-55c9f575a83b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 29.09.07062.575F9C55; Tue, 11 Aug 2015 22:15:33 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSX00LNP65QNN30@mmp2.samsung.com>; Tue, 11 Aug 2015 22:15:33 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Krzysztof Kozlowski , Kukjin Kim , Kukjin Kim Cc: Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Lukasz Majewski Subject: [PATCH RESEND v6 3/3] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3 Date: Tue, 11 Aug 2015 15:15:22 +0200 Message-id: <1439298922-17898-1-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1425470624-25793-1-git-send-email-l.majewski@samsung.com> References: <1425470624-25793-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrALMWRmVeSWpSXmKPExsVy+t9jQd3SrydDDd6ctLKYf+Qcq8X8K9dY LV6/MLToXXCVzaL/8WtmizePuC3ePNzMaPG59wijxYzz+5gcOD12zrrL7rFpVSebx7ppb5k9 +rasYvT4vEkugDWKyyYlNSezLLVI3y6BK+P2Go2CWdwVp9btZWlgnMbRxcjJISFgIvF+52Um CFtM4sK99WxdjFwcQgKzGCUOrP3ECuH8YZS4Pu8BG0gVm4CexOe7T5lAEiICCxglZn9fzwzi MAu8ZJQ4dqebGaRKWKBAouPuIlYQm0VAVWLVzIuMIDavgJvEkpUzGCH2KUp0P5sANpVTwF3i +qMWFhBbCKTmwAnmCYy8CxgZVjFKpBYkFxQnpeca5aWW6xUn5haX5qXrJefnbmIEh9sz6R2M h3e5H2IU4GBU4uEV8DwZKsSaWFZcmXuIUYKDWUmEl+M0UIg3JbGyKrUoP76oNCe1+BCjNAeL kjivvsmmUCGB9MSS1OzU1ILUIpgsEwenVAOjs11seMrn+eejP55asNpH2H6G/MwjgVclc28m Nq4Q6joWW95yQYmHbfki6627v7Idvn7DrTFaaV6pG5/8vh5N/+iW5txkSXcRX5mXvk8c8497 RbffWNAfftfmsPOUj8+n1AU9Uz83R+qwhL3f3QnBUiukD7bpHTO7zKbpfcng1sKAy0riwq5K LMUZiYZazEXFiQDOCfFAMwIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 With those bindings it is possible to use pwm-fan device available in Odroid U3 as a cooling device. Signed-off-by: Lukasz Majewski Acked-by: Eduardo Valentin Reviewed-by: Krzysztof Kozlowski --- arch/arm/boot/dts/exynos4412-odroidu3.dts | 33 ++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts index 4c04837..abcfa3c 100644 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts @@ -32,9 +32,40 @@ }; }; - pwm-fan { + fan0: pwm-fan { compatible = "pwm-fan"; pwms = <&pwm 0 10000 0>; + cooling-min-state = <0>; + cooling-max-state = <3>; + #cooling-cells = <2>; + cooling-levels = <0 102 170 230>; + }; + + thermal-zones { + cpu_thermal: cpu-thermal { + cooling-maps { + map0 { + trip = <&cpu_alert1>; + cooling-device = <&cpu0 7 7>; + }; + map1 { + trip = <&cpu_alert2>; + cooling-device = <&cpu0 13 13>; + }; + map2 { + trip = <&cpu_alert0>; + cooling-device = <&fan0 0 1>; + }; + map3 { + trip = <&cpu_alert1>; + cooling-device = <&fan0 1 2>; + }; + map4 { + trip = <&cpu_alert2>; + cooling-device = <&fan0 2 3>; + }; + }; + }; }; };