From d7296fb2b2636a1772451d0bebea017f32895c8a Mon Sep 17 00:00:00 2001 From: Roberto Dantas <7robertodantas@gmail.com> Date: Wed, 11 Nov 2026 13:15:58 -0300 Subject: [PATCH 1/3] dt-bindings: phy: apple,dptx-phy: add the T6041 LPDPTX PHY The T6041's LPDPTX PHY (ADT lpdptx-phy0, "dptx-phy,t8132") has the T6050 PHY's two banks at the same offsets (a 0x4000 "core" bank and a 0x10000 "dptx" bank 0x40000 above it) and takes the same ADT PLL calibration (DCOCFG, DTCVREG, DTCCAL, DCDADJ, DLFCFG) and source select, so it falls back to apple,t6050-dptx-phy. Assisted-by: LLM Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/phy/apple,dptx-phy.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/apple,dptx-phy.yaml b/Documentation/devicetree/bindings/phy/apple,dptx-phy.yaml index b049ba4534746..5e48405d80a12 100644 --- a/Documentation/devicetree/bindings/phy/apple,dptx-phy.yaml +++ b/Documentation/devicetree/bindings/phy/apple,dptx-phy.yaml @@ -21,6 +21,7 @@ select: compatible: contains: enum: + - apple,t6041-dptx-phy - apple,t6050-dptx-phy - apple,t8122-dptx-phy required: @@ -34,6 +35,9 @@ properties: - apple,t8122-dptx-phy - const: apple,dptx-phy - const: apple,t6050-dptx-phy + - items: + - const: apple,t6041-dptx-phy + - const: apple,t6050-dptx-phy reg: minItems: 2 From 2de59313bd97edbe81f1a345131e1d794f29c1d6 Mon Sep 17 00:00:00 2001 From: Roberto Dantas <7robertodantas@gmail.com> Date: Wed, 11 Nov 2026 13:15:58 -0300 Subject: [PATCH 2/3] soc: apple: display-gate: enable the J575c's HDMI chain The M4 Max HDMI stage is the J616c's: ATC3's power domains and PHY in DP mode, the ATC3 crossbar, then dcpext0. On the J575c ATC3 is the fourth back USB-C port, and the HDMI port runs through the LPDPTX PHY instead. On the J575c, the HDMI stage enables the LPDPTX PHY's power domain, the AOP pin controller (the DP-to-HDMI converter's hotplug), the PHY and dcpext0's DARTs, mailbox and processor. Nothing changes on the J614c and J616c. Tested on a J575c with the next commit and the aura J575c handoff: the gate enables dcp@3a2e00000's chain and a monitor on the HDMI port shows the console. Assisted-by: LLM Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Co-Authored-By: Claude Opus 5.5 --- drivers/soc/apple/display-gate.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/soc/apple/display-gate.c b/drivers/soc/apple/display-gate.c index cde6d7c835d31..de08af5e7716e 100644 --- a/drivers/soc/apple/display-gate.c +++ b/drivers/soc/apple/display-gate.c @@ -3154,8 +3154,29 @@ static const struct gate_staged t6041_j575c_usbc = { "/iommu@602300000", t6041_j575c_usbc_nodes, ARRAY_SIZE(t6041_j575c_usbc_nodes), }; +/* + * The J575c's HDMI chain. Its ATC3 is a USB-C port, and its HDMI port runs + * through the LPDPTX PHY instead (t6041-j575c-hdmi.dtsi): that PHY's power, + * the AOP pins (the converter's hotplug), the PHY, then dcpext0's chain. + */ +static const char *const t6041_j575c_hdmi_nodes[] = { + "/power-management@502280000/power-controller@360", + "/pinctrl@510824000", + "/phy@51c200000", + "/iommu@3a2340000", + "/iommu@3a2300000", + "/mailbox@3a2e08000", + "/dcp@3a2e00000", +}; + +static const struct gate_staged t6041_j575c_hdmi = { + "/iommu@3a2300000", t6041_j575c_hdmi_nodes, ARRAY_SIZE(t6041_j575c_hdmi_nodes), +}; + static const struct gate_staged *t6041_max_stage(unsigned int i) { + if (i == 0 && of_machine_is_compatible("apple,j575c")) + return &t6041_j575c_hdmi; if (i == 1 && of_machine_is_compatible("apple,j575c")) return &t6041_j575c_usbc; return &t6041_max_stages[i]; From 626f0918320960842bec8e2289a232b260a4c2d2 Mon Sep 17 00:00:00 2001 From: Roberto Dantas <7robertodantas@gmail.com> Date: Wed, 11 Nov 2026 13:15:59 -0300 Subject: [PATCH 3/3] arm64: dts: apple: t6041-j575c: describe the HDMI port The J575c's HDMI port runs from the display crossbar's output 4 through the LPDPTX PHY (ADT lpdptx-phy0) to an on-board DP-to-HDMI converter. The converter's pins are the J616c's (ADT dp2hdmi-gpio0: hotplug on AOP GPIO 0x24, power enables on SMC gP0f and gP1a). macOS drives this port from the internal DCP, which aura's Stage 1 puts to sleep on this board. The crossbar has no registers and the PHY's source select picks the engine, so dcpext0 (crossbar input 0) drives it here, as on the M2 Max Mac Studio (t6021-j475c.dts). Describe the PHY with the ADT's PLL calibration and its PMGR domain (DPTX_PHY, pmgr + 0x360), dcpext0's firmware memory placeholders, and dcpext0 as an HDMI-A output on that PHY. All of it is disabled: the boot loader fills dcpext0's memory and the display gate enables the chain. Tested on a J575c with the aura J575c handoff (aurora-silicon/aura#160) and a 2560x1440 monitor on HDMI: the console shows at 2560x1440@59 over four lanes, from a cold boot and after a replug, and together with a second monitor on typec1. With aura 1.0.0b8 the gate logs "display subsystem not enabled" and nothing else changes; with the tree before this commit, the HDMI stage finds no firmware memory and is skipped. Assisted-by: LLM Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Co-Authored-By: Claude Opus 5.5 --- .../boot/dts/apple/t6041-j575c-hdmi.dtsi | 95 +++++++++++++++++++ arch/arm64/boot/dts/apple/t6041-j575c.dts | 6 +- 2 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6041-j575c-hdmi.dtsi diff --git a/arch/arm64/boot/dts/apple/t6041-j575c-hdmi.dtsi b/arch/arm64/boot/dts/apple/t6041-j575c-hdmi.dtsi new file mode 100644 index 0000000000000..539e38521c5af --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j575c-hdmi.dtsi @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The J575c's HDMI port: the LPDPTX PHY (ADT /arm-io/lpdptx-phy0, the display + * crossbar's output 4) and the on-board DP-to-HDMI converter, whose hotplug + * and power pins are the J616c's (ADT /arm-io/dp2hdmi-gpio0: AOP GPIO 0x24, + * SMC gP0f and gP1a). + * + * macOS drives this port from the internal DCP, which aura's Stage 1 puts to + * sleep on this board. The crossbar has no registers: the PHY's source select + * picks the engine, so dcpext0 (crossbar input 0) drives it here, as on the + * M2 Max Mac Studio (t6021-j475c.dts). + * + * Every node is disabled. The boot loader fills dcpext0's firmware memory and + * the display gate (drivers/soc/apple/display-gate.c) then enables the chain. + */ + +/ { + aliases { + dcpext0 = &dcpext0; + }; + + reserved-memory { + /* Filled by the boot loader, as dcpext1's (t6041-j575c-usbc.dtsi). */ + dcpext0_text: dcpext0-text { + compatible = "apple,asc-mem"; + reg = <0x0 0x0 0x0 0x4000>; + no-map; + status = "disabled"; + }; + + dcpext0_data: dcpext0-data { + compatible = "apple,asc-mem"; + reg = <0x0 0x0 0x0 0x4000>; + no-map; + status = "disabled"; + }; + + dcpext0_heap: dcpext0-heap { + compatible = "apple,asc-mem"; + reg = <0x0 0x0 0x0 0x4000>; + no-map; + status = "disabled"; + }; + }; + + /* + * ADT /arm-io/lpdptx-phy0 (dptx-phy,t8132): the T6050 layout, a core + * bank and a dptx bank, and the T8132 PLL calibration. FD0FD1SWAP and + * RODCOROLEAKCOMP are 0xffffffff (unset) in the ADT. + */ + lpdptx_phy0: phy@51c200000 { + compatible = "apple,t6041-dptx-phy", "apple,t6050-dptx-phy"; + reg = <0x5 0x1c200000 0x0 0x4000>, + <0x5 0x1c240000 0x0 0x10000>; + reg-names = "core", "dptx"; + power-domains = <&ps_dptx_phy>; + #phy-cells = <0>; + #reset-cells = <0>; + /* dispext0: source-select-offset 1 puts it at source select 1 */ + apple,ufp-endpoint = <0>; + apple,pll-dcocfg = <0x4>; + apple,pll-dtcvreg = <0xf>; + apple,pll-dtccal = <0x2>; + apple,pll-dcdadj = <0x10>; + apple,pll-dlfcfg = <0x3>; + status = "disabled"; + }; +}; + +/* ADT /arm-io/pmgr DPTX_PHY: pmgr + 0x360 (its parents SBR and FAB5_SOC are not described) */ +&pmgr { + ps_dptx_phy: power-controller@360 { + compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x360 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "dptx_phy"; + status = "disabled"; + }; +}; + +&dcpext0 { + /delete-property/ apple,typec-hybrid-first; + apple,iomfb-surfaces = <1 1 0 0>; + apple,connector-type = "HDMI-A"; + hdmi-hpd-gpios = <&pinctrl_aop 36 GPIO_ACTIVE_HIGH>; + hdmi-pwren-gpios = <&smc_gpio 15 GPIO_ACTIVE_HIGH>; + dp2hdmi-pwren-gpios = <&smc_gpio 26 GPIO_ACTIVE_HIGH>; + phys = <&lpdptx_phy0>; + phy-names = "dp-phy"; + /* the crossbar's output 4 (ADT lpdptx-phy0 dp-switch-dfp-endpoint) */ + apple,dptx-phy = <4>; + memory-region = <&dcpext0_text>, <&dcpext0_data>, <&dcpext0_heap>; + memory-region-names = "text", "data", "heap"; +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j575c.dts b/arch/arm64/boot/dts/apple/t6041-j575c.dts index 8143364e5eca9..522076cd14fa3 100644 --- a/arch/arm64/boot/dts/apple/t6041-j575c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j575c.dts @@ -1993,11 +1993,9 @@ #include "t6041-j575c-atc3.dtsi" #include "t6041-j575c-usb3.dtsi" #include "t6041-j575c-usbc.dtsi" +#include "t6041-j575c-hdmi.dtsi" -/* - * Not described: HDMI (dcpext0 through display-crossbar0 to the lpdptx PHY - * and a DP-to-HDMI converter on i2c8) and the SEP (no Touch ID sensor). - */ +/* Not described: the SEP (no Touch ID sensor). */ /* * The PMP, as the M4 Max MacBook Pros run it. The pmp alias lets the loader