From patchwork Fri Jun 27 06:08:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 4433571 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4FCE49F758 for ; Fri, 27 Jun 2014 06:11:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67C5720320 for ; Fri, 27 Jun 2014 06:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67CAC20221 for ; Fri, 27 Jun 2014 06:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbaF0GLa (ORCPT ); Fri, 27 Jun 2014 02:11:30 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:16990 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbaF0GL1 (ORCPT ); Fri, 27 Jun 2014 02:11:27 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N7T005RJD706A30@mailout1.samsung.com>; Fri, 27 Jun 2014 15:11:24 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id D3.3B.24374.C0B0DA35; Fri, 27 Jun 2014 15:11:24 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-a1-53ad0b0c1576 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id FE.07.04943.C0B0DA35; Fri, 27 Jun 2014 15:11:24 +0900 (KST) Received: from chnaveen-ubuntu.sisodomain.com ([107.108.83.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N7T00F4ND6QQ800@mmp2.samsung.com>; Fri, 27 Jun 2014 15:11:24 +0900 (KST) From: Naveen Krishna Chatradhi To: linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, dianders@chromium.org, gregkh@linuxfoundation.org, naveenkrishna.ch@gmail.com, cpgs@samsung.com Subject: [PATCH v2 2/2] ARM: DTS: Add thermistor dts fragment used by exynos based Peach boards Date: Fri, 27 Jun 2014 11:38:15 +0530 Message-id: <1403849295-29538-3-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1403849295-29538-1-git-send-email-ch.naveen@samsung.com> References: <1403849295-29538-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsWyRsSkRpeHe22wwdOTehYvD2lazD9yjtXi 7LKDbBbNi9ezWcw78o7F4vKuOWwWM87vY7JYtO0/swOHx+yGiyweO2fdZffYP3cNu0ffllWM Hp83yQWwRnHZpKTmZJalFunbJXBl/N7wiL3ggWRFz6rVrA2MXaJdjJwcEgImEn9mfWGHsMUk Ltxbz9bFyMUhJLCUUWLfnG9ACQ6wojOrpUFqhASmM0q8mVQEUdPPJDFr1T4mkASbgJnEwUWr wQaJCDhK7JjzjwmkiFlgAaNE667VYEXCAokSz5qOgA1lEVCVaPyiAGLyCrhKXFwfCrFKQWLO JBuQYk4BN4l3bR+YIda6Svx8v5MFZKKEwCJ2iR/v2sEmsggISHybfIgFoldWYtMBZohXJCUO rrjBMoFReAEjwypG0dSC5ILipPQiQ73ixNzi0rx0veT83E2MwEA//e9Z7w7G2wesDzEmA42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fzPWJEy8RbrjryaF284Z9pVz7XWmak7 S2UCp0vrHfOkOqe8i7pxi2vVs09Y7il7yTThsukkmyZtUxE5M08lluKMREMt5qLiRAC0JQUh uQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 creates a thermistor fragment carrying the NTC Thermistor nodes as children of the IIO based ADC. This fragment is included in exynos5420-peach-pit.dts and exynos5800-peach-pi.dts. Signed-off-by: Naveen Krishna Chatradhi --- Changes since v1: As per the comments https://lkml.org/lkml/2014/6/26/271 and discussion about fragments vs common dtsi @ http://patchwork.ozlabs.org/patch/362633/. Created a thermistors fragment instead of a common dtsi file cat sysfs entries exported by hwmon for 4 thermistors and verified the values on Peach pit and pi boards. arch/arm/boot/dts/cros-adc-thermistors.dtsi | 44 +++++++++++++++++++++++++++ arch/arm/boot/dts/exynos5420-peach-pit.dts | 6 ++++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 6 ++++ 3 files changed, 56 insertions(+) create mode 100644 arch/arm/boot/dts/cros-adc-thermistors.dtsi diff --git a/arch/arm/boot/dts/cros-adc-thermistors.dtsi b/arch/arm/boot/dts/cros-adc-thermistors.dtsi new file mode 100644 index 0000000..17fce72 --- /dev/null +++ b/arch/arm/boot/dts/cros-adc-thermistors.dtsi @@ -0,0 +1,44 @@ +/* + * Thermistor dts fragment for devices that use Thermistors as + * children of the IIO based ADC. + * + * Currently, used by Exynos5420 based Peach PIT and + * Exynos5800 based Peach PI. + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +&adc { + ncp15wb473@3 { + compatible = "murata,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 3>; + }; + ncp15wb473@4 { + compatible = "murata,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 4>; + }; + ncp15wb473@5 { + compatible = "murata,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 5>; + }; + ncp15wb473@6 { + compatible = "murata,ncp15wb473"; + pullup-uv = <1800000>; + pullup-ohm = <47000>; + pulldown-ohm = <0>; + io-channels = <&adc 6>; + }; +}; diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index d124394..7c64009 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -101,6 +101,11 @@ }; }; +&adc { + status = "okay"; + vdd-supply = <&ldo9_reg>; +}; + &dp { status = "okay"; pinctrl-names = "default"; @@ -775,3 +780,4 @@ }; #include "cros-ec-keyboard.dtsi" +#include "cros-adc-thermistors.dtsi" diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index c36c9ce..4fd48b9 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -99,6 +99,11 @@ }; }; +&adc { + status = "okay"; + vdd-supply = <&ldo9_reg>; +}; + &dp { status = "okay"; pinctrl-names = "default"; @@ -773,3 +778,4 @@ }; #include "cros-ec-keyboard.dtsi" +#include "cros-adc-thermistors.dtsi"