]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: dts: spacemit: Add DMA translation buses for K1
authorVivian Wang <wangruikang@iscas.ac.cn>
Mon, 23 Jun 2025 10:04:16 +0000 (18:04 +0800)
committerYixun Lan <dlan@gentoo.org>
Wed, 9 Jul 2025 05:49:18 +0000 (13:49 +0800)
The SpacemiT K1 has various static translations of DMA accesses. Add
these as simple-bus nodes with dma-ranges. Devices actually using these
translations will be added to or moved inside the bus nodes in later
patches.

The bus names are assigned according to consensus with SpacemiT [1].

Link: https://lore.kernel.org/r/CAH1PCMaC+imcMZCFYtRdmH6ge=dPgnANn_GqVfsGRS=+YhyJCw@mail.gmail.com
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: Guodong Xu <guodong@riscstar.com>
Link: https://lore.kernel.org/r/20250623-k1-dma-buses-rfc-wip-v1-1-c0144082061f@iscas.ac.cn
Signed-off-by: Yixun Lan <dlan@gentoo.org>
arch/riscv/boot/dts/spacemit/k1.dtsi

index e0119d8298a0aeedd5ca37670e5f3ed652056b62..92b631a549f4067a8f53eaf49e3f6b6f18da0975 100644 (file)
                        reg-io-width = <4>;
                        status = "reserved"; /* for TEE usage */
                };
+
+               camera-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
+                                    <0x0 0x80000000 0x1 0x00000000 0x1 0x80000000>;
+               };
+
+               dma-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
+                                    <0x1 0x00000000 0x1 0x80000000 0x3 0x00000000>;
+               };
+
+               multimedia-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
+                                    <0x0 0x80000000 0x1 0x00000000 0x3 0x80000000>;
+               };
+
+               network-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
+                                    <0x0 0x80000000 0x1 0x00000000 0x0 0x80000000>;
+               };
+
+               pcie-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>,
+                                    <0x0 0xb8000000 0x1 0x38000000 0x3 0x48000000>;
+               };
+
+               storage-bus {
+                       compatible = "simple-bus";
+                       ranges;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>;
+               };
        };
 };