From patchwork Fri Oct 9 15:44:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 317554 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp2426972ilm; Fri, 9 Oct 2020 08:45:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBtYFT0omwO4QbM/6K9gVjpwHg4t+On5Idkf/bRZXLmzbHJq77xAvYtYxfmVsqUt1i8wc7 X-Received: by 2002:a17:906:dc5:: with SMTP id p5mr15733042eji.116.1602258335868; Fri, 09 Oct 2020 08:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602258335; cv=none; d=google.com; s=arc-20160816; b=U6D4rYvfCMoAu6bPOug3alHe4H4X9yOMzKaygp96cIhP/B1jpwTbm0oUHT65IZX/dD R80xMcT/FfRgMqLxMRSSw0/OiwHv2KatRb0ZpS+alnuDH1GuXES8XkhuVC0Gu+UxMnoA w8IPfXkhoXMvnvT1RZzvo+K2K+5KOEsFwYAkG4jx5AepPTu/40STtznXyTfFtcmX22lY d/dZHduWiT3BAMrDgcELYyu8fiCZ7N747V7Ys3Oqmy9pXCnptXf18INSrSDZzPj7KNb+ uC6fkHXCq3gGnRYAYL+Zigqnt/0zz6xwPDdOtVacnTgO4s1JelYugnl84mNBZaE1uD++ Fw6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IX5J13tHQBhV3OyuAx16FFIRHXqfdlDIoHquJV7x6Go=; b=kZIxifOuO/LekKSbkAiJRg+o8xpy1kefV4wzFkTvwZfCNbxNSg6zv/QR5Cbyz0BF9R d1TLCoqDCQl2oLBL1eg75bKxT3x9q8kkUVd8dP5cPpfUEUSKVJSfYC4XXYIRoy6Bf/8l 1B/cg3U6SOMzzwnQhUwF2/3uinoSO6wcVri8nJ3SOT0fgf+9hNTypH04A89HsN+X36aB MNrnRtLOPoceCKbdu/15Mmp8mYR1vLkjKBcsPwwNNDpi8U5hqvSnXkZQXkWvkM/GbUt3 n1sj/rR3csPmzs4f7bt2wMtpeaiA5nRG7GtxVqlrDtMRN0HLRFWQyorX7HY6IvQnW+df jxVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="OW/J3NuW"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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. [23.128.96.18]) by mx.google.com with ESMTP id d3si6328708ejy.232.2020.10.09.08.45.35; Fri, 09 Oct 2020 08:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="OW/J3NuW"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S2389468AbgJIPpe (ORCPT + 6 others); Fri, 9 Oct 2020 11:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389466AbgJIPpd (ORCPT ); Fri, 9 Oct 2020 11:45:33 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20BDDC0613D5 for ; Fri, 9 Oct 2020 08:45:33 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id y16so8906832ljk.1 for ; Fri, 09 Oct 2020 08:45:33 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=IX5J13tHQBhV3OyuAx16FFIRHXqfdlDIoHquJV7x6Go=; b=OW/J3NuWgPhMJqoOfdBVFraYf0bvh6VUfD9NDs0qFesTezLa3BEyOQPDm1pGtDqfhz DSEiT09DGZOIOPqEKK3b9MqufIMif0m9O2l5cMWpWL3ucBxEm6H94Z9Z55IlK54twjTG ctrihc7EcyCpOGY2yWph6/DH6Ej129C5woSLKuyqaz6lngtc2ySk+XsIWBujE/2VPElr t05o0iSxbYO50tvhq2vEyMIJm1Lt0kuZBd1hmc2TWuma4fMmeRifl48Jypjild4tSnO0 JGLcb6Inxn/bpTGUVSowy1gmD8/mOZAqea6rasV0dcad/sREbxOXIjQ/jNu+E1xxloZV o7aA== 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:mime-version:content-transfer-encoding; bh=IX5J13tHQBhV3OyuAx16FFIRHXqfdlDIoHquJV7x6Go=; b=EtceO/uMnb1kpqHCaMC2pF1SPiREg66ksG/xz4N3g7SvjtoZSKkFKaQVG6SwXdZP6U CyENFb8nAjJyLAnU2uxszvpGjn+tz6XYSzzMPLKSFfx9ADW5ctw+EEiUijGbjdMmsAul 7EUc9z/VhKULzKl0IGDkyw2lQlYqxsCXShfYdB8ZWYww5w76tiPOzSx3koLS6fAI/Ylm yXkBEs3tzOajpCWlz+B8Y8y0R7w/H+7f5fgM8pjYSyBCGh5OW6R+tT9mfBrULH2ejbmn ynOXn3aQ1s9+cs6VSQAgvXLYMqfoSNNNqkaxT930oTRoMF+eg8BLA3eVRjajUI+7QIG/ T50w== X-Gm-Message-State: AOAM532gGGkiJw6etbS/Dr/aFFpntgFLqwZmfdW2fI6CQofK4CHln7ME MWAQt+kQ+od2fnNlIS/v6f6OXfpiRyclx+DR X-Received: by 2002:a2e:b557:: with SMTP id a23mr5586986ljn.0.1602258331537; Fri, 09 Oct 2020 08:45:31 -0700 (PDT) Received: from eriador.lan ([188.162.65.231]) by smtp.gmail.com with ESMTPSA id r4sm1505597lfc.162.2020.10.09.08.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 08:45:30 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Zhang Rui , Daniel Lezcano , Amit Kucheria , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Manivannan Sadhasivam , Jishnu Prakash Subject: [PATCH v8 10/11] arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5 Date: Fri, 9 Oct 2020 18:44:58 +0300 Message-Id: <20201009154459.106189-11-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201009154459.106189-1-dmitry.baryshkov@linaro.org> References: <20201009154459.106189-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Port thermal zones definitions from msm-4.19 tree. Enable and add channel configuration to PMIC's ADC-TM definitions. Declare thermal zones and respective trip points. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 207 ++++++++++++++++++++++++ 1 file changed, 207 insertions(+) -- 2.28.0 diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index 98675e1f8204..95050f7d11f2 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -24,6 +24,104 @@ chosen { stdout-path = "serial0:115200n8"; }; + thermal-zones { + xo-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 0>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + skin-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 1>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + mmw-pa1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 2>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + conn-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150b_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + camera-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + skin-msm-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 1>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + mmw-pa2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 2>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -378,6 +476,115 @@ &i2c15 { /* rtc6226 @ 64 */ }; +&pm8150_adc { + xo-therm@4c { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + skin-therm@4d { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa-therm1@4e { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm8150b_adc { + conn-therm@4f { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm8150l_adc { + camera-flash-therm@4d { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + skin-msm-therm@4e { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa-therm2@4f { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm8150_adc_tm { + status = "okay"; + + xo-therm@0 { + reg = <0>; + io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + skin-therm@1 { + reg = <1>; + io-channels = <&pm8150_adc ADC5_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + pa-therm1@2 { + reg = <2>; + io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; +}; + +&pm8150b_adc_tm { + status = "okay"; + + conn-therm@0 { + reg = <0>; + io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; +}; + +&pm8150l_adc_tm { + status = "okay"; + + camera-flash-therm@0 { + reg = <0>; + io-channels = <&pm8150l_adc ADC5_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + skin-msm-therm@1 { + reg = <1>; + io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + pa-therm2@2 { + reg = <2>; + io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; +}; + &qupv3_id_0 { status = "okay"; };