From patchwork Wed Sep 30 10:02:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 313886 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:1081:0:0:0:0 with SMTP id r1csp48124ilj; Wed, 30 Sep 2020 03:02:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGofffwht6Pn5c8B7xdu2h6I/oAZ7X5WWQUVKFWeM7rm+wX2ABaczzioKp5UnRjFB/Tzqj X-Received: by 2002:a50:e3c4:: with SMTP id c4mr1908611edm.90.1601460166123; Wed, 30 Sep 2020 03:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601460166; cv=none; d=google.com; s=arc-20160816; b=zWDHrsv6tvByBNwRpFA7RIfjcMFw+SuBczQl07aJblF//64WG0SmF37I0sGkR4fX0d u3T4FOgTCAiR63jrszYhELwTpk7nC4lLRe2zmUU8oF58z4zrKP9Ehao5AVYJJhtcKE2G FsE/XaXPenyD3Z7XKbxduQ8A1QYAJWLFDrp36i2MhJjALV9XHbf0yqbDVX4tdh7LD3dV VhFqMJYBNOmDnV9YJr59uPZkqBpbGw3czEx3r96kzJBOeS45fZNwFqHEbQzTdxwRH0uL QtAvQzNQaA3khRzXDUYfAmaUUMkZOvfQ153wiPr7N6xTllCmx+4Rt2vwgHAZUlHp5SWI dvew== 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=0BX47xYPRl2ntUSRDODnxEZ8z0xfWMTgkLrEIea3zW8=; b=bfnnjx39WQE+64/GBMNO5azyuqnkCbJcNrQcb9gcr3HUq83WuDG1mcQd9bKsWBP5Q2 +YASaBX2DAAZ8A7U5eqAz3mGNGrrYs3eoHBVkT0hCSecWkNiqKfw3BS4Jsuf4n+Se31K p/AtF1sRxKG3KE2sWnbwjSkTBt0Ouz7gWhyS7YjPkOvf5SDbP/UxPYhrPwP2SlR0I/M0 3pZCOcU+Q+KQ8xOS/C2bAxDSOUvoL/5LuB2/5s1oTbNu5qj9EfWtzE67mBy0H/fF2HIo Nsz3Z5aChaODmx+s1mNyyxyk0kLj9P/4TbqwZgPu1J7cgEHQUtHdHXLLhm8IbnfOmcYS 0bmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=swaCo5Md; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 b10si732144edq.484.2020.09.30.03.02.45; Wed, 30 Sep 2020 03:02:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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=swaCo5Md; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S1729432AbgI3KCo (ORCPT + 10 others); Wed, 30 Sep 2020 06:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729397AbgI3KCn (ORCPT ); Wed, 30 Sep 2020 06:02:43 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B00DC0613D2 for ; Wed, 30 Sep 2020 03:02:42 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id z19so1411938lfr.4 for ; Wed, 30 Sep 2020 03:02:42 -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=0BX47xYPRl2ntUSRDODnxEZ8z0xfWMTgkLrEIea3zW8=; b=swaCo5MdJqBb9l87kDqE0EBPcn3qTEoIdbCBY7XjaJZrYvi3LBtsp1vb1nmBeU18in sUEYQg4HI0UYukTYqcRNo0CKJfubXCGdLGVNLMX5XYdPZIlThQo2PCvikmbf5hM5y5qs UU1xdqi8M9ulZpCnG7+4MYgtFg4eEI23f0tN0i1h7B1GJgDhSimthj6r0y8FHWY4T3/z tlZJPCfsjBr1KkCpnh++U8er7qB3DoUUZvdJWISu+mGaymHTSvdZL2XniRCxwCQ+1TiC UQEcH4kMyr3E1/KiD6UzdLoTOI8P7hpexn7Fvs8lUt4YNzXo6Y5HiR9qBusowRGYxEu/ 0E7A== 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=0BX47xYPRl2ntUSRDODnxEZ8z0xfWMTgkLrEIea3zW8=; b=YjMg+J+KzRq2ewUol4v4Paj9ah4pt/nHG3mCQbr1hklpPvSuilxcdDLvOeAfuecz2t TBjB3ZzqG56gte+7xcowiX/zvff76FwvF37M9wKse3XqWhttVbvA1eH1kxZhW+lmZ1+c R1ny1z7dv6fTfX5NWmrazSit1XEcpGxmSBmsklFkIKOVAcY5lekABcoG4rQRVeVxlm0b Uf7cn8uXCGf9qW0oC1gK3B53aRyx+AmL7lhtmPJPNFbXeJY/cya6fUaNgxPLeZXux2fE 4UJtnECTxJzSr7QGSYpwtdJY2h0V+By7luhw/Blr3uw1wMq2ZOxr0vPsHIRbUoq1efXC fpDw== X-Gm-Message-State: AOAM531lbpr1M8p53KYdR62QeTa85gfXcspB7H+rqXCkoHQyaTZNTnN/ /Gyni57dyHFe051PJ/UyHFGQsQ== X-Received: by 2002:ac2:5382:: with SMTP id g2mr584156lfh.140.1601460160628; Wed, 30 Sep 2020 03:02:40 -0700 (PDT) Received: from eriador.lan ([188.162.64.138]) by smtp.gmail.com with ESMTPSA id w4sm132479lff.231.2020.09.30.03.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 03:02:39 -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 v6 09/10] arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5 Date: Wed, 30 Sep 2020 13:02:02 +0300 Message-Id: <20200930100203.1988374-10-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930100203.1988374-1-dmitry.baryshkov@linaro.org> References: <20200930100203.1988374-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 fd194ed7fbc8..66da94f6956f 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"; };