From patchwork Sat Feb 26 20:50:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 546196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31431C4321E for ; Sat, 26 Feb 2022 20:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229641AbiBZUvQ (ORCPT ); Sat, 26 Feb 2022 15:51:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiBZUvQ (ORCPT ); Sat, 26 Feb 2022 15:51:16 -0500 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E807262957 for ; Sat, 26 Feb 2022 12:50:40 -0800 (PST) Received: by mail-lj1-x22c.google.com with SMTP id e8so12087912ljj.2 for ; Sat, 26 Feb 2022 12:50:40 -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=5YSGyAyPF45kPZTOEBiFjB51m3jGTYQBjmE+p3kIZYw=; b=uQeX4q133YKohaCiUnKyFr4TSJ7jGHyby1zap2LNOkjZH3sRMxtVWFjKYtAl5sRJbn v+h3fv/L8nVdkLtArFESl9ztItt054L3wnG7I2I+eaWwemYZwgjZXzvMWN9iJRGRBDwJ kiytsn9vNUoRazEVTkAPSHO+wh11xk3IjvFRKZeekaa2VRw2zwJI4X2gPDKTnBsxXXXh 8e2g/LozEgF6927whLSfGHTY6ho7PbA5LbzjAMWZX3Na52ZIdQYEnqPZ4MIMk5sdgQzp eZCuC7BReK6gnoYi+58LWl2+SaNRqm1pzuG2yzq8rkBpmnJz06qiirzM73z3XVVuwsIz Ckrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5YSGyAyPF45kPZTOEBiFjB51m3jGTYQBjmE+p3kIZYw=; b=zPyWr/VGnEZoMElkQ2dODpKSh0ZY2eXJ/pz1rDenpEiOnN0T1osx8ZORRBTwcRNv6Y 6zUAkoE/5wBCKt8uHZF/EDeKXWwOQerFySA++6f24aXRO4CvwY0dnNtBuf8B0k5pSP+T K9DgV9Tppc5/FNvRNA+lYraFoURgV9KOuBCSNG1+SoAOrK9Z9w92A7IAa2ZvPDAF/rrQ FJGpAQuAV5P2sYlQB+9nfFiMURd0u/528bij2yCCgHSe527dkLB5NA4dKxjInqfBrbf+ eAX7syPezfcpeV6yu7gG2MPVEvzRLRj7pi9rTnwCAlfPAcGZAkPQk41ddZDey4gn4HZK Maig== X-Gm-Message-State: AOAM532y9qrbEEWNxUsnEQWmfYV6mtx0HCcgm/ZShO+BcVTGu/h0igQj yOzNBP/zTZEkVnx7HtsETBemRgpWtoyKzA== X-Google-Smtp-Source: ABdhPJy8aCgRcDZc35d8Vy+tF/TT9W4JAPh4z5h+QW4D8lqoziyp69NAriolByHTgJ+VA1dHorEVvw== X-Received: by 2002:a2e:80c6:0:b0:233:66cc:f565 with SMTP id r6-20020a2e80c6000000b0023366ccf565mr9864271ljg.236.1645908638875; Sat, 26 Feb 2022 12:50:38 -0800 (PST) Received: from umbar.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m27-20020ac24adb000000b004433bbaa3fdsm527162lfp.174.2022.02.26.12.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 12:50:38 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/7] arm64: dts: qcom: pmr735b: add temp sensor and thermal zone config Date: Sat, 26 Feb 2022 23:50:31 +0300 Message-Id: <20220226205035.1826360-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220226205035.1826360-1-dmitry.baryshkov@linaro.org> References: <20220226205035.1826360-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add temp-alarm device tree node and a default configuration for the corresponding thermal zone for this PMIC. Temperatures are based on downstream values. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmr735b.dtsi | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmr735b.dtsi b/arch/arm64/boot/dts/qcom/pmr735b.dtsi index 1144086280f5..604324188603 100644 --- a/arch/arm64/boot/dts/qcom/pmr735b.dtsi +++ b/arch/arm64/boot/dts/qcom/pmr735b.dtsi @@ -6,6 +6,30 @@ #include #include +/ { + thermal-zones { + pmr735a_thermal: pmr735a-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pmr735b_temp_alarm>; + + trips { + pmr735b_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pmr735b_crit: pmr735a-crit { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmr735b: pmic@5 { compatible = "qcom,pmr735b", "qcom,spmi-pmic"; @@ -13,6 +37,13 @@ pmr735b: pmic@5 { #address-cells = <1>; #size-cells = <0>; + pmr735b_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + pmr735b_gpios: gpio@8800 { compatible = "qcom,pmr735b-gpio"; reg = <0x8800>;