riscv: dts: spacemit: Add reserved memory for dpu 23/316923/2
authorMichal Wilczynski <m.wilczynski@samsung.com>
Wed, 28 Aug 2024 08:17:35 +0000 (10:17 +0200)
committerMichal Wilczynski <m.wilczynski@samsung.com>
Fri, 30 Aug 2024 16:07:24 +0000 (18:07 +0200)
The hdmi nodes are dependent on memory ranges for the dpu. Port them
from the vendor kernel [1].

[1] - https://github.com/BPI-SINOVOIP/pi-linux.git

Change-Id: I8e1e80c1ef3490f08aa56a5522de6d73d9560091
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts

index d642b8a85011c5bb0d82b8da99680573c5c99f9a..d1a54d28bc52ca01519e83da7edf96ea89a4c8d6 100644 (file)
        model = "Banana Pi BPI-F3";
        compatible = "bananapi,bpi-f3", "spacemit,k1";
 
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x00000000 0x0 0x80000000>;
+       };
+
+       memory@100000000 {
+               device_type = "memory";
+               reg = <0x1 0x00000000 0x0 0x80000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       /* alloc memory from 0x40000000~0x80000000 */
+                       alloc-ranges = <0 0x40000000 0 0x40000000>;
+                       /* size of cma buffer is 384MByte */
+                       size = <0 0x18000000>;
+                       /* start address is 1Mbyte aligned */
+                       alignment = <0x0 0x100000>;
+                       linux,cma-default;
+                       /* besides hardware, dma for ex. buffer can be used by memory management */
+                       reusable;
+               };
+
+               /* reserved 384K for dpu, including mmu table(256K) and cmdlist(128K) */
+               dpu_resv: dpu_reserved@2ff40000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x0 0x2ff40000 0x0 0x000C0000>;
+                       no-map;
+               };
+       };
+
        chosen {
                stdout-path = "serial0";
        };