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
55 changes: 55 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-atc1-dp-tunnel.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* The left-front port's (ATC1) USB4 DisplayPort tunnel clocks on T6050, as the right port's
* (t6050-atc2-dp-tunnel.dtsi): the PHY's DP IN pixel clock sources (dp-clock-source), their four
* clock gates, the PHY's dp0..dp3 power domains, and the router's DP IN interrupts (ADT
* atc1-dpin0..3). Without the clock sources a display behind a USB4/Thunderbolt dock or enclosure
* on this port stays dark. Addresses and interrupts are the T6050's (J714sAP and K114sAP ADT
* agree). For boards that describe the ATC1 router (acio1): J714s (t6050-j714s-display.dtsi),
* K114s and K114c (t6050-k114-usb.dtsi).
*/

&ps_atc1_common_dp_0 {
status = "okay";
};

&ps_atc1_common_dp_1 {
status = "okay";
};

&ps_atc1_common_dp_2 {
status = "okay";
};

&ps_atc1_common_dp_3 {
status = "okay";
};

&atc1_phy {
reg = <0x2 0xab000000 0x0 0x2c000>,
<0x2 0xaaa90000 0x0 0x4000>,
<0x2 0xaa800000 0x0 0x4000>,
<0x2 0xab200000 0x0 0x4000>,
<0x2 0xab244000 0x0 0x4000>,
<0x2 0xa8000000 0x0 0x8000>,
<0x2 0xa8020000 0x0 0x4000>,
<0x2 0xab250000 0x0 0x4000>,
<0x2 0xab140000 0x0 0x4000>,
<0x2 0xab0c0000 0x0 0x10000>,
<0x2 0xaaa84000 0x0 0x4000>,
<0x2 0x80000058 0x0 0x10>;
reg-names = "core", "usb2phy", "usb2-digital", "reset", "fabric", "axi2af", "lioa",
"common-cfg", "usb-control", "firmware-data", "pipehandler",
"dp-clock-source";
power-domains = <&ps_atc1_usb_aon>, <&ps_atc1_common>, <&ps_atc1_phymxwrap>,
<&ps_atc1_usb>, <&ps_atc1_common_dp_0>, <&ps_atc1_common_dp_1>,
<&ps_atc1_common_dp_2>, <&ps_atc1_common_dp_3>;
power-domain-names = "usb-aon", "common", "wrapper", "usb", "dp0", "dp1", "dp2", "dp3";
};

/* The left-front router's DP IN interrupts (ADT atc1-dpin0..3) */
&acio1 {
interrupts = <AIC_IRQ 0 1635 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 0 1636 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 0 1641 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 0 1642 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "dpin0", "dpin1", "dpin2", "dpin3";
};
45 changes: 1 addition & 44 deletions arch/arm64/boot/dts/apple/t6050-j714s-display.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,7 @@

#include "t6050-atc2-dp-tunnel.dtsi"

&ps_atc1_common_dp_0 {
status = "okay";
};

&ps_atc1_common_dp_1 {
status = "okay";
};

&ps_atc1_common_dp_2 {
status = "okay";
};

&ps_atc1_common_dp_3 {
status = "okay";
};
#include "t6050-atc1-dp-tunnel.dtsi"

/* The left-back crossbar (the inventory's, as atc1_dpxbar) and the PHY's tunnel clock gates */
&atc0_dpxbar {
Expand All @@ -316,28 +302,6 @@
status = "disabled";
};

&atc1_phy {
reg = <0x2 0xab000000 0x0 0x2c000>,
<0x2 0xaaa90000 0x0 0x4000>,
<0x2 0xaa800000 0x0 0x4000>,
<0x2 0xab200000 0x0 0x4000>,
<0x2 0xab244000 0x0 0x4000>,
<0x2 0xa8000000 0x0 0x8000>,
<0x2 0xa8020000 0x0 0x4000>,
<0x2 0xab250000 0x0 0x4000>,
<0x2 0xab140000 0x0 0x4000>,
<0x2 0xab0c0000 0x0 0x10000>,
<0x2 0xaaa84000 0x0 0x4000>,
<0x2 0x80000058 0x0 0x10>;
reg-names = "core", "usb2phy", "usb2-digital", "reset", "fabric", "axi2af", "lioa",
"common-cfg", "usb-control", "firmware-data", "pipehandler",
"dp-clock-source";
power-domains = <&ps_atc1_usb_aon>, <&ps_atc1_common>, <&ps_atc1_phymxwrap>,
<&ps_atc1_usb>, <&ps_atc1_common_dp_0>, <&ps_atc1_common_dp_1>,
<&ps_atc1_common_dp_2>, <&ps_atc1_common_dp_3>;
power-domain-names = "usb-aon", "common", "wrapper", "usb", "dp0", "dp1", "dp2", "dp3";
};

/* The left-back PHY's tunnel clock gates, as the other ports' */
&atc0_phy {
power-domains = <&ps_atc0_usb_aon>, <&ps_atc0_common>, <&ps_atc0_phymxwrap>,
Expand All @@ -346,13 +310,6 @@
power-domain-names = "usb-aon", "common", "wrapper", "usb", "dp0", "dp1", "dp2", "dp3";
};

/* The left-front router's DP IN interrupts (atc1-dpin0..3, as in the T6050 inventory and J716c) */
&acio1 {
interrupts = <AIC_IRQ 0 1635 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 0 1636 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 0 1641 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 0 1642 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "dpin0", "dpin1", "dpin2", "dpin3";
};

/* The right router's suppliers, disabled in the inventory */
&ps_atc2_cio {
status = "okay";
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/apple/t6050-j714s-left-usb4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* addresses and interrupts (/arm-io/acio1, acio-cpu1, dart-acio1, apciec1, dart-apciec1). Like
* the right port's (t6050-max-atc2.dtsi), it is powered per connection and nothing is touched at
* boot. The router, DART and tunnel tunables are this board's, from its ADT; they equal ATC2's.
* The K114s ADT has the same router nodes: t6050-k114-usb.dtsi includes this for the K114s
* and K114c.
*/

&ps_atc1_cio {
Expand Down Expand Up @@ -191,7 +193,6 @@
reg-names = "config", "rc", "port0", "fabric", "debug", "ltssm", "intr2axi";
/* The port's: link events and INTx */
interrupts = <AIC_IRQ 0 1437 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "port0";
power-domains = <&ps_atc1_pcie>;
/* No boot loader hands the port over: the kernel cold-initializes it. */
apple,pciec-kernel-init;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
compatible = "apple,sn201202x";
reg = <0xa SPMI_USID>;

connector {
typec1: connector {
compatible = "usb-c-connector";
label = "USB-C Left-front";
power-role = "dual";
Expand Down
20 changes: 18 additions & 2 deletions arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* The 14-inch K boards' ports beyond t6050-k114-k116-usb.dtsi: the MagSafe 3 PD controller
* on nub-spmi-a0 and ATC2's USB4/Thunderbolt router with its PCIe tunnel. The live K114s ADT
* (27.2) and the K114c's have the same nodes and values here, phandles aside.
* on nub-spmi-a0 and the USB4/Thunderbolt routers of ATC2 (right) and ATC1 (left-front) with
* their PCIe tunnels and DisplayPort tunnel clocks. The live K114s ADT (27.2) and the K114c's
* have the same nodes and values here, phandles aside.
*
* Included after t6050-k114-k116-usb.dtsi. t6050-max.dtsi describes the ATC2 router for the
* boards that define T6050_K114C or T6050_K114S before including it.
Expand Down Expand Up @@ -86,3 +87,18 @@
<&ps_atc2_cio_usb>, <&ps_atc2_cio_auss>, <&ps_atc2_pcie>;
apple,pcie-tunnel = <&acio2_pcie_tunnel>;
};

/*
* The left-front port's USB4/Thunderbolt router (acio1) and PCIe tunnel, and its DisplayPort
* tunnels, as on J714s: the K114s ADT's acio1, acio-cpu1, dart-acio1, apciec1, dart-apciec1 and
* atc1-dpin0..3 equal the J714sAP ADT's (host DROM and LSTX pin included), phandles aside, and
* so do atc-phy1's CIO RX_TOP tunables. (The K116s's RX_TOP tunables differ.) Without it a
* Thunderbolt dock or enclosure on this port gets USB only, and no DP or PCIe tunnel.
*/
#include "t6050-j714s-left-usb4.dtsi"
#include "t6050-atc1-dp-tunnel.dtsi"

/* The LSTX pins of both routers: 79 (acio1) and 81 (acio2) */
&pinctrl_aop {
gpio-reserved-ranges = <0 79>, <80 1>, <82 3>;
};
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-k114c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "t6050-soc-max.dtsi"
/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */
#define T6050_ATC2_USB4_ROUTER
/* ADT /arm-io/acio1: the left-front port's USB4/Thunderbolt router (t6050-k114-usb.dtsi) */
#define T6050_ATC1_USB4_ROUTER
/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */
#define T6050_K_N1_FIRMWARE "apple/centauri/k114c-ftab.bin"
#define T6050_K_BOARD_ID 0x04
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-k114s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define T6050_K114S
/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */
#define T6050_ATC2_USB4_ROUTER
/* ADT /arm-io/acio1: the left-front port's USB4/Thunderbolt router (t6050-k114-usb.dtsi) */
#define T6050_ATC1_USB4_ROUTER
/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */
#define T6050_K_N1_FIRMWARE "apple/centauri/k114s-ftab.bin"
#define T6050_K_BOARD_ID 0x14
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/apple/t6050-peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,8 @@
status = "disabled";
};

#if !defined(T6050_J714S) && !defined(T6050_J716C)
/* Boards describing ATC1's USB4 router describe this DART with its PCIe tunnel instead. */
#if !defined(T6050_J714S) && !defined(T6050_J716C) && !defined(T6050_ATC1_USB4_ROUTER)
apciec1_dart: iommu@2ac000000 {
compatible = "apple,t6050-dart", "apple,t8110-dart";
reg = <0x2 0xac000000 0x0 0x20000>;
Expand Down
Loading