From patchwork Tue Jan 31 15:37:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 13123127 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E52CBC636CC for ; Tue, 31 Jan 2023 15:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YrFK82y210VvcknJO4l/f8GiUKFBShgX2vFUTJE1j7Q=; b=I/uCpK44/lJWRo pYbrg3VkofRYpQoFJ4pm4xOBtanKnRyFXeZ/PR/fIdw5Q6UjLoYWlZFnBGDkQIegcJabrgcI8xwAT HpN24h3Fhg8cLZyeTg7TanBjiY8qbmLZZ1ghO0tGhDDn/qPW/bPmobKA31TVQUF43Ka4PZV3USDzJ juvSDA369RwoDSWA0GtgqjQdZmZbKcsH9voN5jT8eUm9jfyahR9n78iyFWL/rqZY7TKiCBJCtvFjD csKmujEFHDNR9ChVJT+kzjarEhyYNoSVqp/ToziZLZAiMBFLGfDRN5WJGMCVTTtbkF1RUVPwcmn9v 2BIwy3VyNf5HTtLxNqzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMshJ-008Xvn-CW; Tue, 31 Jan 2023 15:37:25 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMshF-008XuL-FW for linux-arm-kernel@lists.infradead.org; Tue, 31 Jan 2023 15:37:23 +0000 Received: by mail-wr1-x42a.google.com with SMTP id t7so6235707wrp.5 for ; Tue, 31 Jan 2023 07:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; 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=pm9dedBohZwQnGpljqDLhY46ajQDOcYVRYzNxkYmfz8=; b=o692OoeYQJOwKthgIQuEeue2H+vYPw/MLklftjwtkwMyFp+hzmsVFFTuzUN5hXcdZv 1diz6lhWSh3P2SgP6sgfFkt/YztmBV3CY2dq8ZJgxkxwzrmu3Bx17QaUa4JYmIvirW6V 4flCvVmPNNmoejYhsjvwqKwCSi/5eDwjS8IvamVVR/LvRUFvUrdi+nGeKx4ScVr7L36z M+gVWA61AYRmhfqKRgOfQ4vEwxTAg9Y9Gv51ItZrtZuQ4ETzB7sdXmOpa/5C4h0c4UPc rud2ZghYFgXXXasxy9ErqpzRvhFwKqYum/vkUgPeU3lp4AUXQUuzgAzgdBrgCU2/3aaC WMCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=pm9dedBohZwQnGpljqDLhY46ajQDOcYVRYzNxkYmfz8=; b=VslA+jwXa6PfsVbKjCZw578jBA4tDTQgSJKqRXWiYY5B6GABCTy6QXxTQfj8MyFThh ijV36nCAfwelu1G+EoOdpIcSlqP+sEigz0TAfomr5iHHauogTVxcA7A6fByEKyXQ4ldL /nb6Ddtd/A1v3OM/CvrvSNeCJbtuQA6qziqb2YExVUnzbFZd8iq4IWrMhIN1NvRMMOkp H5bI22zzKHZOgY8a6Zw3ZYC+TJreQbR0THEiRBN2TOOuMamvOapNtwaGZheB2OJf5Asr UmeL+628sJgxiZpg3AUltat5iAYACZrwFeXXojMsPYSgNvpRYaaUIms94rG7h1B3afWx EWCQ== X-Gm-Message-State: AO0yUKUkyW72lCAx0F8IxlBPLm0i9CrkgP4HITzS3tknL0Ypq7MK4vJ3 18kCIQNIO1Zy0IQbRYT1sCr/bQ== X-Google-Smtp-Source: AK7set+yHDJltXCiLAJAaJIl1JdzQwbVU1QNNVTqt5tuW8K/rnz+3j76pcMjOdN0zatg4o/3GTBKQQ== X-Received: by 2002:a05:6000:1787:b0:2bf:f019:c23d with SMTP id e7-20020a056000178700b002bff019c23dmr4249393wrg.11.1675179439908; Tue, 31 Jan 2023 07:37:19 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id c11-20020adfa30b000000b002bfb5ebf8cfsm15068415wrb.21.2023.01.31.07.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:37:19 -0800 (PST) From: bchihi@baylibre.com To: daniel.lezcano@linaro.org, angelogioacchino.delregno@collabora.com, rafael@kernel.org, amitk@kernel.org, rui.zhang@intel.com, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, rdunlap@infradead.org, ye.xingchen@zte.com.cn, p.zabel@pengutronix.de Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com, james.lo@mediatek.com, rex-bc.chen@mediatek.com Subject: [PATCH v12] arm64: dts: mediatek: mt8195: Add thermal zones and thermal nodes Date: Tue, 31 Jan 2023 16:37:17 +0100 Message-Id: <20230131153717.21460-1-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230124131717.128660-6-bchihi@baylibre.com> References: <20230124131717.128660-6-bchihi@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230131_073721_544911_4D46CD05 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Balsam CHIHI Add thermal zones and thermal nodes for the mt8195. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno --- Changelog: v12: - Fixed subject prefix - Rename "include/dt-bindings/thermal/mediatek-lvts.h" to "include/dt-bindings/thermal/mediatek,lvts-thermal.h" due to this patch https://lore.kernel.org/all/20230131140439.600164-1-bchihi@baylibre.com/ --- --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 129 +++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 09df105f4606..c7e958f8f1b5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include / { compatible = "mediatek,mt8195"; @@ -954,6 +955,17 @@ spi0: spi@1100a000 { status = "disabled"; }; + lvts_ap: thermal-sensor@1100b000 { + compatible = "mediatek,mt8195-lvts-ap"; + reg = <0 0x1100b000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8195_INFRA_RST0_THERM_CTRL_SWRST>; + nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells = <1>; + }; + spi1: spi@11010000 { compatible = "mediatek,mt8195-spi", "mediatek,mt6765-spi"; @@ -1114,6 +1126,17 @@ mmc2: mmc@11250000 { status = "disabled"; }; + lvts_mcu: thermal-sensor@11278000 { + compatible = "mediatek,mt8195-lvts-mcu"; + reg = <0 0x11278000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8195_INFRA_RST4_THERM_CTRL_MCU_SWRST>; + nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells = <1>; + }; + xhci1: usb@11290000 { compatible = "mediatek,mt8195-xhci", "mediatek,mtk-xhci"; @@ -2387,4 +2410,110 @@ dp_tx: dp-tx@1c600000 { status = "disabled"; }; }; + + thermal_zones: thermal-zones { + cpu0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>; + trips { + cpu0_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU1>; + trips { + cpu1_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU2>; + trips { + cpu2_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu3-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU3>; + trips { + cpu3_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu4-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU0>; + trips { + cpu4_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu5-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU1>; + trips { + cpu5_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu6-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU2>; + trips { + cpu6_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu7-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU3>; + trips { + cpu7_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };