Skip to content

Commit c9569ef

Browse files
committed
arm64: dts: apple: Add identity dma-ranges mapping
Without this, the OF core ends up limiting all DMA masks to the default 32-bit, since that runs before drivers set up the proper DMA mask. Skipping the highest page because it is impossible to express a full 64-bit range in the DT. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 47f65f1 commit c9569ef

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/t6001.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050

5151
ranges;
5252
nonposted-mmio;
53+
/* Required to get >32-bit DMA via DARTs */
54+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
5355

5456
// filled via templated includes at the end of the file
5557
};

arch/arm64/boot/dts/apple/t6002.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@
240240
<0x5 0x80000000 0x5 0x80000000 0x1 0x80000000>,
241241
<0x7 0x0 0x7 0x0 0xf 0x80000000>;
242242
nonposted-mmio;
243+
/* Required to get >32-bit DMA via DARTs */
244+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
243245

244246
// filled via templated includes at the end of the file
245247
};
@@ -251,6 +253,8 @@
251253
ranges = <0x2 0x0 0x22 0x0 0x4 0x0>,
252254
<0x7 0x0 0x27 0x0 0xf 0x80000000>;
253255
nonposted-mmio;
256+
/* Required to get >32-bit DMA via DARTs */
257+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
254258

255259
// filled via templated includes at the end of the file
256260
};

arch/arm64/boot/dts/apple/t6021.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050

5151
ranges;
5252
nonposted-mmio;
53+
/* Required to get >32-bit DMA via DARTs */
54+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
5355

5456
// filled via templated includes at the end of the file
5557
};

arch/arm64/boot/dts/apple/t8103.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@
436436

437437
ranges;
438438
nonposted-mmio;
439+
/* Required to get >32-bit DMA via DARTs */
440+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
439441

440442
gpu: gpu@206400000 {
441443
compatible = "apple,agx-t8103", "apple,agx-g13g";

arch/arm64/boot/dts/apple/t8112.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@
468468

469469
ranges;
470470
nonposted-mmio;
471+
/* Required to get >32-bit DMA via DARTs */
472+
dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
471473

472474
gpu: gpu@206400000 {
473475
compatible = "apple,agx-t8112", "apple,agx-g14g";

0 commit comments

Comments
 (0)