mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
65 lines
1.9 KiB
Diff
65 lines
1.9 KiB
Diff
From 831c6e8c68a66678e8329a382823dc83c483dcc8 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Thu, 27 Apr 2023 09:30:49 +0200
|
|
Subject: [PATCH] drm/vc4: txp: Add support for BCM2712 MOP
|
|
|
|
The BCM2712 has an evolution of what used to be called TXP in the
|
|
earlier SoCs, but is now called MOP.
|
|
|
|
There's a few differences still, so we can add a new compatible to deal
|
|
with them easily.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_txp.c | 18 +++++++++++++++++-
|
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_txp.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
|
|
@@ -388,6 +388,7 @@ static const struct drm_connector_funcs
|
|
static void vc4_txp_encoder_disable(struct drm_encoder *encoder)
|
|
{
|
|
struct drm_device *drm = encoder->dev;
|
|
+ struct vc4_dev *vc4 = to_vc4_dev(drm);
|
|
struct vc4_txp *txp = encoder_to_vc4_txp(encoder);
|
|
int idx;
|
|
|
|
@@ -406,7 +407,8 @@ static void vc4_txp_encoder_disable(stru
|
|
WARN_ON(TXP_READ(TXP_DST_CTRL) & TXP_BUSY);
|
|
}
|
|
|
|
- TXP_WRITE(TXP_DST_CTRL, TXP_POWERDOWN);
|
|
+ if (vc4->gen < VC4_GEN_6)
|
|
+ TXP_WRITE(TXP_DST_CTRL, TXP_POWERDOWN);
|
|
|
|
drm_dev_exit(idx);
|
|
}
|
|
@@ -510,6 +512,19 @@ static irqreturn_t vc4_txp_interrupt(int
|
|
return IRQ_HANDLED;
|
|
}
|
|
|
|
+const struct vc4_txp_data bcm2712_mop_data = {
|
|
+ .base = {
|
|
+ .name = "mop",
|
|
+ .debugfs_name = "mop_regs",
|
|
+ .hvs_available_channels = BIT(2),
|
|
+ .hvs_output = 2,
|
|
+ },
|
|
+ .encoder_type = VC4_ENCODER_TYPE_TXP0,
|
|
+ .has_byte_enable = true,
|
|
+ .size_minus_one = true,
|
|
+ .supports_40bit_addresses = true,
|
|
+};
|
|
+
|
|
const struct vc4_txp_data bcm2835_txp_data = {
|
|
.base = {
|
|
.name = "txp",
|
|
@@ -616,6 +631,7 @@ static int vc4_txp_remove(struct platfor
|
|
}
|
|
|
|
static const struct of_device_id vc4_txp_dt_match[] = {
|
|
+ { .compatible = "brcm,bcm2712-mop", .data = &bcm2712_mop_data },
|
|
{ .compatible = "brcm,bcm2835-txp", .data = &bcm2835_txp_data },
|
|
{ /* sentinel */ },
|
|
};
|