From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796370216; b=E0/GxPz5ZBRxNyGquOc9vW9m4i7DMOmDju5ExBpHSygvmFE0pDkgnjXpDdXd+K55GUq2 PyBvqgtFteQDpIW1XqEdjyPSJXfEUe659gZHmcl/PbBnnZDDTqLS7WPlscWa7Y/T78bhv 1pWNTHT9mW2ubCT5xPIa2SeDlSUVB9r6JGPGZD/mfSz21F0Tf992/1Ze44HyWAU5kl3cq yPZDGX23xPNySDL/2ZBGit4/u7rInq3Ol1+GpdUIEsO/LYeko6B29+RQwOzVkmwsRlN4t S9JU7m25Xf5gAjRq/iu6VUzmEtPXhNbh40LASgQtYRYlgJER9RvUNQdrnyPKTlZ+HgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796370216; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=Tt7ak6u9GvtAMxijtgwhHQA2LRvzO7SjA7pSllb093Q=; b=4bO5HSvzIXqJYbWBSgMn6iSVnYt1yYDPl4iTCfDyysnCwF98JB5mbwhI/tn+SNa0fINT tsmeH1JKWMSqA4hKrBYCM7trsBSw6ynlzEDRgnBQmxR232+GU3sJLqrnxWdaCag06hbEI E32CmEpeH8Y3jqUq99SVkmGTDfPV9I2Ms2DgIUE9bBrDlN61y97QmesNm/zw0jA4jFBWe D+omnfRpWgukDhe0+WRXnQYj/eT0pOZdx1VLYmUTqcJ1x7lz1Uq9gxqIskNvMhAtmqigl QbcZGBf4VtYvNu7gbSem1wtWReLARGXxW9Ge3NltlY7fliD+EYxLwuhGqem6XNglQLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lT6Wh2S+; arc=none smtp.remote-ip=209.85.128.45 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75FD1606A69F for ; Fri, 4 Dec 2026 07:43:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 75FD1606A69F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lT6Wh2S+ Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4bba60271d7so5120485e9.2 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=vger.kernel.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=lT6Wh2S+VwS1KFRUNFiNpVXeo6T+KJmpvrZWED7aa2x3gb/kY7WrzipSMzkITSwvCy Wk44KzXvfZ+OlZZzhByBMRobSYtzbb8vm9KN0b81dRu62yeOH0wgM8KSQ5/92F6DuqFZ 01GTcxkhumZ2LTI+azYcuD9TVxfYNeEo20VJEFHtUA8lEPcXSg4yEYjf9YTYMvxGd8wg v75ixBapHsiM4JVVTbuh2Igod371cX5QQznyhKgP3NGRNooSLUuCopepJK/GceSpO1aC l4BnB4FOXIDpTeYmdrGfE0bFOO9b+T+34i989Wc5Zbe2OnIfuqDX1N7QEvOoFdlS3SYP 2PNA== 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=Tt7ak6u9GvtAMxijtgwhHQA2LRvzO7SjA7pSllb093Q=; b=T0y4KY09e0APXmW3P9vkI5+G+Hh+ou6JaV/09nJSEjAIAbrwRBoUbOAuwnwZ80PTks S4Af2+KVmt0tY96F+Kc2cb5ucaghjSQYiNnUKfCpYsa/IZ0TjNRjPYpWCwhOfQfwONJC ebdLkBsWWvQ7tVbFjygcatVK2h6bmsY+bo8qk8y4VBGrqRC0N0DQusTLQyBwyisDXLKu XXT+c3BN9BZ+TphGvdDGPy3WvzDV2Qp18XiqDb6fGfYf0v7ICZoGCJUow0sQi8Hl0xe2 irOiUjB8AUfFVijwM+WD+V+9SCZQ2RWH1bOdC6Xvt8AtJGEwqybma61eYF6QWGQQV+xc G3bg== X-Forwarded-Encrypted: i=1; AL+hErEIEewIz6y1kNafFfsA+itGMzP/IMuD/GPEGI7skZapYOTcpt6q9FDBBySUsNRuda7iNY5yyuFDOwwS@vger.kernel.org X-Gm-Message-State: APuU4Z+2NRrDPTvoNIhNOu5jeUABhfCHYZLSnWT0z4PB/tAilhYHQyeT LPXZ2A1eD62CBU2uqiUdu+VTpLqJBYeL/AJuRSPDYc1MxzE9aQEiuoKA X-Gm-Gg: AZFdTZcCGnfz+EMc+rv7iml/bYXxV7GvMtmEp/4RIJvYFMQVFHzpxw+gcFc5+BjEjft 6Y8x8iYo3hCCS6AiSabWqPBL/BO5UobLsmzxANa08zNgpi4ZAdFGQ68gIOWNMxL6qh9AjntP8gW YX/rtjyQ4bQVBDSYGXiLWkVSplKdl2/iDoklUnTYtzs1Z59qS2iefDfchnYIyC7Y+bouNbrU7ih gnDG8/Q5TrTCr8eeeD4fkg0rNoHjh9gsgCBXOmgLc09cFyfx26HOujqgFAPqaZQFfPVQRQVcq4Y IuBu88XWHE4VjNO7NoOd+JrVMInzs/u1S0rY+u4c8b5XGoinB56g+GC+ANl52rY0J/k5WJrztha pGb5aloMvMEKNPPplRVpXT/imqmMxSBXGsuZAUbpTUN4bsTiOqHsyOhk6WvQh9DkZ6ddn/kZC69 wK7Kwhmtd9xHZ2gtyzoJFmew1FMEma7rPR00WqCI87BGZCuIcJ594dxpbSyzn2zRui75trwGGrt xjm8ereq+46aYXpJeKvsoJmgE0v8OxNh9Lg831lAexR0QwnFvLPpPTfK/1IkdAmbQkoNH1UNm5w pydfzP6gHohrOzV72IizqVad96dnIpuw/UtRhieBxSSdjrOC2wisng5oAwnq1VR6Q0HD8yTyWCR 2e0dbiBcGOaBz1nI0Wp+8AyOB6yNgicuszTpdWXnEwjs1 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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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