From c3e48b37c6a93e0c0d8dea8dfcefa8f2958b4440 Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 15 Nov 2026 00:05:18 +0700 Subject: [PATCH 1/2] arm64: dts: apple: t8142-j815: Add the MagSafe 3 PD controller hpm5 on nub-spmi-a0 (SID 8) is the MagSafe 3 port's PD controller (ADT port-type 0x11). It has no USB data path, so it gets no connector node; tipd registers a Type-C port and a power supply for it, as on J714s. The bus is polled on T8142, so like hpm0 and hpm1 it has no interrupts. Its ADT features-supported is <3> ("Power In" only), so it is marked apple,no-liquid-detection. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick --- arch/arm64/boot/dts/apple/t8142-j815.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index c45d185c87c4c..9a265e5567868 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -471,3 +471,18 @@ &jpeg1 { status = "okay"; }; + +/* + * The MagSafe 3 port's PD controller: ADT hpm5 on nub-spmi-a0, SID 8, port-type + * 0x11. It has no USB data path, so it gets no connector node; tipd registers a + * Type-C port and a power supply for it, as on J714s. The bus is polled on + * T8142, so like hpm0 and hpm1 it has no interrupts. Its ADT features-supported + * is <3>, "Power In" only: no liquid detection. + */ +&nub_spmi_a0 { + hpm5: usb-pd@8 { + compatible = "apple,sn201202x"; + reg = <0x8 SPMI_USID>; + apple,no-liquid-detection; + }; +}; From 95ef8130a5a64912768f042c56730f187c12d7dc Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 01:22:51 +1100 Subject: [PATCH 2/2] arm64: dts: apple: t8142: Share the MagSafe 3 PD controller with J704 and J813 The J704 (MacBook Pro 14-inch, M5) and J813 (MacBook Air 13-inch, M5) have the same MagSafe 3 PD controller as the J815: each board's ADT has hpm5 on nub-spmi-a0, SID 8, port-type 0x11, features-supported <3>, with the same values on all three boards. Move the J815's hpm5 node into a new t8142-magsafe.dtsi and include it at the end of t8142-j813-usb.dtsi (J813, J815) and t8142-j704-usb.dtsi (J704), after nub_spmi_a0 is defined. The node itself is unchanged. The J815 DTB is byte-identical to the one before this change. The J704 and J813 DTBs gain only the usb-pd@8 node under nub-spmi-a0. The node was written by Nick for the J815. Suggested-by: Nick Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi | 2 ++ arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi | 2 ++ arch/arm64/boot/dts/apple/t8142-j815.dts | 15 ------------- arch/arm64/boot/dts/apple/t8142-magsafe.dtsi | 21 +++++++++++++++++++ 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t8142-magsafe.dtsi diff --git a/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi b/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi index 09c51e0888aa2..17acc63a8f090 100644 --- a/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi @@ -486,3 +486,5 @@ apple,dma-range = <0x100 0x4000 0 0xffff0000>; status = "okay"; }; + +#include "t8142-magsafe.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi b/arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi index 2eb0b1f16af47..7b85af5f6d155 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi @@ -323,3 +323,5 @@ }; }; }; + +#include "t8142-magsafe.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index 9a265e5567868..c45d185c87c4c 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -471,18 +471,3 @@ &jpeg1 { status = "okay"; }; - -/* - * The MagSafe 3 port's PD controller: ADT hpm5 on nub-spmi-a0, SID 8, port-type - * 0x11. It has no USB data path, so it gets no connector node; tipd registers a - * Type-C port and a power supply for it, as on J714s. The bus is polled on - * T8142, so like hpm0 and hpm1 it has no interrupts. Its ADT features-supported - * is <3>, "Power In" only: no liquid detection. - */ -&nub_spmi_a0 { - hpm5: usb-pd@8 { - compatible = "apple,sn201202x"; - reg = <0x8 SPMI_USID>; - apple,no-liquid-detection; - }; -}; diff --git a/arch/arm64/boot/dts/apple/t8142-magsafe.dtsi b/arch/arm64/boot/dts/apple/t8142-magsafe.dtsi new file mode 100644 index 0000000000000..76227a118c518 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8142-magsafe.dtsi @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The MagSafe 3 port's PD controller on the M5 MacBooks (J704, J813, J815). Each board's + * ADT has it as hpm5 on nub-spmi-a0, SID 8, port-type 0x11, with the same values on all + * three. It has no USB data path, so it gets no connector node; tipd registers a Type-C + * port and a power supply for it, as on J714s. The bus is polled on T8142, so like hpm0 + * and hpm1 it has no interrupts. Its ADT features-supported is <3>, "Power In" only: no + * liquid detection. + * + * Included at the end of the board's USB file, after nub_spmi_a0. + */ + +#include + +&nub_spmi_a0 { + hpm5: usb-pd@8 { + compatible = "apple,sn201202x"; + reg = <0x8 SPMI_USID>; + apple,no-liquid-detection; + }; +};