From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796370216; b=Pgbkkd1q9ikaWJXlEW2hpGRHM1Z219oeoyU3sXk/td9cGmVWDQpwb0MflDw82j2vsCa7 vmdKMTJVlO0FjoEArtgBYksBTSaGM2iW/smLezUphYmAphIL4T7Eyb+1Hy3LjOE9VnXg+ Nhhetb+NjqSH1wp9YxpX/h9n56dHDarcQ3iQhbv+u47ViqJcyW0+NVdyX97aNOHX3Y8r7 bMCWMMBooa4NjmM5UonOABDuoJM/auqU6zUaylRekc3ugjmI6bspEzspRfJBurT3gUvL4 HXqel3GvwYrnyaKJYD+JBvnkHXH66S2zjF+XVwwhKC6WRDOUez9AX+nEs3RSsayvVaA== 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=hDT4kH1mcv7NcYGXMyCqSukl/22bQ+9HumZ2vTuqwLvgV/upsKnp2z2rFCaQM1U6VIgC Ot4/0ClJ2/8Uly1qi9QeJPSxuO46fJgjweQ0Bued/i0hfoDhK4NF50UwOQh+/JdO98YPp Rkg8Bf9wfy+/BqCJ6t8NHXoo+grEc/7OqkCHGjWc6e2Q78QScXLRrJO1q+DzEvS6q4mVm i8KtI6LsGYWfhwhMdAAo5ffujEg3z9MAeJLnThTmH18v+O1iJtkUMZNzm6phh5ym9TC4a nR/xwLT0l84hL5bLRddrEJk0cJXxm4+hczc1T12QBQtnenA6cIjqLqKoMff6ZYCeIcQ== 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.41 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 8D99560A2600 for ; Fri, 4 Dec 2026 07:43:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8D99560A2600 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-f41.google.com with SMTP id 5b1f17b1804b1-4bb9d8e8e90so4941255e9.3 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=N41HgYd8KdBPhGbIXrPMr/Kv3nx0E7kY7rdo68JIfvEEtXg5h81h2AOEzMVuu9yr1M WCjoDi0i6oACBocCeIscyiNrFBUd3NHjMMcET+O+im+7uCNxcjHcyHUXHhcFGZTMBvJl cDyBEj1Y/H6I3bVLfFnNHTMVxHO5AlNWtlnM2pchTTgxu/RqJsnD4l5/+fBa9+HSiGcA lNaF8DZbg7ie+SV2BY2IvMmr0F2Wh/eqlTQB3uLOr/s37AyYdTn2oAG6aJqZga4vcll2 z3mlr7HNmTxb6sow5Mgm+XoDEo4HKZKmDet1D5QTGcTvSutPRraOzBVeO9a1TDEWdV+p Og9Q== X-Forwarded-Encrypted: i=1; AL+hErGLapYIVj+81G4mR88mloWkKkBcIuktQHgycP1LLQ80w4SSxOvlVl54VoIU8Jg58hX7GV+zy/FRK+Oc1oA=@vger.kernel.org X-Gm-Message-State: APuU4Z/r3gJty/llriMDjo3VYWllu26M1hk3+HzTVbnFXFiW+Z9+D+IO VoNI+/G6HAXftB+ucp4eh7N+jl+AHgD4E5R7mmHgpAaYr0QS0bMhGYLz X-Gm-Gg: AZFdTZe0grxfkvF1GDgMSSsgvyeI4isEgseP2SHQRYsnAi4hWaw7jjuLQV5hYGyXe+0 izy94vBwATVpfoZjU3cSmFB+dRPqzudb431O1j1vGSs7YXHpiqvGBEIocMXh5FVP2wmfYYQW0cR htjQXIt/H/bjI86kwYc4hw+u04a/cl2w759dGhzIgv/RUSXlc0XplhGFth97r3R8gEr6pyiUDws aiGz2sD4vHtqU+G1NPfuUomQ7UEHJa8QBrfcA+SbRrYBk6uOIh1zq1S4VvBb/Jw28HwckyTVyfK pst8mFbt6E0+l/x9YKXpgxR2dRadJQk53oTvfFDnzKvx5o5GXemXuzwkyHtvSa6o7xjLS6EwNM2 uJGFR8xOgVv3c0zw5fRyMpuPyxJodAiC6xfNac8ab90E1v/HNZW6hFAlkkwZA3PvMyGtM6qkv6n n+CdJGpb+tuRUEpieysZg27uHVy3znBQdZtL7C6jUkqOC0SbYq7B+Z0GfKQ80b7jmAGkLEXUZbW FYHAzKAF4PnsvrgY2WdxgSi4KIni9ugY9pS78ofEWEWeDLEXoUU/17/Hx1TqyIhKfHq9O8N7URz 6VKdALQ0ziE7Xq65RJRnkzCN+BodyNbZDLRvhkl0N7B/1RXyTORb7xHbF8waxBJ/jtYGHoe/zPX O6OVkrlKH+PY8y3EYOA5iF4vickOC52nZfRhMA7FkeHt+ 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: linux-kernel@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