summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wilczynski <m.wilczynski@samsung.com>2024-08-09 18:04:27 +0200
committerMichal Wilczynski <m.wilczynski@samsung.com>2024-08-13 10:21:59 +0200
commitc663fad4100c3bf771c450234edc8cee44bdfd32 (patch)
tree4934d368db463bd893c7bdfdfd0c2b2e06a987a2
parent254d3684066acfef30e1a24d0a1dd0e4cebf0416 (diff)
downloadlinux-thead-c663fad4100c3bf771c450234edc8cee44bdfd32.tar.gz
linux-thead-c663fad4100c3bf771c450234edc8cee44bdfd32.tar.bz2
linux-thead-c663fad4100c3bf771c450234edc8cee44bdfd32.zip
riscv: dts: thead: Add GPU node and dependent nodes
GPU device tree node is dependent on always-on module working correctly. Fix aon node by supplying it with correct reserved memory space. Add the gpu node itself. Add an empty aon node in the beaglev-ahead dts, to avoid breaking the compilation. Change-Id: I9eafb0d576b1045089a640419ee7a0400ba90550 Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
-rw-r--r--arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts13
-rw-r--r--arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi15
-rw-r--r--arch/riscv/boot/dts/thead/th1520.dtsi33
3 files changed, 61 insertions, 0 deletions
diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
index d9b4de9e4757..0e6f1a0d8573 100644
--- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
+++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
@@ -34,6 +34,19 @@
reg = <0x0 0x00000000 0x1 0x00000000>;
};
+
+ aon: aon {
+ compatible = "thead,light-aon";
+ mbox-names = "aon";
+ mboxes = <&mbox_910t 1 0>;
+ status = "disabled";
+
+ pd: light-aon-pd {
+ compatible = "thead,light-aon-pd";
+ #power-domain-cells = <1>;
+ };
+ };
+
};
&osc {
diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
index 52f3c4c68d5a..2efe93fba6b2 100644
--- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
@@ -101,6 +101,8 @@
mboxes = <&mbox_910t 1 0>;
status = "okay";
+ log-memory-region = <&aon_log_mem>;
+
pd: light-aon-pd {
compatible = "thead,light-aon-pd";
#power-domain-cells = <1>;
@@ -392,6 +394,15 @@
};
};
+&resmem {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ aon_log_mem: memory@33600000 {
+ reg = <0x0 0x33600000 0x0 0x200000>;
+ };
+};
+
&padctrl1_apsys {
light-evb-padctrl1 {
/*
@@ -634,3 +645,7 @@
max-frequency = <198000000>;
status = "okay";
};
+
+&gpu {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index decf16d3a7c7..6a03e059f169 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -10,12 +10,29 @@
#include <dt-bindings/clock/light-vosys.h>
#include <dt-bindings/pinctrl/light-fm-left-pinctrl.h>
#include <dt-bindings/pinctrl/light-fm-right-pinctrl.h>
+#include <dt-bindings/firmware/thead/rsrc.h>
/ {
compatible = "thead,th1520";
#address-cells = <2>;
#size-cells = <2>;
+ resmem: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* global autoconfigured region for contiguous allocations */
+ cmamem: linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0 0x14000000>; // 320MB by default
+ alloc-ranges = <0 0x64000000 0 0x14000000>; // [0x6400_0000 ~ 0x7800_0000]
+ linux,cma-default;
+ };
+ };
+
+
cpus: cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -1031,6 +1048,22 @@
status = "disabled";
};
+ gpu: gpu@ffef400000 {
+ compatible = "img,gpu";
+ reg = <0xff 0xef400000 0x0 0x100000>;
+ interrupt-parent = <&plic>;
+ interrupts = <102 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "gpuirq";
+ vosys-regmap = <&vosys_reg>;
+ power-domains = <&pd LIGHT_AON_GPU_PD>;
+ clocks = <&vosys_clk_gate LIGHT_CLKGEN_GPU_CORE_CLK>,
+ <&vosys_clk_gate LIGHT_CLKGEN_GPU_CFG_ACLK>;
+ clock-names = "cclk", "aclk";
+ gpu_clk_rate = <18000000>;
+ dma-mask = <0xf 0xffffffff>;
+ status = "disabled";
+ };
+
stmmac_axi_setup: stmmac-axi-config {
snps,wr_osr_lmt = <3>;
snps,rd_osr_lmt = <3>;