From nobody Thu Sep 19 23:14:44 2024 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A81AE84FD0 for ; Mon, 3 Jun 2024 10:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411873; cv=none; b=Li3la0M1J4jNHWSBXSQLr2q6hRcwT8keiDnnaydDtZwOfoiHbZdfHPZzc0QS0t5PMOOheWNrZbWZTQF/iHrajFS2rkBu9WU87g7eZ3sLV6NWKxpcpRudp3WQYi4g4H21gzngek7PyCinOIZUQo2BUJVILdNRMZR+zKThm08ENAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411873; c=relaxed/simple; bh=XqEDpBt1pjekHztw/SCAh0kyfwMUmyASAGbkU0m3Wbk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i4DmFPpo830NxFeLv55rZ7Stm9WEFcvJzNkS4DJyg40L0bWrwAchEO5VDRoEshmHoIwlPKiagkS6wNL6wvlE979ex7rooI7/wvff4lvOpyX7jANb9bAn7ALddiD9Rz7zg1SGQ6znZfaZlMNbcgsXQ6fSvnXENAUnRxE349swe5o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=wIMJ5L3K; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="wIMJ5L3K" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52b92e73e2fso2111442e87.2 for ; Mon, 03 Jun 2024 03:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411870; x=1718016670; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=daVqdhxG++H3mnALLmyfpETRxh4gIv98lbHeYejAmF0=; b=wIMJ5L3KqLy2+MlaRzPiJGqFjx4eSRjDHcmUnBt04/+5TcYHkTsBbn6IjQckIe4K0y GrRSEzlHG0QnHPH8/Xlg3XT/1B8laW1eNB1DYgraLlX+9mz76WfeoA49WzYpVMi8ubuF yAP7xCN3PlXZHxjJp7JmBwGtwxtwl73Ncpnb4ZUtou+oaZsja0ued0AZMLNJXxhhsiFr NMaNgHNNxq75PlTmJI18MUFC7n+BDduK5oH1HEx5ZGeAFe2WFY4VlXXEr8Z0zITv1kPz AjAhdB4IUI6fneUZG5ZExs5Dop5IJGvpycLhZOuIeZh117We3tHXSTObE0KuQhCa0jJs p2gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411870; x=1718016670; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=daVqdhxG++H3mnALLmyfpETRxh4gIv98lbHeYejAmF0=; b=LmdAp5B/1QYnXL008StIQXoGjp8Zh/fnUDOKAAqkcaFBqhmK1xlAv3uOP9WcpzS+dM U1/DriByyPJDQwOguo9AwSho90zqdiNEYI4ue6DAP26OO2E3b7XEy/qq7sADG8m5+4Qu XjWi9lAAIbtaa5khad+3sGoJu/rcQnfik7EwTQCQ90oESDOlW8SClWEnZthCNDI1CB6K UEA64EabrhSbFCj9SmPdjRBqgdaRCq8PDb/zyvN1y5ghHZSaORVlPcTQG/V/U6qoM4V3 sH+fY4MRQHTGwbpj3rYB4PNZ+uxTvU0HwKVAGK2IRk1AIy1LxwSo4wc8VTNvRpACbXD0 Yhpw== X-Forwarded-Encrypted: i=1; AJvYcCVVWr5zW37Yd/VwbHeBOSE+4Cbx7EF6c3OJ4bVnR/rmpsOpZDSvARsN8qNUFkOqML0xwiqpSwjBk/LbmbOQ9tnk1WB29a9KTnrtEs8y X-Gm-Message-State: AOJu0YwvzkiSP/0pOCuIvwDYn10hlZHyRwAk/YfihSErjzP9M0dULtG0 T4wPapmUd/cuDxbL1tbiissq8Bs4v49ftbxYrE+fKK4dTQdgBKLM9yMSWe6f1TE= X-Google-Smtp-Source: AGHT+IEG8i9SCgbIN4pAnI2nLvXwWt63QiZb5abuK+q3EozTxj1Lcoi++BMdVKgqfgsLkNeLi4jD1w== X-Received: by 2002:ac2:559a:0:b0:52b:7970:dc7e with SMTP id 2adb3069b0e04-52b8958f39emr4914136e87.39.1717411869970; Mon, 03 Jun 2024 03:51:09 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.231]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42133227f8asm95372535e9.19.2024.06.03.03.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:51:09 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:53 +0200 Subject: [PATCH v7 6/6] arm64: dts: mediatek: mt8188: add default thermal zones Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240603-mtk-thermal-mt818x-dtsi-v7-6-8c8e3c7a3643@baylibre.com> References: <20240603-mtk-thermal-mt818x-dtsi-v7-0-8c8e3c7a3643@baylibre.com> In-Reply-To: <20240603-mtk-thermal-mt818x-dtsi-v7-0-8c8e3c7a3643@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Lezcano , Nicolas Pitre , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, Krzysztof Kozlowski , Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717411855; l=11532; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=df8BOD5nCQUlwBBSC2fQS7/v/hAp+pkQj+1lq7cROSc=; b=Rs5iynNgYBz5szWQoUkV/DSghHbMv5Xf8NmrhhMUlz6RqthNrgFngI+rqptUEu/GOUAfV/aKm HRff6+EBGxGApx8uUmYr+RjnbTj+fcPKc5xkBab6iHno+Uk/ruGIFga X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= From: Nicolas Pitre Inspired by the vendor kernel but adapted to the upstream thermal driver version. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nicolas Pitre Signed-off-by: Julien Panis --- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 447 +++++++++++++++++++++++++++= ++++ 1 file changed, 447 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts= /mediatek/mt8188.dtsi index 02786fe9891b..cd27966d2e3c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -13,6 +13,8 @@ #include #include #include +#include +#include =20 / { compatible =3D "mediatek,mt8188"; @@ -418,6 +420,450 @@ psci { method =3D "smc"; }; =20 + thermal_zones: thermal-zones { + cpu-little0-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <150>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_LITTLE_CPU0>; + + trips { + cpu_little0_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_little0_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_little0_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_little0_alert0>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little1-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <150>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_LITTLE_CPU1>; + + trips { + cpu_little1_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_little1_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_little1_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_little1_alert0>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little2-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <150>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_LITTLE_CPU2>; + + trips { + cpu_little2_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_little2_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_little2_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_little2_alert0>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little3-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <150>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_LITTLE_CPU3>; + + trips { + cpu_little3_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_little3_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_little3_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_little3_alert0>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big0-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <100>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_BIG_CPU0>; + + trips { + cpu_big0_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_big0_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_big0_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_big0_alert0>; + cooling-device =3D <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big1-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <100>; + thermal-sensors =3D <&lvts_mcu MT8188_MCU_BIG_CPU1>; + + trips { + cpu_big1_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cpu_big1_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cpu_big1_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_big1_alert0>; + cooling-device =3D <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + apu-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_APU>; + + trips { + apu_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + apu_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + apu_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_GPU0>; + + trips { + gpu_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + gpu_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + gpu_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&gpu_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu1-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_GPU1>; + + trips { + gpu1_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + gpu1_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + gpu1_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&gpu1_alert0>; + cooling-device =3D <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + adsp-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_ADSP>; + + trips { + soc_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + soc_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + soc_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + vdo-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_VDO>; + + trips { + soc1_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + soc1_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + soc1_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + infra-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_INFRA>; + + trips { + soc2_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + soc2_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + soc2_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + cam1-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_CAM1>; + + trips { + cam1_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cam1_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cam1_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + cam2-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_CAM2>; + + trips { + cam2_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cam2_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cam2_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + }; + timer: timer { compatible =3D "arm,armv8-timer"; interrupt-parent =3D <&gic>; @@ -1322,6 +1768,7 @@ gpu: gpu@13000000 { <&spm MT8188_POWER_DOMAIN_MFG3>, <&spm MT8188_POWER_DOMAIN_MFG4>; power-domain-names =3D "core0", "core1", "core2"; + #cooling-cells =3D <2>; status =3D "disabled"; }; =20 --=20 2.37.3