From 8b313f4d5640a499dc060b5c2b1ead2f1de43f4e Mon Sep 17 00:00:00 2001 From: Lucas Goossen Date: Wed, 18 Nov 2026 19:10:19 -0300 Subject: [PATCH] arm64: dts: apple: t602x: describe the encoder DMA apertures as one block The t602x trees describe the ranges at *020000 and *044000 next to each encoder as two more DARTs. On the M2 Max (J475c) apple-dart rejects the *044000 nodes: the stream count it reads from them is 385 at 40d044000 and 350 at 507044000, above its 256 limit. The *020000 nodes probe as DARTs. T600x describes the same two ranges as one apple,t6000-ave-dma block, with the DARTs at *030000 and *040000. Do the same on t6020 (ave0), t6021 (ave0, ave1) and t6022 (ave0 to ave3), and drop the two ranges from the encoders' iommus. The binding allows exactly these two ranges. A maintainer may prefer an apple,t6020-ave-dma compatible in front; the binding has none today. The encoders on J475c ran with only the *030000 and *040000 DARTs and showed no DART faults. t6020 and t6022 were not booted. Assisted-by: Grok 4.7 Assisted-by: Claude Opus 5.5 Signed-off-by: Lucas Goossen --- .../boot/dts/apple/t6020-peripherals.dtsi | 20 ++--- .../boot/dts/apple/t6021-peripherals.dtsi | 40 +++------- .../boot/dts/apple/t6022-peripherals.dtsi | 80 +++++-------------- 3 files changed, 35 insertions(+), 105 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi index a521eb74b9ea2..adcf963b5b6fe 100644 --- a/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6020-peripherals.dtsi @@ -613,13 +613,13 @@ status = "disabled"; }; - m2_dart_ave0_2: iommu@40d020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd020000 0x0 0x4000>; + m2_ave0_dma: dma-controller@40d020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x4 0xd020000 0x0 0x4000>, + <0x4 0xd044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; status = "disabled"; }; @@ -643,16 +643,6 @@ status = "disabled"; }; - m2_dart_ave0_3: iommu@40d044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave0: video-codec@40d100000 { compatible = "apple,t6020-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -668,7 +658,7 @@ , , ; - iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>, <&m2_dart_ave0_2 0>, <&m2_dart_ave0_3 0>; + iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>; power-domains = <&ps_venc_dma>, <&ps_venc_pipe4>, <&ps_venc_pipe5>, <&ps_venc_me0>, <&ps_venc_me1>, <&ps_afr>; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi index 61061f89aeb84..5476fb3e606b4 100644 --- a/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6021-peripherals.dtsi @@ -791,13 +791,13 @@ status = "disabled"; }; - m2_dart_ave0_2: iommu@40d020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd020000 0x0 0x4000>; + m2_ave0_dma: dma-controller@40d020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x4 0xd020000 0x0 0x4000>, + <0x4 0xd044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; status = "disabled"; }; @@ -821,16 +821,6 @@ status = "disabled"; }; - m2_dart_ave0_3: iommu@40d044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave0: video-codec@40d100000 { compatible = "apple,t6021-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -846,7 +836,7 @@ , , ; - iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>, <&m2_dart_ave0_2 0>, <&m2_dart_ave0_3 0>; + iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>; power-domains = <&ps_venc_dma>, <&ps_venc_pipe4>, <&ps_venc_pipe5>, <&ps_venc_me0>, <&ps_venc_me1>, <&ps_afr>; status = "disabled"; }; @@ -883,13 +873,13 @@ status = "disabled"; }; - m2_dart_ave1_2: iommu@507020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7020000 0x0 0x4000>; + m2_ave1_dma: dma-controller@507020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x5 0x7020000 0x0 0x4000>, + <0x5 0x7044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc1_sys>; - #iommu-cells = <1>; status = "disabled"; }; @@ -913,16 +903,6 @@ status = "disabled"; }; - m2_dart_ave1_3: iommu@507044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc1_sys>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave1: video-codec@507100000 { compatible = "apple,t6021-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -938,7 +918,7 @@ , , ; - iommus = <&m2_dart_ave1_0 0>, <&m2_dart_ave1_1 0>, <&m2_dart_ave1_2 0>, <&m2_dart_ave1_3 0>; + iommus = <&m2_dart_ave1_0 0>, <&m2_dart_ave1_1 0>; power-domains = <&ps_venc1_dma>, <&ps_venc1_pipe4>, <&ps_venc1_pipe5>, <&ps_venc1_me0>, <&ps_venc1_me1>, <&ps_afr>; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi index 0b41c11853b58..b3a7cd4e79932 100644 --- a/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6022-peripherals.dtsi @@ -1153,13 +1153,13 @@ status = "disabled"; }; - m2_dart_ave0_2: iommu@40d020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd020000 0x0 0x4000>; + m2_ave0_dma: dma-controller@40d020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x4 0xd020000 0x0 0x4000>, + <0x4 0xd044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; status = "disabled"; }; @@ -1183,16 +1183,6 @@ status = "disabled"; }; - m2_dart_ave0_3: iommu@40d044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc_sys>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave0: video-codec@40d100000 { compatible = "apple,t6022-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -1208,7 +1198,7 @@ , , ; - iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>, <&m2_dart_ave0_2 0>, <&m2_dart_ave0_3 0>; + iommus = <&m2_dart_ave0_0 0>, <&m2_dart_ave0_1 0>; power-domains = <&ps_venc_dma>, <&ps_venc_pipe4>, <&ps_venc_pipe5>, <&ps_venc_me0>, <&ps_venc_me1>, <&ps_afr>; status = "disabled"; }; @@ -1311,13 +1301,13 @@ status = "disabled"; }; - m2_dart_ave1_2: iommu@507020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7020000 0x0 0x4000>; + m2_ave1_dma: dma-controller@507020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x5 0x7020000 0x0 0x4000>, + <0x5 0x7044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc1_sys>; - #iommu-cells = <1>; status = "disabled"; }; @@ -1341,16 +1331,6 @@ status = "disabled"; }; - m2_dart_ave1_3: iommu@507044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc1_sys>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave1: video-codec@507100000 { compatible = "apple,t6022-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -1366,7 +1346,7 @@ , , ; - iommus = <&m2_dart_ave1_0 0>, <&m2_dart_ave1_1 0>, <&m2_dart_ave1_2 0>, <&m2_dart_ave1_3 0>; + iommus = <&m2_dart_ave1_0 0>, <&m2_dart_ave1_1 0>; power-domains = <&ps_venc1_dma>, <&ps_venc1_pipe4>, <&ps_venc1_pipe5>, <&ps_venc1_me0>, <&ps_venc1_me1>, <&ps_afr>; status = "disabled"; }; @@ -1966,13 +1946,13 @@ status = "disabled"; }; - m2_dart_ave2_2: iommu@40d020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd020000 0x0 0x4000>; + m2_ave2_dma: dma-controller@40d020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x4 0xd020000 0x0 0x4000>, + <0x4 0xd044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc_sys_die1>; - #iommu-cells = <1>; status = "disabled"; }; @@ -1996,16 +1976,6 @@ status = "disabled"; }; - m2_dart_ave2_3: iommu@40d044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x4 0xd044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc_sys_die1>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave2: video-codec@40d100000 { compatible = "apple,t6022-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -2021,7 +1991,7 @@ , , ; - iommus = <&m2_dart_ave2_0 0>, <&m2_dart_ave2_1 0>, <&m2_dart_ave2_2 0>, <&m2_dart_ave2_3 0>; + iommus = <&m2_dart_ave2_0 0>, <&m2_dart_ave2_1 0>; power-domains = <&ps_venc_dma_die1>, <&ps_venc_pipe4_die1>, <&ps_venc_pipe5_die1>, <&ps_venc_me0_die1>, <&ps_venc_me1_die1>, <&ps_afr_die1>; status = "disabled"; }; @@ -2124,13 +2094,13 @@ status = "disabled"; }; - m2_dart_ave3_2: iommu@507020000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7020000 0x0 0x4000>; + m2_ave3_dma: dma-controller@507020000 { + compatible = "apple,t6000-ave-dma", "apple,ave-dma"; + reg = <0x5 0x7020000 0x0 0x4000>, + <0x5 0x7044000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_venc1_sys_die1>; - #iommu-cells = <1>; status = "disabled"; }; @@ -2154,16 +2124,6 @@ status = "disabled"; }; - m2_dart_ave3_3: iommu@507044000 { - compatible = "apple,t6020-dart", "apple,t8110-dart"; - reg = <0x5 0x7044000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - power-domains = <&ps_venc1_sys_die1>; - #iommu-cells = <1>; - status = "disabled"; - }; - m2_ave3: video-codec@507100000 { compatible = "apple,t6022-ave", "apple,ave"; power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1", "perf"; @@ -2179,7 +2139,7 @@ , , ; - iommus = <&m2_dart_ave3_0 0>, <&m2_dart_ave3_1 0>, <&m2_dart_ave3_2 0>, <&m2_dart_ave3_3 0>; + iommus = <&m2_dart_ave3_0 0>, <&m2_dart_ave3_1 0>; power-domains = <&ps_venc1_dma_die1>, <&ps_venc1_pipe4_die1>, <&ps_venc1_pipe5_die1>, <&ps_venc1_me0_die1>, <&ps_venc1_me1_die1>, <&ps_afr_die1>; status = "disabled"; };