From patchwork Wed Mar 12 06:19:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 3815651 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 53AF69F375 for ; Wed, 12 Mar 2014 06:27:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87895201FD for ; Wed, 12 Mar 2014 06:27:33 +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 84D72201F2 for ; Wed, 12 Mar 2014 06:27:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNcbZ-0006Oe-TO; Wed, 12 Mar 2014 06:25:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNcWf-0007Ny-4O; Wed, 12 Mar 2014 06:20:25 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNcW2-0007JP-SQ for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 06:19:49 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2B00A6Q88C0Z10@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 15:19:24 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.112]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 94.55.09028.B6CFF135; Wed, 12 Mar 2014 15:19:24 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-dd-531ffc6bb279 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BD.72.28157.B6CFF135; Wed, 12 Mar 2014 15:19:23 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.75.48]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N2B008UY88743B0@mmp2.samsung.com>; Wed, 12 Mar 2014 15:19:23 +0900 (KST) From: Chanwoo Choi To: kgene.kim@samsung.com, t.figa@samsung.com Subject: [PATCHv2 5/5] ARM: dts: exynos4412-trats2: Add ADC/themistor dt data to get temperature of SoC/battery Date: Wed, 12 Mar 2014 15:19:16 +0900 Message-id: <1394605156-7768-6-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1394605156-7768-1-git-send-email-cw00.choi@samsung.com> References: <1394605156-7768-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGIsWRmVeSWpSXmKPExsWyRsSkQDfnj3ywwfxWRovrX56zWsw/co7V 4tyrlYwWvQuuslmcbXrDbrHp8TVWi8u75rBZzDi/j8ni9mVei6XXLzJZTJi+lsXi1cE2Fov1 M16zOPB6rJm3htGjpbmHzWPl8i9sHpuX1Hv0bVnF6PF5k5zHxrmhAexRXDYpqTmZZalF+nYJ XBldR2wK9nFVvOp6wNbAuI6ji5GDQ0LARGL5lLguRk4gU0ziwr31bF2MXBxCAksZJfb8eMgK kTCRuPDzEytEYjqjxI2Dy1kgnEYmiXkXP4FVsQloSex/cYMNxBYR0JWYMvMOWJxZ4BiTxImp DiDbhAUKJeYuDwIJswioSnTNuckEYvMKu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ii0pzU4kOMyUBHTWSWEk3OB6aJ vJJ4Q2MTMyNLI3NDCyNjc9KElcR5D7ZaBwoJpCeWpGanphakFsFsYeLglGpgLHCq8mD6n3Tl QtqbglkqPCylYtuzW2fsDLi05lmzfAmX9kzPtccuiizjNpn1+U1qZ63dUr9H9gc3FXbPzGMQ mR97WT5kapBL1P7rZ5+KT1L5usabRVDF9WSMUCvb7E4xodgTzuGVM7nurji/YUuJ2XU9N7vf q4Smpavc36/3dJfp9Q/Hf4RlKLEUZyQaajEXFScCAM9xS38JAwAA 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-20140312_021947_169776_3E467C7C X-CRM114-Status: UNSURE ( 8.01 ) 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, 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: 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..3228506 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts @@ -106,6 +106,11 @@ }; }; + adc: adc@126C0000 { + vdd-supply = <&ldo3_reg>; + status = "okay"; + }; + i2c@13890000 { samsung,i2c-sda-delay = <100>; samsung,i2c-slave-addr = <0x10>; @@ -589,4 +594,20 @@ }; }; }; + + thermistor-ap@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 */ + }; + + thermistor-battery@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 */ + }; };