[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250904073151.686227-8-uwu@icenowy.me>
Date: Thu, 4 Sep 2025 15:31:51 +0800
From: Icenowy Zheng <uwu@...nowy.me>
To: Drew Fustini <fustini@...nel.org>,
Guo Ren <guoren@...nel.org>,
Fu Wei <wefu@...hat.com>,
Lucas Stach <l.stach@...gutronix.de>,
Russell King <linux+etnaviv@...linux.org.uk>,
Christian Gmeiner <christian.gmeiner@...il.com>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>
Cc: Han Gao <rabenda.cn@...il.com>,
linux-riscv@...ts.infradead.org,
etnaviv@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
Icenowy Zheng <uwu@...nowy.me>
Subject: [PATCH v2 7/7] [NOT FOR UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520
The T-Head TH1520 SoC contains a GC620 2D graphics accelerator.
Enable it in the devicetree to allow using etnaviv driver with it.
This patch is currently very dirty because it relies on the bootloader
leaving the clocks enabled, and the core clock is a fake one.
Signed-off-by: Icenowy Zheng <uwu@...nowy.me>
---
No changes in v2.
arch/riscv/boot/dts/thead/th1520.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index 03f1d73190499..bc7dd7ee59dd5 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -225,6 +225,13 @@ aonsys_clk: clock-73728000 {
#clock-cells = <0>;
};
+ gc620_cclk: clk-gc620-fake {
+ compatible = "fixed-clock";
+ clock-frequency = <264000000>;
+ clock-output-names = "gc620_cclk";
+ #clock-cells = <0>;
+ };
+
stmmac_axi_config: stmmac-axi-config {
snps,wr_osr_lmt = <15>;
snps,rd_osr_lmt = <15>;
@@ -495,6 +502,18 @@ uart2: serial@...c010000 {
status = "disabled";
};
+ /* Vivante GC620, 2D only */
+ g2d: gpu@...cc80000 {
+ compatible = "vivante,gc";
+ reg = <0xff 0xecc80000 0x0 0x40000>;
+ interrupt-parent = <&plic>;
+ interrupts = <101 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gc620_cclk>;
+ clock-names = "core";
+ status = "okay";
+ };
+
clk: clock-controller@...f010000 {
compatible = "thead,th1520-clk-ap";
reg = <0xff 0xef010000 0x0 0x1000>;
--
2.51.0
Powered by blists - more mailing lists