Skip to content
Merged
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/t6050-j714c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/dts-v1/;

#define T6050_J714C
/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */
#define T6050_ATC2_USB4_ROUTER
#include <dt-bindings/leds/common.h>
#include "t6050-max.dtsi"

Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-j714s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/dts-v1/;

#define T6050_J714S
/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */
#define T6050_ATC2_USB4_ROUTER
#include <dt-bindings/leds/common.h>
#include "t6050-max.dtsi"

Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-j716c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/dts-v1/;

#define T6050_J716C
/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */
#define T6050_ATC2_USB4_ROUTER
#include "t6050-max.dtsi"
#include "hwmon-fan-dual.dtsi"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* K114c (M5 Max, G17C) GPU, for the boot loader's GPU handoff. Everything here
* stays disabled: the loader checks the ADT and the live GPU firmware build,
* fills the GPU reservations, then enables the power states, both mailboxes and
* the GPU, the GPU last. A loader that refuses leaves the GPU off.
* The GPU of the K114c, K114s, K116s and K116c (ADT /arm-io/sgx "gpu,t6050"), for the boot
* loader's GPU hand-off. It is the GPU half of t6050-j714s-gpu-panel.dtsi: the four boards'
* ADTs have the J714s's sgx, gfx-asc and gfx1-asc.
*
* Same layout as t6050-j714s-gpu-panel.dtsi; the GPU is G17C and, in the ADT,
* sgx and both GPU ASCs are the same as on the M5 Pro.
* Everything here stays disabled: the loader checks the ADT and the live GPU firmware build,
* fills the six reservations, then enables the GPU PMGR, GPX, AFR, GFX, both mailboxes and the
* GPU, the GPU last. A loader that refuses leaves the GPU off and the rest of the boot as it is.
*
* arm-io's ranges add 0x2_0000_0000 to the ADT's 0x21_xxxx_xxxx bus addresses.
*/

/ {
Expand All @@ -16,7 +18,12 @@
};

reserved-memory {
/* Filled and enabled by the loader from the ADT */
/*
* Filled and enabled by the loader from the ADT: sgx gpu-region-*,
* gfx-shared-region-*, gfx-shared-l2-region-* and gfx-handoff-* (the UAT
* ranges), the GPU ASCs' __TEXT (fw-text) and gfx-data-base to the end of
* gfx1-data-shared-ro (fw-data). iBoot places them; they differ per Mac.
*/
gpu_fw_text: gpu-fw-text {
reg = <0 0 0 0>;
no-map;
Expand Down Expand Up @@ -61,9 +68,9 @@

&{/soc} {
/*
* ADT gfx-asc and gfx1-asc at their physical windows: the wrapper, the
* 8-byte iop-vbar, and their second and third interrupts (send-empty,
* recv-not-empty), as T8140/T8142.
* ADT gfx-asc: reg 0x21_02600000 + 0x88000 (wrapper), 0x21_02050000 + 8 (iop-vbar);
* interrupts [2798, 2797, 2800, 2799], of which the second and third are send-empty
* and recv-not-empty; role "GFX"; power-gates [614] (GFX_ASC).
*/
gfx_mbox: mailbox@2302600000 {
compatible = "apple,t6050-j775d-ascwrap-v6";
Expand All @@ -79,6 +86,11 @@
status = "disabled";
};

/*
* ADT gfx1-asc: reg 0x21_02e00000 + 0x88000, 0x21_02850000 (ADT size 0x60000; the
* driver uses the first 8 bytes); interrupts [2802, 2801, 2804, 2803]; role "GFX1";
* power-gates [657] (GFX_ASC1).
*/
gfx1_mbox: mailbox@2302e00000 {
compatible = "apple,t6050-j775d-ascwrap-v6";
reg = <0x23 0x2e00000 0x0 0x88000>,
Expand All @@ -94,7 +106,10 @@
};
};

/* The ADT marks GPX and AFR, GFX's parents, critical. */
/*
* ADT pmgr devices GPX (id 359, +0x0), AFR (id 360, +0x100) and GFX (id 362, +0x110) in the
* GPU PMGR. The ADT marks GPX and AFR, GFX's parents, critical; GFX not.
*/
&ps_gpx {
apple,always-on;
};
Expand All @@ -112,8 +127,9 @@
};

&sgx {
/* What the loader checks and drivers/gpu/drm/asahi binds */
compatible = "apple,agx-g17s";
/* ADT sgx reg[0]; the driver maps the first 16 MiB as "sgx" */
/* ADT sgx reg[0] 0x21_00000000 + 0x3fdc000; the driver maps the first 16 MiB as "sgx" */
reg = <0x23 0x0 0x0 0x3fdc000>;
reg-names = "sgx";
/delete-property/ interrupts;
Expand Down
198 changes: 198 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* The K114c, K114s, K116c and K116s USB-C ports ATC1 (left-front) and ATC2 (right):
* USB 2/3 and the PD controllers. A board file includes this after
* t6050-peripherals.dtsi, which describes nub-spmi-a1 for these boards.
*
* From the boards' ADT, the same on all four:
* ATC0 usb-drd0 left-back hpm0 nub-spmi-a0 0x0c (the boot link's debug port, not described)
* ATC1 usb-drd1 left-front hpm1 nub-spmi-a0 0x0a, port-number 2, acio-parent acio1
* ATC2 usb-drd2 right hpm2 nub-spmi-a1 0x0c, port-number 3, acio-parent acio2
* hpm5 nub-spmi-a0 0x08 (MagSafe, not a USB-C connector)
* The PD controllers are SN201202x. The USB4/Thunderbolt routers (acio1, acio2) and the
* DisplayPort routes are not described here; the PHYs run in USB mode. The combo PHY driver
* leaves ATC0 alone on purpose (apple,port-index 0).
*
* The boot loader fills the PHYs' tunables from the ADT through the atcphy aliases.
*/
/ {
aliases {
atcphy1 = &atc1_phy;
atcphy2 = &atc2_phy;
};
};

/* ==== The left-front USB-C port (ATC1) ==== */
&nub_spmi_a0 {
status = "okay";

hpm1: usb-pd@a {
compatible = "apple,sn201202x";
reg = <0xa SPMI_USID>;

connector {
compatible = "usb-c-connector";
label = "USB-C Left-front";
power-role = "dual";
data-role = "dual";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
hpm1_hs: endpoint {
remote-endpoint = <&usb_drd1_hs>;
};
};

port@1 {
reg = <1>;
hpm1_ss: endpoint {
remote-endpoint = <&atc1_phy_ep>;
};
};
};
};
};
};

&atc1_phy_mbox {
status = "okay";
};

&atc1_phy {
status = "okay";

port {
atc1_phy_ep: endpoint {
remote-endpoint = <&hpm1_ss>;
};
};
};

&usb_drd1 {
status = "okay";

port {
usb_drd1_hs: endpoint {
remote-endpoint = <&hpm1_hs>;
};
};
};

&usb_drd1_dart_0 {
status = "okay";
};

&usb_drd1_dart_1 {
status = "okay";
};

/*
* ==== The right USB-C port (ATC2) ====
*
* The HPM is on its own bus, nub-spmi-a1, and nothing hands the port off, so the power
* domains, the PHY mailbox, the PHY, the DWC3 and its DARTs are enabled outright. The driver
* polls the generation 4 bus and refuses an interrupt on it.
*/
&ps_atc2_common {
status = "okay";
};

&ps_atc2_usb_aon {
status = "okay";
};

&ps_atc2_phymxwrap {
status = "okay";
};

&ps_atc2_usb {
status = "okay";
};

&atc2_phy_mbox {
status = "okay";
};

&atc2_phy {
status = "okay";

port {
atc2_phy_ep: endpoint {
remote-endpoint = <&hpm2_ss>;
};
};
};

&usb_drd2 {
status = "okay";

port {
usb_drd2_hs: endpoint {
remote-endpoint = <&hpm2_hs>;
};
};
};

&usb_drd2_dart_0 {
status = "okay";
};

&usb_drd2_dart_1 {
status = "okay";
};

&nub_spmi_a1 {
/delete-property/ interrupts;
status = "okay";

hpm2: usb-pd@c {
compatible = "apple,sn201202x";
reg = <0xc SPMI_USID>;

connector {
compatible = "usb-c-connector";
label = "USB-C Right";
power-role = "dual";
data-role = "dual";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
hpm2_hs: endpoint {
remote-endpoint = <&usb_drd2_hs>;
};
};

port@1 {
reg = <1>;
hpm2_ss: endpoint {
remote-endpoint = <&atc2_phy_ep>;
};
};
};
};
};
};

/* PCIe port 0's power states, used by pcie0 and dart_apcie0 (see t6050-k114-k116.dtsi) */
&ps_fab6_soc {
apple,firmware-owned;
status = "okay";
};

&ps_apcie_gp {
apple,firmware-owned;
status = "okay";
};

&ps_apcie_sys_gp {
apple,firmware-owned;
status = "okay";
};
Loading
Loading