From patchwork Thu Jan 22 21:54:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 43543 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA340240DB for ; Thu, 22 Jan 2015 21:54:39 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf2383028lbd.3 for ; Thu, 22 Jan 2015 13:54:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=p3poSGGkyP0R/osDIqb8qW4Y9UBWt8emHwgviKJz3Fc=; b=E2vSAqs8TUr4rjavE+RoZ5eLU36M3xpAR9M2WphgCKr9CsB4RHuxHXr6O/hNv9uST3 P9apZB+0L8NUuzk6WQAM5CWCISFB0fsx0q593rADzqgaDT+QLpYkyu1/IWbtnU+sZPRh edtxeo/XovdW9dt6MXa0arqrg3wgPNa+w4rddOA/kVzU95zb1sbBs+huxOtuzQX4H/Ds IxTEeozbOCGnK83QIjfNaa8UkWIVG0Jk6jAYLrPIO9AueT2WUaMbMgMZS8EH2mG/AI25 /0qIqXK3vcJ6oGxETI0G4j4e2d5HXNMv1w6uBSRSSOh6JEK5XqHvqm6TpUqDd9Xld6pC TMFA== X-Gm-Message-State: ALoCoQk65zilZfllel4MOoDL3xxyyTCpoIfutsW5GI095ra5dbuXl3msRsviNDX4hlQOyuUyX1+2 X-Received: by 10.180.7.226 with SMTP id m2mr683780wia.5.1421963678653; Thu, 22 Jan 2015 13:54:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.229 with SMTP id v5ls212884lav.11.gmail; Thu, 22 Jan 2015 13:54:38 -0800 (PST) X-Received: by 10.112.119.139 with SMTP id ku11mr4179318lbb.76.1421963678425; Thu, 22 Jan 2015 13:54:38 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id ol6si21869963lbb.11.2015.01.22.13.54.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 13:54:38 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so4165538lab.12 for ; Thu, 22 Jan 2015 13:54:38 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr4103028laa.80.1421963678138; Thu, 22 Jan 2015 13:54:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp35254lbb; Thu, 22 Jan 2015 13:54:36 -0800 (PST) X-Received: by 10.68.68.201 with SMTP id y9mr5802504pbt.110.1421963674590; Thu, 22 Jan 2015 13:54:34 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id or10si9118305pdb.192.2015.01.22.13.54.33; Thu, 22 Jan 2015 13:54:34 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752925AbbAVVyc (ORCPT + 4 others); Thu, 22 Jan 2015 16:54:32 -0500 Received: from mail.kernel.org ([198.145.29.136]:46960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297AbbAVVyb (ORCPT ); Thu, 22 Jan 2015 16:54:31 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7009220256; Thu, 22 Jan 2015 21:54:30 +0000 (UTC) Received: from localhost (c-67-160-101-93.hsd1.wa.comcast.net [67.160.101.93]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45FA420251; Thu, 22 Jan 2015 21:54:29 +0000 (UTC) From: Kevin Hilman To: Kukjin Kim , linux-samsung-soc@vger.kernel.org Cc: linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Javier Martinez Canillas , Sjoerd Simons , Kevin Hilman , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Kukjin Kim , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3] ARM: dts: exynos5422-odroidxu3: add on-board INA231 sensors Date: Thu, 22 Jan 2015 13:54:28 -0800 Message-Id: <1421963668-28359-1-git-send-email-khilman@kernel.org> X-Mailer: git-send-email 2.1.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Kevin Hilman The odroid-xu3 has 4 INA231 current sensors on board which can be accessed from the Linux via the hwmon interface. There is one sensor for each of these power rails: - A15 cluster: VDD_ARM - A7 cluster: VDD_KFC - GPU: VDD_G3D - memory: VDD_MEM In addition to adding the sensors, LDO26 from the PMIC needs to be enabled because it's powering these sensor. Cc: Javier Martinez Canillas Cc: Sjoerd Simons Reviewed-By: Sjoerd Simons Signed-off-by: Kevin Hilman --- v3: extend existing i2c_0 node v2: use "ti,ina231" as compatible string. Applies on top of "ARM: dts: Add dts file for odroid XU3 board" from Sjoerd Simons. arch/arm/boot/dts/exynos5422-odroidxu3.dts | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts index c29123c0734d..38694a4a5417 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts @@ -174,6 +174,13 @@ regulator-always-on; }; + ldo26_reg: LDO26 { + regulator-name = "vdd_ldo26"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + }; + buck1_reg: BUCK1 { regulator-name = "vdd_mif"; regulator-min-microvolt = <800000>; @@ -330,3 +337,35 @@ &usbdrd_dwc3_1 { dr_mode = "otg"; }; + +&i2c_0 { + status = "okay"; + + /* A15 cluster: VDD_ARM */ + ina231@40 { + compatible = "ti,ina231"; + reg = <0x40>; + shunt-resistor = <10000>; + }; + + /* memory: VDD_MEM */ + ina231@41 { + compatible = "ti,ina231"; + reg = <0x41>; + shunt-resistor = <10000>; + }; + + /* GPU: VDD_G3D */ + ina231@44 { + compatible = "ti,ina231"; + reg = <0x44>; + shunt-resistor = <10000>; + }; + + /* A7 cluster: VDD_KFC */ + ina231@45 { + compatible = "ti,ina231"; + reg = <0x45>; + shunt-resistor = <10000>; + }; +};