From nobody Thu Sep 19 19:30:20 2024 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 3C60377112 for ; Tue, 21 May 2024 14:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300353; cv=none; b=LVqmFlmtM2MqvBWGqJ33B+TEe8NegnY3OZIzlzqGXEavWO9BKKJhS5M7YSZNBhtTf6QClnVTlw2Gf/GamtLF8nV4LJoJr76KTLonmDriEXJ2g/6rN/ZcDePBWZtMRIQjTfmAUUe/WoGcnyCF0tf8oWxL1+Wr8wr/5o7Hkhr3d8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300353; c=relaxed/simple; bh=hIvA39TYPLOif8A8RvknSlSb848U6P/fP6pMmPEKIo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cc3uaO3FJGZCY20eajERhky8rwuL7XDyLDDFITRBnJNUthFPZZtH3B6qjmaF3DPQefmkZUfFaJGNbCeuo1dGnUf2gOBMKRLnqwLdOYPb5Qc+z+n6q7WZlvkJmtzE0ZgvD45m2fCFDL874oF2tyf4FshPTVwMMtE71CLiTZwpvgA= 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=iQhDJkMO; arc=none smtp.client-ip=209.85.128.45 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="iQhDJkMO" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4200ee78f35so23426325e9.1 for ; Tue, 21 May 2024 07:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716300349; x=1716905149; 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=3KPQvvAhw/QNVA2rWSAmQjx+yY2X/Ig4NrPz7gPkeZ8=; b=iQhDJkMOk25DJ8MJX3KofUYOhrZ9SyNT7an67JaGtoJr2sU+sXdgShEnJI+0vggz8K podEJoz7jBRRA/qLIxAK3IG6Go1oi/bzRO2qSVmJgM5CO2bZy4QeLPQlQ4Us01aEUVOP zrvjLqyK3q2e6IYcU0kVYxx1Hm5NNchLZsuJ2wgrsDviyMIYv53hIWqaLvCdtSHGQMA9 84BaGdF3zrKgAKuXSVApFRPS0q29zUz1UMTg/oFtZdnGyynVngHzNgRbCaLpmGDppyaM 0S3Lj8C8dx05ErUb0hVItbHAGDg9EClwtrKgM9DLuA6R+C27QBgXjuT1VzhP5UxwH/bB 8VtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716300349; x=1716905149; 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=3KPQvvAhw/QNVA2rWSAmQjx+yY2X/Ig4NrPz7gPkeZ8=; b=bhjI0KhWrJvrnS9qpN/TL/olupAYqotTUjbUAzslj0/vPA+fCeZzwRqQLcu95k32Ra 481CicN+RbvK+pUu2dBvZ8fQnleytQDY+4NEuPEZJdA+9zNORQ5++39Tm0wmUVzAF69W IFWOVxEq6v42Xd7CE3wQ/B4rt7Z9sGXaRaYpFJrQ08KSD2lL/Qy94d4R9bum8H3afU72 ca6cIrehJirjXPYQ9nfgR/Jo13k2Zr5kMVxcESxh8X/JOIzsmBbiXdXaRjdQ3st3Twi/ mq9FprCfWGW/G+CeC2Qfz+ogew/rIS7ZLkOl1gpSRgfU+lr/FjaGZ0zM3oiy3eAsmuFG NRCg== X-Forwarded-Encrypted: i=1; AJvYcCVgzhwxrR194fdOdM6KCwZaa5gyO+dQiP5sMD195ZszZuWV3TnliXfMMpzd2g4aQ03Q1Wt1ic0IT0risnwapS58qTHMgVkP0yTrnYAr X-Gm-Message-State: AOJu0Yypr7E0ap85s/39yoqIpDFqY/4jWiuXl55EPCr40o0L70BlT6xI t29gayKZS5QDpPPqR0wSW8xnlt24MsiNPl/cHrRkvy77Yq9f0uD3PO7T4xmni30JKPLSzEmPjLx Q X-Google-Smtp-Source: AGHT+IEa++vEX6S0j4Qn/W6RWxeUoiqgzZ7i5R9ToZMW8f9WDpRB2jx7hqSqjlNUMUX/xfHdMq+oGA== X-Received: by 2002:a7b:ce0e:0:b0:41f:bcd7:303f with SMTP id 5b1f17b1804b1-41feaa38a8emr336486565e9.16.1716300349354; Tue, 21 May 2024 07:05:49 -0700 (PDT) Received: from [127.0.1.1] (abordeaux-651-1-78-161.w90-5.abo.wanadoo.fr. [90.5.97.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42015deac1asm342085945e9.17.2024.05.21.07.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:05:48 -0700 (PDT) From: Julien Panis Date: Tue, 21 May 2024 16:05:35 +0200 Subject: [PATCH v4 1/4] arm64: dts: mediatek: mt8186: add lvts definitions 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: <20240521-mtk-thermal-mt818x-dtsi-v4-1-b91ee678411c@baylibre.com> References: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> In-Reply-To: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Lezcano , Nicolas Pitre Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716300346; l=1717; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=ZXPmUPXXFa1JCVfBMk9FrptEjzZlcdWN0z1cSMSnOwA=; b=rHnbnAL2mPLXp0uO4yIwYFoqu+Y2g1UyXC2LBLUx32VUK6RlUWIUCjZvwl1P1UCGxTrtDtI6J XYPKEf3F01NA7jUuR/3F2HrthlbW2N+RFTutwMV4M5HM++ukraBP8m1 X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= From: Nicolas Pitre Values extracted from vendor source tree. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20240402032729.2736685-8-nico@fluxnic.net [Angelo: Fixed validation and quality issues] Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Julien Panis --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts= /mediatek/mt8186.dtsi index 4763ed5dc86c..caec83f5eece 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -1361,6 +1361,17 @@ spi0: spi@1100a000 { status =3D "disabled"; }; =20 + lvts: thermal-sensor@1100b000 { + compatible =3D "mediatek,mt8186-lvts"; + reg =3D <0 0x1100b000 0 0x1000>; + interrupts =3D ; + clocks =3D <&infracfg_ao CLK_INFRA_AO_THERM>; + resets =3D <&infracfg_ao MT8186_INFRA_THERMAL_CTRL_RST>; + nvmem-cells =3D <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names =3D "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells =3D <1>; + }; + pwm0: pwm@1100e000 { compatible =3D "mediatek,mt8186-disp-pwm", "mediatek,mt8183-disp-pwm"; reg =3D <0 0x1100e000 0 0x1000>; @@ -1676,6 +1687,14 @@ efuse: efuse@11cb0000 { #address-cells =3D <1>; #size-cells =3D <1>; =20 + lvts_efuse_data1: lvts1-calib@1cc { + reg =3D <0x1cc 0x14>; + }; + + lvts_efuse_data2: lvts2-calib@2f8 { + reg =3D <0x2f8 0x14>; + }; + gpu_speedbin: gpu-speedbin@59c { reg =3D <0x59c 0x4>; bits =3D <0 3>; --=20 2.37.3 From nobody Thu Sep 19 19:30:20 2024 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 798E97C6C1 for ; Tue, 21 May 2024 14:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300354; cv=none; b=iKxZtugb6DSHeOQQK88cuNWwqR27i66SBX0qy5KQAJKLwXzDq0zBqYdRleBY6mSNhn7++ATHyBVAfTLLQRObG9904QHr6iAGpIWm17eKmUy4eZ1wrlmCDgu9pdqnUUKlIQn3/p3nORTsjKU0fcuzeHLP7i7Dp/+hrjS4lGB28Hw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300354; c=relaxed/simple; bh=oh/IWUYJN506nkVHYYkdx0rnWmNdZnY9KqDIe+ywqmE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TCYM+hFSiI1E6x6WfXpkcmQJBBWT3C216H7OyKCm5/NUXdSyLd+RmDyTLUqIH3Dt8cR7jcuOi2o/maWrTce9auL0e3Nnri9jnmgIdY7dSSug8GmBETirVVzJyONdt6p4uXW1H0nXwYya3nxaXgcVWry4g0ViJiN7HIwoLWEhE4M= 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=zPiPBYBF; arc=none smtp.client-ip=209.85.128.45 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="zPiPBYBF" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4200ee78f33so32867275e9.3 for ; Tue, 21 May 2024 07:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716300350; x=1716905150; 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=vHecXF3avei0wMYvVe2nNfqZkGUZuu/4Qjpac4gEU9U=; b=zPiPBYBFamcO1ewspdb3rHljNuRPwGZy5PJijxDlygEVQx/rI95R5i1LwU0Lm7y2I5 kLql4+JbL52ZSnPXKjvLnDPVl+ckWS2/zq5iQVGKauKqyY5l1Lye2ynpKCBWYdb2IlwB CPduYuJRdqbUBgSAKcWoMXnJqXPvvc428An4crAZqr39CuABjfxnLHWw4yds6bscNNe2 DoCK/5JKLagcvV8CboMFezy1kFccw+jAP0WXk7xebHfFdBvgAMoh+DPcG1q7oNUeZJiU fqUc7w3AOuwCTU9oEOIb8UPgjNndi0xCXOvGfNR5G708k5xOVrKsIpu8yHKXw0avMtaJ Nb1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716300350; x=1716905150; 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=vHecXF3avei0wMYvVe2nNfqZkGUZuu/4Qjpac4gEU9U=; b=v94BgHnJcqMGqMBmvQMESummPNMto4RJAGq5ac9wnKkhVHfQjpHc8OvjWtzRdSi/ao KF+dA5+ymEWpWwKlXTKS58tY4tTSxomNAxdk9Zx9dsEpk7FEgx3sJ9daSjeHEbs7hshV cIeiOTZA7+gS/hJi9JB5EOmw62H58WMc3WWJ4ORHpGlReHpTtyr0u+huslYr47N7z34O cLJOkSFgVqhglHiayK+EVs4dmMnNCFrbIWrxEJjccq6rjBU/DogLDRUYivUvXv0Rrr8G J/nfcFRrf2k4HR++eXYxBoNweNQRshsBXznBRiMWzU7tZ4MN3HV8K6903x2UZcCNEZjR NxEA== X-Forwarded-Encrypted: i=1; AJvYcCU5mKUoh/7j/Qacox30LYPdBa+ptRuogmWbDrQsL1BpKj9MGkJkmAvnguMumAb9ehFUq+z2SfusHijarjPdiLvLB4x2gI9gDDd+Zbnm X-Gm-Message-State: AOJu0YxWOENwN90KjfnvoAYfRXMZdRX6R39b2RVkJJpv7o+tB4TfOgrj eU1vuvPAAPih3/gvvG4pwbHIWezvrVLlpLkT9SAGWaX9SOmFi6CpZcrAPJLWwKTy/VGjkN8s/jM 2 X-Google-Smtp-Source: AGHT+IEpb8MyeTzvBtss6nYLtF7rnc8CbH7L10ib6Pkq0/qhNpBIeWifkP0ySE/ilYKRkV6wAkXsAQ== X-Received: by 2002:a05:600c:45c5:b0:41b:a8e8:3ff6 with SMTP id 5b1f17b1804b1-41fea93a4cfmr221282735e9.11.1716300350613; Tue, 21 May 2024 07:05:50 -0700 (PDT) Received: from [127.0.1.1] (abordeaux-651-1-78-161.w90-5.abo.wanadoo.fr. [90.5.97.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42015deac1asm342085945e9.17.2024.05.21.07.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:05:50 -0700 (PDT) From: Julien Panis Date: Tue, 21 May 2024 16:05:36 +0200 Subject: [PATCH v4 2/4] 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: quoted-printable Message-Id: <20240521-mtk-thermal-mt818x-dtsi-v4-2-b91ee678411c@baylibre.com> References: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> In-Reply-To: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Lezcano , Nicolas Pitre Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716300346; l=7629; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=lc2XS6xk5Qc4U1MdpeHWgGtSLQNLO7fOSfRbIiHv4Bo=; b=j/OiVunLGWMoUT//PdjJqT1DUCI6v0ClYa2rjLSUwwPSdgYMGOJOTJWFvWpofKQZgqZ+3jH8m kwW4yhLBMPrAab6ZMKEKf9VIiYvg+qoLhFiFSpEsZqK+IvKfT8b8woO 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. Signed-off-by: Nicolas Pitre Signed-off-by: Julien Panis --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 290 +++++++++++++++++++++++++++= ++++ 1 file changed, 290 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts= /mediatek/mt8186.dtsi index caec83f5eece..ac49a33d1b54 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 =20 / { compatible =3D "mediatek,mt8186"; @@ -2197,4 +2199,292 @@ larb19: smi@1c10f000 { power-domains =3D <&spm MT8186_POWER_DOMAIN_IPE>; }; }; + + thermal_zones: thermal-zones { + cpu-little0-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <150>; + thermal-sensors =3D <&lvts MT8186_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 MT8186_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 MT8186_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>; + }; + }; + }; + + cam-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts MT8186_CAM>; + + trips { + cam_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cam_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + cam_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + nna-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts MT8186_NNA>; + + trips { + nna_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + nna_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + nna_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + adsp-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts MT8186_ADSP>; + + trips { + adsp_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + adsp_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + adsp_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + mfg-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts MT8186_MFG>; + + trips { + mfg_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + mfg_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + mfg_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + cpu-big0-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <100>; + thermal-sensors =3D <&lvts MT8186_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 MT8186_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>; + }; + }; + }; + }; }; --=20 2.37.3 From nobody Thu Sep 19 19:30:20 2024 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 C868C7F7C5 for ; Tue, 21 May 2024 14:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300355; cv=none; b=L5uclttVGC9I5inDEs/fTJ7CD2nJcsgeD/XCxnU+DYZ3e/hPyNNfBjdarz70ZIB0/08un3ddh24R897GtI0coEflLV0LrNK00V+5Fb80nWhR4tyWOszz59iaoYd+fAqDoUnpEIJaKz6/AS+k8kM+t/U4cJFWPvT0/CV24odXNGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300355; c=relaxed/simple; bh=D/CwYxUrwRDdDg8e5n5iJwa+Yitdxw7jjgv7JizLHlg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hIbh9ENk1Nv76VKqSWU3F1ytkaBh0VmjpzJ+S4pJPjviNekZMbj8LePS56rCr5rigZcoOLB9sbrPkZXu5b4q22dg7e+RA0iHB1RhJiVP+obLowsLs8sYP/3vkOsODdsLSFCEW/HIDZ3gQLOdUbnB2zft3Ngaehk29t99r20ahus= 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=qJ6Hwc2+; arc=none smtp.client-ip=209.85.128.51 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="qJ6Hwc2+" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4202ca70318so29202595e9.1 for ; Tue, 21 May 2024 07:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716300352; x=1716905152; 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=gwXTa5ISuv1Kx02m8OOMsEkndfJD0rih1gKoinHaSN8=; b=qJ6Hwc2+JN5U2S+RR5CSCXCZwf5Bv3biiqn0ZfurmKJ6vOOfmhuKYzZm+dUtjUHctl oLkS1ljJyw3f+PsHmsHu4Km7hstfD+u5RG2/J7MdCL7cLeQR8vrFgcc2gXfe0upFJHPT hTT0P5zEol9B+XqL1qe9zS1/BfRZrBaL6dXKPxKYrSufWRdkjKrrhqZ49TGCiFqjKVzr Q4XB60iuqkaIjU3XU0QNHejyML9qJ1/miKlxMgDbZ3ZjBKKgtgjuaUdpyM7F9SBCg8WH VLfAmS4Q2VOKR/0y20vjJBXm0w4H1mLJR4ir6TFGTLMoStlucx2Q1lZgjlGD2wZsASES 8sVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716300352; x=1716905152; 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=gwXTa5ISuv1Kx02m8OOMsEkndfJD0rih1gKoinHaSN8=; b=P+oGLkywvz4MUPLWT95OloL17OfsvU2bBWq3yKvyQCWXrYpCtQp6LzBKP4+5qCmEVJ Wav2SgE6mObWbNWtbbxUwSCPjGJ1ES4iHX46JWKDiRENKi+E5txpdNRc144WbxSi1IHX +r9qaBbCwzablL4PKcjbBUITOLYYLmFsNuFwGZe4kxmBecJQbofJEudSqrp11SSCXJUv Kal1JilNQa/Xa7uWuDWabctup4bSW55CKAiKlpQqHH7ndL5CyEMG4ZgvJNld6Momg+8p EdzB+rBrzf/+ABCQUi93U49QLm2OTE/qBxS7ElcGkS0xL6cmzs1bFAWrtnjE4gzGlNl9 Lh2w== X-Forwarded-Encrypted: i=1; AJvYcCWQHZ/6PU/IFw56r3q7Fsov/bRxpB+f5Bs6Qps8ZTC+3mGRv2+KDx9hoF+JBLVddUmm126RjI2DCjLOH1f8AWgwSnRVooidf4I/1knH X-Gm-Message-State: AOJu0YxcMs+wigUK/0j2Z27K0pTRWvt2c+aD/pqEvhFjwgiTf8qBYIBw sdx8UkfRc3ccSiJE6vn5Oyh7QNUBUIQ1x/+Qz7hlJoAYHzgNc42ZilhDeI8sY+WiVL+B5HkyIDx Z X-Google-Smtp-Source: AGHT+IGmcQ3zhXcwGKq9p4o4lUrXXiEQ7n47lXZBsIoCw5/9guA9QsF0d6CS+Kcs/jF8lR3BYU6Paw== X-Received: by 2002:a05:600c:21d5:b0:420:ed93:bca0 with SMTP id 5b1f17b1804b1-420ed93be2amr48817025e9.20.1716300352002; Tue, 21 May 2024 07:05:52 -0700 (PDT) Received: from [127.0.1.1] (abordeaux-651-1-78-161.w90-5.abo.wanadoo.fr. [90.5.97.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42015deac1asm342085945e9.17.2024.05.21.07.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:05:51 -0700 (PDT) From: Julien Panis Date: Tue, 21 May 2024 16:05:37 +0200 Subject: [PATCH v4 3/4] arm64: dts: mediatek: mt8188: add lvts definitions 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: <20240521-mtk-thermal-mt818x-dtsi-v4-3-b91ee678411c@baylibre.com> References: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> In-Reply-To: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Lezcano , Nicolas Pitre Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716300346; l=2934; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=UpRqfVTfJj/4HAmfkOjlSQQqb0p0PX5zc+/lgsWNhqY=; b=QlwxxxZ+8IMEsZ1KOsNLteR7x+69FK/C7WOhQnM3tCwzAiPWf4eqocPeOLgGz5mYgXKfSnXrW ag145bsqnZ7BAnVx5kKVFz5biNQeMyaroUGbCeVtlwoY4LGAtDJ8dfV X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= From: Nicolas Pitre Various values extracted from the vendor's kernel driver. Signed-off-by: Nicolas Pitre Link: https://lore.kernel.org/r/20240402032729.2736685-14-nico@fluxnic.net [Angelo: Fixed wrong nvmem-cell-names] Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Julien Panis --- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 35 ++++++++++++++++++++++++++++= ++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts= /mediatek/mt8188.dtsi index b4315c9214dc..a9f1b9db54a6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include =20 / { compatible =3D "mediatek,mt8188"; @@ -357,6 +358,7 @@ infracfg_ao: syscon@10001000 { compatible =3D "mediatek,mt8188-infracfg-ao", "syscon"; reg =3D <0 0x10001000 0 0x1000>; #clock-cells =3D <1>; + #reset-cells =3D <1>; }; =20 pericfg: syscon@10003000 { @@ -491,6 +493,17 @@ spi0: spi@1100a000 { status =3D "disabled"; }; =20 + lvts_ap: thermal-sensor@1100b000 { + compatible =3D "mediatek,mt8188-lvts-ap"; + reg =3D <0 0x1100b000 0 0xc00>; + interrupts =3D ; + clocks =3D <&infracfg_ao CLK_INFRA_AO_THERM>; + resets =3D <&infracfg_ao MT8188_INFRA_RST1_THERMAL_CTRL_RST>; + nvmem-cells =3D <&lvts_efuse_data1>; + nvmem-cell-names =3D "lvts-calib-data-1"; + #thermal-sensor-cells =3D <1>; + }; + spi1: spi@11010000 { compatible =3D "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm"; #address-cells =3D <1>; @@ -604,6 +617,17 @@ mmc1: mmc@11240000 { status =3D "disabled"; }; =20 + lvts_mcu: thermal-sensor@11278000 { + compatible =3D "mediatek,mt8188-lvts-mcu"; + reg =3D <0 0x11278000 0 0x1000>; + interrupts =3D ; + clocks =3D <&infracfg_ao CLK_INFRA_AO_THERM>; + resets =3D <&infracfg_ao MT8188_INFRA_RST1_THERMAL_MCU_RST>; + nvmem-cells =3D <&lvts_efuse_data1>; + nvmem-cell-names =3D "lvts-calib-data-1"; + #thermal-sensor-cells =3D <1>; + }; + i2c0: i2c@11280000 { compatible =3D "mediatek,mt8188-i2c"; reg =3D <0 0x11280000 0 0x1000>, @@ -827,6 +851,17 @@ imp_iic_wrap_en: clock-controller@11ec2000 { #clock-cells =3D <1>; }; =20 + efuse: efuse@11f20000 { + compatible =3D "mediatek,mt8188-efuse", "mediatek,efuse"; + reg =3D <0 0x11f20000 0 0x1000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + lvts_efuse_data1: lvts1-calib@1ac { + reg =3D <0x1ac 0x40>; + }; + }; + mfgcfg: clock-controller@13fbf000 { compatible =3D "mediatek,mt8188-mfgcfg"; reg =3D <0 0x13fbf000 0 0x1000>; --=20 2.37.3 From nobody Thu Sep 19 19:30:20 2024 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 37E427FBB6 for ; Tue, 21 May 2024 14:05:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300357; cv=none; b=hjjdURJUJbeflI9oBVijhuQAPOpnJhulD0HyDTkLk+kEOodgD3VVGJTACdIKEjGaqM6zP1qrIu3vbXgUNeV4zoK4yhMYXmRU0q8av+6HXyEfkxLcYITnskMQEst25xUrpPzXlHYPsnR0KEbMRYRgeDcgQB8ZREVHyINpLW6gk0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716300357; c=relaxed/simple; bh=jQ7hBjSICnH1XfGRbCXA1ONWL+x6S3TgJoEk3ETXVDI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gI68eQ7SBJrP42QDgFBH/7b1lndIRS+JzJhJ8Ea/kSn9e6HWIqn9+9iRM0AiN6LE1ykIJEI5Kn9JlhO2ZNHW0ITOMP6ki78BiP+G3Lx9MlHwtgS3/9oh/p9kYZc7p9DrSTctP6jAiVp4WtrMiTFNPTZG12ZoObFHSYRhiwo0cLI= 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=maRbXEEu; arc=none smtp.client-ip=209.85.128.45 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="maRbXEEu" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-420298ff5b1so43548355e9.1 for ; Tue, 21 May 2024 07:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716300353; x=1716905153; 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=YAUrPUoQBd6Kqd4rVTpBegiY7VmR43Tn8S0XkolU6j8=; b=maRbXEEucvaymptM7BhB6Cs35BHFWpNlIQGyUZPv1wZ1aL6+QhdER/7p/jzIpqUXLx RrmQxmL4VW3C7GeWN5S58smsJPZpAYlwcDMsOTJJ7MYartAcx5X7vOLavYNKUjqRB1e7 vwLBfcpJNyjxuyKENuL/o82qRNLzoG0b4zjvNdFq8t5sMOuigKmqML5dxSevlFJuTTJL 7Rtsgw4E5iafRZInPiK6X7pAiDLKbt4kM09EET8mYChDASsMo3hcUwsk7mFdrKxjo0mk 2hmODYKjWrX7y8CBcrnzKPnWS+YzrG4AcWlrhExu6WZ+G7V5XWZwQZ+IrPBGXBWPpKZt SnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716300353; x=1716905153; 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=YAUrPUoQBd6Kqd4rVTpBegiY7VmR43Tn8S0XkolU6j8=; b=pliil5kvrfUHjf9TqeOKLoUleyqXSTdQnn6Xe81MPLM5O6uiCY2nDwY12wo4c+aoWe IHJmRX1zlcsQ5Te1IlSWi3jBw9sydT7aTrQblrOO80EKSz6/2yV85Ur4B41forSxCOMe ZYTsy+g9XO/myCehvEUrZGmjSEJKF6larYOTTlG2JdRiClsZaCxb0JKPOGwe/XaJJuYO aDgYxSxirv9OrN85oPBu/EAxWaTnGQBvj+Vbd5cM07MukupBPuZP4OwjJlj4FB7MHfqL 9xtYztmh3yPcy9iQ5Tby8s8onNlRnYOcsQJ+JYQD2yVC/+r3PZl2zFllTbI6lqbfaNax M9VA== X-Forwarded-Encrypted: i=1; AJvYcCVL1uHB9QYQCTcrbHLhlQyktOEjp5tdbIzccmeAVBHt9dZ7r+RNKooGsROk2xEYjnv2OyBtgerXxL94pRh/FT1z+UnjI7/afCwyNsh/ X-Gm-Message-State: AOJu0Yw1/40zgqh7eAI5qbk1sk/Bvrax5HFpbHNMOUI5QLNIWikJvIYf QxTI3aunL6w4UtMyuniPEBRLsQCf6LE/dma1lafzCZYMwlkWjXIZDR8fFv/Kmc4HvylhmUjTyCz K X-Google-Smtp-Source: AGHT+IE+NiqVpHjK6wSHuRvSJpOgObFEPx9CF5CneBOtdA4QCyF1PA8cSvGNHKjWSAeu24UcFH7NOg== X-Received: by 2002:a05:600c:4707:b0:41b:edf4:4071 with SMTP id 5b1f17b1804b1-41fead64731mr306654185e9.35.1716300353365; Tue, 21 May 2024 07:05:53 -0700 (PDT) Received: from [127.0.1.1] (abordeaux-651-1-78-161.w90-5.abo.wanadoo.fr. [90.5.97.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42015deac1asm342085945e9.17.2024.05.21.07.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:05:53 -0700 (PDT) From: Julien Panis Date: Tue, 21 May 2024 16:05:38 +0200 Subject: [PATCH v4 4/4] 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: <20240521-mtk-thermal-mt818x-dtsi-v4-4-b91ee678411c@baylibre.com> References: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> In-Reply-To: <20240521-mtk-thermal-mt818x-dtsi-v4-0-b91ee678411c@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Lezcano , Nicolas Pitre Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716300346; l=10920; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=0PY9AsBA2yHmIl4GCMFVKsNLBhNXB7eF11KdrYy3g9s=; b=zZrj6a40BVLyZdyiu1kP6GMT8LC4QbbRamvNnGwBZ+Hz1Di3lWRBxdYtfTs1aht9Y53aROG10 wM5/EyO1lbSCW9vxHurpxmWLvdEzLI3vKRCUIZHwFHQNd8Tm7/7OFj4 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. Signed-off-by: Nicolas Pitre Signed-off-by: Julien Panis --- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 432 +++++++++++++++++++++++++++= ++++ 1 file changed, 432 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts= /mediatek/mt8188.dtsi index a9f1b9db54a6..2b0f3e03acc1 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -12,6 +12,8 @@ #include #include #include +#include +#include =20 / { compatible =3D "mediatek,mt8188"; @@ -311,6 +313,436 @@ 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"; + }; + }; + }; + + 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"; + }; + }; + }; + + gpu2-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_GPU2>; + + trips { + gpu2_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + gpu2_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + gpu2_crit: trip-crit { + temperature =3D <100000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + soc1-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_SOC1>; + + 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"; + }; + }; + }; + + soc2-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_SOC2>; + + 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"; + }; + }; + }; + + soc3-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts_ap MT8188_AP_SOC3>; + + trips { + soc3_alert0: trip-alert0 { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + soc3_alert1: trip-alert1 { + temperature =3D <95000>; + hysteresis =3D <2000>; + type =3D "hot"; + }; + + soc3_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>; --=20 2.37.3