Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1677954imu; Wed, 12 Dec 2018 02:19:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/XiCLUUFh25AnSvsLL9UBIj6B2Uuki04sTgMmq2LbsG8XCWPR89yrzmj5pghnJelBGzmb2/ X-Received: by 2002:a63:b17:: with SMTP id 23mr17886395pgl.423.1544609994679; Wed, 12 Dec 2018 02:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544609994; cv=none; d=google.com; s=arc-20160816; b=Kj4/+p7MNRHiqzH3dK0odcb03/fWdX+Ejy9/neSnpoZ5deLNGLV1KwygHxXRHx+Ncq FUv6QeveCqp3KoVTa4WJSIUp8CE9sgzt8QxTPO/oOx5FMQ3jIbbHYZFfsEqazGTMd31f E9UJFBPbBiRzfkxcCNFzElS1Xv7Vx1zEmIcQUw7188T8D1kwfTwVKkO6OQg0SxJnbbob b2yzlsL1/1fVzbosgFjWy4MQb8XAqwSuwvivpf/GDsgNGIW15L6T5srVexeEZQbrI08w HLrbjytyckdXLxpvP2ccUsJfbFhOJZQ4k4JYt3xuVuBofC3/8WGeIhomcAw/NqkOkgty 8m4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=8mNwIcZt5Lt2n8wj4VXXXoeux1aENwpBV0Y6Q1/l4rk=; b=QJ75QdhDFsCA48eeTiYiCMAKmXToQhZIO2girZHAKQRFl0Hrgf1pOYhS1TwO6XA+Pi sVrDmfsswVlGT+M4Ro578AnCv73Y5z4Rw6iv2zHPrBi8qjfnX7jL/Dd7+hWvjDRYv5vo AWbLX6cuWEBQmvckUMxCCo1+NwyuA7MefodrKVGkxvA3Ai6PQy/sCwmZ4lP0+AvWBFKp 7RQM/oa9Yx8kQA0XCNTj8reNgcXIvQ9QORLjaIITAY+LxAzguaAXPLjCyNpk3v7vUSCe KotEHpIb2i6Tl4EGOhyJo9vODpbfh4bnzTd0ARg7jxZBijTVZhiCbziEU1gkulxugsEW fPwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KAIVvxYG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si15208670pli.418.2018.12.12.02.19.39; Wed, 12 Dec 2018 02:19:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KAIVvxYG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbeLLKST (ORCPT + 99 others); Wed, 12 Dec 2018 05:18:19 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34960 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbeLLKSS (ORCPT ); Wed, 12 Dec 2018 05:18:18 -0500 Received: by mail-wm1-f65.google.com with SMTP id c126so5288054wmh.0 for ; Wed, 12 Dec 2018 02:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=8mNwIcZt5Lt2n8wj4VXXXoeux1aENwpBV0Y6Q1/l4rk=; b=KAIVvxYG7SHFmcDvNIucb0RamOZIUfDB7Z7dq0cmWNz59LBeTh/QBjfzHJtTq2pO46 XTXCmlsZpOBzj0w1zUXH5EXQHQSvvBE6YBLHPZ8IqLWV65fil32PwxW5R+keFYV3v7CZ 5NY4KNEOfapmpRdk1fCBy37XAl2pF+mcd+Tu0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=8mNwIcZt5Lt2n8wj4VXXXoeux1aENwpBV0Y6Q1/l4rk=; b=Q/21K4sLRMQykKvenIouoGIidWu+dGm9v1yEcWdwT5PZH5k/mKrSxBdMxC3N+jl0rZ 242gSkeNhALqhpExAZNkaeGlc61rmYc57Zq1QrDRV+XbBIsiyf8X4sUlAcY2/mFQH9m2 uJ9b7U73LI9EmtABvPhRfGXKHsPIWtgxmh0x9vGdul0Ik9LDTfFDaC3YPzRecTKs3moc OojiENtv5j3VgqC4MNke7GVelt1AMdQE65cbIWv1Nc9O8sem6k2ED3Ma89geo3+dH+U4 CNdKIznAztRFQq85JLDwTN2Xq73PRVb1dn1xWAoUohfdlZQXUfjrV6gCovENDqomofsM bsXQ== X-Gm-Message-State: AA+aEWY2tGnYWYS0by+a3TuNoPPfH5ARnkz+3xBk2DZGTCUXjom3vM0m x7tszD+XUnPSNmbmHRgZjLeHOVEFxWU= X-Received: by 2002:a1c:8f95:: with SMTP id r143mr5519629wmd.65.1544609896321; Wed, 12 Dec 2018 02:18:16 -0800 (PST) Received: from localhost ([49.248.93.253]) by smtp.gmail.com with ESMTPSA id w8sm17862512wrv.7.2018.12.12.02.18.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Dec 2018 02:18:15 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, mka@chromium.org, khasim.mohammed@linaro.org, devicetree@vger.kernel.org, David Brown , Rob Herring , Mark Rutland Subject: [PATCH v1 2/2] arm64: dts: pms405: Export PMIC temperature to thermal framework Date: Wed, 12 Dec 2018 15:47:55 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PMS405 PMIC has an ADC that exposes the on-die temperature that we wire up to spmi-temp-alarm thermal driver. This allows the PMIC temperature to be exposed to Linux through the thermal framework. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/pms405.dtsi | 79 ++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pms405.dtsi b/arch/arm64/boot/dts/qcom/pms405.dtsi index ad2b62dfc9f6..1bb836d1e8aa 100644 --- a/arch/arm64/boot/dts/qcom/pms405.dtsi +++ b/arch/arm64/boot/dts/qcom/pms405.dtsi @@ -3,6 +3,32 @@ #include #include +#include +#include + +/ { + thermal-zones { + pms405 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&pms405_temp>; + + trips { + pms405_alert0: pms405-alert0 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + pms405_crit: pms405-crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; +}; &spmi_bus { pms405_0: pms405@0 { @@ -45,6 +71,59 @@ }; }; + pms405_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pms405_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pms405_adc: adc@3100 { + compatible = "qcom,pms405-adc", "qcom,spmi-adc-rev2"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + ref_gnd { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + vref_1p25 { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + vph_pwr { + reg = ; + qcom,pre-scaling = <1 3>; + }; + + die_temp { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + xo_therm_100k_pu { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + amux_thm1_100k_pu { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + amux_thm3_100k_pu { + reg = ; + qcom,pre-scaling = <1 1>; + }; + }; + rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>; -- 2.17.1