From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E96A606A322 for ; Fri, 4 Dec 2026 07:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=wB0yhXd0; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mDFQ32gW DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=Tt7ak6u9GvtAMxijtgwhHQA2LRvzO7SjA7pSllb093Q=; b=wB0yhXd0ZZiKfI zMeaCL3ioU3v5OM2nZH8kXopAcFs93fmlDAw3nVO1jHKcrZJFqqPCzWBygQVG2ZIbbWg1JIeN0yr7 7S7pkUBqEzGSfI6YcDN98qwjCBOIRFjgTCOv5bk5KUk39zmit/DV7Zb+eaoGwwqFliuaQTdJjkOcM /bzXXAgFIcuAgsKJhsVCTsQCQZnpQ6i7812M1J7tGp4WjEHJ1Pbzlp7+XG4ZGabxl+fdV4TZdZ/DM rkEO5jvU0XfLiwjGlIzicmu7ZKBei79nDbCniekuScom1qGWchvjtzA2rsn7KqSIITZLMvWTxpv/W fXdLOB0izOmyRoErMJPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNxo-0000000H0CM-15Nh; Fri, 04 Dec 2026 07:44:17 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNxA-0000000Gzxf-3lmn for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 07:43:47 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4bb85e07aadso6555615e9.1 for ; Thu, 03 Dec 2026 23:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796370215; x=1796975015; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Tt7ak6u9GvtAMxijtgwhHQA2LRvzO7SjA7pSllb093Q=; b=mDFQ32gWKhSFl3eXp56jdRtlo0QphFfuPA8gGF+k+X8w/lNQ5I1yUw7CWUN44OCqFi rrDCVvjqbtTkZndHlPeqsekDHUXPwcNpHv68HWjgPphzr4tsmwU718qIpO5ym+cUrRiU AXriTclaMlu5Dfqn+9cntcz43WqUzprWF2amDib4IbgGda2/TdsgSm32ssl6clfOS91s yrfl/XOWQnEKlvaZCzPNj8cENri0O/Ol+leAMP8G6pz9DDW6b5hqIEbgCylhvb7QDhA7 Ot5AoPN2GWJ22UbnyXL5UULHJDKIlnMWz0nWI4o54Kpr+yrzFKH+qQDr7K9VmKEiOivM 2yMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796370215; x=1796975015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Tt7ak6u9GvtAMxijtgwhHQA2LRvzO7Sj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Vwqi7/qtA4SqUKAbdeJ+btC9iGNY/EX4i8ysvmm51f6iPivnaqu6hgILEE f0KlKkzvhqI4dK0NwjXoreKVhJmisonmGj9A2NEIuE3hrkJVeGSHyxDIkci/fUXSX+MZXCPbaRN 3zTleygsaHY8iFesWSHSJvg1wOHS9aB5EWfd9/ukCTnbmw33daUDFQIloB/YSJq8T+F1wvG79Ue hv1KZeE924a5GKBBt7E0/lT2T0KcLx5nH6cD4nT/gXW67 X-Received: by 2002:a05:600c:1da5:b0:4bb:e1df:7a91 with SMTP id 5b1f17b1804b1-4bbeb6cacafmr20777225e9.3.1796370214938; Thu, 03 Dec 2026 23:43:34 -0800 (PST) Received: from thinkpad16.ts.appmire.be ([94.110.48.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe003108asm129692405e9.1.2026.12.03.23.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 23:43:34 -0800 (PST) From: Jeroen Trappers To: rafael@kernel.org, daniel.lezcano@kernel.org, sven@kernel.org, j@jannau.net, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: rui.zhang@intel.com, lukasz.luba@arm.com, neal@gompa.dev, towinchenmi@gmail.com, konradybcio@kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jeroen Trappers Subject: [PATCH v2 3/3] arm64: dts: apple: t7000: Add die temperature sensors and thermal zones Date: Fri, 4 Dec 2026 08:43:28 +0100 Message-ID: <20261204074328.3741080-4-jeroen.trappers@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261204074328.3741080-1-jeroen.trappers@gmail.com> References: <20261204074328.3741080-1-jeroen.trappers@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_234337_104958_58383E11 X-CRM114-Status: GOOD ( 17.82 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Describe the A8's two die temperature sensor blocks and add three zones: the CPU complex (TCC sensor 2) and the two power manager sensors. The CPUs throttle from 70 C (apple-soc-cpufreq is the cooling device), 90 C is hot and 100 C, the alarm temperature in the boot chain's device tree, is critical, below the hardware failsafe (SoCHOT) at 120 / 125 C. The CPUs are the only cooling device, so the power manager sensors, which also see the GPU's heat, throttle them too. Both CPUs are listed in the cooling maps, so throttling works whichever CPU the kernel boots on. TCC sensors 0 and 1 get no zone yet: sensor 2 is the one checked against CPU load, and where in the CPU complex the other two sit is not measured yet. The power manager page lies after the end of the pmgr node's range (0x20e000000 + 0x24000), like the watchdog's. The trips were validated on the iPhone 6 (N61); they are conservative for the other T7000 devices, which share the SoC. The nodes were drafted with an LLM coding assistant and reviewed by me. Signed-off-by: Jeroen Trappers --- arch/arm64/boot/dts/apple/t7000.dtsi | 130 +++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t7000.dtsi b/arch/arm64/boot/dts/apple/t7000.dtsi index 0342455d3444..529083268524 100644 --- a/arch/arm64/boot/dts/apple/t7000.dtsi +++ b/arch/arm64/boot/dts/apple/t7000.dtsi @@ -12,6 +12,7 @@ #include #include #include +#include / { interrupt-parent = <&aic>; @@ -34,6 +35,7 @@ cpu0: cpu@0 { reg = <0x0 0x0>; cpu-release-addr = <0 0>; /* To be filled in by loader */ performance-domains = <&cpufreq>; + #cooling-cells = <2>; operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; @@ -47,6 +49,7 @@ cpu1: cpu@1 { reg = <0x0 0x1>; cpu-release-addr = <0 0>; /* To be filled in by loader */ performance-domains = <&cpufreq>; + #cooling-cells = <2>; operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; @@ -118,6 +121,12 @@ cpufreq: performance-controller@202220000 { #performance-domain-cells = <0>; }; + tcc_temp: thermal-sensor@202230000 { + compatible = "apple,t7000-tcc-thermal"; + reg = <0x2 0x02230000 0x0 0x1000>; + #thermal-sensor-cells = <1>; + }; + serial0: serial@20a0c0000 { compatible = "apple,s5l-uart"; reg = <0x2 0x0a0c0000 0x0 0x4000>; @@ -216,6 +225,12 @@ wdt: watchdog@20e027000 { interrupts = ; }; + pmgr_temp: thermal-sensor@20e02b000 { + compatible = "apple,t7000-pmgr-thermal"; + reg = <0x2 0x0e02b000 0x0 0x1000>; + #thermal-sensor-cells = <1>; + }; + aic: interrupt-controller@20e100000 { compatible = "apple,t7000-aic", "apple,aic"; reg = <0x2 0x0e100000 0x0 0x100000>; @@ -274,6 +289,121 @@ i2c3_pins: i2c3-pins { }; }; + /* + * The CPUs throttle from 70 C, 90 C is hot and 100 C (the alarm + * temperature in the boot chain's device tree) is critical, below + * the hardware failsafe (SoCHOT) at 120 / 125 C. The CPUs are the + * only cooling device, so the power manager sensors, which also see + * the GPU's heat, throttle them as well. + * + * Of the CPU complex sensors only sensor 2 has a zone: it is the one + * checked against CPU load. Which part of the complex sensors 0 and 1 + * sit in is not known yet; they get zones once that is measured. + */ + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tcc_temp 2>; + + trips { + cpu_alert: cpu-alert { + temperature = <70000>; + hysteresis = <3000>; + type = "passive"; + }; + + cpu-hot { + temperature = <90000>; + hysteresis = <3000>; + type = "hot"; + }; + + cpu-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + soc0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&pmgr_temp 0>; + + trips { + soc0_alert: soc0-alert { + temperature = <70000>; + hysteresis = <3000>; + type = "passive"; + }; + + soc0-hot { + temperature = <90000>; + hysteresis = <3000>; + type = "hot"; + }; + + soc0-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&soc0_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + soc1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&pmgr_temp 1>; + + trips { + soc1_alert: soc1-alert { + temperature = <70000>; + hysteresis = <3000>; + type = "passive"; + }; + + soc1-hot { + temperature = <90000>; + hysteresis = <3000>; + type = "hot"; + }; + + soc1-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&soc1_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupt-parent = <&aic>; -- 2.47.3