From patchwork Mon Mar 27 12:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 75411 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1492828vqo; Mon, 27 Mar 2023 06:03:01 -0700 (PDT) X-Google-Smtp-Source: AK7set98ujbWBb6icTQQPUN3Ld4knAbQyQgbE6z4PlLuraXLkOQdxR6z+2zaDkUViCeexxC8MW8X X-Received: by 2002:a05:6a20:7b1e:b0:d9:4cc8:996b with SMTP id s30-20020a056a207b1e00b000d94cc8996bmr11522210pzh.15.1679922180716; Mon, 27 Mar 2023 06:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679922180; cv=none; d=google.com; s=arc-20160816; b=KQ8bj4GQwmpeaS61npM2nbP60fT8g2gMQIncCheOsWR0k+oES403AWHsPPMKDVF0QC Zvdhp1ONYHOUrYj7nPqAVq/F+8ag10eV4j6LKBqsH90EMebU6Ohf/CWVPP5Zh0jlXqsQ YdDFusicKUiSpvKy7PnZG06xyDlk8HhYjBTR64abDhNyaRG2I7fBHRG6i959Qb1VHazz RjXJ3m+/pd4VTwuDSzRT3DcNRpfSa3/cVdRacAzeNikVvY4oqYMZN5XiqVHc5/5F9kFN ojCNX3roNr55S1InxsyQJwSfQuh2ukJxSMnpZWPA7cG84PYFZ8qZmNc2y3ypRQgWses2 swzw== 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=oXI6ueezQMjbt8yHZkCuSNA3fjya7kV77Z0XtfmoN4Y=; b=SY74ALM1o7Ilwu+IlqHfthwlRsavBVpqhV/YZ3crxrn9xcWiZgFPf/sFI1Z/1VmOc1 g8y1uTTYNTIyasVtJ6fONFNXKzJK3rbv1wMY/XEiDSK9jWlPJ592KKyOJCC9Mtegtkb+ 2zje4MueYURBPelQ9dz8m0airCZFo9TtVk+B+1eX+E8M4f8Aq26ZoMwkm3VERqITRn4m /3Dc7IT7Hcs/xkoSCjMtO+Qs6mKe7dSXv2an2n1XeyvNFiMb07fnzrKKsofzMvMGh+0S z1sfa+H2VXWwUG4yhS7CAYVe2cQidFSl7F1a77vwC0hm36fcXHgEHWXzVWPUjAZhxLtx q14Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=f25hlpW9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a636b09000000b005076410cb9asi27178822pgc.424.2023.03.27.06.02.43; Mon, 27 Mar 2023 06:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=f25hlpW9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232939AbjC0MyM (ORCPT + 99 others); Mon, 27 Mar 2023 08:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbjC0Mxc (ORCPT ); Mon, 27 Mar 2023 08:53:32 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E601210D for ; Mon, 27 Mar 2023 05:53:30 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso7309765wms.1 for ; Mon, 27 Mar 2023 05:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1679921610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oXI6ueezQMjbt8yHZkCuSNA3fjya7kV77Z0XtfmoN4Y=; b=f25hlpW9QN/snZVztVI/GN14nrUhdiFH0ofCY/er+aw7UPmL6nCNC5EjVReu0Ipn3j SpeCTdx8t/xrA8oq0WHSZRnZnPQLUBrA1o2trARs6mbqAc171Myrr1n2p97JWIJQPGdS y4MQPoN3GjII4qUnDD4ufgh4cZpUUD65fp83c0TKQr3VS6jSYqe3ERDDg9H6HDQTcgkb ObYqkOsd9hVTV2+IM9chcAEBIC/2jn5rk0mlzTwKN6eEgl6RPON4cSfAPl2V4wCHoT48 5qEtsFrlgCzW/oQ2FPYY3fzQjaI3rRNh/dMil5/TUas0XsJjJe5nFPVl8ZCyaOejLnKi Bvww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679921610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oXI6ueezQMjbt8yHZkCuSNA3fjya7kV77Z0XtfmoN4Y=; b=DE358kcJxmYh84ZknEaH+/gRBWQa2siwdLwsJbcXGxxkIN+9jTr2IW/RpYdFtnQS8m rUYPwXWLKwNqLwPPkw3rzt9eCJOLocD4rASmQYEPaPdauvhf1YNUlz9YtIlQ6xEL5r0P zVD3nf8a6AXlmnDgVaBxxy4dAWncmbSo8jjpSmTkA9hXfcNrE99HSDwBUj8JvznYcjPK du/ypfkNAgthDQCyrf3zNf467E6yx4fpSzAzOGLfxhNZT6JPantt+sLhk+OFektLu4W4 Z/Ak5BUHoGHp2NGJJSeJOwrdRKARK8jGEI39HazIM5Y9YMIInlO0UPFMlMK4Kya+tc1r SvTw== X-Gm-Message-State: AAQBX9c5NGm+AHY0C+iJVL11n7ixhBzpHuojo/fYRe/HjBX+eZJ7wNWw nmn1Q2eLhTy31g6U0GEvRtzCNA== X-Received: by 2002:a05:600c:2243:b0:3ef:6e1c:3ffa with SMTP id a3-20020a05600c224300b003ef6e1c3ffamr2887048wmm.28.1679921609742; Mon, 27 Mar 2023 05:53:29 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:313d:a304:2790:a949]) by smtp.gmail.com with ESMTPSA id q25-20020a1ce919000000b003ee58e8c971sm13572220wmc.14.2023.03.27.05.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 05:53:29 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 11/18] arm64: dts: qcom: sa8775p: pmic: add thermal zones Date: Mon, 27 Mar 2023 14:53:09 +0200 Message-Id: <20230327125316.210812-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230327125316.210812-1-brgl@bgdev.pl> References: <20230327125316.210812-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761526080467719367?= X-GMAIL-MSGID: =?utf-8?q?1761526080467719367?= From: Bartosz Golaszewski Add the thermal zones and associated alarm nodes for the PMICs that have them hooked up on sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 112 ++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi index 8616ead3daf5..be12997a080c 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi @@ -6,6 +6,90 @@ #include #include +/ { + thermal-zones { + pmm8654au_0_thermal: pm8775-0-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pmm8654au_0_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pmm8654au_1_thermal: pm8775-1-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pmm8654au_1_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pmm8654au_2_thermal: pm8775-2-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pmm8654au_2_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pmm8654au_3_thermal: pm8775-3-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pmm8654au_3_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmm8654au_0: pmic@0 { compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; @@ -13,6 +97,13 @@ pmm8654au_0: pmic@0 { #address-cells = <1>; #size-cells = <0>; + pmm8654au_0_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pmm8654au_0_pon: pon@1200 { compatible = "qcom,pmk8350-pon"; reg = <0x1200>, <0x800>; @@ -41,6 +132,13 @@ pmm8654au_1: pmic@2 { reg = <0x2 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pmm8654au_1_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; }; pmm8654au_2: pmic@4 { @@ -48,6 +146,13 @@ pmm8654au_2: pmic@4 { reg = <0x4 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pmm8654au_2_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; }; pmm8654au_3: pmic@6 { @@ -55,5 +160,12 @@ pmm8654au_3: pmic@6 { reg = <0x6 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pmm8654au_3_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; }; };