From 58b6ddb710382d1b39d2d993fb932a9276d1fdf8 Mon Sep 17 00:00:00 2001 From: Artyom Astafurov Date: Wed, 4 Nov 2026 11:04:01 -0500 Subject: [PATCH 1/5] arm64: dts: apple: t604x: share the external display blocks The external display processors, their mailboxes, the fixed DP PHY of ATC3 and the ATC display crossbars are the same hardware on every T604x, at the same addresses. Move them out of the J616s files, all disabled, so that the next board can share them instead of describing them again. The J616s keeps its wiring and the power it runs on. The J614s and J616s DTBs do not change. Assisted-by: LLM Signed-off-by: Artyom Astafurov --- .../boot/dts/apple/t6040-j616s-extdisp.dtsi | 311 ------------------ arch/arm64/boot/dts/apple/t604x-extdisp.dtsi | 160 +++++++++ .../arm64/boot/dts/apple/t604x-j614-j616.dtsi | 1 + 3 files changed, 161 insertions(+), 311 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t604x-extdisp.dtsi diff --git a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp.dtsi b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp.dtsi index ef7f9afb47028..ea6f2d508e273 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp.dtsi @@ -19,317 +19,6 @@ * mem-loader.dtsi). */ -/ { - pinctrl_aop: pinctrl@510824000 { - compatible = "apple,t6041-pinctrl", "apple,t8103-pinctrl"; - reg = <0x5 0x10824000 0x0 0x4000>; - - gpio-controller; - #gpio-cells = <2>; - gpio-ranges = <&pinctrl_aop 0 0 85>; - apple,npins = <85>; - - interrupt-controller; - #interrupt-cells = <2>; - interrupt-parent = <&aic>; - interrupts = , - , - , - , - , - , - ; - status = "disabled"; - }; - - dispext0_dart: iommu@3a2300000 { - compatible = "apple,t6041-dart", "apple,t8110-dart"; - reg = <0x3 0xa2300000 0x0 0xc000>; - #iommu-cells = <1>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - dcpext0_dart: iommu@3a2340000 { - compatible = "apple,t6041-dart", "apple,t8110-dart"; - reg = <0x3 0xa2340000 0x0 0x20000>; - #iommu-cells = <1>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - dcpext0: dcp@3a2e00000 { - compatible = "apple,t6041-dcpext", "apple,dcpext"; - reg = <0x3 0xa2e00000 0x0 0x4000>, - <0x3 0xa0000000 0x0 0x4000000>, - <0x3 0xa2240000 0x0 0x10000>, - <0x3 0xa23a8000 0x0 0x4000>, - <0x3 0xa2800000 0x0 0x800000>; - reg-names = "coproc", "disp-0", "disp-1", "disp-2", "disp-3"; - mboxes = <&dcpext0_mbox>; - mbox-names = "mbox"; - iommus = <&dcpext0_dart 23>; - /* guessed: the internal DCP uses 0x20000, J700 DISPEXT0 is +0x8000 */ - apple,bw-scratch = <&pmgr_dcp 0 4 0x28000>; - /* firmware Disp_Index, the dual-pipe endpoint ID */ - apple,dcp-endpoint = <1>; - /* the only pipe that can be the primary of a two-pipe display */ - apple,typec-hybrid-first; - status = "disabled"; - - dispext0_piodma: piodma { - iommus = <&dispext0_dart 16>; - }; - }; - - dcpext0_mbox: mailbox@3a2e08000 { - compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; - reg = <0x3 0xa2e08000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = , - , - , - ; - interrupt-names = "send-empty", "send-not-empty", - "recv-empty", "recv-not-empty"; - #mbox-cells = <0>; - status = "disabled"; - }; - - dispext1_dart: iommu@602300000 { - compatible = "apple,t6041-dart", "apple,t8110-dart"; - reg = <0x6 0x02300000 0x0 0xc000>; - #iommu-cells = <1>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - dcpext1_dart: iommu@602340000 { - compatible = "apple,t6041-dart", "apple,t8110-dart"; - reg = <0x6 0x02340000 0x0 0xc000>; - #iommu-cells = <1>; - interrupt-parent = <&aic>; - interrupts = ; - status = "disabled"; - }; - - dcpext1: dcp@602e00000 { - compatible = "apple,t6041-dcpext", "apple,dcpext"; - reg = <0x6 0x02e00000 0x0 0x4000>, - <0x6 0x00000000 0x0 0x4000000>, - <0x6 0x02240000 0x0 0x10000>, - <0x6 0x023a8000 0x0 0x4000>, - <0x6 0x02800000 0x0 0x800000>; - reg-names = "coproc", "disp-0", "disp-1", "disp-2", "disp-3"; - mboxes = <&dcpext1_mbox>; - mbox-names = "mbox"; - iommus = <&dcpext1_dart 23>; - /* guessed, as dcpext0 */ - apple,bw-scratch = <&pmgr_dcp 0 4 0x30000>; - apple,dcp-endpoint = <2>; - status = "disabled"; - - dispext1_piodma: piodma { - iommus = <&dispext1_dart 16>; - }; - }; - - dcpext1_mbox: mailbox@602e08000 { - compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; - reg = <0x6 0x02e08000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = , - , - , - ; - interrupt-names = "send-empty", "send-not-empty", - "recv-empty", "recv-not-empty"; - #mbox-cells = <0>; - status = "disabled"; - }; - - /* ATC3: the HDMI converter's fixed DP PHY; no USB controller, no pipehandler. */ - atcphy3: phy@39aa90000 { - compatible = "apple,t6040-atcphy"; - reg = <0x3 0x9aa90000 0x0 0x4000>, - <0x3 0x9a800000 0x0 0x4000>, - <0x3 0x9b000000 0x0 0x30000>, - <0x3 0x9b200000 0x0 0x4000>, - <0x3 0x9b140000 0x0 0x4000>, - <0x3 0x9b0c0000 0x0 0x10000>, - <0x3 0x98000000 0x0 0x8000>, - <0x3 0x98020000 0x0 0x4000>, - <0x3 0x9b244000 0x0 0x4000>, - <0x3 0x9b250000 0x0 0x4000>; - reg-names = "bank0", "bank1", "core", "cfg", "cpu", "cpu-data", - "axi2af", "axi2af-lioa", "fabric", "common-cfg"; - #phy-cells = <1>; - power-domains = <&ps_atc3_common_dp>; - mboxes = <&atcphy3_mbox>; - mbox-names = "phy-cpu"; - nonposted-mmio; - status = "disabled"; - }; - - atcphy3_mbox: mailbox@39b148000 { - compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; - reg = <0x3 0x9b148000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = , - , - , - ; - interrupt-names = "send-empty", "send-not-empty", - "recv-empty", "recv-not-empty"; - #mbox-cells = <0>; - power-domains = <&ps_atc3_phymxwrap>; - status = "disabled"; - }; - - /* Display crossbars (ADT atcN-dpxbar, atc-dpxbar,t604x): no driver yet. */ - atcphy0_xbar: mux@38324c000 { - compatible = "apple,t6041-display-crossbar"; - reg = <0x3 0x8324c000 0x0 0x4000>; - #mux-control-cells = <1>; - status = "disabled"; - }; - - atcphy1_xbar: mux@38b24c000 { - compatible = "apple,t6041-display-crossbar"; - reg = <0x3 0x8b24c000 0x0 0x4000>; - #mux-control-cells = <1>; - status = "disabled"; - }; - - atcphy2_xbar: mux@39324c000 { - compatible = "apple,t6041-display-crossbar"; - reg = <0x3 0x9324c000 0x0 0x4000>; - #mux-control-cells = <1>; - status = "disabled"; - }; - - atcphy3_xbar: mux@39b24c000 { - compatible = "apple,t6041-display-crossbar"; - reg = <0x3 0x9b24c000 0x0 0x4000>; - #mux-control-cells = <1>; - status = "disabled"; - }; -}; - -/* - * PMGR domains from the ADT device table (+16 offset, +19 block; block 0 = - * pmgr_aux, block 3 = pmgr_mini; checked against the ATC0 nodes). Disabled - * so the pwrstate driver does not touch them yet: DISPEXT0/1 run the - * firmware iBoot loaded, and an always-on domain that happens to be off - * would be powered on by the driver. - */ -&pmgr_aux { - ps_dispext0_sys: power-controller@340 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x340 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext0_sys"; - status = "disabled"; - }; - - ps_dispext0_fe: power-controller@348 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x348 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext0_fe"; - power-domains = <&ps_dispext0_sys>; - status = "disabled"; - }; - - ps_dispext0_cpu: power-controller@350 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x350 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext0_cpu"; - power-domains = <&ps_dispext0_fe>; - apple,always-on; - status = "disabled"; - }; - - ps_atc3_common: power-controller@408 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x408 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "atc3_common"; - apple,always-on; - status = "disabled"; - }; - - ps_dispext1_sys: power-controller@490 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x490 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext1_sys"; - status = "disabled"; - }; - - ps_dispext1_fe: power-controller@498 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x498 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext1_fe"; - power-domains = <&ps_dispext1_sys>; - status = "disabled"; - }; - - ps_dispext1_cpu: power-controller@4a0 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x4a0 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "dispext1_cpu"; - power-domains = <&ps_dispext1_fe>; - apple,always-on; - status = "disabled"; - }; -}; - -&pmgr_mini { - ps_atc3_common_dp: power-controller@b8 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0xb8 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "atc3_common_dp"; - power-domains = <&ps_atc3_phymxwrap>; - status = "disabled"; - }; - - ps_atc3_usb_aon: power-controller@e0 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0xe0 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "atc3_usb_aon"; - apple,always-on; - status = "disabled"; - }; - - ps_atc3_phymxwrap: power-controller@168 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x168 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "atc3_phymxwrap"; - power-domains = <&ps_atc3_common>, <&ps_atc3_usb_aon>; - status = "disabled"; - }; -}; - /* * HDMI port (disabled with dcpext0): converter power SMC gP0f/gP1a (as on * the M3 Pro J514s), HPD on AOP GPIO 0x24. The converter's reset (gP10), diff --git a/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi b/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi new file mode 100644 index 0000000000000..5e2e792e5dd09 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * External display blocks of the T604x: the external display processors and + * their mailboxes, the fixed DP PHY of ATC3 and the ATC display crossbars. + * Every node is disabled. The board adds the wiring and the power it runs on. + */ + +/ { + dcpext0: dcp@3a2e00000 { + compatible = "apple,t6041-dcpext", "apple,dcpext"; + reg = <0x3 0xa2e00000 0x0 0x4000>, + <0x3 0xa0000000 0x0 0x4000000>, + <0x3 0xa2240000 0x0 0x10000>, + <0x3 0xa23a8000 0x0 0x4000>, + <0x3 0xa2800000 0x0 0x800000>; + reg-names = "coproc", "disp-0", "disp-1", "disp-2", "disp-3"; + mboxes = <&dcpext0_mbox>; + mbox-names = "mbox"; + iommus = <&dcpext0_dart 23>; + /* guessed: the internal DCP uses 0x20000, J700 DISPEXT0 is +0x8000 */ + apple,bw-scratch = <&pmgr_dcp 0 4 0x28000>; + /* firmware Disp_Index, the dual-pipe endpoint ID */ + apple,dcp-endpoint = <1>; + /* the only pipe that can be the primary of a two-pipe display */ + apple,typec-hybrid-first; + status = "disabled"; + + dispext0_piodma: piodma { + iommus = <&dispext0_dart 16>; + }; + }; + + dcpext0_mbox: mailbox@3a2e08000 { + compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x3 0xa2e08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + status = "disabled"; + }; + + dcpext1: dcp@602e00000 { + compatible = "apple,t6041-dcpext", "apple,dcpext"; + reg = <0x6 0x02e00000 0x0 0x4000>, + <0x6 0x00000000 0x0 0x4000000>, + <0x6 0x02240000 0x0 0x10000>, + <0x6 0x023a8000 0x0 0x4000>, + <0x6 0x02800000 0x0 0x800000>; + reg-names = "coproc", "disp-0", "disp-1", "disp-2", "disp-3"; + mboxes = <&dcpext1_mbox>; + mbox-names = "mbox"; + iommus = <&dcpext1_dart 23>; + /* guessed, as dcpext0 */ + apple,bw-scratch = <&pmgr_dcp 0 4 0x30000>; + apple,dcp-endpoint = <2>; + status = "disabled"; + + dispext1_piodma: piodma { + iommus = <&dispext1_dart 16>; + }; + }; + + dcpext1_mbox: mailbox@602e08000 { + compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x6 0x02e08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + status = "disabled"; + }; + + /* ATC3: the HDMI converter's fixed DP PHY; no USB controller, no pipehandler. */ + atcphy3: phy@39aa90000 { + compatible = "apple,t6040-atcphy"; + reg = <0x3 0x9aa90000 0x0 0x4000>, + <0x3 0x9a800000 0x0 0x4000>, + <0x3 0x9b000000 0x0 0x30000>, + <0x3 0x9b200000 0x0 0x4000>, + <0x3 0x9b140000 0x0 0x4000>, + <0x3 0x9b0c0000 0x0 0x10000>, + <0x3 0x98000000 0x0 0x8000>, + <0x3 0x98020000 0x0 0x4000>, + <0x3 0x9b244000 0x0 0x4000>, + <0x3 0x9b250000 0x0 0x4000>; + reg-names = "bank0", "bank1", "core", "cfg", "cpu", "cpu-data", + "axi2af", "axi2af-lioa", "fabric", "common-cfg"; + #phy-cells = <1>; + power-domains = <&ps_atc3_common_dp>; + mboxes = <&atcphy3_mbox>; + mbox-names = "phy-cpu"; + nonposted-mmio; + status = "disabled"; + }; + + atcphy3_mbox: mailbox@39b148000 { + compatible = "apple,t6041-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x3 0x9b148000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_atc3_phymxwrap>; + status = "disabled"; + }; + + /* Display crossbars (ADT atcN-dpxbar, atc-dpxbar,t604x). */ + atcphy0_xbar: mux@38324c000 { + compatible = "apple,t6041-display-crossbar"; + reg = <0x3 0x8324c000 0x0 0x4000>; + #mux-control-cells = <1>; + status = "disabled"; + }; + + atcphy1_xbar: mux@38b24c000 { + compatible = "apple,t6041-display-crossbar"; + reg = <0x3 0x8b24c000 0x0 0x4000>; + #mux-control-cells = <1>; + status = "disabled"; + }; + + atcphy2_xbar: mux@39324c000 { + compatible = "apple,t6041-display-crossbar"; + reg = <0x3 0x9324c000 0x0 0x4000>; + #mux-control-cells = <1>; + status = "disabled"; + }; + + atcphy3_xbar: mux@39b24c000 { + compatible = "apple,t6041-display-crossbar"; + reg = <0x3 0x9b24c000 0x0 0x4000>; + #mux-control-cells = <1>; + status = "disabled"; + }; +}; + +&ps_atc3_common { + apple,always-on; +}; + +&ps_atc3_usb_aon { + apple,always-on; +}; + +&ps_atc3_common_dp { + power-domains = <&ps_atc3_phymxwrap>; +}; diff --git a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi index 27593217fd195..ba1f428b4ee04 100644 --- a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi +++ b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi @@ -4822,6 +4822,7 @@ #include "t6040-j616s-usb3.dtsi" /* External display chain, all disabled: the gate in drivers/soc/apple/display-gate.c enables it. */ +#include "t604x-extdisp.dtsi" #include "t6040-j616s-extdisp.dtsi" #include "t6040-j616s-extdisp-mem-loader.dtsi" #include "t6040-j616s-extdisp-hdmi.dtsi" From 8ae55dbaffa0114bb4e710f90e1ce82488a53028 Mon Sep 17 00:00:00 2001 From: Artyom Astafurov Date: Wed, 4 Nov 2026 12:30:11 -0500 Subject: [PATCH 2/5] soc: apple: display-gate: enable the J616c external displays The J616c has no PMP to wait for: iBoot leaves the external display chains powered, and the boot loader fills each external display processor's firmware memory. Enable a chain from the display gate, as for the J616s, once its processor has that memory: its power domains, pins, PHY, crossbar, DARTs, mailbox and processor, and the Type-C route of dcpext1, in one changeset before any device exists, with the chain's display DART appended to the display subsystem's iommus. A chain whose processor has no firmware memory, or that is not all there and disabled, is left as it is, and so is the other chain. The display subsystem's status is never written, so the internal display stays as the boot loader left it. The KUnit tests run the gate on a test tree of the J616c's chains. Assisted-by: LLM Signed-off-by: Artyom Astafurov --- drivers/soc/apple/Kconfig | 5 +- drivers/soc/apple/Makefile | 4 +- drivers/soc/apple/display-gate-test.c | 223 ++++++++++++++++++++++++- drivers/soc/apple/display-gate.c | 121 ++++++++++++++ drivers/soc/apple/t6041-gate-test.dtso | 167 ++++++++++++++++++ 5 files changed, 517 insertions(+), 3 deletions(-) create mode 100644 drivers/soc/apple/t6041-gate-test.dtso diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig index 997a9d90b105a..4639f5b8ab9bf 100644 --- a/drivers/soc/apple/Kconfig +++ b/drivers/soc/apple/Kconfig @@ -321,7 +321,10 @@ config APPLE_DISPLAY_GATE_KUNIT_TEST before, whatever the T6031 option says. On T8122: on by default, and nothing changed when the handoff or the device tree's own PMP topology does not check out. On T6041: a power management processor - that binds late still powers the external displays up. + that binds late still powers the external displays up. On the + J616c: each external display chain is enabled without a PMP once + its processor has firmware memory, and the display subsystem's + status is never written. endmenu diff --git a/drivers/soc/apple/Makefile b/drivers/soc/apple/Makefile index f02b6b2c495f6..57d06930401c4 100644 --- a/drivers/soc/apple/Makefile +++ b/drivers/soc/apple/Makefile @@ -21,7 +21,8 @@ obj-$(CONFIG_APPLE_DISPLAY_GATE) += apple-display-gate.o apple-display-gate-y := display-gate.o t6030-pmp.dtbo.o t6030-j516s-pmp.dtbo.o apple-display-gate-$(CONFIG_APPLE_DISPLAY_GATE_KUNIT_TEST) += t6031-gate-test.dtbo.o \ t6030-gate-test.dtbo.o \ - t8122-gate-test.dtbo.o + t8122-gate-test.dtbo.o \ + t6041-gate-test.dtbo.o # The gate adds the interrupt parent from the base tree at boot. DTC_FLAGS_t6030-pmp := -Wno-interrupts_property DTC_FLAGS_t6030-j516s-pmp := -Wno-interrupts_property @@ -31,6 +32,7 @@ DTC_FLAGS_t6031-gate-test := -Wno-interrupts_property -Wno-chosen_node_is_root \ DTC_FLAGS_t6030-gate-test := -Wno-interrupts_property -Wno-chosen_node_is_root \ -Wno-avoid_unnecessary_addr_size DTC_FLAGS_t8122-gate-test := -Wno-interrupts_property -Wno-chosen_node_is_root +DTC_FLAGS_t6041-gate-test := -Wno-unit_address_vs_reg -Wno-avoid_unnecessary_addr_size obj-$(CONFIG_APPLE_TUNABLE) += apple-tunable.o apple-tunable-y = tunable.o diff --git a/drivers/soc/apple/display-gate-test.c b/drivers/soc/apple/display-gate-test.c index 4751b0804503e..c767a064e9280 100644 --- a/drivers/soc/apple/display-gate-test.c +++ b/drivers/soc/apple/display-gate-test.c @@ -18,6 +18,10 @@ * - T6041: no test tree; a PMP that binds after the deadline still * starts the external display power-up, and only a failed PMP or power-up * leaves the internal panel alone. + * - T6041 on the J616c (t6041-gate-test.dtso): no PMP; each external chain + * is enabled once its processor has firmware memory, one without it or + * already enabled stays as it is, and the display subsystem is never + * written. * Included at the end of display-gate.c. * * The test trees are applied once and stay: the gate gives some properties @@ -33,6 +37,8 @@ extern const u8 __dtbo_t6030_gate_test_begin[]; extern const u8 __dtbo_t6030_gate_test_end[]; extern const u8 __dtbo_t8122_gate_test_begin[]; extern const u8 __dtbo_t8122_gate_test_end[]; +extern const u8 __dtbo_t6041_gate_test_begin[]; +extern const u8 __dtbo_t6041_gate_test_end[]; /* One SoC's test tree and what the gate should make of it. */ struct gt_soc { @@ -136,6 +142,7 @@ static const struct gt_soc gt_t6030 __initconst = { static int gt_fixture_t6031 __initdata = -1; static int gt_fixture_t6030 __initdata = -1; static int gt_fixture_t8122 __initdata = -1; +static int gt_fixture_t6041 __initdata = -1; /* * Whether the booted tree has its own /soc, checked before the first fixture @@ -1016,6 +1023,220 @@ static struct kunit_suite gate_t6041_suite __refdata = { .test_cases = gate_t6041_cases, }; +/* + * T6041 on the J616c. Its test tree is at the root, so it is applied only + * where there is no display subsystem; the chains are reverted after each + * case, the tree stays. + */ +static const struct gt_soc gt_t6041_max __initconst = { + .soc = &gate_t6041_max, + .fixture = __dtbo_t6041_gate_test_begin, + .fixture_end = __dtbo_t6041_gate_test_end, +}; + +static bool gt_max_live __initdata; +static struct property *gt_max_display_status __initdata; + +static int __init gt_max_suite_init(struct kunit_suite *suite) +{ + struct device_node *np = of_find_node_by_path("/display-subsystem"); + + gt_max_live = !!np; + of_node_put(np); + if (gt_max_live) + return 0; + return of_overlay_fdt_apply(gt_t6041_max.fixture, + gt_t6041_max.fixture_end - gt_t6041_max.fixture, + >_fixture_t6041, NULL); +} + +static int __init gt_max_init(struct kunit *test) +{ + int ret = gt_init(test, >_t6041_max); + + if (!ret && gt_max_live) + kunit_skip(test, "the booted device tree has its own display subsystem"); + return ret; +} + +static void __init gt_max_exit(struct kunit *test) +{ + unsigned int i; + + /* The later chain's iommus edit builds on the earlier one's. */ + for (i = ARRAY_SIZE(t6041_max_cs); i--;) { + of_changeset_revert(&t6041_max_cs[i]); + of_changeset_destroy(&t6041_max_cs[i]); + } + gt_exit(test); +} + +/* The test's edits, then the gate; the display subsystem's status property is noted before. */ +static void __init gt_max_run(struct kunit *test) +{ + struct gate_test *t = test->priv; + unsigned int i; + + KUNIT_ASSERT_EQ(test, of_changeset_apply(&t->cs), 0); + for (i = 0; i < ARRAY_SIZE(t6041_max_cs); i++) + of_changeset_init(&t6041_max_cs[i]); + gt_max_display_status = of_find_property(gt_node(test, "/display-subsystem"), "status", + NULL); + gate_t6041_max_run(); +} + +/* The processor's data and heap regions, as the boot loader fills them. */ +static void __init gt_max_fill(struct kunit *test, unsigned int i) +{ + char path[48]; + + snprintf(path, sizeof(path), "/reserved-memory/dcpext%u-data", i); + gt_set_string(test, path, "status", "okay"); + snprintf(path, sizeof(path), "/reserved-memory/dcpext%u-heap", i); + gt_set_string(test, path, "status", "okay"); +} + +static void __init gt_max_expect_chain(struct kunit *test, unsigned int i, bool enabled) +{ + const struct gate_staged *st = &t6041_max_stages[i]; + unsigned int n; + + for (n = 0; n < st->nr; n++) + KUNIT_EXPECT_EQ_MSG(test, gt_okay(test, st->nodes[n]), enabled, "%s", st->nodes[n]); +} + +/* + * The display subsystem keeps its status property (the gate never wrote it) + * and has the internal DART's entry, then the display DARTs of the chains in + * @mask, in order. + */ +static void __init gt_max_expect_display(struct kunit *test, unsigned int mask) +{ + struct device_node *display = gt_node(test, "/display-subsystem"); + struct of_phandle_args args; + unsigned int i, entry = 1; + + KUNIT_EXPECT_PTR_EQ(test, of_find_property(display, "status", NULL), gt_max_display_status); + KUNIT_EXPECT_TRUE(test, of_device_is_available(display)); + KUNIT_EXPECT_EQ(test, of_count_phandle_with_args(display, "iommus", "#iommu-cells"), + 1 + hweight32(mask)); + for (i = 0; i < ARRAY_SIZE(t6041_max_stages); i++) { + if (!(mask & BIT(i))) + continue; + KUNIT_ASSERT_EQ(test, of_parse_phandle_with_args(display, "iommus", "#iommu-cells", + entry++, &args), 0); + KUNIT_EXPECT_PTR_EQ(test, args.np, gt_node(test, t6041_max_stages[i].dart)); + KUNIT_EXPECT_EQ(test, args.args[0], 0); + of_node_put(args.np); + } +} + +/* Without a PMP, both chains whose processors have memory are enabled. */ +static void __init gate_t6041_max_enabled(struct kunit *test) +{ + struct device_node *pmp = of_find_node_by_path("/pmp@500700000"); + + KUNIT_EXPECT_NULL(test, pmp); + of_node_put(pmp); + gt_max_fill(test, 0); + gt_max_fill(test, 1); + gt_max_run(test); + gt_max_expect_chain(test, 0, true); + gt_max_expect_chain(test, 1, true); + gt_max_expect_display(test, BIT(0) | BIT(1)); +} + +/* A boot loader that fills nothing leaves everything as it is. */ +static void __init gate_t6041_max_no_memory(struct kunit *test) +{ + gt_max_run(test); + gt_max_expect_chain(test, 0, false); + gt_max_expect_chain(test, 1, false); + gt_max_expect_display(test, 0); +} + +/* The other processor's chain does not wait for one that was refused. */ +static void __init gate_t6041_max_one_processor(struct kunit *test) +{ + gt_max_fill(test, 1); + gt_max_run(test); + gt_max_expect_chain(test, 0, false); + gt_max_expect_chain(test, 1, true); + gt_max_expect_display(test, BIT(1)); +} + +/* A region that is still a placeholder keeps the whole chain off. */ +static void __init gate_t6041_max_partial_memory(struct kunit *test) +{ + gt_max_fill(test, 1); + gt_set_string(test, "/reserved-memory/dcpext0-data", "status", "okay"); + gt_max_run(test); + gt_max_expect_chain(test, 0, false); + gt_max_expect_chain(test, 1, true); + gt_max_expect_display(test, BIT(1)); +} + +/* A boot loader that enabled a chain itself is not enabled again, nor its DART added twice. */ +static void __init gate_t6041_max_enabled_by_loader(struct kunit *test) +{ + gt_max_fill(test, 0); + gt_max_fill(test, 1); + gt_set_string(test, t6041_max_hdmi_nodes[0], "status", "okay"); + gt_set_string(test, t6041_max_usbc_nodes[0], "status", "okay"); + gt_max_run(test); + KUNIT_EXPECT_TRUE(test, gt_okay(test, t6041_max_hdmi_nodes[0])); + KUNIT_EXPECT_FALSE(test, gt_okay(test, t6041_max_hdmi_nodes[1])); + KUNIT_EXPECT_TRUE(test, gt_okay(test, t6041_max_usbc_nodes[0])); + KUNIT_EXPECT_FALSE(test, gt_okay(test, t6041_max_usbc_nodes[1])); + gt_max_expect_display(test, 0); +} + +/* A chain that is not all there is refused whole. */ +static void __init gate_t6041_max_missing_node(struct kunit *test) +{ + gt_max_fill(test, 0); + gt_max_fill(test, 1); + gt_detach(test, "/phy@39aa90000"); + gt_max_run(test); + gt_max_expect_chain(test, 1, true); + gt_max_expect_display(test, BIT(1)); + KUNIT_EXPECT_FALSE(test, gt_okay(test, t6041_max_hdmi_nodes[0])); +} + +/* Without an enabled display subsystem nothing is enabled, and it stays as it was. */ +static void __init gate_t6041_max_no_display(struct kunit *test) +{ + struct device_node *display = gt_node(test, "/display-subsystem"); + + gt_max_fill(test, 0); + gt_max_fill(test, 1); + gt_set_string(test, "/display-subsystem", "status", "disabled"); + gt_max_run(test); + gt_max_expect_chain(test, 0, false); + gt_max_expect_chain(test, 1, false); + KUNIT_EXPECT_FALSE(test, of_device_is_available(display)); + KUNIT_EXPECT_EQ(test, of_count_phandle_with_args(display, "iommus", "#iommu-cells"), 1); +} + +static struct kunit_case gate_t6041_max_cases[] __refdata = { + KUNIT_CASE(gate_t6041_max_enabled), + KUNIT_CASE(gate_t6041_max_no_memory), + KUNIT_CASE(gate_t6041_max_one_processor), + KUNIT_CASE(gate_t6041_max_partial_memory), + KUNIT_CASE(gate_t6041_max_enabled_by_loader), + KUNIT_CASE(gate_t6041_max_missing_node), + KUNIT_CASE(gate_t6041_max_no_display), + {} +}; + +static struct kunit_suite gate_t6041_max_suite __refdata = { + .name = "apple-display-gate-t6041-max", + .suite_init = gt_max_suite_init, + .init = gt_max_init, + .exit = gt_max_exit, + .test_cases = gate_t6041_max_cases, +}; + /* T6030 first: the T6031 and T8122 trees describe a PMP, which it refuses. */ kunit_test_init_section_suites(&gate_t6030_suite, &gate_t6031_suite, &gate_t8122_suite, - &gate_t6041_suite); + &gate_t6041_suite, &gate_t6041_max_suite); diff --git a/drivers/soc/apple/display-gate.c b/drivers/soc/apple/display-gate.c index 7178412579287..a34cbc9fee011 100644 --- a/drivers/soc/apple/display-gate.c +++ b/drivers/soc/apple/display-gate.c @@ -77,6 +77,12 @@ * bound, even long after the boot (see gate_t6041_run()). This part was a * driver of its own, t6041-display-gate.c, by Ryan Murray and František * Balázsy. + * + * On the M4 Max (J616c, apple,t6041) the PMP never runs: iBoot leaves the + * external chains powered and the boot loader fills each external display + * processor's firmware memory. The gate enables a chain once its processor has + * that memory, before any device exists (see gate_t6041_max_run()), and never + * touches the internal display. */ #define pr_fmt(fmt) fmt @@ -327,11 +333,22 @@ static const struct gate_soc gate_t6041 __initconst = { .run = gate_t6041_run, }; +static void __init gate_t6041_max_run(void); + +/* T6041 (M4 Max): no PMP; the external chains follow the boot loader's firmware memory. */ +static const struct gate_soc gate_t6041_max __initconst = { + .machine = "apple,t6041", + .prefix = "apple-t6041-display: ", + .name = "T6041", + .run = gate_t6041_max_run, +}; + static const struct gate_soc *const gate_socs[] __initconst = { &gate_t6030, &gate_t8122, &gate_t6031, &gate_t6041, + &gate_t6041_max, }; /* The SoC this boot runs on, if the gate serves it. */ @@ -2946,6 +2963,110 @@ static void __init gate_t6041_run(void) gate_t6041_staged(); } +/* + * J616c's external chains. No PMP, so no DISPEXT power domain is described and + * nothing is requested or waited for: the domains are on as iBoot left them. + */ +static const char *const t6041_max_hdmi_nodes[] = { + /* ATC3 power, AOP pins, PHY, crossbar, DARTs, mailbox, dcpext0 */ + "/power-management@502800000/power-controller@408", + "/power-management@508300000/power-controller@e0", + "/power-management@508300000/power-controller@168", + "/power-management@508300000/power-controller@b8", + "/power-management@508300000/power-controller@148", + "/pinctrl@510824000", + "/mailbox@39b148000", + "/phy@39aa90000", + "/mux@39b24c000", + "/iommu@3a2340000", + "/iommu@3a2300000", + "/mailbox@3a2e08000", + "/dcp@3a2e00000", +}; + +static const char *const t6041_max_usbc_nodes[] = { + /* ATC1 mailbox and crossbar, DARTs, mailbox, route, dcpext1 */ + "/mailbox@38b148000", + "/mux@38b24c000", + "/iommu@602340000", + "/iommu@602300000", + "/mailbox@602e08000", + "/dcp@602e00000/typec-routes/route@1", + "/dcp@602e00000", +}; + +static const struct gate_staged t6041_max_stages[] = { + { "/iommu@3a2300000", t6041_max_hdmi_nodes, ARRAY_SIZE(t6041_max_hdmi_nodes) }, + { "/iommu@602300000", t6041_max_usbc_nodes, ARRAY_SIZE(t6041_max_usbc_nodes) }, +}; + +/* Applied, they stay: the live tree refers to them. Only the KUnit test reverts them. */ +static struct of_changeset t6041_max_cs[ARRAY_SIZE(t6041_max_stages)]; + +/* Enable every node of stage @i and put its display DART into the display subsystem's iommus. */ +static int __init t6041_max_apply(unsigned int i, struct device_node *display) +{ + const struct gate_staged *st = &t6041_max_stages[i]; + struct of_changeset *cs = &t6041_max_cs[i]; + struct device_node *np; + unsigned int n; + int ret; + + of_changeset_init(cs); + np = of_find_node_by_path(st->dart); + ret = np ? gate_iommus_append(cs, display, np) : -ENODEV; + of_node_put(np); + for (n = 0; !ret && n < st->nr; n++) { + np = of_find_node_by_path(st->nodes[n]); + ret = np ? of_changeset_update_prop_string(cs, np, "status", "okay") : -ENODEV; + of_node_put(np); + } + if (!ret) + ret = of_changeset_apply(cs); + if (ret) + of_changeset_destroy(cs); + return ret; +} + +/* + * Each chain is enabled in one changeset, once its processor has firmware + * memory. A chain that has none, or is not all there and disabled (a boot + * loader that enabled it itself), stays as it is, and the other chain does not + * depend on it. The display subsystem only gains the DART of an enabled chain: + * its status is never written, so the internal display stays as the boot + * loader left it whatever happens here. + */ +static void __init gate_t6041_max_run(void) +{ + struct device_node *display; + unsigned int i; + int ret; + + if (IS_ENABLED(CONFIG_VIDEO) && video_firmware_drivers_only()) + return; + + staged_prefix = gate_soc->prefix; + display = of_find_node_by_path("/display-subsystem"); + if (!display || !of_device_is_available(display)) { + staged_err("no display subsystem, nothing enabled\n"); + of_node_put(display); + return; + } + for (i = 0; i < ARRAY_SIZE(t6041_max_stages); i++) { + const struct gate_staged *st = &t6041_max_stages[i]; + const char *dcp = st->nodes[st->nr - 1]; + + if (!staged_ready(st)) + continue; + ret = t6041_max_apply(i, display); + if (ret) + staged_err("%s: could not enable the chain: %d\n", dcp, ret); + else + staged_info("%s enabled\n", dcp); + } + of_node_put(display); +} + /* Runs before of_platform_default_populate_init() at arch_initcall_sync. */ static int __init apple_display_gate(void) { diff --git a/drivers/soc/apple/t6041-gate-test.dtso b/drivers/soc/apple/t6041-gate-test.dtso new file mode 100644 index 0000000000000..96c0eaa541ced --- /dev/null +++ b/drivers/soc/apple/t6041-gate-test.dtso @@ -0,0 +1,167 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Test device tree for the display gate KUnit test: the J616c's external + * display chains at their real paths (t604x-extdisp.dtsi, + * t6041-j616c-hdmi.dtsi, t6041-j616c-usbc.dtsi), disabled, and the display + * subsystem with the internal display's DART. There is no PMP. The data and + * heap regions of both processors are the boot loader's disabled + * placeholders, the text region the one it adds. + * + * The display subsystem is the only node that is enabled. It sits at the + * root, as on the J616c, so a tree that has one does not get this applied. + */ + +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target-path = "/"; + + __overlay__ { + reserved-memory { + dcpext0_text: dcpext0-text { + compatible = "apple,asc-mem"; + }; + + dcpext0_data: dcpext0-data { + compatible = "apple,asc-mem"; + status = "disabled"; + }; + + dcpext0_heap: dcpext0-heap { + compatible = "apple,asc-mem"; + status = "disabled"; + }; + + dcpext1_text: dcpext1-text { + compatible = "apple,asc-mem"; + }; + + dcpext1_data: dcpext1-data { + compatible = "apple,asc-mem"; + status = "disabled"; + }; + + dcpext1_heap: dcpext1-heap { + compatible = "apple,asc-mem"; + status = "disabled"; + }; + }; + + power-management@502800000 { + power-controller@408 { + status = "disabled"; + }; + }; + + power-management@508300000 { + power-controller@e0 { + status = "disabled"; + }; + + power-controller@168 { + status = "disabled"; + }; + + power-controller@b8 { + status = "disabled"; + }; + + power-controller@148 { + status = "disabled"; + }; + }; + + pinctrl@510824000 { + status = "disabled"; + }; + + mailbox@39b148000 { + status = "disabled"; + }; + + phy@39aa90000 { + status = "disabled"; + }; + + mux@39b24c000 { + status = "disabled"; + }; + + dcpext0_dart: iommu@3a2340000 { + #iommu-cells = <1>; + status = "disabled"; + }; + + dispext0_dart: iommu@3a2300000 { + #iommu-cells = <1>; + status = "disabled"; + }; + + mailbox@3a2e08000 { + status = "disabled"; + }; + + dcp@3a2e00000 { + compatible = "apple,t6041-dcpext"; + iommus = <&dcpext0_dart 23>; + memory-region = <&dcpext0_data>, <&dcpext0_heap>, <&dcpext0_text>; + status = "disabled"; + + piodma { + iommus = <&dispext0_dart 16>; + }; + }; + + mailbox@38b148000 { + status = "disabled"; + }; + + mux@38b24c000 { + status = "disabled"; + }; + + dcpext1_dart: iommu@602340000 { + #iommu-cells = <1>; + status = "disabled"; + }; + + dispext1_dart: iommu@602300000 { + #iommu-cells = <1>; + status = "disabled"; + }; + + mailbox@602e08000 { + status = "disabled"; + }; + + dcp@602e00000 { + compatible = "apple,t6041-dcpext"; + iommus = <&dcpext1_dart 23>; + memory-region = <&dcpext1_data>, <&dcpext1_heap>, <&dcpext1_text>; + status = "disabled"; + + typec-routes { + route@1 { + status = "disabled"; + }; + }; + + piodma { + iommus = <&dispext1_dart 16>; + }; + }; + + disp_dart: iommu@a00000000 { + #iommu-cells = <1>; + }; + + display-subsystem { + compatible = "apple,display-subsystem"; + iommus = <&disp_dart 0>; + status = "okay"; + }; + }; + }; +}; From be87c8c20cc5d766e3b6c219b0e3715769809a80 Mon Sep 17 00:00:00 2001 From: Artyom Astafurov Date: Sat, 31 Oct 2026 19:34:19 -0400 Subject: [PATCH 3/5] arm64: dts: apple: t6041-j616c: describe the HDMI output dcpext0 drives the HDMI port through the ATC3 display crossbar, atcphy3 and the on-board DP-to-HDMI converter, as on J616s; the J616c ADT gives the same addresses, interrupts, GPIOs and power states, and atcphy3 gets this board's tunables. With no PMP to acknowledge DISPEXT0, the chain runs as iBoot left it powered: no DISPEXT0 power domain is named and ATC3_COMMON is always-on. Everything stays disabled until the boot loader has filled dcpext0's firmware memory and the display gate enables it. Assisted-by: LLM Signed-off-by: Artyom Astafurov --- .../boot/dts/apple/t6041-j616c-hdmi.dtsi | 231 ++++++++++++++++++ arch/arm64/boot/dts/apple/t6041-j616c.dts | 7 + 2 files changed, 238 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi diff --git a/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi b/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi new file mode 100644 index 0000000000000..c46b4d93b5955 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi @@ -0,0 +1,231 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * HDMI output of the J616c: dcpext0, the ATC3 display crossbar, atcphy3 (a + * DP PHY without a USB controller) and the on-board DP-to-HDMI converter. + * + * Every node is disabled. No DISPEXT0 power domain is described: the chain + * runs as iBoot leaves it powered. The boot loader fills dcpext0's firmware + * memory (the data and heap regions below; the text region is the internal + * DCP's), and the display gate (drivers/soc/apple/display-gate.c) then + * enables the chain and adds dispext0's DART to the display subsystem's + * iommus. + */ + +/ { + aliases { + dcpext0 = &dcpext0; + }; + + reserved-memory { + 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"; + }; + }; +}; + +&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 = <&atcphy3 PHY_TYPE_DP>; + phy-names = "dp-phy"; + mux-controls = <&atcphy3_xbar 0>; + mux-control-names = "dp-xbar"; + mux-index = <0>; + apple,dptx-phy = <3>; + memory-region = <&dcpext0_data>, <&dcpext0_heap>; + memory-region-names = "data", "heap"; +}; + +&atcphy3_xbar { + power-domains = <&ps_atc3_usb>; +}; + +&atcphy3 { + apple,tunable-axi2af = + <0x0 0x800000ff 0x80000025>, + <0x4 0x80ff00ff 0x80250003>, + <0x8 0x80ff00ff 0x80250003>, + <0xc 0x80ff00ff 0x80250005>, + <0x10 0x80ff00ff 0x80250003>, + <0x14 0x80ff00ff 0x80250003>, + <0x18 0x80ff00ff 0x80250003>, + <0x1c 0x80ff00ff 0x80250003>, + <0x20 0x800000ff 0x8000001e>, + <0x24 0x800000ff 0x8000004a>, + <0x28 0x80ff00ff 0x804a0006>, + <0x2c 0x80ff00ff 0x804a0006>, + <0x30 0x80ff00ff 0x804a0006>, + <0x34 0x80ff00ff 0x804a0006>, + <0x38 0x80ff00ff 0x804a0006>, + <0x3c 0x80ff00ff 0x804a0006>, + <0x40 0x800000ff 0x8000001e>, + <0x44 0x800000ff 0x8000001e>, + <0x48 0x800000ff 0x8000001e>, + <0x100 0x000000ff 0x000000ff>, + <0x108 0xffff0006 0x00100000>, + <0x304 0x3f3f0000 0x04040000>, + <0x308 0x000fffff 0x00001681>, + <0x30c 0x000fffff 0x00001680>, + <0x310 0x70000fff 0x000001e0>, + <0x314 0xf0000fff 0x800001e0>, + <0x318 0x70000fff 0x000001e0>, + <0x31c 0xf0000fff 0x800001e0>, + <0x320 0x70000fff 0x000005a0>, + <0x324 0xf0000fff 0x800005a0>, + <0x328 0x70000fff 0x000005a0>, + <0x32c 0xf0000fff 0x800005a0>, + <0x330 0x70000fff 0x000005a0>, + <0x334 0xf0000fff 0x800005a0>, + <0x338 0x70000fff 0x000005a0>, + <0x33c 0x70000fff 0x000005a0>, + <0x340 0x70000fff 0x000005a0>, + <0x344 0x70000fff 0x000005a0>, + <0x348 0x70000fff 0x000005a0>, + <0x34c 0x70000fff 0x000005a0>, + <0x350 0x70000fff 0x000005a0>, + <0x358 0xffffffff 0x0000ffff>, + <0x35c 0xffffffff 0x0000ffff>, + <0x408 0xffff0020 0x00210020>, + <0x40c 0x000fffff 0x00001681>, + <0x410 0x000fffff 0x00001680>, + <0x414 0x70000fff 0x000001e0>, + <0x418 0x70000fff 0x000001e0>, + <0x41c 0x70000fff 0x000001e0>, + <0x420 0x70000fff 0x000001e0>, + <0x424 0x70000fff 0x000005a0>, + <0x428 0x70000fff 0x000005a0>, + <0x42c 0x70000fff 0x000005a0>, + <0x430 0x70000fff 0x000005a0>, + <0x434 0x70000fff 0x000005a0>, + <0x438 0x70000fff 0x000005a0>, + <0x43c 0x70000fff 0x000005a0>, + <0x440 0x70000fff 0x000005a0>, + <0x444 0x70000fff 0x000005a0>, + <0x448 0x70000fff 0x000005a0>, + <0x44c 0x70000fff 0x000005a0>, + <0x450 0x70000fff 0x000005a0>, + <0x454 0x70000fff 0x000005a0>, + <0x948 0x07ff07ff 0x00280000>, + <0xa48 0x07ff07ff 0x00400040>, + <0xb48 0x07ff07ff 0x00b8010e>, + <0xc48 0x07ff07ff 0x00400020>, + <0xd48 0x07ff07ff 0x008a008a>, + <0x1000 0xffffffff 0x7fffffff>, + <0x4008 0x00000001 0x00000001>, + <0x400c 0x00000001 0x00000001>, + <0x4014 0x00000001 0x00000001>, + <0x4018 0x00000001 0x00000000>, + <0x401c 0x00000001 0x00000001>; + apple,tunable-fabric = + <0x4 0x003f003f 0x00200020>, + <0xc 0x000000f1 0x000000a1>, + <0x10 0x0000801f 0x00000004>, + <0x18 0x003f003f 0x00200020>, + <0x20 0x000000f1 0x000000a1>, + <0x24 0x0000801f 0x00000004>, + <0x2c 0x00ff00ff 0x00960096>, + <0x34 0x000000f1 0x00000071>, + <0x38 0x0000801f 0x00000004>, + <0x40 0x0000003f 0x00000020>, + <0x48 0x0000801f 0x00000004>, + <0x50 0x007f007f 0x00450045>, + <0x58 0x0000801f 0x00000004>, + <0x60 0x0000003f 0x00000020>, + <0x68 0x0000801f 0x00000004>, + <0x70 0x00000001 0x00000001>, + <0x74 0x0000801f 0x00000004>, + <0x7c 0x007f007f 0x00400040>, + <0x80 0x000000f1 0x00000011>, + <0x84 0x00000001 0x00000001>, + <0x88 0x00000001 0x00000001>, + <0x8c 0x0000801f 0x00000004>, + <0x94 0x001f001f 0x00100010>, + <0x98 0x000000f1 0x00000011>, + <0x9c 0x0000801f 0x00000004>, + <0xa4 0x000000ff 0x000000e0>, + <0xa8 0x0000801f 0x00000004>, + <0xb0 0x0000003f 0x00000020>, + <0xb8 0x0000801f 0x00000004>, + <0xc0 0x0000003f 0x00000020>, + <0xc8 0x0000801f 0x00000004>, + <0xd0 0x001f001f 0x00100010>, + <0xd8 0x00000001 0x00000001>, + <0xdc 0x00000001 0x00000001>, + <0xe0 0x0000801f 0x00000004>, + <0xe8 0x0000000f 0x00000008>, + <0xec 0x0000801f 0x00000004>, + <0xf4 0xffffffff 0x01010101>, + <0xf8 0x0000801f 0x00000004>, + <0x100 0x00000001 0x00000001>, + <0x104 0x00000001 0x00000001>, + <0x108 0x0000801f 0x00000004>, + <0x110 0x0000801f 0x00000004>, + <0x118 0x0000801f 0x00000004>, + <0x120 0x00000001 0x00000001>, + <0x124 0x00000001 0x00000001>, + <0x128 0x0000801f 0x00000004>, + <0x130 0xffffffff 0x01010101>, + <0x134 0x0000801f 0x00000004>, + <0x13c 0x00000001 0x00000001>, + <0x140 0x00000001 0x00000001>, + <0x144 0x0000801f 0x00000004>, + <0x14c 0x00000001 0x00000001>, + <0x150 0x00000001 0x00000001>, + <0x154 0x0000801f 0x00000004>, + <0x15c 0x0000801f 0x00000004>, + <0x164 0xffffffff 0x01010101>, + <0x168 0x0000ffff 0x00000101>, + <0x16c 0x0000801f 0x00000004>, + <0x174 0x00000001 0x00000001>, + <0x178 0x00000001 0x00000001>, + <0x17c 0x0000801f 0x00000004>, + <0x184 0x00000001 0x00000001>, + <0x188 0x00000001 0x00000001>, + <0x18c 0x0000801f 0x00000004>; + apple,tunable-common-cfg = + <0x8 0x00000001 0x00000001>; + apple,tunable-axi2af-lioa = + <0x28 0x0000fe2f 0x00000000>, + <0x2c 0x00000007 0x00000000>, + <0x30 0x0000007f 0x00000000>, + <0x34 0x000000ff 0x00000000>, + <0x58 0x0000010b 0x00000000>; + apple,tunable-lane0 = + <0xd094 0x00080000 0x00080000>, + <0xd098 0x00080000 0x00080000>, + <0xd0a4 0x00800000 0x00800000>, + <0xd0a8 0x00200000 0x00200000>; + apple,tunable-lane1 = + <0x1d094 0x00080000 0x00080000>, + <0x1d098 0x00080000 0x00080000>, + <0x1d0a4 0x00800000 0x00800000>, + <0x1d0a8 0x00200000 0x00200000>; + apple,tunable-aus40cmn-shm = + <0xa04 0x0000007c 0x0000004c>; + apple,tunable-auspll = + <0x3224 0x00000c00 0x00000800>, + <0x3230 0x0000001f 0x0000000f>, + <0x3240 0x07d8007f 0x04000039>, + <0x32b0 0x0b800000 0x01800000>, + <0x32e8 0x00060001 0x00040001>, + <0x3338 0x0f800000 0x07800000>; + apple,tunable-cio4pll = + <0x3a30 0x0000001f 0x0000000f>, + <0x3a4c 0x0000fe7f 0x0000501e>, + <0x3ab0 0x00700000 0x00300000>, + <0x3ae8 0x00060000 0x00020000>; +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j616c.dts b/arch/arm64/boot/dts/apple/t6041-j616c.dts index fdbf55c085136..61ee6f7aff14f 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j616c.dts @@ -885,3 +885,10 @@ &aop { memory-region = <&aop_mmio_pmgr>; }; + +#include "t604x-extdisp.dtsi" + +/delete-node/ &atcphy0_xbar; +/delete-node/ &atcphy2_xbar; + +#include "t6041-j616c-hdmi.dtsi" From 99c935530dd27362b95badb145412ef8ab9c121b Mon Sep 17 00:00:00 2001 From: Artyom Astafurov Date: Sat, 31 Oct 2026 19:34:26 -0400 Subject: [PATCH 4/5] arm64: dts: apple: t6041-j616c: describe USB-C DisplayPort on the left-front port dcpext1 drives DP alt mode on typec1 through the ATC1 display crossbar and atcphy1, as on J616s: a Type-C display route on dcpext1, the connector's SuperSpeed and route ports, and the Type-C orientation and mode switches of atcphy1 with this board's tunables. atcphy1 has no pipehandler tunable, so it keeps USB2 and takes the DP-only path for DP. dcpext1, its DARTs, mailbox, crossbar and route stay disabled until the boot loader has filled dcpext1's firmware memory and the display gate enables them. Assisted-by: LLM Signed-off-by: Artyom Astafurov --- .../boot/dts/apple/t6041-j616c-usbc.dtsi | 270 ++++++++++++++++++ arch/arm64/boot/dts/apple/t6041-j616c.dts | 1 + 2 files changed, 271 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi diff --git a/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi b/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi new file mode 100644 index 0000000000000..ad06473a2e0eb --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi @@ -0,0 +1,270 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * USB-C DisplayPort on the J616c's left-front port (typec1): dcpext1, the + * ATC1 display crossbar and atcphy1 in DP alt mode, driven by hpm1. + * + * dcpext1, its DARTs, mailbox, crossbar and Type-C route are disabled, as + * for HDMI: the display gate enables them once the boot loader has filled + * dcpext1's firmware memory. A disabled route is no mode switch, so typec1 + * then keeps USB2 and PD as before. + */ + +/ { + aliases { + dcpext1 = &dcpext1; + }; + + reserved-memory { + dcpext1_data: dcpext1-data { + compatible = "apple,asc-mem"; + reg = <0x0 0x0 0x0 0x4000>; + no-map; + status = "disabled"; + }; + + dcpext1_heap: dcpext1-heap { + compatible = "apple,asc-mem"; + reg = <0x0 0x0 0x0 0x4000>; + no-map; + status = "disabled"; + }; + }; +}; + +&dcpext1 { + apple,iomfb-surfaces = <1 1 0 0>; + apple,connector-type = "USB-C"; + phys = <&atcphy1 PHY_TYPE_DP>; + phy-names = "typec1"; + mux-controls = <&atcphy1_xbar 0>; + mux-control-names = "typec1"; + /* indexed by route */ + apple,typec-dptx-phys = <0 1 2>; + apple,typec-mux-indices = <2 2 2>; + memory-region = <&dcpext1_data>, <&dcpext1_heap>; + memory-region-names = "data", "heap"; + + typec-routes { + #address-cells = <1>; + #size-cells = <0>; + + route@1 { + reg = <1>; + mode-switch; + status = "disabled"; + + port { + dcpext1_typec1: endpoint { + remote-endpoint = <&typec1_dcpext1>; + }; + }; + }; + }; +}; + +&atcphy1_xbar { + power-domains = <&ps_atc1_usb>; +}; + +&typec1 { + ports { + port@1 { + reg = <1>; + typec1_con_ss: endpoint { + remote-endpoint = <&atcphy1_ss>; + }; + }; + + port@3 { + reg = <3>; + typec1_dcpext1: endpoint { + remote-endpoint = <&dcpext1_typec1>; + }; + }; + }; +}; + +&atcphy1 { + mode-switch; + orientation-switch; + + apple,tunable-axi2af = + <0x0 0x800000ff 0x8000001c>, + <0x4 0x80ff00ff 0x801b0003>, + <0x8 0x80ff00ff 0x801b0003>, + <0xc 0x80ff00ff 0x801b0005>, + <0x10 0x80ff00ff 0x801b0003>, + <0x14 0x80ff00ff 0x801b0003>, + <0x18 0x80ff00ff 0x801b0003>, + <0x1c 0x80ff00ff 0x801b0003>, + <0x20 0x800000ff 0x80000015>, + <0x24 0x800000ff 0x80000038>, + <0x28 0x80ff00ff 0x80380006>, + <0x2c 0x80ff00ff 0x80380006>, + <0x30 0x80ff00ff 0x80380006>, + <0x34 0x80ff00ff 0x80380006>, + <0x38 0x80ff00ff 0x80380006>, + <0x3c 0x80ff00ff 0x80380006>, + <0x40 0x800000ff 0x80000015>, + <0x44 0x800000ff 0x80000015>, + <0x48 0x800000ff 0x80000015>, + <0x100 0x000000ff 0x000000ff>, + <0x108 0xffff0006 0x00100000>, + <0x304 0x3f3f0000 0x04040000>, + <0x308 0x000fffff 0x00001681>, + <0x30c 0x000fffff 0x00001680>, + <0x310 0x70000fff 0x000001e0>, + <0x314 0xf0000fff 0x800001e0>, + <0x318 0x70000fff 0x000001e0>, + <0x31c 0xf0000fff 0x800001e0>, + <0x320 0x70000fff 0x000005a0>, + <0x324 0xf0000fff 0x800005a0>, + <0x328 0x70000fff 0x000005a0>, + <0x32c 0xf0000fff 0x800005a0>, + <0x330 0x70000fff 0x000005a0>, + <0x334 0xf0000fff 0x800005a0>, + <0x338 0x70000fff 0x000005a0>, + <0x33c 0x70000fff 0x000005a0>, + <0x340 0x70000fff 0x000005a0>, + <0x344 0x70000fff 0x000005a0>, + <0x348 0x70000fff 0x000005a0>, + <0x34c 0x70000fff 0x000005a0>, + <0x350 0x70000fff 0x000005a0>, + <0x358 0xffffffff 0x0000ffff>, + <0x35c 0xffffffff 0x0000ffff>, + <0x408 0xffff0020 0x00180020>, + <0x40c 0x000fffff 0x00001681>, + <0x410 0x000fffff 0x00001680>, + <0x414 0x70000fff 0x000001e0>, + <0x418 0x70000fff 0x000001e0>, + <0x41c 0x70000fff 0x000001e0>, + <0x420 0x70000fff 0x000001e0>, + <0x424 0x70000fff 0x000005a0>, + <0x428 0x70000fff 0x000005a0>, + <0x42c 0x70000fff 0x000005a0>, + <0x430 0x70000fff 0x000005a0>, + <0x434 0x70000fff 0x000005a0>, + <0x438 0x70000fff 0x000005a0>, + <0x43c 0x70000fff 0x000005a0>, + <0x440 0x70000fff 0x000005a0>, + <0x444 0x70000fff 0x000005a0>, + <0x448 0x70000fff 0x000005a0>, + <0x44c 0x70000fff 0x000005a0>, + <0x450 0x70000fff 0x000005a0>, + <0x454 0x70000fff 0x000005a0>, + <0x948 0x07ff07ff 0x00280000>, + <0xa48 0x07ff07ff 0x00400040>, + <0xb48 0x07ff07ff 0x00b8010e>, + <0xc48 0x07ff07ff 0x00400020>, + <0xd48 0x07ff07ff 0x008a008a>, + <0x1000 0xffffffff 0x7fffffff>, + <0x4008 0x00000001 0x00000001>, + <0x400c 0x00000001 0x00000001>, + <0x4014 0x00000001 0x00000001>, + <0x4018 0x00000001 0x00000000>, + <0x401c 0x00000001 0x00000001>; + apple,tunable-fabric = + <0x4 0x003f003f 0x00200020>, + <0xc 0x000000f1 0x000000a1>, + <0x10 0x0000801f 0x00000004>, + <0x18 0x003f003f 0x00200020>, + <0x20 0x000000f1 0x000000a1>, + <0x24 0x0000801f 0x00000004>, + <0x2c 0x00ff00ff 0x00960096>, + <0x34 0x000000f1 0x00000071>, + <0x38 0x0000801f 0x00000004>, + <0x40 0x0000003f 0x00000020>, + <0x48 0x0000801f 0x00000004>, + <0x50 0x007f007f 0x00450045>, + <0x58 0x0000801f 0x00000004>, + <0x60 0x0000003f 0x00000020>, + <0x68 0x0000801f 0x00000004>, + <0x70 0x00000001 0x00000001>, + <0x74 0x0000801f 0x00000004>, + <0x7c 0x007f007f 0x00400040>, + <0x80 0x000000f1 0x00000011>, + <0x84 0x00000001 0x00000001>, + <0x88 0x00000001 0x00000001>, + <0x8c 0x0000801f 0x00000004>, + <0x94 0x001f001f 0x00100010>, + <0x98 0x000000f1 0x00000011>, + <0x9c 0x0000801f 0x00000004>, + <0xa4 0x000000ff 0x000000e0>, + <0xa8 0x0000801f 0x00000004>, + <0xb0 0x0000003f 0x00000020>, + <0xb8 0x0000801f 0x00000004>, + <0xc0 0x0000003f 0x00000020>, + <0xc8 0x0000801f 0x00000004>, + <0xd0 0x001f001f 0x00100010>, + <0xd8 0x00000001 0x00000001>, + <0xdc 0x00000001 0x00000001>, + <0xe0 0x0000801f 0x00000004>, + <0xe8 0x0000000f 0x00000008>, + <0xec 0x0000801f 0x00000004>, + <0xf4 0xffffffff 0x01010101>, + <0xf8 0x0000801f 0x00000004>, + <0x100 0x00000001 0x00000001>, + <0x104 0x00000001 0x00000001>, + <0x108 0x0000801f 0x00000004>, + <0x110 0x0000801f 0x00000004>, + <0x118 0x0000801f 0x00000004>, + <0x120 0x00000001 0x00000001>, + <0x124 0x00000001 0x00000001>, + <0x128 0x0000801f 0x00000004>, + <0x130 0xffffffff 0x01010101>, + <0x134 0x0000801f 0x00000004>, + <0x13c 0x00000001 0x00000001>, + <0x140 0x00000001 0x00000001>, + <0x144 0x0000801f 0x00000004>, + <0x14c 0x00000001 0x00000001>, + <0x150 0x00000001 0x00000001>, + <0x154 0x0000801f 0x00000004>, + <0x15c 0x0000801f 0x00000004>, + <0x164 0xffffffff 0x01010101>, + <0x168 0x0000ffff 0x00000101>, + <0x16c 0x0000801f 0x00000004>, + <0x174 0x00000001 0x00000001>, + <0x178 0x00000001 0x00000001>, + <0x17c 0x0000801f 0x00000004>, + <0x184 0x00000001 0x00000001>, + <0x188 0x00000001 0x00000001>, + <0x18c 0x0000801f 0x00000004>; + apple,tunable-common-cfg = + <0x8 0x00000001 0x00000001>; + apple,tunable-axi2af-lioa = + <0x28 0x0000fe2f 0x00000000>, + <0x2c 0x00000007 0x00000000>, + <0x30 0x0000007f 0x00000000>, + <0x34 0x000000ff 0x00000000>, + <0x58 0x0000010b 0x00000000>; + apple,tunable-lane0 = + <0xd094 0x00080000 0x00080000>, + <0xd098 0x00080000 0x00080000>, + <0xd0a4 0x00800000 0x00800000>, + <0xd0a8 0x00200000 0x00200000>; + apple,tunable-lane1 = + <0x1d094 0x00080000 0x00080000>, + <0x1d098 0x00080000 0x00080000>, + <0x1d0a4 0x00800000 0x00800000>, + <0x1d0a8 0x00200000 0x00200000>; + apple,tunable-aus40cmn-shm = + <0xa04 0x0000007c 0x0000004c>; + apple,tunable-auspll = + <0x3224 0x00000c00 0x00000800>, + <0x3230 0x0000001f 0x0000000f>, + <0x3240 0x07d8007f 0x04000039>, + <0x32b0 0x0b800000 0x01800000>, + <0x32e8 0x00060001 0x00040001>, + <0x3338 0x0f800000 0x07800000>; + apple,tunable-cio4pll = + <0x3a30 0x0000001f 0x0000000f>, + <0x3a4c 0x0000fe7f 0x00004e1d>, + <0x3ab0 0x00700000 0x00300000>, + <0x3ae8 0x00060000 0x00020000>; + + port { + atcphy1_ss: endpoint { + remote-endpoint = <&typec1_con_ss>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j616c.dts b/arch/arm64/boot/dts/apple/t6041-j616c.dts index 61ee6f7aff14f..6bbb4eb81a709 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j616c.dts @@ -892,3 +892,4 @@ /delete-node/ &atcphy2_xbar; #include "t6041-j616c-hdmi.dtsi" +#include "t6041-j616c-usbc.dtsi" From 3d119bbe0599c21b746d9f81e44fe26bb6416eba Mon Sep 17 00:00:00 2001 From: Artyom Astafurov Date: Wed, 4 Nov 2026 22:29:15 -0500 Subject: [PATCH 5/5] arm64: dts: apple: t604x: share more of the external display description J616c and J616s carried the same six ATC3 PHY tables and the same crossbar power domains. Move them to t604x-extdisp.dtsi. Drop J616s's copy of ps_atc3_usb, which t604x-pmgr.dtsi has, reduce ps_fab7_soc to the parent J616s gives it, and drop status lines the shared files already imply. The J616s files keep what J616c doesn't use: the PMP-ordered power chain, the routes to all three Type-C ports and the ATC3 tables that differ. The J614s, J616s, J616s tether and J616c DTBs are byte-identical before and after. Assisted-by: LLM Signed-off-by: Artyom Astafurov --- .../dts/apple/t6040-j616s-extdisp-hdmi.dtsi | 216 +----------------- .../dts/apple/t6040-j616s-extdisp-usbc.dtsi | 34 +-- .../boot/dts/apple/t6041-j616c-hdmi.dtsi | 163 ------------- .../boot/dts/apple/t6041-j616c-usbc.dtsi | 4 - arch/arm64/boot/dts/apple/t604x-extdisp.dtsi | 166 +++++++++++++- 5 files changed, 169 insertions(+), 414 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-hdmi.dtsi b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-hdmi.dtsi index f471f9332e939..f828c64d3ccf3 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-hdmi.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-hdmi.dtsi @@ -36,11 +36,6 @@ &ps_dispext0_sys { power-domains = <&pmp_dispext0>; - status = "disabled"; -}; - -&ps_dispext0_fe { - status = "disabled"; }; &ps_dispext0_cpu { @@ -51,57 +46,20 @@ * virtual DISPEXT0-CPU-V; the last real register of the chain is FE. */ /delete-property/ apple,always-on; - status = "disabled"; -}; - -&ps_atc3_common { - status = "disabled"; -}; - -&ps_atc3_common_dp { - status = "disabled"; -}; - -&ps_atc3_usb_aon { - status = "disabled"; -}; - -&ps_atc3_phymxwrap { - status = "disabled"; -}; - -&pmgr_mini { - /* ADT ATC3_USB: +0x148, parents ATC3_COMMON and ATC3_USB_AON; the crossbar's domain as on T6030 */ - ps_atc3_usb: power-controller@148 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x148 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "atc3_usb"; - power-domains = <&ps_atc3_common>, <&ps_atc3_usb_aon>; - status = "disabled"; - }; -}; - -&pinctrl_aop { - status = "disabled"; }; &dcpext0_dart { /* in the DISPEXT0 block: powered (after the PMP request) before probing */ power-domains = <&ps_dispext0_fe>; - status = "disabled"; }; &dispext0_dart { /* in the DISPEXT0 block: powered (after the PMP request) before probing */ power-domains = <&ps_dispext0_fe>; - status = "disabled"; }; &dcpext0_mbox { power-domains = <&ps_dispext0_fe>; - status = "disabled"; }; &dcpext0 { @@ -111,186 +69,16 @@ * without apple,iomfb-surfaces apple-dcp's probe fails with -EINVAL. */ apple,iomfb-surfaces = <1 1 0 0>; - status = "disabled"; -}; - -&atcphy3_mbox { - status = "disabled"; -}; - -&atcphy3_xbar { - power-domains = <&ps_atc3_usb>; - status = "disabled"; }; /* * atcphy3 apply_tunables tables (aciophy_phy_init mode 3), from this machine's ADT /arm-io/atc-phy3 * (privateartifacts/omarchy-m4-unit/adt.bin): AXI2AF converted entry by entry; every other table is * byte-identical to atc-phy0 in the ADT, so the atcphy0 values of t6040-j616s-usb3.dtsi are reused - * (AUS40CMN_SHM differs: 0x50). Only the first six (axi2af..lane1) are applied in DP mode. + * (AUS40CMN_SHM differs: 0x50). Only the first six (axi2af..lane1) are applied in DP mode; those + * are in t604x-extdisp.dtsi, as J616c has the same values. */ &atcphy3 { - /* ATC3 ADT tunable_ATC0AXI2AF (port-specific), entries */ - apple,tunable-axi2af = - <0x0 0x800000ff 0x80000025>, - <0x4 0x80ff00ff 0x80250003>, - <0x8 0x80ff00ff 0x80250003>, - <0xc 0x80ff00ff 0x80250005>, - <0x10 0x80ff00ff 0x80250003>, - <0x14 0x80ff00ff 0x80250003>, - <0x18 0x80ff00ff 0x80250003>, - <0x1c 0x80ff00ff 0x80250003>, - <0x20 0x800000ff 0x8000001e>, - <0x24 0x800000ff 0x8000004a>, - <0x28 0x80ff00ff 0x804a0006>, - <0x2c 0x80ff00ff 0x804a0006>, - <0x30 0x80ff00ff 0x804a0006>, - <0x34 0x80ff00ff 0x804a0006>, - <0x38 0x80ff00ff 0x804a0006>, - <0x3c 0x80ff00ff 0x804a0006>, - <0x40 0x800000ff 0x8000001e>, - <0x44 0x800000ff 0x8000001e>, - <0x48 0x800000ff 0x8000001e>, - <0x100 0x000000ff 0x000000ff>, - <0x108 0xffff0006 0x00100000>, - <0x304 0x3f3f0000 0x04040000>, - <0x308 0x000fffff 0x00001681>, - <0x30c 0x000fffff 0x00001680>, - <0x310 0x70000fff 0x000001e0>, - <0x314 0xf0000fff 0x800001e0>, - <0x318 0x70000fff 0x000001e0>, - <0x31c 0xf0000fff 0x800001e0>, - <0x320 0x70000fff 0x000005a0>, - <0x324 0xf0000fff 0x800005a0>, - <0x328 0x70000fff 0x000005a0>, - <0x32c 0xf0000fff 0x800005a0>, - <0x330 0x70000fff 0x000005a0>, - <0x334 0xf0000fff 0x800005a0>, - <0x338 0x70000fff 0x000005a0>, - <0x33c 0x70000fff 0x000005a0>, - <0x340 0x70000fff 0x000005a0>, - <0x344 0x70000fff 0x000005a0>, - <0x348 0x70000fff 0x000005a0>, - <0x34c 0x70000fff 0x000005a0>, - <0x350 0x70000fff 0x000005a0>, - <0x358 0xffffffff 0x0000ffff>, - <0x35c 0xffffffff 0x0000ffff>, - <0x408 0xffff0020 0x00210020>, - <0x40c 0x000fffff 0x00001681>, - <0x410 0x000fffff 0x00001680>, - <0x414 0x70000fff 0x000001e0>, - <0x418 0x70000fff 0x000001e0>, - <0x41c 0x70000fff 0x000001e0>, - <0x420 0x70000fff 0x000001e0>, - <0x424 0x70000fff 0x000005a0>, - <0x428 0x70000fff 0x000005a0>, - <0x42c 0x70000fff 0x000005a0>, - <0x430 0x70000fff 0x000005a0>, - <0x434 0x70000fff 0x000005a0>, - <0x438 0x70000fff 0x000005a0>, - <0x43c 0x70000fff 0x000005a0>, - <0x440 0x70000fff 0x000005a0>, - <0x444 0x70000fff 0x000005a0>, - <0x448 0x70000fff 0x000005a0>, - <0x44c 0x70000fff 0x000005a0>, - <0x450 0x70000fff 0x000005a0>, - <0x454 0x70000fff 0x000005a0>, - <0x948 0x07ff07ff 0x00280000>, - <0xa48 0x07ff07ff 0x00400040>, - <0xb48 0x07ff07ff 0x00b8010e>, - <0xc48 0x07ff07ff 0x00400020>, - <0xd48 0x07ff07ff 0x008a008a>, - <0x1000 0xffffffff 0x7fffffff>, - <0x4008 0x00000001 0x00000001>, - <0x400c 0x00000001 0x00000001>, - <0x4014 0x00000001 0x00000001>, - <0x4018 0x00000001 0x00000000>, - <0x401c 0x00000001 0x00000001>; - /* the remaining tables equal atc-phy0 in the ADT, except AUS40CMN_SHM (0x50) */ - apple,tunable-fabric = - <0x4 0x003f003f 0x00200020>, - <0xc 0x000000f1 0x000000a1>, - <0x10 0x0000801f 0x00000004>, - <0x18 0x003f003f 0x00200020>, - <0x20 0x000000f1 0x000000a1>, - <0x24 0x0000801f 0x00000004>, - <0x2c 0x00ff00ff 0x00960096>, - <0x34 0x000000f1 0x00000071>, - <0x38 0x0000801f 0x00000004>, - <0x40 0x0000003f 0x00000020>, - <0x48 0x0000801f 0x00000004>, - <0x50 0x007f007f 0x00450045>, - <0x58 0x0000801f 0x00000004>, - <0x60 0x0000003f 0x00000020>, - <0x68 0x0000801f 0x00000004>, - <0x70 0x00000001 0x00000001>, - <0x74 0x0000801f 0x00000004>, - <0x7c 0x007f007f 0x00400040>, - <0x80 0x000000f1 0x00000011>, - <0x84 0x00000001 0x00000001>, - <0x88 0x00000001 0x00000001>, - <0x8c 0x0000801f 0x00000004>, - <0x94 0x001f001f 0x00100010>, - <0x98 0x000000f1 0x00000011>, - <0x9c 0x0000801f 0x00000004>, - <0xa4 0x000000ff 0x000000e0>, - <0xa8 0x0000801f 0x00000004>, - <0xb0 0x0000003f 0x00000020>, - <0xb8 0x0000801f 0x00000004>, - <0xc0 0x0000003f 0x00000020>, - <0xc8 0x0000801f 0x00000004>, - <0xd0 0x001f001f 0x00100010>, - <0xd8 0x00000001 0x00000001>, - <0xdc 0x00000001 0x00000001>, - <0xe0 0x0000801f 0x00000004>, - <0xe8 0x0000000f 0x00000008>, - <0xec 0x0000801f 0x00000004>, - <0xf4 0xffffffff 0x01010101>, - <0xf8 0x0000801f 0x00000004>, - <0x100 0x00000001 0x00000001>, - <0x104 0x00000001 0x00000001>, - <0x108 0x0000801f 0x00000004>, - <0x110 0x0000801f 0x00000004>, - <0x118 0x0000801f 0x00000004>, - <0x120 0x00000001 0x00000001>, - <0x124 0x00000001 0x00000001>, - <0x128 0x0000801f 0x00000004>, - <0x130 0xffffffff 0x01010101>, - <0x134 0x0000801f 0x00000004>, - <0x13c 0x00000001 0x00000001>, - <0x140 0x00000001 0x00000001>, - <0x144 0x0000801f 0x00000004>, - <0x14c 0x00000001 0x00000001>, - <0x150 0x00000001 0x00000001>, - <0x154 0x0000801f 0x00000004>, - <0x15c 0x0000801f 0x00000004>, - <0x164 0xffffffff 0x01010101>, - <0x168 0x0000ffff 0x00000101>, - <0x16c 0x0000801f 0x00000004>, - <0x174 0x00000001 0x00000001>, - <0x178 0x00000001 0x00000001>, - <0x17c 0x0000801f 0x00000004>, - <0x184 0x00000001 0x00000001>, - <0x188 0x00000001 0x00000001>, - <0x18c 0x0000801f 0x00000004>; - apple,tunable-common-cfg = - <0x8 0x00000001 0x00000001>; - apple,tunable-axi2af-lioa = - <0x28 0x0000fe2f 0x00000000>, - <0x2c 0x00000007 0x00000000>, - <0x30 0x0000007f 0x00000000>, - <0x34 0x000000ff 0x00000000>, - <0x58 0x0000010b 0x00000000>; - apple,tunable-lane0 = - <0xd094 0x00080000 0x00080000>, - <0xd098 0x00080000 0x00080000>, - <0xd0a4 0x00800000 0x00800000>, - <0xd0a8 0x00200000 0x00200000>; - apple,tunable-lane1 = - <0x1d094 0x00080000 0x00080000>, - <0x1d098 0x00080000 0x00080000>, - <0x1d0a4 0x00800000 0x00800000>, - <0x1d0a8 0x00200000 0x00200000>; apple,tunable-aus40cmn-shm = <0xa04 0x0000007c 0x00000050>; apple,tunable-auspll = diff --git a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-usbc.dtsi b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-usbc.dtsi index d4e7d32a06b31..47995f1bc8e7b 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-usbc.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-j616s-extdisp-usbc.dtsi @@ -28,47 +28,17 @@ * DISPEXT1_SYS without it and the first DCPEXT1 register access (its DART) reset * the SoC. DISPEXT0_SYS's parent FAB2_SOC is on anyway through ATC0..2_COMMON. */ -&pmgr_aux { - ps_fab7_soc: power-controller@488 { - compatible = "apple,t6041-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; - reg = <0x488 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "fab7_soc"; - power-domains = <&ps_fab6_soc>; - status = "disabled"; - }; +&ps_fab7_soc { + power-domains = <&ps_fab6_soc>; }; &ps_dispext1_sys { power-domains = <&ps_fab7_soc>, <&pmp_dispext1>; - status = "disabled"; -}; - -&ps_dispext1_fe { - status = "disabled"; }; &ps_dispext1_cpu { /* NEVER enable: ADT no_ps, as DISPEXT0_CPU (its register read resets the SoC). */ /delete-property/ apple,always-on; - status = "disabled"; -}; - -/* The per-ATC crossbars of the Type-C ports: the ATC USB domain, as atcphy3's. */ -&atcphy0_xbar { - power-domains = <&ps_atc0_usb>; - status = "disabled"; -}; - -&atcphy1_xbar { - power-domains = <&ps_atc1_usb>; - status = "disabled"; -}; - -&atcphy2_xbar { - power-domains = <&ps_atc2_usb>; - status = "disabled"; }; /* tipd switches the PHY into DP alt mode through the connector graph. */ diff --git a/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi b/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi index c46b4d93b5955..7bf6baf4a2f11 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi +++ b/arch/arm64/boot/dts/apple/t6041-j616c-hdmi.dtsi @@ -50,170 +50,7 @@ memory-region-names = "data", "heap"; }; -&atcphy3_xbar { - power-domains = <&ps_atc3_usb>; -}; - &atcphy3 { - apple,tunable-axi2af = - <0x0 0x800000ff 0x80000025>, - <0x4 0x80ff00ff 0x80250003>, - <0x8 0x80ff00ff 0x80250003>, - <0xc 0x80ff00ff 0x80250005>, - <0x10 0x80ff00ff 0x80250003>, - <0x14 0x80ff00ff 0x80250003>, - <0x18 0x80ff00ff 0x80250003>, - <0x1c 0x80ff00ff 0x80250003>, - <0x20 0x800000ff 0x8000001e>, - <0x24 0x800000ff 0x8000004a>, - <0x28 0x80ff00ff 0x804a0006>, - <0x2c 0x80ff00ff 0x804a0006>, - <0x30 0x80ff00ff 0x804a0006>, - <0x34 0x80ff00ff 0x804a0006>, - <0x38 0x80ff00ff 0x804a0006>, - <0x3c 0x80ff00ff 0x804a0006>, - <0x40 0x800000ff 0x8000001e>, - <0x44 0x800000ff 0x8000001e>, - <0x48 0x800000ff 0x8000001e>, - <0x100 0x000000ff 0x000000ff>, - <0x108 0xffff0006 0x00100000>, - <0x304 0x3f3f0000 0x04040000>, - <0x308 0x000fffff 0x00001681>, - <0x30c 0x000fffff 0x00001680>, - <0x310 0x70000fff 0x000001e0>, - <0x314 0xf0000fff 0x800001e0>, - <0x318 0x70000fff 0x000001e0>, - <0x31c 0xf0000fff 0x800001e0>, - <0x320 0x70000fff 0x000005a0>, - <0x324 0xf0000fff 0x800005a0>, - <0x328 0x70000fff 0x000005a0>, - <0x32c 0xf0000fff 0x800005a0>, - <0x330 0x70000fff 0x000005a0>, - <0x334 0xf0000fff 0x800005a0>, - <0x338 0x70000fff 0x000005a0>, - <0x33c 0x70000fff 0x000005a0>, - <0x340 0x70000fff 0x000005a0>, - <0x344 0x70000fff 0x000005a0>, - <0x348 0x70000fff 0x000005a0>, - <0x34c 0x70000fff 0x000005a0>, - <0x350 0x70000fff 0x000005a0>, - <0x358 0xffffffff 0x0000ffff>, - <0x35c 0xffffffff 0x0000ffff>, - <0x408 0xffff0020 0x00210020>, - <0x40c 0x000fffff 0x00001681>, - <0x410 0x000fffff 0x00001680>, - <0x414 0x70000fff 0x000001e0>, - <0x418 0x70000fff 0x000001e0>, - <0x41c 0x70000fff 0x000001e0>, - <0x420 0x70000fff 0x000001e0>, - <0x424 0x70000fff 0x000005a0>, - <0x428 0x70000fff 0x000005a0>, - <0x42c 0x70000fff 0x000005a0>, - <0x430 0x70000fff 0x000005a0>, - <0x434 0x70000fff 0x000005a0>, - <0x438 0x70000fff 0x000005a0>, - <0x43c 0x70000fff 0x000005a0>, - <0x440 0x70000fff 0x000005a0>, - <0x444 0x70000fff 0x000005a0>, - <0x448 0x70000fff 0x000005a0>, - <0x44c 0x70000fff 0x000005a0>, - <0x450 0x70000fff 0x000005a0>, - <0x454 0x70000fff 0x000005a0>, - <0x948 0x07ff07ff 0x00280000>, - <0xa48 0x07ff07ff 0x00400040>, - <0xb48 0x07ff07ff 0x00b8010e>, - <0xc48 0x07ff07ff 0x00400020>, - <0xd48 0x07ff07ff 0x008a008a>, - <0x1000 0xffffffff 0x7fffffff>, - <0x4008 0x00000001 0x00000001>, - <0x400c 0x00000001 0x00000001>, - <0x4014 0x00000001 0x00000001>, - <0x4018 0x00000001 0x00000000>, - <0x401c 0x00000001 0x00000001>; - apple,tunable-fabric = - <0x4 0x003f003f 0x00200020>, - <0xc 0x000000f1 0x000000a1>, - <0x10 0x0000801f 0x00000004>, - <0x18 0x003f003f 0x00200020>, - <0x20 0x000000f1 0x000000a1>, - <0x24 0x0000801f 0x00000004>, - <0x2c 0x00ff00ff 0x00960096>, - <0x34 0x000000f1 0x00000071>, - <0x38 0x0000801f 0x00000004>, - <0x40 0x0000003f 0x00000020>, - <0x48 0x0000801f 0x00000004>, - <0x50 0x007f007f 0x00450045>, - <0x58 0x0000801f 0x00000004>, - <0x60 0x0000003f 0x00000020>, - <0x68 0x0000801f 0x00000004>, - <0x70 0x00000001 0x00000001>, - <0x74 0x0000801f 0x00000004>, - <0x7c 0x007f007f 0x00400040>, - <0x80 0x000000f1 0x00000011>, - <0x84 0x00000001 0x00000001>, - <0x88 0x00000001 0x00000001>, - <0x8c 0x0000801f 0x00000004>, - <0x94 0x001f001f 0x00100010>, - <0x98 0x000000f1 0x00000011>, - <0x9c 0x0000801f 0x00000004>, - <0xa4 0x000000ff 0x000000e0>, - <0xa8 0x0000801f 0x00000004>, - <0xb0 0x0000003f 0x00000020>, - <0xb8 0x0000801f 0x00000004>, - <0xc0 0x0000003f 0x00000020>, - <0xc8 0x0000801f 0x00000004>, - <0xd0 0x001f001f 0x00100010>, - <0xd8 0x00000001 0x00000001>, - <0xdc 0x00000001 0x00000001>, - <0xe0 0x0000801f 0x00000004>, - <0xe8 0x0000000f 0x00000008>, - <0xec 0x0000801f 0x00000004>, - <0xf4 0xffffffff 0x01010101>, - <0xf8 0x0000801f 0x00000004>, - <0x100 0x00000001 0x00000001>, - <0x104 0x00000001 0x00000001>, - <0x108 0x0000801f 0x00000004>, - <0x110 0x0000801f 0x00000004>, - <0x118 0x0000801f 0x00000004>, - <0x120 0x00000001 0x00000001>, - <0x124 0x00000001 0x00000001>, - <0x128 0x0000801f 0x00000004>, - <0x130 0xffffffff 0x01010101>, - <0x134 0x0000801f 0x00000004>, - <0x13c 0x00000001 0x00000001>, - <0x140 0x00000001 0x00000001>, - <0x144 0x0000801f 0x00000004>, - <0x14c 0x00000001 0x00000001>, - <0x150 0x00000001 0x00000001>, - <0x154 0x0000801f 0x00000004>, - <0x15c 0x0000801f 0x00000004>, - <0x164 0xffffffff 0x01010101>, - <0x168 0x0000ffff 0x00000101>, - <0x16c 0x0000801f 0x00000004>, - <0x174 0x00000001 0x00000001>, - <0x178 0x00000001 0x00000001>, - <0x17c 0x0000801f 0x00000004>, - <0x184 0x00000001 0x00000001>, - <0x188 0x00000001 0x00000001>, - <0x18c 0x0000801f 0x00000004>; - apple,tunable-common-cfg = - <0x8 0x00000001 0x00000001>; - apple,tunable-axi2af-lioa = - <0x28 0x0000fe2f 0x00000000>, - <0x2c 0x00000007 0x00000000>, - <0x30 0x0000007f 0x00000000>, - <0x34 0x000000ff 0x00000000>, - <0x58 0x0000010b 0x00000000>; - apple,tunable-lane0 = - <0xd094 0x00080000 0x00080000>, - <0xd098 0x00080000 0x00080000>, - <0xd0a4 0x00800000 0x00800000>, - <0xd0a8 0x00200000 0x00200000>; - apple,tunable-lane1 = - <0x1d094 0x00080000 0x00080000>, - <0x1d098 0x00080000 0x00080000>, - <0x1d0a4 0x00800000 0x00800000>, - <0x1d0a8 0x00200000 0x00200000>; apple,tunable-aus40cmn-shm = <0xa04 0x0000007c 0x0000004c>; apple,tunable-auspll = diff --git a/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi b/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi index ad06473a2e0eb..4ccf897e1dd01 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi +++ b/arch/arm64/boot/dts/apple/t6041-j616c-usbc.dtsi @@ -62,10 +62,6 @@ }; }; -&atcphy1_xbar { - power-domains = <&ps_atc1_usb>; -}; - &typec1 { ports { port@1 { diff --git a/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi b/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi index 5e2e792e5dd09..dcbce6e842cd9 100644 --- a/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi +++ b/arch/arm64/boot/dts/apple/t604x-extdisp.dtsi @@ -2,7 +2,8 @@ /* * External display blocks of the T604x: the external display processors and * their mailboxes, the fixed DP PHY of ATC3 and the ATC display crossbars. - * Every node is disabled. The board adds the wiring and the power it runs on. + * Every node is disabled. The board adds the wiring, the power it runs on and + * the ATC3 tables that differ between boards. */ / { @@ -100,6 +101,165 @@ mbox-names = "phy-cpu"; nonposted-mmio; status = "disabled"; + apple,tunable-axi2af = + <0x0 0x800000ff 0x80000025>, + <0x4 0x80ff00ff 0x80250003>, + <0x8 0x80ff00ff 0x80250003>, + <0xc 0x80ff00ff 0x80250005>, + <0x10 0x80ff00ff 0x80250003>, + <0x14 0x80ff00ff 0x80250003>, + <0x18 0x80ff00ff 0x80250003>, + <0x1c 0x80ff00ff 0x80250003>, + <0x20 0x800000ff 0x8000001e>, + <0x24 0x800000ff 0x8000004a>, + <0x28 0x80ff00ff 0x804a0006>, + <0x2c 0x80ff00ff 0x804a0006>, + <0x30 0x80ff00ff 0x804a0006>, + <0x34 0x80ff00ff 0x804a0006>, + <0x38 0x80ff00ff 0x804a0006>, + <0x3c 0x80ff00ff 0x804a0006>, + <0x40 0x800000ff 0x8000001e>, + <0x44 0x800000ff 0x8000001e>, + <0x48 0x800000ff 0x8000001e>, + <0x100 0x000000ff 0x000000ff>, + <0x108 0xffff0006 0x00100000>, + <0x304 0x3f3f0000 0x04040000>, + <0x308 0x000fffff 0x00001681>, + <0x30c 0x000fffff 0x00001680>, + <0x310 0x70000fff 0x000001e0>, + <0x314 0xf0000fff 0x800001e0>, + <0x318 0x70000fff 0x000001e0>, + <0x31c 0xf0000fff 0x800001e0>, + <0x320 0x70000fff 0x000005a0>, + <0x324 0xf0000fff 0x800005a0>, + <0x328 0x70000fff 0x000005a0>, + <0x32c 0xf0000fff 0x800005a0>, + <0x330 0x70000fff 0x000005a0>, + <0x334 0xf0000fff 0x800005a0>, + <0x338 0x70000fff 0x000005a0>, + <0x33c 0x70000fff 0x000005a0>, + <0x340 0x70000fff 0x000005a0>, + <0x344 0x70000fff 0x000005a0>, + <0x348 0x70000fff 0x000005a0>, + <0x34c 0x70000fff 0x000005a0>, + <0x350 0x70000fff 0x000005a0>, + <0x358 0xffffffff 0x0000ffff>, + <0x35c 0xffffffff 0x0000ffff>, + <0x408 0xffff0020 0x00210020>, + <0x40c 0x000fffff 0x00001681>, + <0x410 0x000fffff 0x00001680>, + <0x414 0x70000fff 0x000001e0>, + <0x418 0x70000fff 0x000001e0>, + <0x41c 0x70000fff 0x000001e0>, + <0x420 0x70000fff 0x000001e0>, + <0x424 0x70000fff 0x000005a0>, + <0x428 0x70000fff 0x000005a0>, + <0x42c 0x70000fff 0x000005a0>, + <0x430 0x70000fff 0x000005a0>, + <0x434 0x70000fff 0x000005a0>, + <0x438 0x70000fff 0x000005a0>, + <0x43c 0x70000fff 0x000005a0>, + <0x440 0x70000fff 0x000005a0>, + <0x444 0x70000fff 0x000005a0>, + <0x448 0x70000fff 0x000005a0>, + <0x44c 0x70000fff 0x000005a0>, + <0x450 0x70000fff 0x000005a0>, + <0x454 0x70000fff 0x000005a0>, + <0x948 0x07ff07ff 0x00280000>, + <0xa48 0x07ff07ff 0x00400040>, + <0xb48 0x07ff07ff 0x00b8010e>, + <0xc48 0x07ff07ff 0x00400020>, + <0xd48 0x07ff07ff 0x008a008a>, + <0x1000 0xffffffff 0x7fffffff>, + <0x4008 0x00000001 0x00000001>, + <0x400c 0x00000001 0x00000001>, + <0x4014 0x00000001 0x00000001>, + <0x4018 0x00000001 0x00000000>, + <0x401c 0x00000001 0x00000001>; + apple,tunable-fabric = + <0x4 0x003f003f 0x00200020>, + <0xc 0x000000f1 0x000000a1>, + <0x10 0x0000801f 0x00000004>, + <0x18 0x003f003f 0x00200020>, + <0x20 0x000000f1 0x000000a1>, + <0x24 0x0000801f 0x00000004>, + <0x2c 0x00ff00ff 0x00960096>, + <0x34 0x000000f1 0x00000071>, + <0x38 0x0000801f 0x00000004>, + <0x40 0x0000003f 0x00000020>, + <0x48 0x0000801f 0x00000004>, + <0x50 0x007f007f 0x00450045>, + <0x58 0x0000801f 0x00000004>, + <0x60 0x0000003f 0x00000020>, + <0x68 0x0000801f 0x00000004>, + <0x70 0x00000001 0x00000001>, + <0x74 0x0000801f 0x00000004>, + <0x7c 0x007f007f 0x00400040>, + <0x80 0x000000f1 0x00000011>, + <0x84 0x00000001 0x00000001>, + <0x88 0x00000001 0x00000001>, + <0x8c 0x0000801f 0x00000004>, + <0x94 0x001f001f 0x00100010>, + <0x98 0x000000f1 0x00000011>, + <0x9c 0x0000801f 0x00000004>, + <0xa4 0x000000ff 0x000000e0>, + <0xa8 0x0000801f 0x00000004>, + <0xb0 0x0000003f 0x00000020>, + <0xb8 0x0000801f 0x00000004>, + <0xc0 0x0000003f 0x00000020>, + <0xc8 0x0000801f 0x00000004>, + <0xd0 0x001f001f 0x00100010>, + <0xd8 0x00000001 0x00000001>, + <0xdc 0x00000001 0x00000001>, + <0xe0 0x0000801f 0x00000004>, + <0xe8 0x0000000f 0x00000008>, + <0xec 0x0000801f 0x00000004>, + <0xf4 0xffffffff 0x01010101>, + <0xf8 0x0000801f 0x00000004>, + <0x100 0x00000001 0x00000001>, + <0x104 0x00000001 0x00000001>, + <0x108 0x0000801f 0x00000004>, + <0x110 0x0000801f 0x00000004>, + <0x118 0x0000801f 0x00000004>, + <0x120 0x00000001 0x00000001>, + <0x124 0x00000001 0x00000001>, + <0x128 0x0000801f 0x00000004>, + <0x130 0xffffffff 0x01010101>, + <0x134 0x0000801f 0x00000004>, + <0x13c 0x00000001 0x00000001>, + <0x140 0x00000001 0x00000001>, + <0x144 0x0000801f 0x00000004>, + <0x14c 0x00000001 0x00000001>, + <0x150 0x00000001 0x00000001>, + <0x154 0x0000801f 0x00000004>, + <0x15c 0x0000801f 0x00000004>, + <0x164 0xffffffff 0x01010101>, + <0x168 0x0000ffff 0x00000101>, + <0x16c 0x0000801f 0x00000004>, + <0x174 0x00000001 0x00000001>, + <0x178 0x00000001 0x00000001>, + <0x17c 0x0000801f 0x00000004>, + <0x184 0x00000001 0x00000001>, + <0x188 0x00000001 0x00000001>, + <0x18c 0x0000801f 0x00000004>; + apple,tunable-common-cfg = + <0x8 0x00000001 0x00000001>; + apple,tunable-axi2af-lioa = + <0x28 0x0000fe2f 0x00000000>, + <0x2c 0x00000007 0x00000000>, + <0x30 0x0000007f 0x00000000>, + <0x34 0x000000ff 0x00000000>, + <0x58 0x0000010b 0x00000000>; + apple,tunable-lane0 = + <0xd094 0x00080000 0x00080000>, + <0xd098 0x00080000 0x00080000>, + <0xd0a4 0x00800000 0x00800000>, + <0xd0a8 0x00200000 0x00200000>; + apple,tunable-lane1 = + <0x1d094 0x00080000 0x00080000>, + <0x1d098 0x00080000 0x00080000>, + <0x1d0a4 0x00800000 0x00800000>, + <0x1d0a8 0x00200000 0x00200000>; }; atcphy3_mbox: mailbox@39b148000 { @@ -123,6 +283,7 @@ reg = <0x3 0x8324c000 0x0 0x4000>; #mux-control-cells = <1>; status = "disabled"; + power-domains = <&ps_atc0_usb>; }; atcphy1_xbar: mux@38b24c000 { @@ -130,6 +291,7 @@ reg = <0x3 0x8b24c000 0x0 0x4000>; #mux-control-cells = <1>; status = "disabled"; + power-domains = <&ps_atc1_usb>; }; atcphy2_xbar: mux@39324c000 { @@ -137,6 +299,7 @@ reg = <0x3 0x9324c000 0x0 0x4000>; #mux-control-cells = <1>; status = "disabled"; + power-domains = <&ps_atc2_usb>; }; atcphy3_xbar: mux@39b24c000 { @@ -144,6 +307,7 @@ reg = <0x3 0x9b24c000 0x0 0x4000>; #mux-control-cells = <1>; status = "disabled"; + power-domains = <&ps_atc3_usb>; }; };