diff --git a/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi b/arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi index fac15e4d4099f..24e76598e5cab 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 bf81e9b35ce21..081a66d8b2104 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-j813.dts b/arch/arm64/boot/dts/apple/t8142-j813.dts index 55228ab6572de..731a35b5bd3bb 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813.dts +++ b/arch/arm64/boot/dts/apple/t8142-j813.dts @@ -284,6 +284,15 @@ apple,sleep-ssps-rules; }; +/* + * The MagSafe 3 port's PD controller (t8142-magsafe.dtsi) follows the system's sleep and + * its rules, as on hpm0/hpm1 and on the J815. + */ +&hpm5 { + apple,sleep-ssps; + apple,sleep-ssps-rules; +}; + &smc_hwmon { #thermal-sensor-cells = <1>; }; diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index c06dec75a667a..bb6fa29a6eb3f 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -465,21 +465,12 @@ }; /* - * 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. + * The MagSafe 3 port's PD controller (t8142-magsafe.dtsi, from t8142-j813-usb.dtsi) + * follows the system's sleep and its rules, as on hpm0/hpm1 and J714s's hpm5. */ -&nub_spmi_a0 { - hpm5: usb-pd@8 { - compatible = "apple,sn201202x"; - reg = <0x8 SPMI_USID>; - apple,no-liquid-detection; - /* Follow the system's sleep and its rules, as on hpm0/hpm1 and J714s's hpm5. */ - apple,sleep-ssps; - apple,sleep-ssps-rules; - }; +&hpm5 { + apple,sleep-ssps; + apple,sleep-ssps-rules; }; #include "t8142-j813-j815-sleep.dtsi" 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..5b0be0da9fae6 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8142-magsafe.dtsi @@ -0,0 +1,22 @@ +// 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. Whether it follows the + * system's sleep (apple,sleep-ssps, apple,sleep-ssps-rules) is the board's, as for hpm0/hpm1. + */ + +#include + +&nub_spmi_a0 { + hpm5: usb-pd@8 { + compatible = "apple,sn201202x"; + reg = <0x8 SPMI_USID>; + apple,no-liquid-detection; + }; +};