Skip to content

Commit 5d4d263

Browse files
Michal WilczynskiJassi Brar
authored andcommitted
mailbox: Introduce support for T-head TH1520 Mailbox driver
This driver was tested using the drm/imagination GPU driver. It was able to successfully power on the GPU, by passing a command through mailbox from E910 core to E902 that's responsible for powering up the GPU. The GPU driver was able to read the BVNC version from control registers, which confirms it was successfully powered on. [ 33.957467] powervr ffef400000.gpu: [drm] loaded firmware powervr/rogue_36.52.104.182_v1.fw [ 33.966008] powervr ffef400000.gpu: [drm] FW version v1.0 (build 6621747 OS) [ 38.978542] powervr ffef400000.gpu: [drm] *ERROR* Firmware failed to boot Though the driver still fails to boot the firmware, the mailbox driver works when used with the not-yet-upstreamed firmware AON driver. There is ongoing work to get the BXM-4-64 supported with the drm/imagination driver [1], though it's not completed yet. This work is based on the driver from the vendor kernel [2]. Link: https://gitlab.freedesktop.org/imagination/linux-firmware/-/issues/2 [1] Link: https://github.com/revyos/thead-kernel.git [2] Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
1 parent 271ee26 commit 5d4d263

File tree

4 files changed

+610
-0
lines changed

4 files changed

+610
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19871,6 +19871,7 @@ T: git https://github.com/pdp7/linux.git
1987119871
F: Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml
1987219872
F: arch/riscv/boot/dts/thead/
1987319873
F: drivers/clk/thead/clk-th1520-ap.c
19874+
F: drivers/mailbox/mailbox-th1520.c
1987419875
F: include/dt-bindings/clock/thead,th1520-clk-ap.h
1987519876

1987619877
RNBD BLOCK DRIVERS

drivers/mailbox/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,14 @@ config QCOM_IPCC
296296
acts as an interrupt controller for receiving interrupts from clients.
297297
Say Y here if you want to build this driver.
298298

299+
config THEAD_TH1520_MBOX
300+
tristate "T-head TH1520 Mailbox"
301+
depends on ARCH_THEAD || COMPILE_TEST
302+
help
303+
Mailbox driver implementation for the Thead TH-1520 platform. Enables
304+
two cores within the SoC to communicate and coordinate by passing
305+
messages. Could be used to communicate between E910 core, on which the
306+
kernel is running, and E902 core used for power management among other
307+
things.
308+
299309
endif

drivers/mailbox/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ obj-$(CONFIG_SPRD_MBOX) += sprd-mailbox.o
6464
obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o
6565

6666
obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o
67+
68+
obj-$(CONFIG_THEAD_TH1520_MBOX) += mailbox-th1520.o

0 commit comments

Comments
 (0)