From patchwork Fri May 24 09:04:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A247C25B79 for ; Fri, 24 May 2024 09:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zp3b5gqo1jlew+TC7PC/QZMHTUSu26Rs8dJtO/d1K4Y=; b=UDfs1BgKljhIcS MC9of51OpS4Fvpz5m0LmD9QaU2EIffYf+SfaUhkhdsoOlkZKLSiFBww5QUHkMM9fDA0PXNlQBpd/x bzsr3DbRsQB9hzKNzU57wXpZru0xXbBOAD+eSZ8ashKxmyb6cPc/jyGE3uVeERe3GhWbzzNiQu8yM z4UJCtWERvm68NJ28c1OKyNEq0iJsGm38Re1thB1hz8/iQljxfAVAxoGP8NOdtI1FIN8syBf4URLW WXvT2nwrwaTGQu9muZ0weyb7Dsjf05ceVXu4+kuEeOuAOt709DMwcMtYqU/ueDW+/FXV1Cu3obv5p LJ1Qa2nxBBPn831EtBtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQrC-00000008Syc-1Lbf; Fri, 24 May 2024 09:04:58 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr0-00000008Srf-1ru2 for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:50 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4202cea9941so62578745e9.1 for ; Fri, 24 May 2024 02:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541483; x=1717146283; darn=lists.infradead.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=uoPKo6y3Rls3bork3EHcuNoN18jSBiGl7Uk9FD1A50s=; b=vHjS3n0yU5srt+D5e6BhgVWeyCma9oOv3aC1H1K8fBuLXmZDAgYBUNAqJf5UMGDd7p /cQlVBZwz7VAz70VZ0wpWUXNU+H/PZCB1TRboOwprqnY0Htpm0ON353TPXtGfLi61H0r KwS4Xd5iTPzUmSVssfxq9mDtP/1bBlwD0N9T8ZEGGo4xp4FbrB57uF6TkONcLqiRmLx3 TXPcCx9zMnqcvH+p/kwNHmCTdow1ujKMEzWC0s6mfnxE5j2kESbjpHgoEFUXkXjd0139 p5PVjTmj2W73EvuN4AmfpsttTyHPAIbsPmxEcH2Xr10U/dV11zoHrJDUaWBLglbIUhAY aqUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541483; x=1717146283; 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=uoPKo6y3Rls3bork3EHcuNoN18jSBiGl7Uk9FD1A50s=; b=gyhoLuTFGbfkdu+80Yl030rrW8e8RY5iwhNG1vrLYYM8d/gw+unbvV3TbLWYmJ7O+J aqTfPOy9uGmAQzN4auDlA67+orLB7Y854OL08oCzIHgr8c/DeemuH04iAIau8Qg5FpPh jg1qs+fQMRLkfaxri4Hrl6fFuoJdUwh4n+asikregGFP2zXiNgKRoYoDYujBpiIEO2pb 7jsMdkl37TRPnGxuh6odM52ks+F0fr9RA7Y1b+d3Vh3NLDzoeYjh4VEpLM0JXT6ZRmff lTeJLoJQaGHB+XEjCJ0Y/szPvyUoTCjTDob73NyDhgnGu2zoOkZR5kQRfrQP4HIywuHt q8NQ== X-Forwarded-Encrypted: i=1; AJvYcCXYNbcP3Mo6htKve9g+UV/nsrdZRhsVF8HagOa8P4gMH+Eghoy7Dot2Isv0clt0LC7oHqD6GGcpD2QFryEt+ITidoqukFz6lhxa8kM90luLumLI8LY= X-Gm-Message-State: AOJu0YyLMJvgiw7OdJ3ah4AowCgj54LXh3s9NauaY563kAugK8hBirT+ eBszYviErS0dU7T4+v+IUWeN1bWknJcwJQk4HN0+3NarkinhHosMuLkBPa1Tsj0= X-Google-Smtp-Source: AGHT+IFpU4ERnNt7x7BjtA0EsmfIwtbjyLKpSwh5Xl1z3zoJKYR1+rNeB+IK22SAp4HcKpeCq9BkpA== X-Received: by 2002:a05:600c:534f:b0:41b:b013:a2d8 with SMTP id 5b1f17b1804b1-421089f4daamr13145865e9.10.1716541483183; Fri, 24 May 2024 02:04:43 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:42 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:34 +0200 Subject: [PATCH v5 1/6] dt-bindings: thermal: mediatek: Rename thermal zone definitions for MT8186 and MT8188 MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-1-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=1161; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=dLqKCSSB83A5CpMYvy5y1AWx1dYh/sN+oOI5PnPOVSY=; b=UqNxuRjXPeTBHKlV/cedr5aBagTA3pLWnK/IbBAMO8LzIZYjxQP/cJw4HIrV2uIKRW8rZ0j0v gMjy5x16ppYCza2SKj8b9pCxHHd+9ZyJAaki0Noua2Oe4BxfAEWcQJu X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020446_520217_CC19286E X-CRM114-Status: GOOD ( 10.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use thermal zone names that make more sense. Signed-off-by: Julien Panis --- include/dt-bindings/thermal/mediatek,lvts-thermal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h index bf95309d2525..ddc7302a510a 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 #define MT8188_MCU_LITTLE_CPU0 0 #define MT8188_MCU_LITTLE_CPU1 1 @@ -34,11 +34,11 @@ #define MT8188_MCU_BIG_CPU1 5 #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 From patchwork Fri May 24 09:04:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDD0CC25B74 for ; Fri, 24 May 2024 09:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zcIf5kI9v3Rb3cmvvfqWxqOTSnAo9bCCskhwmhH200c=; b=A6o5kZjlgh19tl BmoLEY14UZc8jGBpIyFFBAOBQ3OcNN1gwZi5MxX/+RtvAMS4MIafyes1CT+aOr9HH7Mp8iKqZfMKS MDwHSa6TrrwjYc2/Y5cqugCAlGxrHfyws7hbHo8wW/qAuTmXzz36alWI6T/Guzq+1HLxvKx4+fexN LsNpvpAliA5ew4fBXWbQX6hMcLRWiv8zr1fK1Dq4AqKIxB0gg22jlzKtcE8uZaQSnM0Q7yG6TQj1k pIIFo2EjeqgrhA/J8AC5/wBf7bpxC00WY5G780ZK1HuziC+62cHgnz7bvQV+xtwiDt2tILujZb0mm 7RcVE4YPsuxJDGyfzN5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQrK-00000008T3k-2b43; Fri, 24 May 2024 09:05:06 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr1-00000008Srj-1r41 for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:50 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-420180b58c5so27649715e9.3 for ; Fri, 24 May 2024 02:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541485; x=1717146285; darn=lists.infradead.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=n5J/C+IDybR4omqOS9SfWx1Ek6B9bW0Uauk6Wgutzds=; b=xTb/X9sstoFn5eG10JH+IJ9dplAZKxJkX0N5ETOWDq1EpMB6yjLGMjeBkWu67U7Plp tpejrSqLCOS51kyhlpJus4QDnokM7GZCFckx/yqnRLg5jKya8+0dciVyzdrhVcEUCdRH LrPa5F07llnl0byB0Z9es2jJl5AFVVkJrRxcmpnUOivriScLhMou6VLyij8XZrp1hWBz u5jBe+dA6/Gbn0n0B75e7tj8UewVStZyGQaUo6+usKR0WLB+qQ4tq6eEHKKaIbHkknKl RNKUIq0A86ra5jMhYfENfuu1VRfK4bVTrtiKbCMdKxGhiXXO6EbLYrMY5dRfGUXe442G B2tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541485; x=1717146285; 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=n5J/C+IDybR4omqOS9SfWx1Ek6B9bW0Uauk6Wgutzds=; b=haDOk3KxphY17MKSzG68wPi9bXnh24h4QW3+qrfCNQBXOfSf6CD3vPhQyngfPGb24Q 6Z/HRqUJ9t5UQ2C2EDFMyPv/aIJ3KXbVHZ+UF3vRBFjYfiXWFpugmUmWBWGKrsndOLLM fef7MwFP6Ij/Tj1UJWQMcGepVPi99Rjx2KYzSQ4Ztmo2+2Z4SB1gsWm0nQtZzusjxGV/ Xa3n2hOqJcGdquyXvMHAVe3I5tySeyPcxXAGQTL8ktR00tfkXGNOseq4uNhMv8Mbf8CX oZvrfsl6dMN7D/aZcGCJmr6H+I364pHzB3J9qun35kft5bFlJ8JYldu5HoY96v2xTOXN F6YA== X-Forwarded-Encrypted: i=1; AJvYcCV1+Ockv3so4jNOrfbH8l19H6bIdo2ws7MgJfOURxnBOLeN5osKZVf2stilHkMH7BDE9E7g/SJkuMH7bR21KRH8wm+n9Z0UYoN0HVsz36+5aZiTISY= X-Gm-Message-State: AOJu0YzCDWyA2DwKbB7EmB3WEBWLe9jmfw2LBo58SrB7YLooTA2vk8BQ Ez6fvsbf6l9LZFTOGcj4L160eMiQRp93zX8UwjmXpEvfWXKCNRjBA6eqS5Mt+8o= X-Google-Smtp-Source: AGHT+IHUDDoW9rQJTdAgLqeGcCRmeKf1PaVW4qpC2XoxgoR1WBGP9ozRpfaWZIwylY04deonHSWDDg== X-Received: by 2002:a05:600c:19ca:b0:41a:3b7e:2235 with SMTP id 5b1f17b1804b1-421089b1b42mr12560065e9.5.1716541485147; Fri, 24 May 2024 02:04:45 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:44 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:35 +0200 Subject: [PATCH v5 2/6] thermal/drivers/mediatek/lvts_thermal: Use renamed thermal zone definitions for MT8186 and MT8188 MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-2-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=1639; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=qOE+NwNH35rMZqPs630S3yw6fUABDjCAXs0E4TU/Lto=; b=rwZi7ol8l4OofuhfkYL6KEqAIXdExwo2d+8HZov5y+dHbOYu64V5flumGoI5gw4dW+mdzQGtM FSxO+nrBjttB8WDBGhUChWjc+R9hv8Vp/Oe7chcgm12gNpeN7Szpxay X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020447_525168_597BAF1E X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use thermal zone names that make more sense. Signed-off-by: Julien Panis --- drivers/thermal/mediatek/lvts_thermal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 0bb3a495b56e..89fb92666b81 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_ctrl[] = { .cal_offsets = { 29, 30, 31 } }, { .dt_id = MT8186_ADSP, .cal_offsets = { 34, 35, 28 } }, - { .dt_id = MT8186_MFG, + { .dt_id = MT8186_GPU, .cal_offsets = { 39, 32, 33 } } }, VALID_SENSOR_MAP(1, 1, 1, 0), @@ -1487,11 +1487,11 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = { }, { .lvts_sensor = { - { .dt_id = MT8188_AP_GPU1, + { .dt_id = MT8188_AP_GPU0, .cal_offsets = { 43, 44, 45 } }, - { .dt_id = MT8188_AP_GPU2, + { .dt_id = MT8188_AP_GPU1, .cal_offsets = { 46, 47, 48 } }, - { .dt_id = MT8188_AP_SOC1, + { .dt_id = MT8188_AP_ADSP, .cal_offsets = { 49, 50, 51 } }, }, VALID_SENSOR_MAP(1, 1, 1, 0), @@ -1500,9 +1500,9 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = { }, { .lvts_sensor = { - { .dt_id = MT8188_AP_SOC2, + { .dt_id = MT8188_AP_VDO, .cal_offsets = { 52, 53, 54 } }, - { .dt_id = MT8188_AP_SOC3, + { .dt_id = MT8188_AP_INFRA, .cal_offsets = { 55, 56, 57 } }, }, VALID_SENSOR_MAP(1, 1, 0, 0), From patchwork Fri May 24 09:04:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3263C25B74 for ; Fri, 24 May 2024 09:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2K5cU9IuT+Lzms4azHESGOQSA4ZzkcrxqfQzQRAfFtM=; b=QKsWrTmlMjDjlt RkA8EuN9UyXEHudYmV/JO1spUQHrVuFTvkOwC2Et4SG/UgcMi+UkrEhS+MvASpbD8tSJJy12Q80BB loLVCx1kiCTT+55szp5fIz3wUCKcK12wfYig43/XU+W0mPxg22IrM7n7+yoiYTw15h5B8Io7+5b9Z B4oR7u0L1RnWWo6D2uYwnNEjOz6xjLdwfrEsPsrlJrUkk44Y8jAKvFy7QZs79XmJ19UbSLs9RLhe7 WeIud5jg1PJQji4uoSu3au9NgcRODV3LIKohGGaxvKhQB1N5oGqX2mWJqR6OwZ6t1BnloeQFJMSkW XXDWkKYOcfmTCZ007uhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQrU-00000008T9e-05PM; Fri, 24 May 2024 09:05:16 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr4-00000008St4-0oU4 for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:51 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2e724bc46c4so61414631fa.2 for ; Fri, 24 May 2024 02:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541487; x=1717146287; darn=lists.infradead.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=noQSviTD/oexfxByAieCm91cCKYNGH2a6qMNAjox/dPTMW6NrwkhvRrs5Uepgy4Dm4 cRY3Hk5LpL0aN0wqDl5V/OClctEHQT0KWuYRpiDvBZoqOSBiZ1uT8oVbP8gJA6ynG5V6 OaWTEgsY8kgtg8NWdGfV05O+wbf0S7GzSE2E6+7TUaRJ7erNDJgMlAbJZNlPI9V0ZG8s m0d5NAla2LuaCooyAPFkzv+ecLICbxCUPEbvBmAL9GuQQoteVbIFoZgQS86bG2QmmGLN SeevQLmNfAazYu13g7grzwJ7cpG5/nqfIoAXdjNxJorMBPSCpdz6XLRjglthRi3FtFRv D4zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541487; x=1717146287; 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=Ss3AAqHwCWTfeybQDVelUyVeWpV23e0srxxR1mu4g5nXxzIkTkkIz1g3b4mEuPX5Am fa9FW4EXgRzdwsCn8saZBP56yFbgNjYZq527Jt95TBM0HNFpNdSXwYVhlPozoZ6zs2GH Ses9XVwwKplOvqxE4oAdwRg/c7Cs3KzKZW8G2Db1B0qisq5t5uXPxYJXZ3ZgeDPgJWLz qV3m6gXuHjoQO7HOeFcoWkFTzs1+f1h+CWtnN0xjb+Z+XA7u7QS7Jhg8NNerwHLbcFqr OHFwfgZkBvhykrK3dpnE1wcLazRJtii3QZpEKACkZ5gT/bz178GMVOGRwMiwtRZ/9Jv6 Xj4Q== X-Forwarded-Encrypted: i=1; AJvYcCVJC0/EbVkQ0bKczJ0BnzzClw2rKiM6dY+k2WC3iJQ48mCzWq4kpOdnfwsxBhhstaNn3I15vQZ6NSEvRAB+SqlhK093nSGE7tsivtWsvWYtDBTIMrE= X-Gm-Message-State: AOJu0Yz0j66e+9sFVwYf4JdXHLRcUpQCox2ofszwEf29eUbApiymw0mv AqZ/wMIj7ju7c2DXh/6kJEEKz1CXWJFNZkLxLnpyUb5RCkeLzY29YoFEfqx+sHU= X-Google-Smtp-Source: AGHT+IG4ZPvP3zyMcIIsqJRNHq2zKeq8gVeaCSSEPAEcrdFwonBn4Mlo37q4NLlAbVPyD1pqqDJuSw== X-Received: by 2002:a2e:9c8f:0:b0:2e6:f59e:226f with SMTP id 38308e7fff4ca-2e95b0bce90mr9581401fa.5.1716541487399; Fri, 24 May 2024 02:04:47 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:46 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:36 +0200 Subject: [PATCH v5 3/6] arm64: dts: mediatek: mt8186: add lvts definitions MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-3-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=1717; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=ZXPmUPXXFa1JCVfBMk9FrptEjzZlcdWN0z1cSMSnOwA=; b=DnxRTjxW9wcR2LDOBi5XDgQoQhBL6Qg8MGh6B91uPvtLP04Jw+un7gLHna5Fd+Gap9ino5nx7 0fkow0NZ0Q1B2HcwWjk8f3uOiSg6Yj45Xh3lrEEqW62m2BKow3pSlc7 X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020450_370086_044B2CCC X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 = "disabled"; }; + lvts: thermal-sensor@1100b000 { + compatible = "mediatek,mt8186-lvts"; + reg = <0 0x1100b000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8186_INFRA_THERMAL_CTRL_RST>; + nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells = <1>; + }; + pwm0: pwm@1100e000 { compatible = "mediatek,mt8186-disp-pwm", "mediatek,mt8183-disp-pwm"; reg = <0 0x1100e000 0 0x1000>; @@ -1676,6 +1687,14 @@ efuse: efuse@11cb0000 { #address-cells = <1>; #size-cells = <1>; + lvts_efuse_data1: lvts1-calib@1cc { + reg = <0x1cc 0x14>; + }; + + lvts_efuse_data2: lvts2-calib@2f8 { + reg = <0x2f8 0x14>; + }; + gpu_speedbin: gpu-speedbin@59c { reg = <0x59c 0x4>; bits = <0 3>; From patchwork Fri May 24 09:04:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A0AFC25B79 for ; Fri, 24 May 2024 09:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Aj9f3Pzy62Ga5Gg7MWLjmR0SZFC3+MlexV8Gmo8jcis=; b=ZOh+ZHMvA/OZp8 OcaRlgYsgHSZM6k9f3iya/3ZNfxjlq2uQw3b1GkoNGQ+OzneAcr/JTC1b3fXLxsdiPxOCjV3c1zTr R3xJnRi5t5m7PKbraTPJtXHR5NHycvp+gpGGAoPkoJTEEcESYod1DLon6/9KU3xcskFAhiHbgCDtA ioqbafWT1xnVWlXtw+G9g85SJZ1D8PZOzkIKFq4LoetnC09uIwQFuTt2URyPILaYYiJbIyCLTWiE5 BDXh0uA/KeV21gLyaX0fNFaHAZM8aqECKijRK2Lrrtv+tav6OwSJbcyiGxREMydLfO7lOMdCf5vxc IvaZd+QmRKmGzH6WgDLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQrc-00000008TGD-3aXT; Fri, 24 May 2024 09:05:24 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr6-00000008Stt-2sKB for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:54 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2e6f2534e41so71855481fa.0 for ; Fri, 24 May 2024 02:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541490; x=1717146290; darn=lists.infradead.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=kQYjDJKjiuUGN1IdrBorFo2itihiB9FUhURZkClhppI=; b=IUdGu3wQXGa7PzP1dNNvJZwBVWfNgJCMvkVQNfUC5NY5hLkSffffqgGxWYQobJl24F g4e6yCv3urinhiv9N/9ox0PJWVAQQVnYUAHot+lnqrIMg/HwjvvBivcXub2Kw/7yf/+N 5rPzZZ0219do9fo66iAc5ZtyEsB6jCgtaKBEalMj62avE8VslBWI8g3P7+Pbs0tqHoS/ IX7dPlbfkFwBO4Tt8ggpLbf83OCrGENdBNOZnEvAOeRS0JSWjveHsTHXwJ1gPoVkLWKr VQdqwDmnGWXNpEVdPlBJJE2e6L++Ej1vZ7yNUXs/svevUKpf9LziEVIkZII/E1wS3kpt oaEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541490; x=1717146290; 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=kQYjDJKjiuUGN1IdrBorFo2itihiB9FUhURZkClhppI=; b=LFKblymeRrYdxtZuI3MM9MfvgWQAOXrM481CdXELGzNFD9D3q2HXQe7Cd3ZyXNHNK+ kfhthmPjEnZ+QDVg66Bosdtk63CfX3FHfAhFsspKif+oiewJARVAclXUmI4m9Q/k4w6S WIj2q1v4+R/Gba4vLdcmTCcVaFharIiW4itVyIDiYjRD06j+KiBmW6GJBfTbwKxij9o/ ffmbMrrbdhHJPrE2x8OnG4Mx7x8TBJYnNj6Tyk+Oig8TT9m/NNXFEJag5XTyC43F9nxu bOEbM1QYehIsyONO2n0nKCaIhgCxzs0qUCxz6JsTaCtjiLMIAetfFJzPQEW1BO1L2YQ9 bwrw== X-Forwarded-Encrypted: i=1; AJvYcCWBPSl0id5KiKWRpdg7YjxrpKQp8vK2LZN08PZgkWcUQK4ckpDGVw2S75geOptLtnBmvDTIHtjNEcr4s3qO5SiliNnUTohHgs3TMjwUo/h2FE9rwT0= X-Gm-Message-State: AOJu0YwHkvrCj96QCpK7yOnlWdM0WB0J4gDWvWMHgD/g67OazWLmwe6t kj1xJmGSUy8meTXZbn8V8WKDLvJM1YzfFzeXaJ6lcGVRElFM/enrZpzlPxMk6nU= X-Google-Smtp-Source: AGHT+IEWY1785xuP9/i8yXEbOXfKA5w6okdNZnyRXoBfWq0mc5JIkHLzCk4rRKy1BU/1uAAubYUrjw== X-Received: by 2002:a2e:7c16:0:b0:2e0:1a40:6ff1 with SMTP id 38308e7fff4ca-2e95b03f295mr9859161fa.6.1716541489839; Fri, 24 May 2024 02:04:49 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:49 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:37 +0200 Subject: [PATCH v5 4/6] arm64: dts: mediatek: mt8186: add default thermal zones MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-4-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=7777; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=sG5Ze//7RlqRD8XfjGttbCgM09mHkLhEkzGoVC5Po1o=; b=ddNwZyGkYMLsHlw5K9GzjhQ54XMaZybiMes1Coyl8cdtyfFhljpTtyM5BCoNKOSSV0WfIoWT9 PBJ0KjMjVK5A7zZuoqIIomOpVAf651JUJmljzXKEPTQtQXYfuLXdlQT X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020452_867641_349CEB90 X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 297 +++++++++++++++++++++++++++++++ 1 file changed, 297 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index caec83f5eece..95fe5a05f0d7 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -13,6 +13,8 @@ #include #include #include +#include +#include / { compatible = "mediatek,mt8186"; @@ -2197,4 +2199,299 @@ larb19: smi@1c10f000 { power-domains = <&spm MT8186_POWER_DOMAIN_IPE>; }; }; + + thermal_zones: thermal-zones { + cpu-little0-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU0>; + + trips { + cpu_little0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little0_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little1-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU1>; + + trips { + cpu_little1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little1_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little2-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts MT8186_LITTLE_CPU2>; + + trips { + cpu_little2_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little2_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little2_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little2_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cam-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_CAM>; + + trips { + cam_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cam_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cam_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + nna-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_NNA>; + + trips { + nna_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + nna_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + nna_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + adsp-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_ADSP>; + + trips { + adsp_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + adsp_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + adsp_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts MT8186_GPU>; + + trips { + gpu_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big0-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts MT8186_BIG_CPU0>; + + trips { + cpu_big0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big0_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big1-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts MT8186_BIG_CPU1>; + + trips { + cpu_big1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big1_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; }; From patchwork Fri May 24 09:04:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9742C25B7D for ; Fri, 24 May 2024 09:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+gBS6Iob+UMQckHaF6SBkDEQ0vHX0y3pYtNST02VHcg=; b=hyzSyhiLDMsuZK JHPDbEoGMO9LzCnvrObSBJHXzqgRu8PXhon/LfuL+6bY0qjKXK/DACp8eO+lJz47ANXi7oGNcccmk xpIWlJzwJQuuJee8i7hdoLoWN7onV8Rg+4g2tnudIZIu5rpH/mDy9lSCFTsDhRr2sSB23SzFtd8n2 XfXcLwohl7Z6RCQKsxSHdmzeeMB2GeZfSrmov7JPfSk7X9Cxyq2ViEccbcJODP62Re8uAVh8ZJ3ud j73RVLQfN4vis0Dlx9oE3ThG2f6UgCDVTJgDYhG7S1sPL7JMS8vRWllyCmGq03NKqD8B/fIK8qLgB DQafSCQf9hYLhxMdOcfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQrd-00000008TGh-32Kp; Fri, 24 May 2024 09:05:25 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr7-00000008Sv5-1JhC for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:55 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-420180b58c5so27650455e9.3 for ; Fri, 24 May 2024 02:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541492; x=1717146292; darn=lists.infradead.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=W3tuO7Z7Q2hRicUOmo8XHmhNw95kZFoOZFzdQYeywqxE8DxwHxfdwrQD5+5m9ENP4T yt09DUaxpAem7njZx7eZpYIljd2YkeT11XAaIfVoIffMobQgQJp0bmqj2rmNqeWhReCF KWBCHOirKB9mfllYChDO/zN0uPwcDyLD3PgcHJDsRoon2EGl6E1/koTa+EiQ4rMQu6CO 0XhnWhq4u8PuzaAxwglc7Ao1C7iSvfWKj1fCjS6IMizEpgWejqz2tqghkWxwq7VABj+x V6hbKLw3aS8W3KjXAU/9kdGSVxrP9M0KE3KUte7eBQAlV3GwQxRREXWljyyQMzbv2UOQ S43g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541492; x=1717146292; 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=u73Acvp6LUUrzDrj7DfEgNADJdt7WQ+uFNqHTvPh/TbVgGcKP/1DO5BZDwwa9yePRw qevRWIVR6V3kxOPYNLEAy4nZ/qt+1x4rjRekLUxWciH47MxV7xP59gSK45gMOwyEcyGr y9V4WWptq0OXWlNSDZgXKcNG8dREdfK1bmmeFtnQzfOR913dbr6s9oQcVu5mesvBV0kJ +LfUeLfTmrskE8kDvuLfvyY71B9oz8njhVqpteSACbE65UgqRlI0tu80YRsR/LPTz7gB uV1ZPpo9Q7Fp4oyuvXkd8lzwdzuqNpscamdbq9yyr0oGb/s3/clZhjxyT7i4PtKBz+MK dX3w== X-Forwarded-Encrypted: i=1; AJvYcCW/yLpW5JLWwKuIdViqs01Ihv4oCFrKmL9GUo7GnHyL02NNTu8oBf6lHrILvsp0Lm8VvLWQlSQPseafdVHKtaDPhmItHGowWgeUOzluqSaCOME3mow= X-Gm-Message-State: AOJu0YzxM8GSBPMtCZKuIPB/xUMMcvYIyAvgBcHgg6XM2zU+d0sXJBiU j/mL1CI4KaCYqlO9eG7zWNNjUYjKgPmm3uvbVZ2AnH9VRsf1glNaP7anklMoJ8E= X-Google-Smtp-Source: AGHT+IFenMcuhS9OsEyd+h7AaddD2iy90CZR7BBfUN10hVId+maydXEPDYGko74NzdBb4Y9rrZNbKw== X-Received: by 2002:a05:600c:4690:b0:41b:f3b6:e5da with SMTP id 5b1f17b1804b1-421089f981dmr13646005e9.36.1716541492077; Fri, 24 May 2024 02:04:52 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:51 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:38 +0200 Subject: [PATCH v5 5/6] arm64: dts: mediatek: mt8188: add lvts definitions MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-5-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=2934; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=UpRqfVTfJj/4HAmfkOjlSQQqb0p0PX5zc+/lgsWNhqY=; b=Gx+63BRCjTxPhtYHJO94l+rLZO/giNvzvSPnRBXAOb4fiO0zkouPa+UhiVToPGnfja1IeLBsv S8PaOVfWQWRAdfrvCg8GMOaIdgVkSFYOVvrvc50uQVKXzwylwaIGpSm X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020453_529513_39B6B399 X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 / { compatible = "mediatek,mt8188"; @@ -357,6 +358,7 @@ infracfg_ao: syscon@10001000 { compatible = "mediatek,mt8188-infracfg-ao", "syscon"; reg = <0 0x10001000 0 0x1000>; #clock-cells = <1>; + #reset-cells = <1>; }; pericfg: syscon@10003000 { @@ -491,6 +493,17 @@ spi0: spi@1100a000 { status = "disabled"; }; + lvts_ap: thermal-sensor@1100b000 { + compatible = "mediatek,mt8188-lvts-ap"; + reg = <0 0x1100b000 0 0xc00>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8188_INFRA_RST1_THERMAL_CTRL_RST>; + nvmem-cells = <&lvts_efuse_data1>; + nvmem-cell-names = "lvts-calib-data-1"; + #thermal-sensor-cells = <1>; + }; + spi1: spi@11010000 { compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm"; #address-cells = <1>; @@ -604,6 +617,17 @@ mmc1: mmc@11240000 { status = "disabled"; }; + lvts_mcu: thermal-sensor@11278000 { + compatible = "mediatek,mt8188-lvts-mcu"; + reg = <0 0x11278000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8188_INFRA_RST1_THERMAL_MCU_RST>; + nvmem-cells = <&lvts_efuse_data1>; + nvmem-cell-names = "lvts-calib-data-1"; + #thermal-sensor-cells = <1>; + }; + i2c0: i2c@11280000 { compatible = "mediatek,mt8188-i2c"; reg = <0 0x11280000 0 0x1000>, @@ -827,6 +851,17 @@ imp_iic_wrap_en: clock-controller@11ec2000 { #clock-cells = <1>; }; + efuse: efuse@11f20000 { + compatible = "mediatek,mt8188-efuse", "mediatek,efuse"; + reg = <0 0x11f20000 0 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + lvts_efuse_data1: lvts1-calib@1ac { + reg = <0x1ac 0x40>; + }; + }; + mfgcfg: clock-controller@13fbf000 { compatible = "mediatek,mt8188-mfgcfg"; reg = <0 0x13fbf000 0 0x1000>; From patchwork Fri May 24 09:04:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Panis X-Patchwork-Id: 13672881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAC14C25B74 for ; Fri, 24 May 2024 09:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fny9hv8zsHfrCWPv/birNYkaP3NA/Yt0wlN41lCqaVo=; b=DapoLafjhPQMMx ylMika4GgzN8QDovZmXGEzvkJCtKLUC+BiTkNs7L8y5uY25JHIjNMIowJV3ON3iwbVCPNvYNPzoKv 9Bfan7dFKLB/Jy8Ijym40h6vwb5YmN16ISQ1ABxXSrthGuHaqbppHt2/icc/0xACgK5UdH6Ooknbh +BR6ewwW2K7Y2ULp4mlJrQu7A0w3XpsyqhnY2jk+YNgQ+QhlgyB0KZ4OtpiPVQ8m93EzjahSuyzRB J38mo5K/jLlKpS2J8/1ym3pHYqPf/yCbfXCidZaRrNSdhpO7GMYHLJJmt3m8fS372b9QAwfMytrhO +k0d1PJRMYqedv5yzJeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQsC-00000008Taw-3ocx; Fri, 24 May 2024 09:06:00 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAQr9-00000008Swh-2MdO for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2024 09:04:57 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-420180b5922so35472865e9.2 for ; Fri, 24 May 2024 02:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716541494; x=1717146294; darn=lists.infradead.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=8JsfNElJfg7t83JWSY0Q5Kr7lPKCXG5izuiy1SK4/V0=; b=MbxZXOr17aOxavNqvuXuQAnUsXbRpJiOsEEbgla/q9lVEudkAm9u7FdrihSQyQfOND h5dQZUGqse2bKUTiRyQpJ0wvYdIZMyUq+PqAYoReRTOeKbW5XE2VtoxzNBIifQaOS0fs rE0GSLqAXgRsw66YUh3ZXCBfPNKI7BInUan9wNPghOWwjWoj0EBQUR9Rd6oVzV+iATEv r5R63tOg4wuKP2OFT/xF8fOWqgReLGEEFF/x5AIPv3bHbZXqmHXaQ1Z7Yp5kHA20NvA9 jjtxWOPkxxC8TNoqVpm/rii6hzcz5DnlAxdFzBRIeHjV/1SH9Jc1Rx7fFbu9XNle5UWY N7/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716541494; x=1717146294; 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=8JsfNElJfg7t83JWSY0Q5Kr7lPKCXG5izuiy1SK4/V0=; b=wCDUg6GkrKTRoNHoqVvYradHLQ1qgElupzgPtjTetLe6eSTNUzoCokWdgsxKhZjWVZ tRoPKzd1eCUZlcVrhOW4txE+suurd/K/s/aMJftvK9qCx2auXgBajB4YDsBmxI6YD5A0 u/mPXc3Nv0vEqCHmjkKD/3HuYiS58+2k1SHWiQjIAxWhhXs6e6N81RSzqSMayc29aJaI b5+4Crwx0C9r2p1/PS3glIg/qi7BpOcoQrpCYmZRB+/+KOc457Ej40Fk8/Bwo49Xa4sp MhzPvjMvmpr313R4mzrIfpd6kaxMiKrf9Ch99lWqSbnfKdG/Fc10EDe5gNCLkQOgLNOZ 4XTw== X-Forwarded-Encrypted: i=1; AJvYcCVLV61fzYUkzS/bxdRYMWsCj0pCpx9xNB+hh6dG9NPaOcRFUDyBJ2TSRBmk7Z4kMRBp6xYNVadbUHhMDGY4qUO3JU7Q/GlmooHzkAKUMMTf1hEchFQ= X-Gm-Message-State: AOJu0YyXQ+E0Xovi21RGEHdDasQYi2nEHsE2ZphGQ3PQGcZx6nAddsKJ s/riNp0iF7kqd9q65t3Tl1V48gpJqNFROZAd6nvSnRXCH/rnCZ1t5YRNmxg930s= X-Google-Smtp-Source: AGHT+IGLRmLy3vLX56naNsxt9tkHt77K7pRo1mPcyr+8LC5xIKDSsfPjy2sv/TraDW6T0gxjlBPqkQ== X-Received: by 2002:a05:600c:5354:b0:420:f8:23d6 with SMTP id 5b1f17b1804b1-42108aa7589mr16124105e9.36.1716541494243; Fri, 24 May 2024 02:04:54 -0700 (PDT) Received: from [127.0.1.1] ([84.102.31.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f163a8sm47273045e9.13.2024.05.24.02.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 02:04:53 -0700 (PDT) From: Julien Panis Date: Fri, 24 May 2024 11:04:39 +0200 Subject: [PATCH v5 6/6] arm64: dts: mediatek: mt8188: add default thermal zones MIME-Version: 1.0 Message-Id: <20240524-mtk-thermal-mt818x-dtsi-v5-6-56f8579820e7@baylibre.com> References: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@baylibre.com> In-Reply-To: <20240524-mtk-thermal-mt818x-dtsi-v5-0-56f8579820e7@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, Julien Panis X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716541478; l=11210; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=PlNfQwewW55iPtm2FBXd/o7mTcWM5UJJaAgZGNKmb+Q=; b=ttEY0DWULPMoKBafExGLDh+BDacKW1oxwfvayzgooWH7cebFkT6IhroBs1N4Jn33RPthPFliK SqAZ15JAQ4tDhNIA/7F+SPezL9jxxPQIo7QAEPnVQE3eDOX0UhWDggO X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_020455_760755_48A5EB42 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 446 +++++++++++++++++++++++++++++++ 1 file changed, 446 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi index a9f1b9db54a6..6ab4ccc245b9 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 / { compatible = "mediatek,mt8188"; @@ -311,6 +313,450 @@ psci { method = "smc"; }; + thermal_zones: thermal-zones { + cpu-little0-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts_mcu MT8188_MCU_LITTLE_CPU0>; + + trips { + cpu_little0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little0_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little1-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts_mcu MT8188_MCU_LITTLE_CPU1>; + + trips { + cpu_little1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little1_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little2-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts_mcu MT8188_MCU_LITTLE_CPU2>; + + trips { + cpu_little2_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little2_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little2_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little2_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-little3-thermal { + polling-delay = <1000>; + polling-delay-passive = <150>; + thermal-sensors = <&lvts_mcu MT8188_MCU_LITTLE_CPU3>; + + trips { + cpu_little3_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_little3_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_little3_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_little3_alert0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big0-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts_mcu MT8188_MCU_BIG_CPU0>; + + trips { + cpu_big0_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big0_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big0_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big0_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu-big1-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&lvts_mcu MT8188_MCU_BIG_CPU1>; + + trips { + cpu_big1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_big1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_big1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_big1_alert0>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + apu-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_APU>; + + trips { + apu_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + apu_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + apu_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_GPU0>; + + trips { + gpu_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu1-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_GPU1>; + + trips { + gpu1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu1_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + adsp-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_ADSP>; + + trips { + soc_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + soc_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + soc_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + vdo-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_VDO>; + + trips { + soc1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + soc1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + soc1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + infra-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_INFRA>; + + trips { + soc2_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + soc2_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + soc2_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + cam1-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_CAM1>; + + trips { + cam1_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cam1_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cam1_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + cam2-thermal { + polling-delay = <1000>; + polling-delay-passive = <250>; + thermal-sensors = <&lvts_ap MT8188_AP_CAM2>; + + trips { + cam2_alert0: trip-alert0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cam2_alert1: trip-alert1 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + + cam2_crit: trip-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; + timer: timer { compatible = "arm,armv8-timer"; interrupt-parent = <&gic>;