From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BACBE2E2EFC for ; Thu, 24 Jul 2025 14:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753366757; cv=none; b=f92OHZ/pHp9aYxQWboaoCWVU1PEEEv5DJadWjpsCV2QCGkO7qM/zMPSiW/Fv/1IhAl3cDLjtXZkc3GFdLdpTEp0mccum6S23n0ceZHeGrT9NfD0NoY9st6ggljQFPxpUAottXOugHMXwBvDkZFOtz8A59I3YW0YbpMF5YyE4W3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753366757; c=relaxed/simple; bh=P7It3FMf29uKY5DKZnUmXnhqoBhVLO35ws15wFY52ZM=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=AhHQM8CDw9jdKZPjEUHobc2o3rcitAebhxlhgyz0QffWGb5jTINgDyYPQ/6Pk6tVv/BdW5fNhXC8YkyaH4e5drT/IzGFYvhsX8JJ1pAA2TknC9fsVMwf2ZEV7b1pysF/aM6AjsUFMEr2cdlLMRw5b1VAu1jKJgFOjPlP0n3HqzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=CBFnTL2y; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="CBFnTL2y" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20250724141913euoutp01fa6ec69f2ae46f00261cd0491a9102aa~VNcXbFzg51183511835euoutp01L for ; Thu, 24 Jul 2025 14:19:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20250724141913euoutp01fa6ec69f2ae46f00261cd0491a9102aa~VNcXbFzg51183511835euoutp01L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1753366753; bh=VfsQJvjq5c9ev8IN+DYZ8WbeMJC6AfqTnoMPHMtlcaY=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=CBFnTL2ycqPRNxFUw8shyXZKKhWJATrLUoHGP3zeONI7f+HPDIzZNOIi90K6IClE+ kWiLrDaj0IMClYq1mC19kDlhlo6Ksf5poiXiXsWW8eiOKEcJawR89upxDMuLZ5qUhO LFcVA0W1el0pvG4MX1dN0YDyMt50iQprZBSrihrI= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20250724141912eucas1p1a759f68c5a738d813da3bce81583db16~VNcWhVw4d2670326703eucas1p1t; Thu, 24 Jul 2025 14:19:12 +0000 (GMT) Received: from AMDC4942.eu.corp.samsungelectronics.net (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20250724141911eusmtip29ece3cb982b2733d90ead776c0b3622b~VNcVfK-EA0458804588eusmtip2a; Thu, 24 Jul 2025 14:19:11 +0000 (GMT) From: Michal Wilczynski Date: Thu, 24 Jul 2025 16:19:00 +0200 Subject: [PATCH v8 3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <20250724-apr_14_for_sending-v8-3-0714bef83c59@samsung.com> In-Reply-To: <20250724-apr_14_for_sending-v8-0-0714bef83c59@samsung.com> To: Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michal Wilczynski , Bartosz Golaszewski , Philipp Zabel , Frank Binns , Matt Coster , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Ulf Hansson , Marek Szyprowski , Drew Fustini Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartosz Golaszewski X-Mailer: b4 0.15-dev X-CMS-MailID: 20250724141912eucas1p1a759f68c5a738d813da3bce81583db16 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20250724141912eucas1p1a759f68c5a738d813da3bce81583db16 X-EPHeader: CA X-CMS-RootMailID: 20250724141912eucas1p1a759f68c5a738d813da3bce81583db16 References: <20250724-apr_14_for_sending-v8-0-0714bef83c59@samsung.com> Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD TH1520 SoC used by the Lichee Pi 4A board. This node enables support for the GPU using the drm/imagination driver. By adding this node, the kernel can recognize and initialize the GPU, providing graphics acceleration capabilities on the Lichee Pi 4A and other boards based on the TH1520 SoC. Add fixed clock gpu_mem_clk, as the MEM clock on the T-HEAD SoC can't be controlled programatically. Reviewed-by: Ulf Hansson Reviewed-by: Drew Fustini Reviewed-by: Bartosz Golaszewski Signed-off-by: Michal Wilczynski --- arch/riscv/boot/dts/thead/th1520.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index 42724bf7e90e08fac326c464d0f080e3bd2cd59b..6ae5c632205ba63248c0a119c03bdfc084aac7a0 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>; }; + gpu_mem_clk: mem-clk { + compatible = "fixed-clock"; + clock-frequency = <0>; + clock-output-names = "gpu_mem_clk"; + #clock-cells = <0>; + }; + stmmac_axi_config: stmmac-axi-config { snps,wr_osr_lmt = <15>; snps,rd_osr_lmt = <15>; @@ -500,6 +507,20 @@ clk: clock-controller@ffef010000 { #clock-cells = <1>; }; + gpu: gpu@ffef400000 { + compatible = "thead,th1520-gpu", "img,img-bxm-4-64", + "img,img-rogue"; + reg = <0xff 0xef400000 0x0 0x100000>; + interrupt-parent = <&plic>; + interrupts = <102 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk_vo CLK_GPU_CORE>, + <&gpu_mem_clk>, + <&clk_vo CLK_GPU_CFG_ACLK>; + clock-names = "core", "mem", "sys"; + power-domains = <&aon TH1520_GPU_PD>; + resets = <&rst TH1520_RESET_ID_GPU>; + }; + rst: reset-controller@ffef528000 { compatible = "thead,th1520-reset"; reg = <0xff 0xef528000 0x0 0x4f>; -- 2.34.1