From patchwork Sun Jun 21 19:35:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 191299 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp443215ile; Sun, 21 Jun 2020 12:36:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye+9Ia4z+fcfs8Kad55XygpquwFfQHz5DM6iQqm69f/G437/63N1Jsuj5ztmr4MrsDQZE4 X-Received: by 2002:a05:6402:659:: with SMTP id u25mr14195905edx.124.1592768165452; Sun, 21 Jun 2020 12:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592768165; cv=none; d=google.com; s=arc-20160816; b=Mlk/e0xu2lxZj9/oeNsTjyImYK4tqoBNltLKIv6B1XBgsu7Mk7fVd0VM9gSc+Z3wB6 A83e5pqdNpzoAJkjAPnPxsbY2m6KdBh7olbc92HlcIJ+k3ttPnug0esHPMLjxnkWdAwW XjL+e3I1GwUgVeJa1eTDYlS/Gj0U7EU3+8IFSe2dqtFUY4/+Fwd43kutk5Mg43+Z1HGV /DT1eMxhBcvsoLfM7MqGVn/Av/3RkyjY4WG/Eypk8dSqTu74Tbliycqh6uTcJ+27DyGG vbG2hQ+B92zJf1aAlRGRxD9VfL5uMtfBzbTnz6BqgW6eVBu7LT87FBWiXvUuYQF3DgGf VIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1ErXkZf7BLCpg6GnDRfFbSB9VliQZ1SaYRDHnOq2XmQ=; b=X/pvPbsn+lTWpkWGa2phkqg4taxo3EFJmV8SpjJB3VVGRKv+SmObLCnncMZAIz8d9g PuFyL2+V0BdfMKpkIqAFMYQ8yDgN4htjKZ5zJpFzhIYurtWbMb9gnU52GNy8bj4Nth9G ryvLt3kM2q/YVUCHz201OXws4L63tAzUEHF9wv4ZTb9RfEh2ZoopjbvX24+E14Hy9L1R Nm5wthQQtPMx3loJxYqHScfGcD8iBxZRP5TPFBwwyy5o9rF6pmUDmMsS+UkjIoKk2O52 nVtX/K+Z5Sk9OPmt/k9/sQiMjeM+DLnRdfFCEfvfBGYqp0kZ1gIuUufk5YXBjKpwyiiT Al7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FxDenOYF; 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 g20si3105175edq.447.2020.06.21.12.36.05; Sun, 21 Jun 2020 12:36:05 -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=FxDenOYF; 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 S1730535AbgFUTgE (ORCPT + 6 others); Sun, 21 Jun 2020 15:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730510AbgFUTgD (ORCPT ); Sun, 21 Jun 2020 15:36:03 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 149BFC061795 for ; Sun, 21 Jun 2020 12:36:03 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id k15so1379800lfc.4 for ; Sun, 21 Jun 2020 12:36:02 -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=1ErXkZf7BLCpg6GnDRfFbSB9VliQZ1SaYRDHnOq2XmQ=; b=FxDenOYF/A25j1VglXtu1i1YXkjt6BN1uw/1Pl65aRzdJTSHJot639NR/ARSNVJ+F6 xNRewo7x5sOg0i0gK1tOpUELDEI7C5+GzmFYMk5uzfLJjkLNGTYH17XazC6i2t+IE2s9 RjHP5Acy/RY/JUnqyX6CcrvKUZoteZ/917pdCH9Yfc0tfYvTuCe0/madFMzUBJwHieKB 4/OKykeF4H9qhdGcSPpGjuhzBpRDFQoPsA2hZ6MxmYBnctHwrURyAJD0l1cDWv6377HY 0cQs5sjr9/M25+lNQ9jUFGBTutwEDU6L4Xipu/Clqz6X0vCh/s+dppWmDHLsz+zr50Ke LoTw== 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=1ErXkZf7BLCpg6GnDRfFbSB9VliQZ1SaYRDHnOq2XmQ=; b=ECUqkSp+ojzR2abxGTKBV2Xt0gRaCAXmsgAK+rP+Smvq3sR8oSEJWKv4d6gaU3iZg6 OK0zYcVNfST2zDvGl71q2Zezlc8EIX9XVBC0P2Exz7BuWLlC2GpWeOMtgrwlyhsmM8tj nFu7H1xQ8QUIlwfnD9p9CDODblSJwwDNYwbR+k7kRuS+W9uVcyFyJxq3Eq7Jwtg3x1WJ iTppBHHo66bBx1P6nnNQjkZLOxI31gGJv/SzDkLeiXVLZwazmLpDLraTEd9x9UmN0MY+ PoFtqQqd46V8QY3wa5O35jJh7LjlDFPjbJz2Bdr8/MCHhHz12wBiuhFyLGcbdxHkw9P5 Ce3g== X-Gm-Message-State: AOAM531oPcvu+a5DXkxbQfDlXW/gxdHEyznpAhyLv+qjXey4eUM5AAnq RKrIu+pi89OzEUBEnLKgueY1lw== X-Received: by 2002:ac2:5e6c:: with SMTP id a12mr7842921lfr.35.1592768161337; Sun, 21 Jun 2020 12:36:01 -0700 (PDT) Received: from eriador.lan ([188.162.65.109]) by smtp.gmail.com with ESMTPSA id r13sm2917854lfp.80.2020.06.21.12.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 12:36:00 -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, devicetree@vger.kernel.org, Vinod Koul , linux-iio@vger.kernel.org Subject: [PATCH 5/5] arm64: dts: sm8250-dts: add thermal zones using pmic's adc-tm5 Date: Sun, 21 Jun 2020 22:35:49 +0300 Message-Id: <20200621193549.2070434-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200621193549.2070434-1-dmitry.baryshkov@linaro.org> References: <20200621193549.2070434-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org 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 | 237 ++++++++++++++++++++++++ 1 file changed, 237 insertions(+) -- 2.27.0 diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index aa37eb112d85..78f0cf582a9a 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"; @@ -355,6 +453,145 @@ vreg_l7f_1p8: ldo7 { }; }; +&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 { + 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"; + io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>, + <&pm8150_adc ADC5_AMUX_THM1_100K_PU>, + <&pm8150_adc ADC5_AMUX_THM2_100K_PU>; + io-channel-names = "xo-therm", "skin-therm", "pa-therm1"; + + xo-therm@0 { + reg = <0>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + skin-therm@1 { + reg = <1>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa-therm1@2 { + reg = <2>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm8150b_adc_tm { + status = "okay"; + io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>; + io-channel-names = "conn-therm"; + + conn-therm@0 { + reg = <0>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pm8150l_adc_tm { + status = "okay"; + io-channels = <&pm8150l_adc ADC5_AMUX_THM1_100K_PU>, + <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>, + <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>; + io-channel-names = "camera-flash-therm", "skin-msm-therm", "pa-therm2"; + + camera-flash-therm@0 { + reg = <0>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + skin-msm-therm@1 { + reg = <1>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pa-therm2@2 { + reg = <2>; + qcom,adc-channel = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + &qupv3_id_1 { status = "okay"; };