Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp877605lqj; Mon, 3 Jun 2024 03:52:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxbPOW23F3kBZS9T5+QU53RhA1lD3dzqMygnMcXQiGuSyGB8szPDkzl0ihXlab7hCaMxJmzbwOfy/ufJ+PlrLQ0cKYJgmT0xQZ/SPtAw== X-Google-Smtp-Source: AGHT+IHyCm3iLdpL2FMHEa7cerMWQJ0PSaoq4pcvv6bRfu3d2seSMJMiSh1SiM0Xh5FCzks4mqTX X-Received: by 2002:a05:622a:2c5:b0:43d:ea13:4331 with SMTP id d75a77b69052e-43ff527c3e1mr98947051cf.18.1717411937318; Mon, 03 Jun 2024 03:52:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717411937; cv=pass; d=google.com; s=arc-20160816; b=lK28jpVcW/CGILlnaxacM0yO6ouauJlRRqoPRMSq1znSAay1woiRHJB7S+f1vFxDzL RSKF58vvFlZK9CC0pkyypdjFoW9NNEU6y5HmJj5CkMVXw0q1JTbGLmR2Mg6gfFYSiCTd omUCbmXfnQFBFtrVJ/sxviHe3xy6Hie0wSqDLANSVE9+7nPTYA8LFz/8Xiu2mhlBU3YM 9Oy1ZjlBdHaAKIQT6hMvfYbEb/LUuai8HhRmP/yj6Dqb3W3+C2pxEYgkIVaQCxYs7+1v /g+cIe3H4i1yBHz6Eu3mImxVwXr+213M/iEj/tDlEzelOeqpJVDGUnD8fTpaOIRu40S4 nYcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=JH/Fg2Ib1WNtveytiPiMO6OnHe/f0VN621Z3OJJZHZg=; fh=s4qyOAnAPeLDuu2SWj8GTHLM4TPzDE4gWmw4HBKM/WQ=; b=JhChH6a1iI1/R+Ahf88TjYhGEo47jlJhf+iNyCpnT09fG3NBjFubCfV38rVwXEdSmJ 0l8MON+6+9I1ludZWmvhrWnm5HjIIm8jXgZIPOzGVthrSApv1gOKfxeESUFR5rmQH0pL 7f5jJwQbQqX8HUIEwWdS1KbAAMIaDJnO9+lgf+DvpNwj81NlX4qjjH6ZpK8BAtv11MEP AMEj4MKscUTohlUhs1sexnGHuuPdr61cKPPZD5+1iRDs8Vhpbtexc2uCAhz2RQpNVTsX nQFzxXGEjcZzs6PUtFwAI0lGFBKqYA7uHVrFKO0iCea7lbRDJkOyGCdcZct0yizB3F2z qMdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=omxd9ClS; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-198998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198998-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2466961si85701031cf.380.2024.06.03.03.52.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:52:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=omxd9ClS; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-198998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198998-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 01EA71C216EC for ; Mon, 3 Jun 2024 10:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E4D984FBE; Mon, 3 Jun 2024 10:51:11 +0000 (UTC) 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="omxd9ClS" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 2F61484D34 for ; Mon, 3 Jun 2024 10:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411870; cv=none; b=mKn/cj1hsCYm7FT4TrTIHvcI2CZ/1G1MbrLjvk1/o5qa9NX3Ku6YQxGuFhoOFXRO9YfD+aWyBpj5p3pMu8xlI/3Pti5S2u/uCA0umKtEFWtIj3DAainAhyOTY50KpuqbvNzX43Of2m3bztk6HW2cbWtcYfIGG4xgUWH1taGKoDw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411870; c=relaxed/simple; bh=BwySla2cuAgx3hvLMtuZuqrcIRnP11RTboQ2DPScWxs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YOPTKEoOD3om0y+knRo1WSt6vJ3zmBNmr/TcKG3zPpImWb1xujsIWEMDs+/VuoNgKJ7PaIU+98xSE8m5rVm8u/TWqd4zhSxfyFBTS7WkcKdJC1rBkSbRjpHjE6KcxxO+RhMEImime5eRS/8uN7JZnFpqYvL1tc+zkcz4PPwUuEo= 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=omxd9ClS; arc=none smtp.client-ip=209.85.128.47 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 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42134bb9735so17513165e9.1 for ; Mon, 03 Jun 2024 03:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411865; x=1718016665; 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=JH/Fg2Ib1WNtveytiPiMO6OnHe/f0VN621Z3OJJZHZg=; b=omxd9ClSEHG/f5yKQpbZojTcm2Puigdn7z5b2fV4NQzswCmWpvuwMO4hXsG6Mlm3Ro 5/g2UuszcNhOuHqn03gA/010NmPTjVLTfjakhO7BJplQDPFpZ5kMauw3YGSo7yh/QsfG kTuyMg+hJCmVxeOIb3pvgCpn7NWX/oJoDY2SP/OTp3Fxa5qP1KZIYCL6To+AifI8Lm5u aUrYv3UwMtGUr+5+lENuoVSAXeu2v87GO2sj669/YRWXnU4z6PIoogWoiYLirvMi8k8a 0WmsZfPeaJAo7MSvZLCVPh999uQ+znz0OEcrqQu6N2ZpPhuhaQstYhymWWVn3ODwq/Gz lfAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411865; x=1718016665; 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=JH/Fg2Ib1WNtveytiPiMO6OnHe/f0VN621Z3OJJZHZg=; b=PjvOcbW62q+GSOMejKrBW8wcd4RFUlg+qwugL8FpbybxC/uoWTEkjRKCsK3p+g8M5Y P/mftIwGXB7GIK86oyrV5K9wOr7Qx005lPYr/LjJV5axvqG6HWx/HZ2xDrlfluLw9fuc iJg+Fl8x79u8IzDVdvd+lJueUCZlZYbAzMB1M0CP0BgnlvD4K1ffUFc21qARycod/bPl mYOSHBhtmAW1+tWYxiF7JeC/YioHNj3lgWqbU6+O8finuFmtQ3ZchMABohAJmnt1AO8f NzZpu4OFBkLARyn5aeVOfXuIOCJCrrwenqKBLeqkxZeIx8WiBX2aXAXlPNGrY36Tx+6L 1KQg== X-Forwarded-Encrypted: i=1; AJvYcCXcVp6BpfKPhsAijykdAR5O/g9gVCsQG2A5Lm80L84wZNnteFh59T9ilNQO0wpXVMhb3KzWZ0SqO9fSbhEoNkoRdhA25uWaFIXIsOZW X-Gm-Message-State: AOJu0YwvSUAuRGR9tqUNPJ0qL+lZfE6WsC4+kgLyawxe0/a0nL9unWTg GyIi0LjAkVmEG+JpWnV8yappjC0CiHOsb+K+ZnauYdZNX0HohC191Ow7EPM04TM= X-Received: by 2002:a05:600c:5012:b0:418:f991:8ad4 with SMTP id 5b1f17b1804b1-4212e047519mr62376905e9.6.1717411865666; Mon, 03 Jun 2024 03:51:05 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:51:05 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:51 +0200 Subject: [PATCH v7 4/6] arm64: dts: mediatek: mt8186: 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: 7bit Message-Id: <20240603-mtk-thermal-mt818x-dtsi-v7-4-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=7860; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=lPgsulGv9GpCiinxcEjh9k1yG/tfMpaueb3shauQV5g=; b=p+SoN5gmJzAKZ6pn3yzDgBwHeGquM4KfP3Y+wTQCNv9PggaHPFLkV0/uxu/EfpITVJw2EB6l9 8crXgGllKsrCPdaxkmqgGmxYdoLcEYENs0/TOs2DxoloQUdTpDp0czR 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/mt8186.dtsi | 297 +++++++++++++++++++++++++++++++ 1 file changed, 297 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index caec83f5eece..95fe5a05f0d7 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -13,6 +13,8 @@ #include #include #include +#include +#include / { compatible = "mediatek,mt8186"; @@ -2197,4 +2199,299 @@ larb19: smi@1c10f000 { power-domains = <&spm MT8186_POWER_DOMAIN_IPE>; }; }; + + thermal_zones: thermal-zones { + cpu-little0-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU0>; + + trips { + cpu_little0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little0_alert0>; + cooling-device = <&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 = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU1>; + + trips { + cpu_little1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little1_alert0>; + cooling-device = <&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 = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU2>; + + trips { + cpu_little2_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little2_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little2_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little2_alert0>; + cooling-device = <&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>; + }; + }; + }; + + cam-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_CAM>; + + trips { + cam_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cam_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cam_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + nna-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_NNA>; + + trips { + nna_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + nna_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + nna_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + adsp-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_ADSP>; + + trips { + adsp_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + adsp_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + adsp_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_GPU>; + + trips { + gpu_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big0-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts MT8186_BIG_CPU0>; + + trips { + cpu_big0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big0_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big1-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts MT8186_BIG_CPU1>; + + trips { + cpu_big1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big1_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; }; -- 2.37.3