From patchwork Fri Dec 4 02:55:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 337716 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp818722ilb; Thu, 3 Dec 2020 18:58:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDa5c1qpfvifpgZ+jiZYPzD3QuQF3PKaiGa+dqNkrNRYWGCXwM9wKSs0m8bDgR9zCbCpqS X-Received: by 2002:aa7:cd9a:: with SMTP id x26mr5516715edv.226.1607050715799; Thu, 03 Dec 2020 18:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607050715; cv=none; d=google.com; s=arc-20160816; b=LsqcfV3BdFryZOqgOkXU5A9ePYsX5DVyLz7JjqeLRmNbTd+j25gaAHFvW9Ovzuj3kz xL6sybsR7WqnbmAn842I3v/MHQQ0HJlbmgbuZHVAvfg2gNkHJrIswfT5KIPC+z1vUz9o 7V1sLC3SqPzpkkFWo9tAtke5G25jnBd66hYWRbqemLdCT7l5fKDHcQV1O+bH+lapSY76 97QSAIqWNooLb5Lehky72NtlNu41osFS6r5FVw85JDKFWYaM8sSJGddXuPiZgOSHJFVy B0xC4Ieg0lQ0vJUmzUJ0LVhlym05i/QOyWmegPvJo6y8qbJtpOL/ffOXi/D4v2N7u4Dn m/QQ== 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=kCvCs+cGpNSti6aevLirLO4rjYdZ0p3eaXG4O+lrgLs=; b=uQupDg4vpGRUiXFWGhbTX8tBcLaJrRQtT4IBAd1FolqQTE1B3bo+CAxZNq84mzoANo rT13fO0646I8oBpOKzA0xuO41AiAzyrH3cxuXhtEdTE1cMtioTiZqU2EuV5o/HD/mexA PBXEbY1ajxs1w0BljTObk3jyGfRFva/7HnEKDhRJqu4M476TJQDeXr3ZDREKEspkzWCK YOlL+uIz/V70wlVXMk+lzSTohpEU7HH9cRj5GdRyiGBjHqsydLr4zbWMJa6bJB4SVRT9 LT2Zi7gxj3Z921TuAFnwrtn8XP/uvffKEiIBfCXvzeZoXPauNloW9dJcjQF8oSFR/rK7 34YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fOmdg3NJ; 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 i19si558396ejr.557.2020.12.03.18.58.35; Thu, 03 Dec 2020 18:58:35 -0800 (PST) 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=fOmdg3NJ; 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 S1727403AbgLDC5l (ORCPT + 8 others); Thu, 3 Dec 2020 21:57:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727407AbgLDC5k (ORCPT ); Thu, 3 Dec 2020 21:57:40 -0500 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50CBFC09426E for ; Thu, 3 Dec 2020 18:55:47 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id r18so4953907ljc.2 for ; Thu, 03 Dec 2020 18:55:47 -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=kCvCs+cGpNSti6aevLirLO4rjYdZ0p3eaXG4O+lrgLs=; b=fOmdg3NJ32xmlEOp9JcOTRPOpiYq/GLxbjyvA5h5xLUpkQkEyALFKLZIvhWkjtNs1w Uva0IN8zBoKy2ty8ey39I7VKW8WIDV6cXEwV9oCk0neNmv93ZOjgWEmRqZhCeBRPsAX5 afKTTj5bpysdhE5+z1ZcAVc07/I/23zUZvSWW40RC/KYEVb2lW5+0kjSqH8pEDBrGOsy dwtMXp8BC/0wB3TQ+MSPp6e2klOQ1uKF1ZVEEo6+NOFwPsP0HQZ1+EBLb3XZybQ5F9iV dRFUV1/UC02VcMLElCk6gOYanZFHFbdjYTAFps8tjp3LAhe/VL1h9WaMLZ+FueR33ZZF yFVg== 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=kCvCs+cGpNSti6aevLirLO4rjYdZ0p3eaXG4O+lrgLs=; b=Z/xBV4Ho06Rt3NQ3KU7GnLTodB8sKP08qvefFWWsbT/68csPjd0ONZY6Lv6NGJwBa+ weJzphNcw9ObDdSR2tKVErPsPn3pvx3U6vIHQ56HM7SZrngeeOZFdc2LFaXsmY+ClPe4 DIkLiJRpqGq7yyRaWCKMsXI/+xSgt6bxi1piaEYgBkL8oVrUNLVvMG7QU5Szg8FVcecZ YKWXrj7SiZDtDlB/sNHN9VgxhSQo0lhM+Bf33aYP17wdIeJJAn0ry05OOi66E63wKWvf rI69Juxjua3/BbCICAFhWkq3L4DA/cKh/Q4GJ30Pc3kf8vXJqLK6+ygnEMO4Rr9FPCfV aFLg== X-Gm-Message-State: AOAM532u0lpU3b46MIqytSqekR1RycWWp1PDmJuW6cSrES5sv53X+UiT AA4QhiV1U4INE6Ygyvxqph2Omg== X-Received: by 2002:a2e:3216:: with SMTP id y22mr2403746ljy.178.1607050545872; Thu, 03 Dec 2020 18:55:45 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.117]) by smtp.gmail.com with ESMTPSA id b8sm1131667ljo.68.2020.12.03.18.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 18:55:45 -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 v10 14/15] arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5 Date: Fri, 4 Dec 2020 05:55:08 +0300 Message-Id: <20201204025509.1075506-15-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201204025509.1075506-1-dmitry.baryshkov@linaro.org> References: <20201204025509.1075506-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.29.2 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"; };