Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2813758rdb; Wed, 4 Oct 2023 12:11:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKRoGRHaVFcfJL4j6+UIjZ34hygjthWJ+e2wU9cscO/npZAwuMcntXRQ9M96t3UKAfCIm2 X-Received: by 2002:a05:6a20:3945:b0:160:c502:6d8b with SMTP id r5-20020a056a20394500b00160c5026d8bmr3761417pzg.7.1696446716116; Wed, 04 Oct 2023 12:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696446716; cv=none; d=google.com; s=arc-20160816; b=kYnlo6bL3oLexxmh6u5YAiHcurXiaDn+yw4NGcJrg6h315acBo0OMxIPRmr8YvwGfL Rrczc8MIF6j9xROCMurpxL5epjjzZkBBJh/8B9bqT72K9d/1+iDkkycp2txkxOL6ySSr 24ek+AkkTxjTMLY2kv+0oI553VKsqQhpzU2luJk+JwrLpXliIO38mQYjIXoEWk8miOBN q6GFm80LrowEF/DXuQP8iAAmTBdTjxBNJx6mtCQxsssclWcfew12+fTuiAKfg/ra+eKV nbUrrjy/Fj7dYgU/+MZvL9vRt+ejG2E5740792Nd93illzRuOXyzcR6H/Li/ohCdySAb JXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=KuJ2CLb6+MUVtdnSy1rgrDtPNCbJpfpGSVNkFiavsuM=; fh=FTGCNC6hYVuS83gXpvZDSzLqpq3HHRZ5cg7ljkh8m3M=; b=IcoN7i/iZ49fTBoheiir5ubAubzA45/cQj3T3NUuYFaDz70qkrWdCc1j8++/njKMRx vHrprm+6eZibUFhVs1UJ8ZaOUPaFy6+cKSQu1kMOWpVBazJUb5Ox+A3SVEQ3bLr3kpBX hcySORuI0ajhFxX1vHL9KmFby4/ZLx0v481WxqR7RF8Aj9yX2UodWBssA1h34yajNAcK TuKmBUDAsxEkCP4oCDMK56y4MuhRv8Rzm6AG0II3tcS96jjxzPsBB4BAiGbB4r5krDfU hX6L/yrt+aS9+ag7ii1txCebP4449Y6UlkN4u5MS8Ks1XrVMfQ3y8qnF36m+IOB0K8Hc +AYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ShK2h3SV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 72-20020a63004b000000b0056536fc7901si4357279pga.593.2023.10.04.12.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ShK2h3SV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CD352809C646; Wed, 4 Oct 2023 12:11:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245634AbjJDTKS (ORCPT + 99 others); Wed, 4 Oct 2023 15:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245382AbjJDTKB (ORCPT ); Wed, 4 Oct 2023 15:10:01 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E8830D5; Wed, 4 Oct 2023 12:09:02 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-533e7d127d4so182558a12.3; Wed, 04 Oct 2023 12:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696446541; x=1697051341; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KuJ2CLb6+MUVtdnSy1rgrDtPNCbJpfpGSVNkFiavsuM=; b=ShK2h3SVwRonGRHd58RWYx0kASOLQ4U6bUmzl/yyF3cXbMDzKc1xVC1husWUzJqmD5 j6ibFNVuJHsNlsYN4x1h8m6jJlkn4fUhGPC8obtIF6MV5U9hjee/JMgh3MTy2JhY3BKV pvP1RP0UMgbfDNbXo2cSeqEJ+F9q2ByIuA7spiCYRPG1etP2iswOX0cX9gxwqL1BFXwl BI0QHgFklGIj2p6hvArnUpFlEUxOkYaEwzBME3ydBwKzT8FtVHb4mR85OY20ZeQ9FEEe qjhdaXbTn345DvpCGgDU8CUeI+e6QHPwEUNvGZbuqPBz8ZIoP2Q4pQVDIX2xQ40VRTbX Hf1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696446541; x=1697051341; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KuJ2CLb6+MUVtdnSy1rgrDtPNCbJpfpGSVNkFiavsuM=; b=IhdJ4l4rRxI92Sd1323eT/33jpUwpdG1QV5HMSn4AYh73Na7nzcKgn9u1BACYZ3PQz ypthYMGwaVNhKXVZqKLkk/NzOKdSRNuwfmXfkXDbRkE5Zw3cNeWYZT85tS6yUOubOhQG sHK4Yw9ByBxMqYLSDc/xNgNLbW0p21kyrUOVXa29b/Tbv9M4WEBpXrtN2hkaH0s9ZS9J 3iCz64ZdQCC1DzYyxqmSMgJkLNsF3RtFnm65kzl7lUYb4lAPMh7sRVTcXJ2+C97ERNt3 cBDXbWyDyJqPwyr/3ZJtx+w4VbhynBc3fYh4BpVe+uOIng6sc2+yiXklvgcStBdITqAg W3Wg== X-Gm-Message-State: AOJu0YyEw40MfOO+PMGNEyrjiJHd1XJeVxz8K6UIFyZWh7994tLsIhh8 9SgrivvmFCim1lBE0eprPo8= X-Received: by 2002:aa7:db95:0:b0:526:9cfb:c12 with SMTP id u21-20020aa7db95000000b005269cfb0c12mr3077590edt.38.1696446540940; Wed, 04 Oct 2023 12:09:00 -0700 (PDT) Received: from [192.168.3.32] (cpezg-94-253-131-161-cbl.xnet.hr. [94.253.131.161]) by smtp.gmail.com with ESMTPSA id e10-20020a50fb8a000000b0053404772535sm270964edq.81.2023.10.04.12.08.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Oct 2023 12:09:00 -0700 (PDT) Message-ID: <1c6ecc92-89d3-3b7e-c2d0-e2fded9b446d@gmail.com> Date: Wed, 4 Oct 2023 21:08:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V3 4/4] arm64: dts: qcom: ipq5018: Add tsens node Content-Language: en-US To: Sricharan R , krzysztof.kozlowski@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, srinivas.kandagatla@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, thara.gopinath@gmail.com, rafael@kernel.org, daniel.lezcano@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dmitry.baryshkov@linaro.org, quic_srichara@quicinc.com References: <20230922115116.2748804-1-srichara@win-platform-upstream01.qualcomm.com> <20230922115116.2748804-5-srichara@win-platform-upstream01.qualcomm.com> From: Robert Marko In-Reply-To: <20230922115116.2748804-5-srichara@win-platform-upstream01.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 12:11:06 -0700 (PDT) On 22. 09. 2023. 13:51, Sricharan R wrote: > From: Sricharan Ramabadhran > > IPQ5018 has tsens V1.0 IP with 4 sensors. > There is no RPM, so tsens has to be manually enabled. Adding the tsens > and nvmem node and IPQ5018 has 4 thermal sensors (zones). With the > critical temperature being 120'C and action is to reboot. Adding all > the 4 zones here. > > Signed-off-by: Sricharan Ramabadhran > --- > [v3] Ordered the qfprom device node properties as per > Krzysztof's comments > > arch/arm64/boot/dts/qcom/ipq5018.dtsi | 169 ++++++++++++++++++++++++++ > 1 file changed, 169 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > index 9f13d2dcdfd5..9e28b54ebcbd 100644 > --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi > +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > @@ -93,6 +93,117 @@ soc: soc@0 { > #size-cells = <1>; > ranges = <0 0 0 0xffffffff>; > > + qfprom: qfprom@a0000 { > + compatible = "qcom,ipq5018-qfprom", "qcom,qfprom"; Hi, "qcom,ipq5018-qfprom" needs to be documented in QFPROM bindings first. Regards, Robert > + reg = <0xa0000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + tsens_base1: base1@249 { > + reg = <0x249 2>; > + bits = <3 8>; > + }; > + > + tsens_base2: base2@24a { > + reg = <0x24a 2>; > + bits = <3 8>; > + }; > + > + tsens_mode: mode@249 { > + reg = <0x249 1>; > + bits = <0 3>; > + }; > + > + tsens_s0_p1: s0-p1@24b { > + reg = <0x24b 0x2>; > + bits = <2 6>; > + }; > + > + tsens_s0_p2: s0-p2@24c { > + reg = <0x24c 0x1>; > + bits = <1 6>; > + }; > + > + tsens_s1_p1: s1-p1@24c { > + reg = <0x24c 0x2>; > + bits = <7 6>; > + }; > + > + tsens_s1_p2: s1-p2@24d { > + reg = <0x24d 0x2>; > + bits = <5 6>; > + }; > + > + tsens_s2_p1: s2-p1@24e { > + reg = <0x24e 0x2>; > + bits = <3 6>; > + }; > + > + tsens_s2_p2: s2-p2@24f { > + reg = <0x24f 0x1>; > + bits = <1 6>; > + }; > + > + tsens_s3_p1: s3-p1@24f { > + reg = <0x24f 0x2>; > + bits = <7 6>; > + }; > + > + tsens_s3_p2: s3-p2@250 { > + reg = <0x250 0x2>; > + bits = <5 6>; > + }; > + > + tsens_s4_p1: s4-p1@251 { > + reg = <0x251 0x2>; > + bits = <3 6>; > + }; > + > + tsens_s4_p2: s4-p2@254 { > + reg = <0x254 0x1>; > + bits = <0 6>; > + }; > + }; > + > + tsens: thermal-sensor@4a9000 { > + compatible = "qcom,ipq5018-tsens"; > + reg = <0x4a9000 0x1000>, /* TM */ > + <0x4a8000 0x1000>; /* SORT */ > + > + nvmem-cells = <&tsens_mode>, > + <&tsens_base1>, > + <&tsens_base2>, > + <&tsens_s0_p1>, > + <&tsens_s0_p2>, > + <&tsens_s1_p1>, > + <&tsens_s1_p2>, > + <&tsens_s2_p1>, > + <&tsens_s2_p2>, > + <&tsens_s3_p1>, > + <&tsens_s3_p2>, > + <&tsens_s4_p1>, > + <&tsens_s4_p2>; > + > + nvmem-cell-names = "mode", > + "base1", > + "base2", > + "s0_p1", > + "s0_p2", > + "s1_p1", > + "s1_p2", > + "s2_p1", > + "s2_p2", > + "s3_p1", > + "s3_p2", > + "s4_p1", > + "s4_p2"; > + > + interrupts = ; > + interrupt-names = "uplow"; > + #qcom,sensors = <5>; > + #thermal-sensor-cells = <1>; > + }; > + > tlmm: pinctrl@1000000 { > compatible = "qcom,ipq5018-tlmm"; > reg = <0x01000000 0x300000>; > @@ -240,6 +351,64 @@ frame@b128000 { > }; > }; > > + thermal-zones { > + ubi32-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsens 1>; > + > + trips { > + ubi32-critical { > + temperature = <120000>; > + hysteresis = <2>; > + type = "critical"; > + }; > + }; > + }; > + > + cpu-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsens 2>; > + > + trips { > + cpu-critical { > + temperature = <120000>; > + hysteresis = <2>; > + type = "critical"; > + }; > + }; > + }; > + > + top-glue-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsens 3>; > + > + trips { > + top_glue-critical { > + temperature = <120000>; > + hysteresis = <2>; > + type = "critical"; > + }; > + }; > + }; > + > + gephy-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsens 4>; > + > + trips { > + gephy-critical { > + temperature = <120000>; > + hysteresis = <2>; > + type = "critical"; > + }; > + }; > + }; > + }; > + > timer { > compatible = "arm,armv8-timer"; > interrupts = ,