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 {