From bb01f44ff47e79e95df39fa42cedf6c981da831e Mon Sep 17 00:00:00 2001 From: Satya Benson Date: Sun, 29 Nov 2026 23:02:23 -0500 Subject: [PATCH] arm64: dts: apple: t6050-j775c: drive HDMI from dcpext0 and describe the boot framebuffer The boot loader brings the HDMI port up on dcpext0: lpdptx-phy0 sits behind display-crossbar0, the ADT ties the port to no engine, and the loader takes the crossbar's lowest DCP input, dispext0 (source select 1). This tree had the port on dcpext1 (source select 2), so after a live handoff the kernel's PHY would switch the port away from the engine that is scanning out, and the engine it hands over has no HDMI description. Move the HDMI output (lpdptx-phy0, the converter's hotplug and power GPIOs) to dcpext0 and point lpdptx-phy0's ufp-endpoint at dispext0. The four Type-C routes move to dcpext1, on crossbar source 2 (dispext1), the 2 * dispext index the other T6050 boards use for that engine. Each engine keeps its own DARTs, bandwidth scratch and DP audio pipe. Also add what the loader needs to hand the running display over: - the dcpext0 and dcpext1 aliases, through which it publishes the live RTKit session of the engine it started; - /chosen/framebuffer0, a disabled simple-framebuffer it fills with the boot framebuffer, naming dcpext0 as the display that scans it out. Without them the loader refuses the handoff ("no /chosen/framebuffer@... simple-framebuffer") and then stops the boot, because the running DCP's session has no node to be described on. The memory controller lists dcpext0 as a boot DMA supplier beside the display subsystem, as the laptops list their DCP: with framebuffer0 naming it, cache allocation waits until dcpext0 has replaced the boot scanout with a swap of its own, not only until the display subsystem binds. Signed-off-by: Satya Benson --- arch/arm64/boot/dts/apple/t6050-j775c.dts | 173 ++++++++++++---------- 1 file changed, 98 insertions(+), 75 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-j775c.dts b/arch/arm64/boot/dts/apple/t6050-j775c.dts index d112925636abf..136b7f8bda197 100644 --- a/arch/arm64/boot/dts/apple/t6050-j775c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j775c.dts @@ -1037,75 +1037,25 @@ apple,bw-scratch = <&dcpext0_pmc 0x00 0x05 0x2c000>; apple,dcp-index = <0x01>; apple,clock-ids; - apple,connector-type = "USB-C"; + /* + * The HDMI port: lpdptx-phy0 behind the DP-to-HDMI converter. macOS + * drives it from the internal DCP; here it is crossbar input 0, the + * engine the boot loader brings the port up on and hands over live. + */ + apple,connector-type = "HDMI-A"; apple,dptx-die = <0x00>; - apple,typec-dptx-phys = <0x02 0x01 0x03 0x00>; - apple,typec-mux-indices = <0x00 0x00 0x00 0x00>; - phys = <&atc2_phy 0x06 &atc1_phy 0x06 - &atc3_phy 0x06 &atc0_phy 0x06>; - phy-names = "typec0", "typec1", "typec2", "typec3"; - mux-controls = <&atc2_xbar 0x00 &atc1_xbar 0x00 - &atc3_xbar 0x00 &atc0_xbar 0x00>; - mux-control-names = "typec0", "typec1", "typec2", "typec3"; + apple,dptx-phy = <0x04>; + phys = <&lpdptx_phy0>; + phy-names = "dp-phy"; + hdmi-hpd-gpios = <&pinctrl_aop 0x0e 0x00>; + hdmi-pwren-gpios = <&smc_pcio 0x00 0x00>; + dp2hdmi-pwren-gpios = <&smc_pcio 0x01 0x00>; status = "disabled"; piodma { iommus = <&dart_dispext0 0x10>; }; - typec-routes { - #address-cells = <0x01>; - #size-cells = <0x00>; - - route@0 { - reg = <0x00>; - mode-switch; - - port { - - dcpext0_typec: endpoint { - remote-endpoint = <&hpm2_dp>; - }; - }; - }; - - route@1 { - reg = <0x01>; - mode-switch; - - port { - - dcpext0_typec1: endpoint { - remote-endpoint = <&hpm1_dp>; - }; - }; - }; - - route@2 { - reg = <0x02>; - mode-switch; - - port { - - dcpext0_typec2: endpoint { - remote-endpoint = <&hpm3_dp>; - }; - }; - }; - - route@3 { - reg = <0x03>; - mode-switch; - - port { - - dcpext0_typec3: endpoint { - remote-endpoint = <&hpm0_dp>; - }; - }; - }; - }; - ports { #address-cells = <0x01>; #size-cells = <0x00>; @@ -1919,7 +1869,7 @@ reg = <0x02>; hpm0_dp: endpoint { - remote-endpoint = <&dcpext0_typec3>; + remote-endpoint = <&dcpext1_typec3>; }; }; @@ -1968,7 +1918,7 @@ reg = <0x02>; hpm1_dp: endpoint { - remote-endpoint = <&dcpext0_typec1>; + remote-endpoint = <&dcpext1_typec1>; }; }; @@ -2018,7 +1968,7 @@ reg = <0x02>; hpm2_dp: endpoint { - remote-endpoint = <&dcpext0_typec>; + remote-endpoint = <&dcpext1_typec>; }; }; @@ -2067,7 +2017,7 @@ reg = <0x02>; hpm3_dp: endpoint { - remote-endpoint = <&dcpext0_typec2>; + remote-endpoint = <&dcpext1_typec2>; }; }; @@ -3581,20 +3531,76 @@ apple,bw-scratch = <&dcpext0_pmc 0x00 0x05 0x30000>; apple,dcp-index = <0x02>; apple,clock-ids; - apple,connector-type = "HDMI-A"; + apple,connector-type = "USB-C"; apple,dptx-die = <0x00>; - apple,dptx-phy = <0x04>; - phys = <&lpdptx_phy0>; - phy-names = "dp-phy"; - hdmi-hpd-gpios = <&pinctrl_aop 0x0e 0x00>; - hdmi-pwren-gpios = <&smc_pcio 0x00 0x00>; - dp2hdmi-pwren-gpios = <&smc_pcio 0x01 0x00>; + apple,typec-dptx-phys = <0x02 0x01 0x03 0x00>; + /* Crossbar source 2 (dispext1): the 2 * dispext of the other T6050 boards */ + apple,typec-mux-indices = <0x02 0x02 0x02 0x02>; + phys = <&atc2_phy 0x06 &atc1_phy 0x06 + &atc3_phy 0x06 &atc0_phy 0x06>; + phy-names = "typec0", "typec1", "typec2", "typec3"; + mux-controls = <&atc2_xbar 0x00 &atc1_xbar 0x00 + &atc3_xbar 0x00 &atc0_xbar 0x00>; + mux-control-names = "typec0", "typec1", "typec2", "typec3"; status = "disabled"; piodma { iommus = <&dart_dispext1 0x10>; }; + typec-routes { + #address-cells = <0x01>; + #size-cells = <0x00>; + + route@0 { + reg = <0x00>; + mode-switch; + + port { + + dcpext1_typec: endpoint { + remote-endpoint = <&hpm2_dp>; + }; + }; + }; + + route@1 { + reg = <0x01>; + mode-switch; + + port { + + dcpext1_typec1: endpoint { + remote-endpoint = <&hpm1_dp>; + }; + }; + }; + + route@2 { + reg = <0x02>; + mode-switch; + + port { + + dcpext1_typec2: endpoint { + remote-endpoint = <&hpm3_dp>; + }; + }; + }; + + route@3 { + reg = <0x03>; + mode-switch; + + port { + + dcpext1_typec3: endpoint { + remote-endpoint = <&hpm0_dp>; + }; + }; + }; + }; + ports { #address-cells = <0x01>; #size-cells = <0x00>; @@ -3691,7 +3697,8 @@ apple,pll-dcdadj = <0x10>; apple,pll-dlfcfg = <0x03>; apple,pclkdrv-select = <0x01>; - apple,ufp-endpoint = <0x01>; + /* dispext0: crossbar input 0, source select 1 */ + apple,ufp-endpoint = <0x00>; status = "disabled"; }; @@ -5715,7 +5722,11 @@ 0x2c080000 0x00 0x10000>, <0x22 0x2c0c0000 0x00 0x10000>, <0x22 0x2e000000 0x00 0x10000>, <0x22 0x2e040000 0x00 0x10000>, <0x22 0x2e080000 0x00 0x10000>, <0x22 0x2e0c0000 0x00 0x10000>; - apple,boot-dma-devices = <&display>; + /* + * dcpext0 scans out the boot framebuffer on the HDMI port + * (framebuffer0): allocation also waits for a swap of its own. + */ + apple,boot-dma-devices = <&display>, <&dcpext0>; }; }; @@ -5835,12 +5846,24 @@ usb4-2-nhi = &acio2_nhi; usb4-3-acio = &acio3; usb4-3-nhi = &acio3_nhi; + /* kboot finds the engines it hands over through these */ + dcpext0 = &dcpext0; + dcpext1 = &dcpext1; }; chosen { #address-cells = <0x02>; #size-cells = <0x02>; ranges; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; /* To be filled by the loader */ + /* Format properties will be added by the loader */ + /* Scanned out on the HDMI port by dcpext0, handed off or not */ + display = <&dcpext0>; + status = "disabled"; + }; }; pcie0: pcie@1cb0000000 {