From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796313457; b=MCaPlnfsmdchhZfK00iM4+xKCTT3MNNMQGbNJw6ep9ii81+Hi/w0dFwnAVo+Kdlk+3T7 /vVn72USUiWKRhUlqv9oU9yBBuwHFunfCMG9zsIqR1XANPB0/tzm9NBLcyEFLur1X7ioU hbS1afH9f+BmSQDOV1ACJRag9eyLUzFICPbpJfCr7W1zZs+uAcBfay15YUP1CmWm/drEg jw5EmCNL2Z42etGpglbcaufwr4qTZRLYPjrCGKgcBiFdASdp0X5iV5sq2xbNEPbZ8NQTN qESyanwqRHcMoquHFXbBZwDqc1odYWUhnLqv6JFXywj7wpTA8f1Oo/Yj/8RnqWCfA4g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796313457; 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=/X1/hjIs7oHhkGnE8xLoaZGtPHst9cVuk46qi7F4an0=; b=fkucCV2nEuIK8CVumUkgOovgmKHxougBt5NDvrys9kw8dVZsMG91xKn0wHA3PRX+7CV8 EOKiTFWgqDqfPT74YmZBAJmSg/mxWpfIUcrv73XDHXu6E/av+Qt8czcZQAF8pW9+dnDXp scDh+0TwTRyAUzRqIKPc1ON1rEHVwL6+9EQlfbIUXmgyfKX+C7ZQbB4rIjFNZWiRiHOGU qod1n8i8ZKFQduR9rKCTm5RpG8nfNyT3VlIKwuYwq8Yn9BLvEno56aO0quWsgqHKgdjEA SibmeGUNrjj9g4qFOcnGLvDyK47nK4vxzDXRhC0cBFUUqDhpYpLjTInu1ZO6TOGvQ3w== 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=XwJUFxTb; arc=none smtp.remote-ip=209.85.208.52 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 4C938606A6A2 for ; Thu, 3 Dec 2026 15:57:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4C938606A6A2 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=XwJUFxTb Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-6b88d143160so16939361a12.1 for ; Thu, 03 Dec 2026 07:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796313455; x=1796918255; 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=/X1/hjIs7oHhkGnE8xLoaZGtPHst9cVuk46qi7F4an0=; b=XwJUFxTbbg8vbkkCDlhfYAe3Pasc7mRkmX//mQykZocRoywcLi4C5ZZLno6aOY4n7a 9k866iF5ghKji0mnyMdVFcCijsbYI0wUq7nSwBv6F6I7qPYj3aT/05igtAZox9W69aYX 7OBSWkvyE1xRA729FwjIikrSWkUicGBl2CKj8FcHvmqLd3bV6HaYN8XZa5M8/+W4mzC5 dN8a3D1mfkoam1juLPKb5SvRFpO1Z74zZuTV+5Mh153qH+leM6fkMEcr19tpZEGocFIH 70lVyRXUfQRgRE1dAgmyU/Pi89UJ1+F2cgipMuNEj7cUJfSwYZXoNbObV/R+hwv4VWNK inyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796313455; x=1796918255; 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=/X1/hjIs7oHhkGnE8xLoaZGtPHst9cVuk46qi7F4an0=; b=HHBl4QOF1dxIc4HBroka+BcrxBxSxyMzGXnF2ns0d5jS+LA+xm85ges0zgiwpmCdP5 7zqCCqcf8R2tJiZ3b5MJXxesu/znkt9uRfZfqII2P0d2OyrAgU8luRVOe3FVQ306djEb EAm+U3zAHQjt8d88FTgdpVeGD4uqyUE4cxq9dk17luNf0JYDi4yfeHdYDSUUrHM96AHL B+7vfD5p+gkC1xMHFT2GugLo8ZYdR3U/lJHhRcQVMUl2R9gfc0ta+22d77MMUDY2bsHf yjd++zWykyyfKHDjWtldsrPf6h5QNebV0e/bfBOlysBZlzcD8ezL2ty150q0LF0EPGmT bR+w== X-Forwarded-Encrypted: i=1; AL+hErEgEi8/mnmiAi3eJk/cT0GD5ZGWeRmTQ/lQp8daAhDEgRxbeuWqJiA7p8AZ2bOdOClM5U4E7SzySQcxXdQ=@vger.kernel.org X-Gm-Message-State: APuU4Z8ml7DXFlWkcn/U68l39Yrgx4T8ws9D3ZnREuwEqZEGKCR8qQzE 93Pcs6fCnUpBJAR1Z6dzYhtjPA5WHRqldwH0Sh/shsYoa9IwGcQjunx+ X-Gm-Gg: AZFdTZemwkCbu4i1iCqFi0xTtuwZA43NtILgknvu+ku7ygG7fAWvELh+HH6SvUq+TG5 gvtzku6x4yYqeT06p/svVSDLDlt486r4BQRF0vjoINDZu3DaU8G62Dqiq0q/nNMT0T66GLOx4eJ TB+k/AyZIgSX3C5uKBuGJBrC18WDAhPpFLUaiKrYdECKGP1Xjf2xhlShxA83hzrLlZkbLxge4uC RHBOORR9gGimxFInUOuxkFrbJr7wHRciXlNxdJWhKWXK8HujPXozsEnVtanAz+ZATOk1u3umW72 t31Wtzqg5Q9yv5oLDFJBG/aWAk64hlMoHVZd54bEf3J7mkDgkqPQK0HHANdjEBKDkIDccSNWAu1 EObbSp2u6prUY45AGTWuOG0ihgCNicX2S1Zj6gz/EtKvKkugEdA5kBJapFcvtFDSk3awp8Ncd2p zz8Jodt72tgANu8lXNWjh/ESy7w1diyEjSlZJJq9BeFRH58wZFH0G2MbEJexy27WEnchxSFiuBo z2tGVXUzMQNm9ffwZrjONUjuIOSXumRHMSMOVdIM3/uIL+P6ewXkBp/l2ppSokRc7q2NoSdU6dR Ow7NyB5SDmxyLAv8HI6Iyz5FBqVdK4lZsB2Mvvi5F4IvwqFdIXfD1mjhxvcCmS9RAHC8bsHxnhR T34EdRDDv0UztZyTZmisjJ0a2ujcOkpy9kjPoGVUtK0gk X-Received: by 2002:a05:6402:5411:b0:6bc:6b2e:9375 with SMTP id 4fb4d7f45d1cf-6bc6b2e96f0mr3840216a12.6.1796313454568; Thu, 03 Dec 2026 07:57:34 -0800 (PST) Received: from thinkpad16.ts.appmire.be ([94.110.48.221]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6bc65ddf159sm1896383a12.10.2026.12.03.07.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 07:57: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 Subject: [PATCH 3/3] arm64: dts: apple: t7000: Add die temperature sensors and thermal zones Date: Thu, 3 Dec 2026 16:56:00 +0100 Message-ID: <20261203155600.3911447-4-jeroen.trappers@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261203155600.3911447-1-jeroen.trappers@gmail.com> References: <20261203155600.3911447-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 die temperature sensors 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. The sensor 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 | 119 +++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t7000.dtsi b/arch/arm64/boot/dts/apple/t7000.dtsi index 0342455d3444..ecac3d3b59b4 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"; @@ -216,6 +219,14 @@ wdt: watchdog@20e027000 { interrupts = ; }; + die_temp: thermal-sensor@20e02b000 { + compatible = "apple,t7000-thermal"; + reg = <0x2 0x0e02b000 0x0 0x1000>, + <0x2 0x02230000 0x0 0x1000>; + reg-names = "soc", "tcc"; + #thermal-sensor-cells = <1>; + }; + aic: interrupt-controller@20e100000 { compatible = "apple,t7000-aic", "apple,aic"; reg = <0x2 0x0e100000 0x0 0x100000>; @@ -274,6 +285,114 @@ 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. + */ + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&die_temp 4>; + + 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>; + }; + }; + }; + + soc0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&die_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>; + }; + }; + }; + + soc1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&die_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>; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupt-parent = <&aic>; -- 2.47.3