Skip to content

Commit b6f11f1

Browse files
rk-hgcmmind
authored andcommitted
drm/rockchip: dsi2: add support rk3576
Add the necessary specific bits to support the rk3576-variant of the DW-DSI2 controller. Signed-off-by: Guochun Huang <hero.huang@rock-chips.com> [adapted from the vendor-kernel for mainline] Reviewed-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20250707164906.1445288-10-heiko@sntech.de
1 parent f05530b commit b6f11f1

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ static void dw_mipi_dsi2_rockchip_remove(struct platform_device *pdev)
437437
dw_mipi_dsi2_remove(dsi2->dmd);
438438
}
439439

440+
static const struct dsigrf_reg rk3576_dsi_grf_reg_fields[MAX_FIELDS] = {
441+
[TXREQCLKHS_EN] = { 0x0028, 1, 1 },
442+
[GATING_EN] = { 0x0028, 0, 0 },
443+
[IPI_SHUTDN] = { 0x0028, 3, 3 },
444+
[IPI_COLORM] = { 0x0028, 2, 2 },
445+
[IPI_COLOR_DEPTH] = { 0x0028, 8, 11 },
446+
[IPI_FORMAT] = { 0x0028, 4, 7 },
447+
};
448+
440449
static const struct dsigrf_reg rk3588_dsi0_grf_reg_fields[MAX_FIELDS] = {
441450
[TXREQCLKHS_EN] = { 0x0000, 11, 11 },
442451
[GATING_EN] = { 0x0000, 10, 10 },
@@ -455,6 +464,15 @@ static const struct dsigrf_reg rk3588_dsi1_grf_reg_fields[MAX_FIELDS] = {
455464
[IPI_FORMAT] = { 0x0004, 0, 3 },
456465
};
457466

467+
static const struct rockchip_dw_dsi2_chip_data rk3576_chip_data[] = {
468+
{
469+
.reg = 0x27d80000,
470+
.grf_regs = rk3576_dsi_grf_reg_fields,
471+
.max_bit_rate_per_lane = 2500000ULL,
472+
},
473+
{ /* sentinel */ }
474+
};
475+
458476
static const struct rockchip_dw_dsi2_chip_data rk3588_chip_data[] = {
459477
{
460478
.reg = 0xfde20000,
@@ -470,6 +488,9 @@ static const struct rockchip_dw_dsi2_chip_data rk3588_chip_data[] = {
470488

471489
static const struct of_device_id dw_mipi_dsi2_rockchip_dt_ids[] = {
472490
{
491+
.compatible = "rockchip,rk3576-mipi-dsi2",
492+
.data = &rk3576_chip_data,
493+
}, {
473494
.compatible = "rockchip,rk3588-mipi-dsi2",
474495
.data = &rk3588_chip_data,
475496
},

0 commit comments

Comments
 (0)