Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-j704-usb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,5 @@
apple,dma-range = <0x100 0x4000 0 0xffff0000>;
status = "okay";
};

#include "t8142-magsafe.dtsi"
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-j813-usb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,5 @@
};
};
};

#include "t8142-magsafe.dtsi"
9 changes: 9 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-j813.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
Expand Down
19 changes: 5 additions & 14 deletions arch/arm64/boot/dts/apple/t8142-j815.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 22 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-magsafe.dtsi
Original file line number Diff line number Diff line change
@@ -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 <dt-bindings/spmi/spmi.h>

&nub_spmi_a0 {
hpm5: usb-pd@8 {
compatible = "apple,sn201202x";
reg = <0x8 SPMI_USID>;
apple,no-liquid-detection;
};
};
Loading