From patchwork Tue Mar 11 07:54:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 3809221 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 73ED09F369 for ; Tue, 11 Mar 2014 07:58:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACCB520220 for ; Tue, 11 Mar 2014 07:58:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5F892021F for ; Tue, 11 Mar 2014 07:58:25 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNHY9-0006Qd-OG; Tue, 11 Mar 2014 07:56:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNHXm-0002sn-0J; Tue, 11 Mar 2014 07:56:10 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNHX9-0002oT-7L for linux-arm-kernel@lists.infradead.org; Tue, 11 Mar 2014 07:55:33 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N29007XFHZU60B0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 11 Mar 2014 16:55:06 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.115]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id AA.DD.09028.951CE135; Tue, 11 Mar 2014 16:55:05 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-ed-531ec159b894 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B1.A9.28157.951CE135; Tue, 11 Mar 2014 16:55:05 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.75.48]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N29004OTHZOIV80@mmp1.samsung.com>; Tue, 11 Mar 2014 16:55:05 +0900 (KST) From: Chanwoo Choi To: kgene.kim@samsung.com, t.figa@samsung.com Subject: [PATCH 5/5] ARM: dts: exynos4412-trats2: Add ADC's dt data to get temperature of SoC/battery Date: Tue, 11 Mar 2014 16:54:54 +0900 Message-id: <1394524494-30641-6-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1394524494-30641-1-git-send-email-cw00.choi@samsung.com> References: <1394524494-30641-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWyRsSkWDfyoFywweu1lhbXvzxntZh/5Byr xblXKxktehdcZbM42/SG3WLT42usFpd3zWGzmHF+H5PF7cu8FkuvX2SymDB9LYvF4RUHmCxe HWxjsVg/4zWLA5/HmnlrGD1amnvYPBZ8vsLusXL5FzaPzUvqPfq2rGL0+LxJzmPj3NAAjigu m5TUnMyy1CJ9uwSujN7vlgULuSsebJzK3sD4k6OLkYNDQsBEouVEbBcjJ5ApJnHh3nq2LkYu DiGBpYwSVzpmsEIkTCTWnn3EApFYBJTYM5cRwmlkkvh4q5UJpIpNQEti/4sbbCC2iICuxJSZ d1hBipgF7jNJ/Di+CiwhLJAu8X3NUzCbRUBV4tXm/ewgN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YlEV6ntUAh3pTEyqrUovz4otKc1OJD jMlAV01klhJNzgcmkLySeENjEzMjSyNzQwsjY3PShJXEeQ+2WgcKCaQnlqRmp6YWpBbBbGHi 4JRqYGxy0GpQDp0g6P173leOmFbt2hrnt+Y390c3CP31PyzqH6/3J3KO73fl7ttLt1qlP9de wT71wen7flZnLnhtvbcpoNSO4ZJzbenyOrMwkx1SS4UiZ8xfNnd2pLpm7Df/C4LPpqcu/d+4 sEyMvcj3kltU9aSZJRUM1qp/L8ibvT18J7NCJJixUImlOCPRUIu5qDgRAE4amZUWAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140311_035531_561421_66D6A9A0 X-CRM114-Status: UNSURE ( 8.40 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, pawel.moll@arm.com, swarren@wwwdotorg.org, ijc+devicetree@hellion.org.uk, linux-kernel@vger.kernel.org, rob.herring@calxeda.com, Chanwoo Choi , kyungmin.park@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, T_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 use ADC to get the temperature of SoC/battery by using NTC thermistor driver in hwmon. NTC thermistor driver covnvert ADC's raw data to temperature by using following variables: - pullup-uv : Voltage - pullup-ohm : Pull-up resistance - pulldown-ohm : Pull-down resistance - io-channels : It means ADC channel. Signed-off-by: Chanwoo Choi --- arch/arm/boot/dts/exynos4412-trats2.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index 4f851cc..fc517c3 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts @@ -106,6 +106,27 @@ }; }; + adc: adc@126C0000 { + vdd-supply = <&ldo3_reg>; + status = "okay"; + + ncp15wb473@0 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; /* VCC_1.8V_AP */ + pullup-ohm = <100000>; /* 100K */ + pulldown-ohm = <100000>; /* 100K */ + io-channels = <&adc 1>; /* AP temperature */ + }; + + ncp15wb473@1 { + compatible = "ntc,ncp15wb473"; + pullup-uv = <1800000>; /* VCC_1.8V_AP */ + pullup-ohm = <100000>; /* 100K */ + pulldown-ohm = <100000>; /* 100K */ + io-channels = <&adc 2>; /* Battery temperature */ + }; + }; + i2c@13890000 { samsung,i2c-sda-delay = <100>; samsung,i2c-slave-addr = <0x10>;