From nobody Thu Sep 19 19:36:26 2024 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4D44780056 for ; Mon, 3 Jun 2024 10:51:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411863; cv=none; b=cFZjKUcpEn8XJP/NoLaL14l/dyGwTQCbT4hpBWxb3juP/NawoPs0fejYexcBBUJtWsRnbRNfR9tY1acqaqlXcyRP/s8NNoeMpvogLsW/9C6qZA//2IQH+elDHDChHyj0c8fFy514DufqA6DB4umv1zi6i9xvRczEM9+xUUugoq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411863; c=relaxed/simple; bh=IZPrvRPbGNSCghjb/r1UV5NLYTSYSWHR7o/UY4dQ/l8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VulJVW1rrx92Ta/1BH5kz74MsioVM4fbJ5XUhJFTaNJZ5bRfMF0H+qBblU7ydmP3c+QFB6vssh1Lzr1M4jf3rLqaJj9zTqXvtboGfsdiW6R0hXdirWAZPg6BwvnADXruYkCxVTptxplBgIlitHm8WF89MFcb60gr763MC5uRPIk= 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=hiFZ0l71; arc=none smtp.client-ip=209.85.128.46 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="hiFZ0l71" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42135a45e2aso13136895e9.3 for ; Mon, 03 Jun 2024 03:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411860; x=1718016660; 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=mVKrwpOU8w8n3bWP7IaMbuZSC96tHGg2G6FEzlrVdlk=; b=hiFZ0l71OB+PYUXwM3Me/R8p+E5iRVT9XXd59V2jyOns8JKM90Uqb8QOBsNgej8Yim x0HeBNEs9BLoIZq8SCle2CG4eF+emXCJjavo4kZpQ9GSq6Esqrmr7nNlYFHNu24y0rDC 2opMlQQTRRwYF6YbivGRNpEAiAtKoHS6CO0BqXe6waGbthf7T4aLJwv4AXkW+XOAasLJ Fn7oVV7qGLLPmDDuUtaY6s9uPSfVOh0KRJUizWef//GoFqMWvULhuc39AReDdlWLY1gK uZKM2Jetrs7w5sBSKII/zMQMrgh8tuAXgj+lUMK6fwIuXuvRdgifAamGxSXF7HS8Xpbx y31A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411860; x=1718016660; 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=mVKrwpOU8w8n3bWP7IaMbuZSC96tHGg2G6FEzlrVdlk=; b=S5lKnxkcH+WOPWVUUxziu1aZ6l4coMEtauKYw5SetD6Db4EtRdVDFcLJtutehifmrz +AGKpj9S6ojPXWtSHXUPWl/ACBDPRXkdSr2SIJ/PjL7v++jT1bd2Rcw708hxkVxe3DeS 5or8dUe6Njk9ULqEa3npwcwYj3dcsmNTFGFRvHthdEPubt+06gODdEmNqh9b3XvKXKiO lttdGs59c8T9A8Obj4qhMSPkz0Kjr9pQLZfcapaFMF64xtgHEJI1NtYciFsBI4Ty2qLi br8MSg6kQDp0JMG7ZCFoIgAqWsXcrBbju5fzHnTjL1Ds9sjc8LnRSrOlbdt/PX1vCP+J pgpw== X-Forwarded-Encrypted: i=1; AJvYcCVbL7Uhtw5QaOFCU4T5RU1tvyLlRU6O6XnQ1fCWd1DiOP9H1PiBMDzAmIWOj1WcxpsGl3UBe4vzqStoaFN2aWLmb4Kt1/tmLTcHgS/J X-Gm-Message-State: AOJu0Yx269w/9F3L4xNGbC/0GbJvXhjhBUMRRT9FPxWcE9KQwJqjCqjk HSmAN1vdoxRlnv1mjkdDoBybzULpsgoDxYziS8e83/2oYX6eqHX/wNlOg9+zMoI= X-Google-Smtp-Source: AGHT+IEHJzmkYk1x/64Dttgql0TFeN0LlRnjrwKSBmUBZV11he1EW14HwlQNANH8IEcojrIBxI1yZg== X-Received: by 2002:a05:600c:3b15:b0:421:925:6655 with SMTP id 5b1f17b1804b1-4212e046201mr66085115e9.1.1717411859616; Mon, 03 Jun 2024 03:50:59 -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.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:50:59 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:48 +0200 Subject: [PATCH v7 1/6] dt-bindings: thermal: mediatek: Fix thermal zone definition for MT8186 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-1-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 , Conor Dooley X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717411855; l=2060; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=IZPrvRPbGNSCghjb/r1UV5NLYTSYSWHR7o/UY4dQ/l8=; b=H0YGfuOx97A32AYKnSb54my+ipnwNHN3gyXGwn1w1+Gowhq81ksSoJwKx5VAgIuDuFdYqw47N vgPxSRvm45PD22rChAtElT+XIOrWc0ylFv5Ds4cGkpg6i0UnRDm/xCa X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= Fix a thermal zone name for consistency with the other SoCs: MFG contains GPU, the latter is more specific and must be used here. The naming must be fixed "atomically" so compilation does not break. As a result, the change is made in the dt-bindings and in the LVTS driver within a single commit, despite the checkpatch warning. The definition can be safely modified here because it is used only in the LVTS driver, which is modified accordingly, and has not yet been included in a released kernel. Fixes: a2ca202350f9 ("dt-bindings: thermal: mediatek: Add LVTS thermal cont= roller definition for MT8186") Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Julien Panis --- drivers/thermal/mediatek/lvts_thermal.c | 2 +- include/dt-bindings/thermal/mediatek,lvts-thermal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/medi= atek/lvts_thermal.c index 0bb3a495b56e..506eed52db1e 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -1436,7 +1436,7 @@ static const struct lvts_ctrl_data mt8186_lvts_data_c= trl[] =3D { .cal_offsets =3D { 29, 30, 31 } }, { .dt_id =3D MT8186_ADSP, .cal_offsets =3D { 34, 35, 28 } }, - { .dt_id =3D MT8186_MFG, + { .dt_id =3D MT8186_GPU, .cal_offsets =3D { 39, 32, 33 } } }, VALID_SENSOR_MAP(1, 1, 1, 0), diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/= dt-bindings/thermal/mediatek,lvts-thermal.h index bf95309d2525..85d25b4d726d 100644 --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h @@ -24,7 +24,7 @@ #define MT8186_BIG_CPU1 5 #define MT8186_NNA 6 #define MT8186_ADSP 7 -#define MT8186_MFG 8 +#define MT8186_GPU 8 =20 #define MT8188_MCU_LITTLE_CPU0 0 #define MT8188_MCU_LITTLE_CPU1 1 --=20 2.37.3 From nobody Thu Sep 19 19:36:26 2024 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 B974B83CD3 for ; Mon, 3 Jun 2024 10:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411865; cv=none; b=luS3NftboiAN5XBLKB/TEMAEtKiNY+4PnVuc17DlsAyGWgyPaqif0varJOJ+ysonb1b76OijNHIRPBGSOxGyLJlTSqOTJLcElO913H4aWeEPebCuQYlG9blSFU9Oh1X7VZpUajW22wax7pQdxgwCwCre1Y/YhYb9GEt5n0j+n+M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411865; c=relaxed/simple; bh=ZqI2EmSTiCeQkIQ029juObOniGHTqqS9zskZ5qN+P1Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rm0JHNcdlUBAouNCBMGxBa+wuaUtg2nSi2WkBAf3MQfIJui0pPqpj8MQprp8zlJO3b9mp7fU0fWMlPOeiyYTP4rR1+YjosfTNdofag5KHCnB73ExIEO7mh4VrBcJPEt5HcFE/lbfGlVmjyKZlDDJTTNCLFOSl7v44wTAb/2Cs1M= 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=fC1gwpvR; arc=none smtp.client-ip=209.85.208.173 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="fC1gwpvR" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e95a1f9c53so52140661fa.0 for ; Mon, 03 Jun 2024 03:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411862; x=1718016662; 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=qji0UP0xUl/IquKfodaZRyE+GMoc8OcYwqb2/om3sxM=; b=fC1gwpvRDhB1hnVaJiXwgjSXQP0VZJh3eBNUyha9UAgkC5LQRyAzzVSmngQOrv6jD2 mlxx5d5CS5zPl932ewo9Esb7sD1N+yOEfz4lSYGChoHVNt83Q88S/s2WbbJbYcb1+AwV Gn9yd4zucooZjsZs/IXGLDCGxbhwhGI0bYv6yqx3g2MbqLefEOUOgn6/Y1FQgIe2bx8E cXjG0802CENi8BuvNVE+o1Pkgja3Anh1zyFAPDLZdQi3XxIWc5E3XWCMp1nIf0nwBt+F tDhJQd+VihNK+bqVyn9RF//p+m6EJcPXi6H3eUAHlpNAm5TL6ByPv9KFb/jtE3NAGWiW zQ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411862; x=1718016662; 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=qji0UP0xUl/IquKfodaZRyE+GMoc8OcYwqb2/om3sxM=; b=Hae6BX2hn5TcuOA+PutFcRm6swBoPMuidsiMxvI2RUivMq1hWJP+g+moUw25NC9NiO 7SN2O358bbZ68BojEpd6i3J7ufoj79htNW9wIhXxkVoPhEuoynaKSoEEl8Q/q48sCXxo P3WcsRh2mcqr5DrsQsGuNilNIsSl2oZe+XZnhyZ+WTVtNomLncuH8LNtNiQ+fGnB+xyE g7RXSI5YQIGrDs7GhqiB58cOYsSiX9OfvdYp3ensub9YvwI8zC+w/Kqc/V7ugnEo8B77 awwEqHOAA8ogVY6e0re+JNQiWKlaFc0jsxmwHzxhvBUuE9fX4RwsJSgMk3WQoxzjDM6u i0jw== X-Forwarded-Encrypted: i=1; AJvYcCURszANK39Przd4NSRc6SnxUTUafAfylnDapjPARoxGBzFcEBhdD9A5k2YObFjKgE2Ndg2syWEJOr2H2/HkNg27viowLQ+eUJUR9cPJ X-Gm-Message-State: AOJu0YxO3rR4ZIvTmNPc/QfV8uLFrjcuqzUayN2WF0iScKXmyZXsR4Ek G9oRNdG10XmZ+mlcBuKNxsvyLLm66MgtB9oBCuPZtt5cIym8g4HDK574YIEptik= X-Google-Smtp-Source: AGHT+IGiTDLsLcSDxxJBfHYdR2L0V7tR+pJ49Omj8OpudBjroJButtWWzfsGSf103bQFR8ayRgCtIQ== X-Received: by 2002:a2e:9903:0:b0:2e9:794c:19ae with SMTP id 38308e7fff4ca-2ea95122772mr59006141fa.23.1717411861734; Mon, 03 Jun 2024 03:51:01 -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.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:51:01 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:49 +0200 Subject: [PATCH v7 2/6] dt-bindings: thermal: mediatek: Fix thermal zone definitions for MT8188 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-2-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 , Conor Dooley X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717411855; l=2836; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=ZqI2EmSTiCeQkIQ029juObOniGHTqqS9zskZ5qN+P1Y=; b=Tw82fn/ZAXPeDohLJa8RKt2pEsOcZr9bdvgVK6hzP3QqxnhsrLDnsX2AgTmAaCXFSECZy0zTP oMSA7L28yq2DyzTWri20+vWMBaXVEEvLL9M55ZVVNtlWFMvGysf0qwK X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= Fix thermal zone names for consistency with the other SoCs: - GPU0 must be used as the first GPU item. - SOCx deal with audio DSP, video, and infra subsystems. The naming must be fixed "atomically" so compilation does not break. As a result, the change is made in the dt-bindings and in the LVTS driver within a single commit, despite the checkpatch warning. The definitions can be safely modified here because they are used only in the LVTS driver, which is modified accordingly, and have not yet been included in a released kernel. Fixes: 78c88534e5e1 ("dt-bindings: thermal: mediatek: Add LVTS thermal cont= roller definition for MT8188") Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Julien Panis --- drivers/thermal/mediatek/lvts_thermal.c | 10 +++++----- include/dt-bindings/thermal/mediatek,lvts-thermal.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/medi= atek/lvts_thermal.c index 506eed52db1e..89fb92666b81 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -1487,11 +1487,11 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_d= ata_ctrl[] =3D { }, { .lvts_sensor =3D { - { .dt_id =3D MT8188_AP_GPU1, + { .dt_id =3D MT8188_AP_GPU0, .cal_offsets =3D { 43, 44, 45 } }, - { .dt_id =3D MT8188_AP_GPU2, + { .dt_id =3D MT8188_AP_GPU1, .cal_offsets =3D { 46, 47, 48 } }, - { .dt_id =3D MT8188_AP_SOC1, + { .dt_id =3D MT8188_AP_ADSP, .cal_offsets =3D { 49, 50, 51 } }, }, VALID_SENSOR_MAP(1, 1, 1, 0), @@ -1500,9 +1500,9 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_dat= a_ctrl[] =3D { }, { .lvts_sensor =3D { - { .dt_id =3D MT8188_AP_SOC2, + { .dt_id =3D MT8188_AP_VDO, .cal_offsets =3D { 52, 53, 54 } }, - { .dt_id =3D MT8188_AP_SOC3, + { .dt_id =3D MT8188_AP_INFRA, .cal_offsets =3D { 55, 56, 57 } }, }, VALID_SENSOR_MAP(1, 1, 0, 0), diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/= dt-bindings/thermal/mediatek,lvts-thermal.h index 85d25b4d726d..ddc7302a510a 100644 --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h @@ -34,11 +34,11 @@ #define MT8188_MCU_BIG_CPU1 5 =20 #define MT8188_AP_APU 0 -#define MT8188_AP_GPU1 1 -#define MT8188_AP_GPU2 2 -#define MT8188_AP_SOC1 3 -#define MT8188_AP_SOC2 4 -#define MT8188_AP_SOC3 5 +#define MT8188_AP_GPU0 1 +#define MT8188_AP_GPU1 2 +#define MT8188_AP_ADSP 3 +#define MT8188_AP_VDO 4 +#define MT8188_AP_INFRA 5 #define MT8188_AP_CAM1 6 #define MT8188_AP_CAM2 7 =20 --=20 2.37.3 From nobody Thu Sep 19 19:36:26 2024 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 0526E84A33 for ; Mon, 3 Jun 2024 10:51:04 +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=1717411866; cv=none; b=ArKUcO/Le1rTbmhImEsI6Ha4YIU9QUcGs0w7kga7zMPIHtrm50avV12zdI6ewfRA/TR3PIIkSIohh5GI5vocK5wp6ndheoqEMqbGvMBTB9/5j1DHUhhgNDXJ29xeiJcJkku3xnWAyMnw2fzZrDs9rSwA4YxUds/h0T682YwcZTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411866; c=relaxed/simple; bh=hIvA39TYPLOif8A8RvknSlSb848U6P/fP6pMmPEKIo8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BzOTlj6cgT2eUkJ4o9v4YO42yo8+hSppXrMkMnDY0dS4VMgGlafMM4vwP32OJ7gkfWdXL30wtH2rgjAlc3Fey+/0PuGHMk+QcN83A46XMYi1B33r4D3LKA7MAcmDkJzVZGIKTFX7Nfd2qol2oGVrbE/ax0aHyBJbqsNjsxO11lo= 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=3Bd6PJEb; 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 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="3Bd6PJEb" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4212e341818so25666865e9.2 for ; Mon, 03 Jun 2024 03:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411863; x=1718016663; 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=3Bd6PJEbcUCzGUL656vISjLoXz1IHIJ1tYUqOrzLww6gwvu9ZaNcmJJl+hs9Le5M2w g+p6xqyM0n5AmnLbl+ge82dh+eLtjsHnLyKmNQeYy+AhSpnKPAcED94WXoav/r5i3CtW kSdAiYyuc3xsMupQSP/ernbssirs5mPGU5ZQERl4zfPY2iXFCNNlP6Xdl7o3aArWcTE4 cp5EN3jq9t8I5O/QfcKBVwmu5+L2QNuOgVUC6sW7j+6UgRqpMYpgZLWKJiIn2A30s1XP mueJfTcTcjwT9Mc5aQlmGDjnwKA+WWmakHn8iOYe2ErFfCHdyFXmAOzh9rbfjCn7d1QX 1UMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411863; x=1718016663; 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=VQekKWYcTRYh7z3/kU/8wu0MthyrIeIZx6YNzw+cEMxhB02Aa6pWwkyspTCFrv90Wo aFGOPghsYG7L92/3quBq0nkQMytLaiyf1Y96K06O8cFy0/nTlwZUyErgu7XLyl9a8mD5 3oBl63TsmLwHVg28Zki4hCYOKt/wi+L3lyH/ng7CljSpCHy9RhA0Y+AXdyZocTfNtxoH aHg6VZuPrkr461lWMuGVyeg4U679gt29/Im/CRrCunyPzQ4U4pa8RLqFtTuJQyUsr0Pw Sn0NVWErnGXSFfqyBfzSeek6PMhAOPRV2Mx1fXSL+emwUOLz2ntbGYhewBh1y+m1dTLm qEWQ== X-Forwarded-Encrypted: i=1; AJvYcCWx8ugiZ4TskrOvoBBHJfQwC0IMeJcnEM5QZcQYA+AFEiCtk9jzRy6quNJutSJVlSxO9ljG+NeWHp6YB12W4c3EFLu2gl1jeLKzW/+E X-Gm-Message-State: AOJu0YxewuSHHm9tFfcwjWQrWoMm2h9rkpHlOTH6KGin66WUHYAE/p8a s/YZl2QcjX3T1Zwi4SOK/DKUQ6j7UfYWHrsz2qt45ZyjdbpDj32cXLxT8HGC/ho= X-Google-Smtp-Source: AGHT+IHIpI7ZG1pCJsIFce1Ck3eFPOfrieRcWpk0YEJqOFz8SVhpF8pID2UFEAvp0s2E15RMKaVAHg== X-Received: by 2002:a05:600c:45cb:b0:41a:c92:d323 with SMTP id 5b1f17b1804b1-4212e04a1famr79830925e9.10.1717411863490; Mon, 03 Jun 2024 03:51:03 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:51:03 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:50 +0200 Subject: [PATCH v7 3/6] 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: <20240603-mtk-thermal-mt818x-dtsi-v7-3-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=1717; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=ZXPmUPXXFa1JCVfBMk9FrptEjzZlcdWN0z1cSMSnOwA=; b=Kt+1V0UhcrpohxTAKZFUE6vVY7Di9DK+ytngdabEc9EgSfLdYOSvG84ZuIRjZE5ntcFnGkiTk 2NXaGqDdubOAar0nMdkuK90dJZZMBlW7wdgSxz2A3s1DmE7244C82G2 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:36:26 2024 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 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: 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-Google-Smtp-Source: AGHT+IFg05hUJ+UhR1WuW3a3UOq5pjw9Flrk4uLNqvG+ay3rTDzn0O/Z7Iw1iLXiw14U2aWWNr+jUQ== 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: quoted-printable 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 =20 / { compatible =3D "mediatek,mt8186"; @@ -2197,4 +2199,299 @@ 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"; + }; + }; + }; + + gpu-thermal { + polling-delay =3D <1000>; + polling-delay-passive =3D <250>; + thermal-sensors =3D <&lvts MT8186_GPU>; + + 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>; + }; + }; + }; + + 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:36:26 2024 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 8B1A484A30 for ; Mon, 3 Jun 2024 10:51:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411871; cv=none; b=K0HNFPkQUeXjzN3GtkOp8R97LLwrE3LZlXF/gu+bbVYbREKMh57iQ3Mom4CrbeWD91Lg3ffB4tSAOTGHruu6DLyoygDgphyfqESOGqxhN8SSTpCkR0NJU5Wu/OsUcB8yi5pE5BE1qeASb2fApqK7Qqow9ZUai1SMYmvtga7+8hM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717411871; c=relaxed/simple; bh=RaphsPxL1vAZbHeeRLP1drK+MOl0iOgmrWjVA8BpwOA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aefdmStxJQDZmF2MgBucR7YJD3T+6QWCDdEluJ7ZJGDw2iQF3tpLznS5oNJ3u0ek4zNTuvV+FRvgkJmgMT2GS49zrUR0mH9AuGQbuYoynmFuIB6t5OEYnKDvHL9UyhMZvz1O/D/l6Xxy+7N/ib+QiDN2E6tVorqomNc6IVpavPM= 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=bNbNt+JF; arc=none smtp.client-ip=209.85.208.182 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="bNbNt+JF" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2eaa80cb550so19282881fa.0 for ; Mon, 03 Jun 2024 03:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717411868; x=1718016668; 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=aRW7Z+RxEALad/svOO1raRC4NcXEXhP3a8BeFtPc0+A=; b=bNbNt+JFXSwT0U5zVuqRAbfppM285KssyZ660ND/rQZ3aWIUyPwHs6ez6Kaop4Q3th Ko7Jae2CIBYAmfkpr53vcqHykK3WGOba5qj/rIj6FkcMDuQShAq1OlonOKfbQJccAxh7 pD3QfAn5WZj4hvJEcPjo5pP+2rti7wbN7Rou08c38Yvg8zNe0WGSkWohYzo0+Noh6L8s t4qk8HQyzqRAqe0fgeWtWs8JGlGr+VHXkoHtDPO0KLzFSFGOathM2SlOHwKUNljHVMKA /M1DeiA8nbkqsvoT5icX73NoGvJoF1LMnwNnTO/f29L9ozEAGuuQhS3Ah4bawn/mDvhr 7VIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717411868; x=1718016668; 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=aRW7Z+RxEALad/svOO1raRC4NcXEXhP3a8BeFtPc0+A=; b=vnyAsxjJr0cSxhMV/Wa1Os6f091Z8AgjmIPmYf4NTsZOkg/9l66WjjEYH5LCilPnI0 M8+kNnBRFatpnMlG6kNE69pVMEb7eVobLEXuShYKHoEpT+QZxxLg8g02pthaUUovBeEo hSdgKT+a44FOx3WxBNzzeKfxrJpgtF3hhqYdAgk6f66eV0kCbxqhNyQicaaRnzgcgrqn 8dx8SMiXTcCwoaxR9gFEVnZuHC4QozGOnFqz5E+uBH0oinYSNOSlRqE+7HXrRDwpq2+l GG8GBvt+S4uPl5k2yZfxfVfG5KEUacnIhJFxPFxgUKF7LtzUbznxJUpmFYlYcUqt+r0u sqYw== X-Forwarded-Encrypted: i=1; AJvYcCXS3qhJE9+HXXzrlek0dGOx9cIl3TNa3CFJo7lveFcTA9nNojRx2dgejmFn209nLnkWSyr3v/6lumPSGj1vjqNwALcYjHxccHD2ZIGI X-Gm-Message-State: AOJu0YwXUepG0en7MEML2EKO396Kfzm4/4QB6Pu/C/3jIBpR/IrxTpVH /w4Ui4wcoeXp1LsDnz5T1EandqU4mmxipwFzu1mwaq167BDxA2+xUlWqN86IcV4= X-Google-Smtp-Source: AGHT+IEGQ/xC8cX47PtpinhY28EGaWP+Mr4APwZrrd6T4OFRq3QMU1+xhuIu0AkIriafaOGRhgkcGg== X-Received: by 2002:a2e:b615:0:b0:2ea:7d47:82a3 with SMTP id 38308e7fff4ca-2ea9519b87emr58662711fa.37.1717411867679; Mon, 03 Jun 2024 03:51:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:51:07 -0700 (PDT) From: Julien Panis Date: Mon, 03 Jun 2024 12:50:52 +0200 Subject: [PATCH v7 5/6] 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: <20240603-mtk-thermal-mt818x-dtsi-v7-5-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=2943; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=a+N8mpao7+QeANDnMFXYaOS/6MVQmW9fHDWrXbASce8=; b=nPcjEmvEDQuDtpxAh7mvZz2ffsRr5fj3qPdL3X5DhgO6KVn3q8ZDpj1hjVdfG5wxvVClk3weC QqeeaNkkDhlBBnKbra1B7aOJADUxtXQsEYidq8Xne/9nTcyJKSxyLXL 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 29d012d28edb..02786fe9891b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -12,6 +12,7 @@ #include #include #include +#include =20 / { compatible =3D "mediatek,mt8188"; @@ -464,6 +465,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 { @@ -937,6 +939,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>; @@ -1050,6 +1063,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>, @@ -1273,6 +1297,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>; + }; + }; + gpu: gpu@13000000 { compatible =3D "mediatek,mt8188-mali", "arm,mali-valhall-jm"; reg =3D <0 0x13000000 0 0x4000>; --=20 2.37.3 From nobody Thu Sep 19 19:36:26 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