From patchwork Thu Aug 4 13:09:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 12936392 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 27415C19F2D for ; Thu, 4 Aug 2022 13:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nxQpFa1KVHgBC+y7kPg5BLU20sJM1ezbCwHBaU9ajtw=; b=ecKFTioGKrVDvXHPcYcoE/KwnQ eNOB9GvCxQFd1xvuWoHb3pAav4p9AGSye4B6/K2QL43JE0PB+lZd5SLpbbzE6pTmtVTO3mJmXW7HW v0Uq6smQxcguIDHQX/BZBA+B6DBGRxYq2D2W6b+4s3U3v5aZlaMFiyqqMf+H5kicvuTLUQ+nRd7PQ Aatowrm4eMkEKvWxlN7C1YMWj4ACm2jchsoXHTCPxvHFzNa85mcb20moHpy7Ba+O+WSR63VDJK0XH +bjirDupcmUSPXzmhnQzK6lhxuEgzLkc6wHPoD9grntoFpvRSNdCdid2/Etn909odf+PWn1apeF6/ POX1wdqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJae8-006C2M-Ph; Thu, 04 Aug 2022 13:12:16 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJac4-006Ae9-Nr for linux-mediatek@lists.infradead.org; Thu, 04 Aug 2022 13:10:15 +0000 Received: by mail-wm1-x329.google.com with SMTP id j4-20020a05600c1c0400b003a4f287418bso2319082wms.5 for ; Thu, 04 Aug 2022 06:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nxQpFa1KVHgBC+y7kPg5BLU20sJM1ezbCwHBaU9ajtw=; b=OmS/UkX0R637Z4VOJjpcKnP3ZDUAMHkDGbSIg/Aw2kDIDwqY2jkjmSErujW6MF16kI Z26rAKBKkCCrFgXiKHN5qW63UzSl7/IymfTimFdGViikviaxZ5EJ9PMMfZA5LjKYFv8K FMX5JT1q0KuWRiPStZOL1LSG/s9QAcGpif5DlyRn1KP+ABPO2/LnrA+xTlbkcEC2aNlq JSfTg49e1qxzJt9KP50OsUJ/hYRk//CCB1zt3F4ZYm8vOyetiDUM5IjphPb53TSvCP5V mU2tmROZpKoz8jkRzJ99d80GxGXHR6MyTMyXTQoQtM8eqEmZcMslhBSc9X7ErlhNOio6 o8dg== 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=nxQpFa1KVHgBC+y7kPg5BLU20sJM1ezbCwHBaU9ajtw=; b=S/f0SfYYW4n2f1uy8JPnz9jDB/n2PUZefmN251pnajHobSqt0m41SOgN6NlUnqU9W0 xT3qMXvTuw+ThtrmKOg5ACEtVMVf+NlbdgaOyjfk4ZqXDRqyFy0DaP4TIUriPE8x5M7m NjjECYOo93pywKAGwQihJcG7oqE83VfYrTzG2kxBTUhYNhNc8XOwstS0DYn3ZU/lSZKw DdBm+XYHWP2XpzYVXD0pAoVzGgdoTevEawiuDIMbN3U4QgM06fTuJbf2nRvKC4xpUygh Umv2f+qqxRhfYCg47cM13I/eBj2flPcT5YvyYQkRSU1RFobpQtA+LqUgdLuUVEIlpmcm KWew== X-Gm-Message-State: ACgBeo3v6oaAbJx2Uggj1XPA34Pjn/D+QisBByg9XJqBaTfyeP/QY8dw 2hqBgW7/1d4mWadjAM3gydFUlg== X-Google-Smtp-Source: AA6agR56YaWcFKth3loWOPC2qQQk2cH3Ku2XADJ0DMwX+fzZCwDmAQChaI3g7lAVv/mFv9ObqjloyA== X-Received: by 2002:a05:600c:34d6:b0:3a3:31cc:e150 with SMTP id d22-20020a05600c34d600b003a331cce150mr6198544wmq.94.1659618607450; Thu, 04 Aug 2022 06:10:07 -0700 (PDT) Received: from Balsam-ThinkPad-T480.. (235.163.185.81.rev.sfr.net. [81.185.163.235]) by smtp.gmail.com with ESMTPSA id o15-20020adfcf0f000000b0021d6a520ce9sm1156817wrj.47.2022.08.04.06.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 06:10:06 -0700 (PDT) From: bchihi@baylibre.com To: rafael@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, mka@chromium.org, robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, james.lo@mediatek.com, fan.chen@mediatek.com, louis.yu@mediatek.com, rex-bc.chen@mediatek.com, abailon@baylibre.com Subject: [PATCH v8.1, 6/7] arm64: dts: mt8195: Add thermal zone Date: Thu, 4 Aug 2022 15:09:11 +0200 Message-Id: <20220804130912.676043-7-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220804130912.676043-1-bchihi@baylibre.com> References: <20220804130912.676043-1-bchihi@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220804_061008_812996_6C833AB3 X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Tinghan Shen This adds the thermal zone for the mt8195. Signed-off-by: Tinghan Shen Signed-off-by: Ben Tseng Signed-off-by: Alexandre Bailon Signed-off-by: Balsam CHIHI --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 111 +++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index cbd0401968a2..5890e688eebe 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include / { compatible = "mediatek,mt8195"; @@ -452,6 +453,28 @@ spi0: spi@1100a000 { status = "disabled"; }; + lvts_ap: thermal-sensor@1100b000 { + compatible = "mediatek,mt8195-lvts-ap"; + #thermal-sensor-cells = <1>; + 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_data1", "lvts_calib_data2"; + }; + + lvts_mcu: thermal-sensor@11278000 { + compatible = "mediatek,mt8195-lvts-mcu"; + #thermal-sensor-cells = <1>; + 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_data1", "lvts_calib_data2"; + }; + spi1: spi@11010000 { compatible = "mediatek,mt8195-spi", "mediatek,mt6765-spi"; @@ -1106,4 +1129,92 @@ vencsys_core1: clock-controller@1b000000 { #clock-cells = <1>; }; }; + + thermal_zones: thermal-zones { + cpu-big1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 0>; + }; + cpu-big2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 1>; + }; + cpu-big3-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 2>; + }; + cpu-big4-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 3>; + }; + cpu-little1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 4>; + }; + cpu-little2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 5>; + }; + cpu-little3-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 6>; + }; + cpu-little4-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 7>; + }; + vpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 0>; + }; + vpu2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 1>; + }; + gpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 2>; + }; + gpu2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 3>; + }; + vdec-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 4>; + }; + img-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 5>; + }; + infra-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 6>; + }; + cam1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 7>; + }; + cam2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 8>; + }; + }; };