[PW_SID:967456] [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer#459
[PW_SID:967456] [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer#459linux-riscv-bot wants to merge 9 commits into
Conversation
Introduce device tree bindings for a new power sequencer provider dedicated to the T-HEAD TH1520 SoC's GPU. The thead,th1520-gpu-pwrseq compatible designates a node that will manage the complex power-up and power-down sequence for the GPU. This sequencer requires a handle to the GPU's clock generator reset line (gpu-clkgen), which is specified in its device tree node. This binding will be used by a new pwrseq driver to abstract the SoC specific power management details from the generic GPU driver. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Introduce the pwrseq-thead-gpu driver, a power sequencer provider for the Imagination BXM-4-64 GPU on the T-HEAD TH1520 SoC. The TH1520 GPU requires a specific sequence to correctly initialize and power down its resources: - Enable GPU clocks (core and sys). - De-assert the GPU clock generator reset (clkgen_reset). - Introduce a short hardware-required delay. - De-assert the GPU core reset. The power-down sequence performs these steps in reverse. Implement this sequence via the pwrseq_power_on and pwrseq_power_off callbacks. It binds to the "thead,th1520-gpu-pwrseq" device tree node, from which it acquires the clkgen_reset. Crucially, the driver's match function is called when a consumer (the Imagination GPU driver) requests the "gpu-power" target. During this match, the sequencer uses devm_clk_bulk_get() and devm_reset_control_get_exclusive() on the consumer's device to obtain handles to the GPU's "core" and "sys" clocks, and the GPU core reset. These, along with its own clkgen_reset, allow it to perform the complete sequence. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update the Imagination PVR DRM driver to leverage the pwrseq framework for managing the power sequence of the GPU on the T-HEAD TH1520 SoC. In pvr_device_init(), the driver now attempts to get a handle to the "gpu-power" sequencer target using devm_pwrseq_get(). If successful, the responsibility for powering on and off the GPU's core clocks and resets is delegated to the power sequencer. Consequently, the GPU driver conditionally skips acquiring the GPU reset line if the pwrseq handle is obtained, as the sequencer's match function will acquire it. Clock handles are still acquired by the GPU driver for other purposes like devfreq. The runtime PM callbacks, pvr_power_device_resume() and pvr_power_device_suspend(), are modified to call pwrseq_power_on() and pwrseq_power_off() respectively when the sequencer is present. If no sequencer is found, the driver falls back to its existing manual clock and reset management. A helper function, pvr_power_off_sequence_manual(), is introduced to encapsulate the manual power-down logic. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update the img,powervr-rogue.yaml device tree bindings to include the T-HEAD TH1520 SoC's specific GPU compatible string. The thead,th1520-gpu compatible, along with its full chain img,img-bxm-4-64, and img,img-rogue, is added to the list of recognized GPU types. This allows the Imagination DRM driver to correctly bind to the GPU node defined in the TH1520 device tree. The power-domains property requirement for img,img-bxm-4-64 is also ensured by adding it to the relevant allOf condition. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
TH1520_RESET_ID_GPU_CLKGEN and TH1520_RESET_ID_GPU are required for GPU power sequencing to work. To make these symbols available, add the necessary include for the T-HEAD TH1520 reset controller bindings. This change was dropped during conflict resolution [1]. [1] - https://lore.kernel.org/all/aAvfn2mq0Ksi8DF2@x1/ Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the device tree node for the T-HEAD TH1520 GPU power sequencer (gpu_pwrseq) to the th1520.dtsi file. This node instantiates the thead,th1520-gpu-pwrseq driver, which is responsible for managing the GPU's power-on/off sequence. The node specifies the gpu-clkgen reset, which is one of the resources controlled by this sequencer. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.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. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Several RISC-V boards feature Imagination GPUs that are compatible with the PowerVR driver. An example is the IMG BXM-4-64 GPU on the Lichee Pi 4A board. This commit adjusts the driver's Kconfig dependencies to allow the PowerVR driver to be compiled on the RISC-V architecture. By enabling compilation on RISC-V, we expand support for these GPUs, providing graphics acceleration capabilities and enhancing hardware compatibility on RISC-V platforms. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V" |
2f55822 to
e69f607
Compare
PR for series 967456 applied to workflow
Name: [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=967456
Version: 3