From: ZhuXiangyu <1194781887@qq.com>
To: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Heiko Stuebner <heiko@sntech.de>,
Sandy Huang <hjc@rock-chips.com>
Cc: Andy Yan <andyshrk@163.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Manivannan Sadhasivam <mani@kernel.org>,
linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
ZhuXiangyu <1194781887@qq.com>
Subject: [PATCH] drm/phy: rockchip: fix RK3506 DSI low-power command handling
Date: Sat, 21 Nov 2026 15:58:35 +0800 [thread overview]
Message-ID: <tencent_6F7C9E04169BCBAE4E162DAA3DCD5395B209@qq.com> (raw)
Two bugs keep the RK3506 MIPI-DSI link from initialising a panel: the
DPHY programs the wrong high-speed timing entry, and the PHY data lanes
are never enabled in the GRF.
1. phy-rockchip-inno-dsidphy picks the wrong HS timing entry
The 1.5 GHz inno DSI PHY timing table stores its rates in Mbps while
the other tables and the lookup use Hz. The mode enable code compares
inno->pll.rate in Hz (e.g. 372000000) against timings[].rate in Mbps
(e.g. 400), so the comparison never matches. The loop runs to the end
and the last, fastest entry is used, which programs a TLPX/LPX
counter that is far too large. The panel then cannot decode the
low-power DCS commands and stays in sleep mode, so the display stays
black even though the LP packets are visible on the data lane.
Convert the 1.5 GHz timing table rates to Hz so that the lookup
selects the correct entry.
2. The RK3506 DSI GRF lane enable bits are never written
rk3506_chip_data only clears the turnaround / force-stop fields, so
the PHY data lanes stay disabled unless the boot loader happens to
enable them. Program RK3506_DSI_PHY_ENABLE_LANE0/1 as well.
Tested on the RK3506B JerryTech board: the panel now receives the init
sequence over LP and the framebuffer console is visible.
Signed-off-by: ZhuXiangyu <1194781887@qq.com>
---
.../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 +++-
.../phy/rockchip/phy-rockchip-inno-dsidphy.c | 28 +++++++++----------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 30d6f83c..116cc140 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -199,6 +199,8 @@
#define RK3506_SYS_GRF_SOC_CON6 0x0018
#define RK3506_DSI_FORCETXSTOPMODE (0xf << 4)
+#define RK3506_DSI_PHY_ENABLE_LANE1 BIT(9)
+#define RK3506_DSI_PHY_ENABLE_LANE0 BIT(8)
#define RK3506_DSI_TURNDISABLE BIT(2)
#define RK3506_DSI_FORCERXMODE BIT(0)
@@ -1727,7 +1729,9 @@ static const struct rockchip_dw_dsi_chip_data rk3506_chip_data[] = {
.lanecfg1_grf_reg = RK3506_SYS_GRF_SOC_CON6,
.lanecfg1 = (FIELD_PREP_WM16_CONST(RK3506_DSI_TURNDISABLE, 0) |
FIELD_PREP_WM16_CONST(RK3506_DSI_FORCERXMODE, 0) |
- FIELD_PREP_WM16_CONST(RK3506_DSI_FORCETXSTOPMODE, 0)),
+ FIELD_PREP_WM16_CONST(RK3506_DSI_FORCETXSTOPMODE, 0) |
+ FIELD_PREP_WM16_CONST(RK3506_DSI_PHY_ENABLE_LANE0, 1) |
+ FIELD_PREP_WM16_CONST(RK3506_DSI_PHY_ENABLE_LANE1, 1)),
.max_data_lanes = 2,
.max_bit_rate_per_lane = 1500000000UL,
.dphy_get_timing = dw_mipi_dsi_phy_px30_get_timing,
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index 6ad04b0c..fcf7aa17 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -282,20 +282,20 @@ struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_1ghz[] = {
static const
struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_1_5ghz[] = {
- { 110, 0x02, 0x7f, 0x16, 0x02, 0x02},
- { 150, 0x02, 0x7f, 0x16, 0x03, 0x02},
- { 200, 0x02, 0x7f, 0x17, 0x04, 0x02},
- { 250, 0x02, 0x7f, 0x17, 0x05, 0x04},
- { 300, 0x02, 0x7f, 0x18, 0x06, 0x04},
- { 400, 0x03, 0x7e, 0x19, 0x07, 0x04},
- { 500, 0x03, 0x7c, 0x1b, 0x07, 0x08},
- { 600, 0x03, 0x70, 0x1d, 0x08, 0x10},
- { 700, 0x05, 0x40, 0x1e, 0x08, 0x30},
- { 800, 0x05, 0x02, 0x1f, 0x09, 0x30},
- {1000, 0x05, 0x08, 0x20, 0x09, 0x30},
- {1200, 0x06, 0x03, 0x32, 0x14, 0x0f},
- {1400, 0x09, 0x03, 0x32, 0x14, 0x0f},
- {1500, 0x0d, 0x42, 0x36, 0x0e, 0x0f},
+ { 110000000, 0x02, 0x7f, 0x16, 0x02, 0x02},
+ { 150000000, 0x02, 0x7f, 0x16, 0x03, 0x02},
+ { 200000000, 0x02, 0x7f, 0x17, 0x04, 0x02},
+ { 250000000, 0x02, 0x7f, 0x17, 0x05, 0x04},
+ { 300000000, 0x02, 0x7f, 0x18, 0x06, 0x04},
+ { 400000000, 0x03, 0x7e, 0x19, 0x07, 0x04},
+ { 500000000, 0x03, 0x7c, 0x1b, 0x07, 0x08},
+ { 600000000, 0x03, 0x70, 0x1d, 0x08, 0x10},
+ { 700000000, 0x05, 0x40, 0x1e, 0x08, 0x30},
+ { 800000000, 0x05, 0x02, 0x1f, 0x09, 0x30},
+ {1000000000, 0x05, 0x08, 0x20, 0x09, 0x30},
+ {1200000000, 0x06, 0x03, 0x32, 0x14, 0x0f},
+ {1400000000, 0x09, 0x03, 0x32, 0x14, 0x0f},
+ {1500000000, 0x0d, 0x42, 0x36, 0x0e, 0x0f},
};
static const
--
2.47.3
next reply other threads:[~2026-11-21 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 7:58 ZhuXiangyu [this message]
2026-11-21 8:05 ZhuXiangyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_6F7C9E04169BCBAE4E162DAA3DCD5395B209@qq.com \
--to=1194781887@qq.com \
--cc=airlied@gmail.com \
--cc=andyshrk@163.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mani@kernel.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®