drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
cover drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
Due to parameter errors, the Anbernic RG353V-V2 screen couldn't be properly initialized, resulting in a black screen and unable to display anything. After correcting these parameters by referencing the device tree in JELOS (which uses the BSP kernel for RK3566), the panel started to work properly.
Ao Zhong (1):
drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
PATCH RESEND 1/1 drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
This patch resolves the issue with the panel initialization of the Anbernic RG353V-V2 caused by incorrect parameters.
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-sitronix-st7703.c +2 -2
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
Signature · 1 line
2.43.0
Guido Günther
maintainerHi Ao,
this doesn't say why that was changed but your cover letter has that information:
Quoted 3 lines
After correcting these parameters by referencing the
device tree in JELOS (which uses the BSP kernel for RK3566), the panel started to work properly.
Can you add that to the commit message and maybe add an URL as reference please?
I've added Chris to the cc: list. He submitted the original rg353v2 and we don't want to break other devices. Chris, do you have any means to check these values?
Cheers,
-- Guido
Quoted 26 lines · Ao Zhong
This patch resolves the issue with the panel initialization of the Anbernic RG353V-V2 caused by incorrect parameters.
Signed-off-by Ao Zhong <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-sitronix-st7703.c +2
-2@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,Signature · 1 line
2.43.0
Chris Morgan
Tested-byQuoted 9 lines · Guido Günther
Hi Ao,
this doesn't say why that was changed but your cover letter has that information:
Quoted 3 lines
After correcting these parameters by referencing the
device tree in JELOS (which uses the BSP kernel for RK3566), the panel started to work properly.
Quoted 6 lines
Can you add that to the commit message and maybe add an URL as reference please?
I've added Chris to the cc: list. He submitted the original rg353v2 and we don't want to break other devices. Chris, do you have any means to check these values?
I checked. I'm not sure exactly how but when I fired up the most recent kernel this panel appeared to have problems with the init sequence as defined. After making the changes from this patch series it seems to be back to normal. So these changes appear to be needed for existing devices, and I'm not sure what could have caused the regression...
Note the previous settings did still appear to work, the panel just took much longer to start working after the init sequence (as much as 20 seconds on cold boot, clearly indicating a problem).
Thank you for the fix!
Quoted 31 lines
Cheers,
-- GuidoQuoted 26 lines · Ao Zhong
This patch resolves the issue with the panel initialization of the Anbernic RG353V-V2 caused by incorrect parameters.
Signed-off-by Ao Zhong <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-sitronix-st7703.c +2
-2@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,Signature · 1 line
2.43.0
Hello Chris Morgan, Guido Günther,
I will post a v2 patch. I will supplement the commit information and attach the reference links I used when modifying the init sequence.
Ao Zhong
Am Fr., 9. Feb. 2024 um 22:35 Uhr schrieb Chris Morgan <[email protected]>:
Quoted 63 lines · Guido Günther
Quoted 9 lines
Hi Ao,
this doesn't say why that was changed but your cover letter has that information:
Quoted 3 lines
After correcting these parameters by referencing the
device tree in JELOS (which uses the BSP kernel for RK3566), the panel started to work properly.Quoted 6 lines
Can you add that to the commit message and maybe add an URL as reference please?
I've added Chris to the cc: list. He submitted the original rg353v2 and we don't want to break other devices. Chris, do you have any means to check these values?
I checked. I'm not sure exactly how but when I fired up the most recent kernel this panel appeared to have problems with the init sequence as defined. After making the changes from this patch series it seems to be back to normal. So these changes appear to be needed for existing devices, and I'm not sure what could have caused the regression...
Note the previous settings did still appear to work, the panel just took much longer to start working after the init sequence (as much as 20 seconds on cold boot, clearly indicating a problem).
Thank you for the fix!
Tested-by Chris Morgan <[email protected]>Quoted 31 lines
Cheers,
-- GuidoQuoted 26 lines · Ao Zhong
This patch resolves the issue with the panel initialization of the Anbernic RG353V-V2 caused by incorrect parameters.
Signed-off-by Ao Zhong <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-sitronix-st7703.c +2
-3@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00, --2.43.0
PATCH v2 1/1 drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
This patch addresses an issue with the Anbernic RG353V-V2 panel initialization that was caused by incorrect parameter. The correct initialization sequence was derived by referencing the JELOS (Just Enough Linux OS) BSP kernel's device tree for the V2 panel, which is identified by the ID "38 21". The relevant device tree can be found at:
The proper initialization sequence was further informed by dissecting instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide", starting from page 18 of the document.
Upon comparing the initialization sequence within the rg353v2_init_sequence function against the device tree in the BSP kernel, discrepancies were identified in two instructions. The relevant instructions in the device tree are:
1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT command with parameters 26 62 f0 63
Adjusting the parameters to match those specified in the BSP kernel's device tree allow the panel to initialize correctly.
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-sitronix-st7703.c +2 -2
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
Signature · 1 line
2.43.0
PATCH v3 1/1 drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
In reply to Guido GüntherThis patch addresses an issue with the Anbernic RG353V-V2 panel initialization that was caused by incorrect parameter. The correct initialization sequence was derived by referencing the JELOS (Just Enough Linux OS) BSP kernel's device tree for the V2 panel, which is identified by the ID "38 21". The relevant device tree can be found at:
The proper initialization sequence was further informed by dissecting instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide", specifically in Chapter 3.3 of the document.
Upon comparing the initialization sequence within the rg353v2_init_sequence function against the device tree in the BSP kernel, discrepancies were identified in two instructions. The relevant instructions in the device tree are:
1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT command with parameters 26 62 f0 63
Adjusting the parameters to match those specified in the BSP kernel's device tree allow the panel to initialize correctly.
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-sitronix-st7703.c +2 -2
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
Signature · 1 line
2.43.0
Quoted 24 lines · Ao Zhong
This patch addresses an issue with the Anbernic RG353V-V2 panel initialization that was caused by incorrect parameter. The correct initialization sequence was derived by referencing the JELOS (Just Enough Linux OS) BSP kernel's device tree for the V2 panel, which is identified by the ID "38 21". The relevant device tree can be found at:
The proper initialization sequence was further informed by dissecting instructions as outlined in the "
Rockchip_DRM_Panel_Porting_Guide", specifically in Chapter 3.3 of the document.Upon comparing the initialization sequence within the
rg353v2_init_sequencefunction against the device tree in the BSP kernel, discrepancies were identified in two instructions. The relevant instructions in the device tree are:1. 15 00 03 b6 7f 7f corresponding to the
ST7703_CMD_SETVCOMcommand with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to theST7703_CMD_SETPOWER_EXTcommand with parameters 26 62 f0 63
Quoted 4 lines
Adjusting the parameters to match those specified in the BSP kernel's device tree allow the panel to initialize correctly.
Signed-off-by Ao Zhong <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-sitronix-st7703.c +2
-2@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,Signature · 1 line
2.43.0
Hi,
Quoted 47 lines · Ao Zhong
This patch addresses an issue with the Anbernic RG353V-V2 panel initialization that was caused by incorrect parameter. The correct initialization sequence was derived by referencing the JELOS (Just Enough Linux OS) BSP kernel's device tree for the V2 panel, which is identified by the ID "38 21". The relevant device tree can be found at:
The proper initialization sequence was further informed by dissecting instructions as outlined in the "
Rockchip_DRM_Panel_Porting_Guide", specifically in Chapter 3.3 of the document.Upon comparing the initialization sequence within the
rg353v2_init_sequencefunction against the device tree in the BSP kernel, discrepancies were identified in two instructions. The relevant instructions in the device tree are:1. 15 00 03 b6 7f 7f corresponding to the
ST7703_CMD_SETVCOMcommand with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to theST7703_CMD_SETPOWER_EXTcommand with parameters 26 62 f0 63Adjusting the parameters to match those specified in the BSP kernel's device tree allow the panel to initialize correctly.
Signed-off-by Ao Zhong <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-sitronix-st7703.c +2
-2@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx) 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCYC ,0x80 );mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETBGP ,0x0a ,0x0a ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x92 ,0x92 ); -mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 , +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x7f ,0x7f ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x26 ,0x62 ,0xf0 ,0x63 ); mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00,
Quoted 1 line
0x00,
-- Guido
Quoted 3 lines
Signature · 1 line
2.43.0