61 lines
1.8 KiB
Diff
61 lines
1.8 KiB
Diff
From 11fdb231f4127bf60839a63a8c7ed640ebe4751a Mon Sep 17 00:00:00 2001
|
|
From: Jagan Teki <jagan@edgeble.ai>
|
|
Date: Mon, 31 Jul 2023 16:30:06 +0530
|
|
Subject: [PATCH] drm/rockchip: dsi: Add rv1126 MIPI DSI support
|
|
|
|
RV1126 MIPI DSI supports V1.2 DPHY with 4 lanes and 1Gbps transfer
|
|
rate for lane.
|
|
|
|
Add support for it.
|
|
|
|
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
|
|
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
|
Link: https://patchwork.freedesktop.org/patch/msgid/20230731110012.2913742-9-jagan@edgeble.ai
|
|
---
|
|
.../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 20 +++++++++++++++++++
|
|
1 file changed, 20 insertions(+)
|
|
|
|
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
|
|
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
|
|
@@ -197,6 +197,11 @@
|
|
#define RK3568_DSI1_TURNDISABLE BIT(2)
|
|
#define RK3568_DSI1_FORCERXMODE BIT(0)
|
|
|
|
+#define RV1126_GRF_DSIPHY_CON 0x10220
|
|
+#define RV1126_DSI_FORCETXSTOPMODE (0xf << 4)
|
|
+#define RV1126_DSI_TURNDISABLE BIT(2)
|
|
+#define RV1126_DSI_FORCERXMODE BIT(0)
|
|
+
|
|
#define HIWORD_UPDATE(val, mask) (val | (mask) << 16)
|
|
|
|
enum {
|
|
@@ -1650,6 +1655,18 @@ static const struct rockchip_dw_dsi_chip
|
|
{ /* sentinel */ }
|
|
};
|
|
|
|
+static const struct rockchip_dw_dsi_chip_data rv1126_chip_data[] = {
|
|
+ {
|
|
+ .reg = 0xffb30000,
|
|
+ .lanecfg1_grf_reg = RV1126_GRF_DSIPHY_CON,
|
|
+ .lanecfg1 = HIWORD_UPDATE(0, RV1126_DSI_TURNDISABLE |
|
|
+ RV1126_DSI_FORCERXMODE |
|
|
+ RV1126_DSI_FORCETXSTOPMODE),
|
|
+ .max_data_lanes = 4,
|
|
+ },
|
|
+ { /* sentinel */ }
|
|
+};
|
|
+
|
|
static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = {
|
|
{
|
|
.compatible = "rockchip,px30-mipi-dsi",
|
|
@@ -1663,6 +1680,9 @@ static const struct of_device_id dw_mipi
|
|
}, {
|
|
.compatible = "rockchip,rk3568-mipi-dsi",
|
|
.data = &rk3568_chip_data,
|
|
+ }, {
|
|
+ .compatible = "rockchip,rv1126-mipi-dsi",
|
|
+ .data = &rv1126_chip_data,
|
|
},
|
|
{ /* sentinel */ }
|
|
};
|