From patchwork Mon Jan 18 14:51:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 365548 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp30565jap; Mon, 18 Jan 2021 06:54:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB7QOTMM3FknJ5/stPXYDeLusfzOvom5eQWdve8PcxW2UsTNigH1ZMSFn8QdCDM0foJGTQ X-Received: by 2002:a17:906:178d:: with SMTP id t13mr32432eje.455.1610981691723; Mon, 18 Jan 2021 06:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610981691; cv=none; d=google.com; s=arc-20160816; b=AdcdH+0FG9s3PZTiqM2CeMxP6Yrbh1ZZPBtVSTktnum2mEJexOcj0RpKlac+4m1UZU tqVMHRVcaU52/N8KfeCt/vLDe+vjOfqejoviHDnhpkRcR2gLHjcMZ6aiOKA1HwmrlXkh hmYwZAb87BWbaNgHXQseuTO095+7MHnwPhWUmXl5KPv4BFpmEatyOVYwzIfaX7WjXAXg zKC01Fs64Qt5Mc4Bmrc9QAXsm3duwKue7hkVlTrf/FmRy15PUfYPO5+Z6ZYhQuhJ/G4k YtHko7oG0eqtThLKX+P8dllpmGe4ovBxt1dbEUj78GFPUs9K6CpphC9kc4jLYO17oqci fzbQ== 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=PiP8LcJ6dWMmCi/kSyfEeDH6QqluhGAB6bpen9IBBv8=; b=aJBt2JlPgoFCkEpL/031U1/BU8nAd3k4haNNn8tx02jo0R9mHLA18baWLdNSZWbZec emaP66uLkOx2huuF8egBOa3oNQKxp2u2zOx4qJj/QGbw2p9zwRnCOdkwuz8142B01cOD kJuM2J02D+dvKHNrMyuBZX15sOApfWyAUxet4SRd0PhbRxFZFh9pGbgNfoHzt5lBmlK6 HvdS1oUf8i300odTGabdmigEKwpY7OdbahXFvX0IdLMbWaK8SkMDVm8Nhe4NnVTXqtLN 7ldwXNoK+5lWEw7SWcdo03EgF+nZlp7JbnYLUyKDhb+Ssa2wxz1bEr2IsZOdL9e2hndZ ZDQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JPSMWfHr; 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 f12si7754199ejl.311.2021.01.18.06.54.51; Mon, 18 Jan 2021 06:54:51 -0800 (PST) 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=JPSMWfHr; 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 S2405313AbhAROyH (ORCPT + 6 others); Mon, 18 Jan 2021 09:54:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405317AbhAROx5 (ORCPT ); Mon, 18 Jan 2021 09:53:57 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B06AC06179B for ; Mon, 18 Jan 2021 06:52:12 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id x20so24424671lfe.12 for ; Mon, 18 Jan 2021 06:52:12 -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 :mime-version:content-transfer-encoding; bh=PiP8LcJ6dWMmCi/kSyfEeDH6QqluhGAB6bpen9IBBv8=; b=JPSMWfHrhshM7I5+iS9m7ICSqVf8qobJm2EvetCNvfvUKYYnwHoUScTV/OMQJEjOB9 ZU6YqE8ADW+3oQbKNnCG43Xa3W/N8DzKgCRSv+FLevAUgP9U30H6Mh4SXfJloHX7OZ6P vON6hh4PQTfuGTDsSl1Rz90nZy3W+PFIBrqEqPGMotR9pTOPvul1dWUtbQO2p90aUseW VlnHvaw0VLHQbMkoUM/0dfrRAamYy2c1v5TLOP98cU5hTDqvKfSlQtSXsmVoOT95AOQe M5C+tB9khQ/pcD46DcpURnSV8GOyecTz7u5Tpf14t81dufOIyqOdwt8Re7kpYBewRo1Y 4/3A== 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=PiP8LcJ6dWMmCi/kSyfEeDH6QqluhGAB6bpen9IBBv8=; b=lE9ujzvUILdLDW6UUPIjr8IEVFjYQXvm0KNykDl18NNTaja9GYWOr+oI5YMluOP7Lm iJj8iuKi2xdkT3t/3UI8Z1VRwmKMMT0JHjl7/fpN9lAR8WouZqBA+aEqLTQ65ToU7Xjv MIzlqd+Yghx1hgEzGgvkHb6qA+gGqfu6bBeGS8RcvuVWHnULXS1BAm7IZ+2cJfDwezdZ 9KYPnm7W7wggJmP3H7pySLJvLs7OztzLS4oC41YdoYmd9GDTf8RAEt8s5AgyTFXwJ6IZ waW9DO4x1kHqX8ohHwh5gGe0Znc6AKhUWTn4CBLmns1lEjAzipXzfz8hOD+FyIVKa2HD GGPg== X-Gm-Message-State: AOAM533PHQbaMnFrAawuTEZMqr022AwwgasofcJvm6wYe+kSwzViesdf Miqr/svhP9K6TDCX+aNxCWUrNw== X-Received: by 2002:a19:3f12:: with SMTP id m18mr10602394lfa.519.1610981531120; Mon, 18 Jan 2021 06:52:11 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.4]) by smtp.gmail.com with ESMTPSA id h13sm1969697lfj.110.2021.01.18.06.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 06:52:10 -0800 (PST) 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 v11 4/5] arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5 Date: Mon, 18 Jan 2021 17:51:59 +0300 Message-Id: <20210118145200.504951-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210118145200.504951-1-dmitry.baryshkov@linaro.org> References: <20210118145200.504951-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 | 209 ++++++++++++++++++++++++ 1 file changed, 209 insertions(+) -- 2.29.2 diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index dea00f19711d..092ec5da82e7 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -24,6 +24,106 @@ chosen { stdout-path = "serial0:115200n8"; }; + thermal-zones { + camera-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + conn-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150b_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + mmw-pa1-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 2>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + mmw-pa2-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 2>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + skin-msm-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150l_adc_tm 1>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + skin-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 1>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + xo-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8150_adc_tm 0>; + + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -378,6 +478,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>; + }; +}; + +&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 { + conn-therm@4f { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <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>; + }; +}; + +&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_rtc { status = "okay"; };