Add Support for RK3566 Powkiddy RGB10MAX3
Subsystems (6)
cover Add Support for RK3566 Powkiddy RGB10MAX3
From: Chris Morgan <[email protected]>
Add support for the Powkiddy RGB10MAX3 handheld gaming console.
[1] https://powkiddy.com/products/pre-sale-powkiddy-rgb10max3-handheld-game-console
Chris Morgan (7):
dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
dt-bindings: display: Document ST7703 panel rotation drm/panel: st7703: Add Panel Rotation Support
arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3
dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
arm64: dts: rockchip: Add Powkiddy RGB10MAX3
.../devicetree/bindings/arm/rockchip.yaml | 1 + .../display/panel/rocktech,jh057n00900.yaml | 4 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../rockchip/rk3566-powkiddy-rgb10max3.dts | 87 +++++++++++++++ .../dts/rockchip/rk3566-powkiddy-rgb30.dts | 18 +++ .../dts/rockchip/rk3566-powkiddy-rk2023.dts | 18 +++ .../dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 18 +-- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 104 ++++++++++++++++++ 8 files changed, 234 insertions(+), 17 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts
Signature · 1 line
2.34.1
PATCH 1/7 dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel
From: Chris Morgan <[email protected]>
The RGB10MAX3 panel is a panel specific to the Powkiddy RGB10MAX3 handheld device that measures 5 inches diagonally with a resolution of 720x1280.
--- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +2 -0
@@ -22,6 +22,8 @@ properties: enum: # Anberic RG353V-V2 5.0" 640x480 TFT LCD panel - anbernic,rg353v-panel-v2 + # Powkiddy RGB10MAX3 5.0" 720x1280 TFT LCD panel + - powkiddy,rgb10max3-panel # Powkiddy RGB30 3.0" 720x720 TFT LCD panel - powkiddy,rgb30-panel # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
Signature · 1 line
2.34.1
Re: [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel
Hi,
Quoted 16 lines · Chris Morgan
From: Chris Morgan <[email protected]>
The RGB10MAX3 panel is a panel specific to the Powkiddy RGB10MAX3 handheld device that measures 5 inches diagonally with a resolution of 720x1280.
Signed-off-by Chris Morgan <[email protected]>--- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +0
-0
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml properties: · line 29
Quoted 8 lines
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +2
-0@@ -22,6 +22,8 @@ properties: enum: # Anberic RG353V-V2 5.0" 640x480 TFT LCD panel - anbernic,rg353v-panel-v2 + # Powkiddy RGB10MAX3 5.0" 720x1280 TFT LCD panel + - powkiddy,rgb10max3-panel # Powkiddy RGB30 3.0" 720x720 TFT LCD panel - powkiddy,rgb30-panel # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
Cheers,
-- Guido
Quoted 3 lines
Signature · 1 line
2.34.1
Re: [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel
In reply to Chris MorganQuoted 7 lines · Chris Morgan
From: Chris Morgan <[email protected]>
The RGB10MAX3 panel is a panel specific to the Powkiddy RGB10MAX3 handheld device that measures 5 inches diagonally with a resolution of 720x1280.
Signed-off-by Chris Morgan <[email protected]>
Best regards,
Krzysztof
PATCH 2/7 drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
The Powkiddy RGB10MAX3 is a handheld device with a 5 inch 720x1280 display panel with a Sitronix ST7703 display controller. The panel is installed rotated 270 degrees.
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+)
drivers/gpu/drm/panel/panel-sitronix-st7703.c +91 -0
@@ -521,6 +521,96 @@ static const struct st7703_panel_desc rgb30panel_desc = { .init_sequence = rgb30panel_init_sequence, }; +static int rgb10max3_panel_init_sequence (struct st7703 *ctx) +{ +struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); + +/* Init sequence extracted from Powkiddy RGB10MAX3 BSP kernel. */ + +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEXTC ,0xf1 ,0x12 ,0x83 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETAPID ,0x00 ,0x00 ,0x00 ,0xda , +0x80 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETDISP ,0xc8 ,0x02 ,0x30 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETRGBIF ,0x10 ,0x10 ,0x28 , +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 ,0x04 ,0x04 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x78 ,0x78 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 ,0xf0 , +0x63 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETMIPI ,0x33 ,0x81 ,0x05 ,0xf9 , +0x0e ,0x0e ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x44 ,0x25 ,0x00 ,0x90 ,0x0a ,0x00 , +0x00 ,0x01 ,0x4f ,0x01 ,0x00 ,0x00 ,0x37 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVDC ,0x47 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_BF ,0x02 ,0x11 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETSCR ,0x73 ,0x73 ,0x50 ,0x50 , +0x00 ,0x00 ,0x12 ,0x70 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER ,0x25 ,0x00 ,0x32 , +0x32 ,0x77 ,0xe1 ,0xff ,0xff ,0xcc ,0xcc ,0x77 , +0x77 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETECO ,0x82 ,0x00 ,0xbf ,0xff , +0x00 ,0xff ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETIO ,0xb8 ,0x00 ,0x0a ,0x00 , +0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCABC ,0x10 ,0x40 ,0x1e , +0x02 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPANEL ,0x0b ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGAMMA ,0x00 ,0x04 ,0x07 , +0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b ,0x0e , +0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ,0x00 ,0x04 , +0x07 ,0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b , +0x0e ,0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEQ ,0x03 ,0x03 ,0x03 ,0x03 , +0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0xff ,0x80 , +0xc0 ,0x10 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP1 ,0xc8 ,0x10 ,0x08 ,0x00 , +0x00 ,0x41 ,0xf8 ,0x12 ,0x31 ,0x23 ,0x37 ,0x86 , +0x11 ,0xc8 ,0x37 ,0x2a ,0x00 ,0x00 ,0x0c ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x0c ,0x00 ,0x00 ,0x00 , +0x88 ,0x20 ,0x46 ,0x02 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xff ,0x88 ,0x31 ,0x57 ,0x13 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xff ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP2 ,0x00 ,0x1a ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x8f ,0x13 ,0x31 ,0x75 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xf8 ,0x8f ,0x02 ,0x20 ,0x64 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xf8 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_EF ,0xff ,0xff ,0x01 ); + +return 0 ; +} + +static const struct drm_display_mode rgb10max3_panel_mode = { + .hdisplay =720 , + .hsync_start =720 +40 , + .hsync_end =720 +40 +10 , + .htotal =720 +40 +10 +40 , + .vdisplay =1280 , + .vsync_start =1280 +16 , + .vsync_end =1280 +16 +4 , + .vtotal =1280 +16 +4 +14 , + .clock =63800 , + .flags =DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC , + .width_mm =62 , + .height_mm =109 , +}; + +static const struct st7703_panel_desc rgb10max3_panel_desc = { + .mode = &rgb10max3_panel_mode, + .lanes =4 , + .mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_MODE_NO_EOT_PACKET |MIPI_DSI_MODE_LPM , + .format =MIPI_DSI_FMT_RGB888 , + .init_sequence = rgb10max3_panel_init_sequence, +}; +static int st7703_enable (struct drm_panel *panel) {struct st7703 *ctx =panel_to_st7703 (panel);
@@ -784,6 +874,7 @@ static void st7703_remove(struct mipi_dsi_device *dsi)static const struct of_device_id st7703_of_match[] = { { .compatible ="anbernic,rg353v-panel-v2" , .data = &rg353v2_desc }, + { .compatible ="powkiddy,rgb10max3-panel" , .data = &rgb10max3_panel_desc }, { .compatible ="powkiddy,rgb30-panel" , .data = &rgb30panel_desc }, { .compatible ="rocktech,jh057n00900" , .data = &jh057n00900_panel_desc }, { .compatible ="xingbangda,xbd599" , .data = &xbd599_desc },
Signature · 1 line
2.34.1
Re: [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
Quoted 7 lines · Chris Morgan
From: Chris Morgan <[email protected]>
The Powkiddy RGB10MAX3 is a handheld device with a 5 inch 720x1280 display panel with a Sitronix ST7703 display controller. The panel is installed rotated 270 degrees.
Signed-off-by Chris Morgan <[email protected]>
Hi Chris,
Thanks,
Jessica Zhang
Quoted 116 lines
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+)drivers/gpu/drm/panel/panel-sitronix-st7703.c +91
-0@@ -521,6 +521,96 @@ static const struct st7703_panel_desc rgb30panel_desc = { .init_sequence = rgb30panel_init_sequence, }; +static int rgb10max3_panel_init_sequence (struct st7703 *ctx) +{ +struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); + +/* Init sequence extracted from Powkiddy RGB10MAX3 BSP kernel. */ + +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEXTC ,0xf1 ,0x12 ,0x83 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETAPID ,0x00 ,0x00 ,0x00 ,0xda , +0x80 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETDISP ,0xc8 ,0x02 ,0x30 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETRGBIF ,0x10 ,0x10 ,0x28 , +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 ,0x04 ,0x04 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x78 ,0x78 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 ,0xf0 , +0x63 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETMIPI ,0x33 ,0x81 ,0x05 ,0xf9 , +0x0e ,0x0e ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x44 ,0x25 ,0x00 ,0x90 ,0x0a ,0x00 , +0x00 ,0x01 ,0x4f ,0x01 ,0x00 ,0x00 ,0x37 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVDC ,0x47 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_BF ,0x02 ,0x11 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETSCR ,0x73 ,0x73 ,0x50 ,0x50 , +0x00 ,0x00 ,0x12 ,0x70 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER ,0x25 ,0x00 ,0x32 , +0x32 ,0x77 ,0xe1 ,0xff ,0xff ,0xcc ,0xcc ,0x77 , +0x77 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETECO ,0x82 ,0x00 ,0xbf ,0xff , +0x00 ,0xff ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETIO ,0xb8 ,0x00 ,0x0a ,0x00 , +0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCABC ,0x10 ,0x40 ,0x1e , +0x02 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPANEL ,0x0b ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGAMMA ,0x00 ,0x04 ,0x07 , +0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b ,0x0e , +0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ,0x00 ,0x04 , +0x07 ,0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b , +0x0e ,0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEQ ,0x03 ,0x03 ,0x03 ,0x03 , +0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0xff ,0x80 , +0xc0 ,0x10 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP1 ,0xc8 ,0x10 ,0x08 ,0x00 , +0x00 ,0x41 ,0xf8 ,0x12 ,0x31 ,0x23 ,0x37 ,0x86 , +0x11 ,0xc8 ,0x37 ,0x2a ,0x00 ,0x00 ,0x0c ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x0c ,0x00 ,0x00 ,0x00 , +0x88 ,0x20 ,0x46 ,0x02 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xff ,0x88 ,0x31 ,0x57 ,0x13 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xff ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP2 ,0x00 ,0x1a ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x8f ,0x13 ,0x31 ,0x75 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xf8 ,0x8f ,0x02 ,0x20 ,0x64 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xf8 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_EF ,0xff ,0xff ,0x01 ); + +return 0 ; +} + +static const struct drm_display_mode rgb10max3_panel_mode = { + .hdisplay =720 , + .hsync_start =720 +40 , + .hsync_end =720 +40 +10 , + .htotal =720 +40 +10 +40 , + .vdisplay =1280 , + .vsync_start =1280 +16 , + .vsync_end =1280 +16 +4 , + .vtotal =1280 +16 +4 +14 , + .clock =63800 , + .flags =DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC , + .width_mm =62 , + .height_mm =109 , +}; + +static const struct st7703_panel_desc rgb10max3_panel_desc = { + .mode = &rgb10max3_panel_mode, + .lanes =4 , + .mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_MODE_NO_EOT_PACKET |MIPI_DSI_MODE_LPM , + .format =MIPI_DSI_FMT_RGB888 , + .init_sequence = rgb10max3_panel_init_sequence, +}; +static int st7703_enable (struct drm_panel *panel) {struct st7703 *ctx =panel_to_st7703 (panel);@@ -784,6 +874,7 @@ static void st7703_remove(struct mipi_dsi_device *dsi)static const struct of_device_id st7703_of_match[] = { { .compatible ="anbernic,rg353v-panel-v2" , .data = &rg353v2_desc }, + { .compatible ="powkiddy,rgb10max3-panel" , .data = &rgb10max3_panel_desc }, { .compatible ="powkiddy,rgb30-panel" , .data = &rgb30panel_desc }, { .compatible ="rocktech,jh057n00900" , .data = &jh057n00900_panel_desc }, { .compatible ="xingbangda,xbd599" , .data = &xbd599_desc },Signature · 1 line
2.34.1
Re: [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
In reply to Chris MorganHi,
Quoted 113 lines · Chris Morgan
From: Chris Morgan <[email protected]>
The Powkiddy RGB10MAX3 is a handheld device with a 5 inch 720x1280 display panel with a Sitronix ST7703 display controller. The panel is installed rotated 270 degrees.
Signed-off-by Chris Morgan <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+)drivers/gpu/drm/panel/panel-sitronix-st7703.c +90
-0@@ -521,6 +521,96 @@ static const struct st7703_panel_desc rgb30panel_desc = { .init_sequence = rgb30panel_init_sequence, }; +static int rgb10max3_panel_init_sequence (struct st7703 *ctx) +{ +struct mipi_dsi_device *dsi =to_mipi_dsi_device (ctx->dev); + +/* Init sequence extracted from Powkiddy RGB10MAX3 BSP kernel. */ + +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEXTC ,0xf1 ,0x12 ,0x83 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETAPID ,0x00 ,0x00 ,0x00 ,0xda , +0x80 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETDISP ,0xc8 ,0x02 ,0x30 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETRGBIF ,0x10 ,0x10 ,0x28 , +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 ,0x04 ,0x04 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVCOM ,0x78 ,0x78 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER_EXT ,0x25 ,0x22 ,0xf0 , +0x63 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETMIPI ,0x33 ,0x81 ,0x05 ,0xf9 , +0x0e ,0x0e ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x44 ,0x25 ,0x00 ,0x90 ,0x0a ,0x00 , +0x00 ,0x01 ,0x4f ,0x01 ,0x00 ,0x00 ,0x37 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETVDC ,0x47 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_BF ,0x02 ,0x11 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETSCR ,0x73 ,0x73 ,0x50 ,0x50 , +0x00 ,0x00 ,0x12 ,0x70 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPOWER ,0x25 ,0x00 ,0x32 , +0x32 ,0x77 ,0xe1 ,0xff ,0xff ,0xcc ,0xcc ,0x77 , +0x77 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETECO ,0x82 ,0x00 ,0xbf ,0xff , +0x00 ,0xff ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETIO ,0xb8 ,0x00 ,0x0a ,0x00 , +0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETCABC ,0x10 ,0x40 ,0x1e , +0x02 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETPANEL ,0x0b ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGAMMA ,0x00 ,0x04 ,0x07 , +0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b ,0x0e , +0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ,0x00 ,0x04 , +0x07 ,0x2a ,0x39 ,0x3f ,0x36 ,0x31 ,0x06 ,0x0b , +0x0e ,0x12 ,0x14 ,0x12 ,0x13 ,0x0f ,0x17 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETEQ ,0x03 ,0x03 ,0x03 ,0x03 , +0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0xff ,0x80 , +0xc0 ,0x10 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP1 ,0xc8 ,0x10 ,0x08 ,0x00 , +0x00 ,0x41 ,0xf8 ,0x12 ,0x31 ,0x23 ,0x37 ,0x86 , +0x11 ,0xc8 ,0x37 ,0x2a ,0x00 ,0x00 ,0x0c ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x0c ,0x00 ,0x00 ,0x00 , +0x88 ,0x20 ,0x46 ,0x02 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xff ,0x88 ,0x31 ,0x57 ,0x13 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xff ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_SETGIP2 ,0x00 ,0x1a ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x8f ,0x13 ,0x31 ,0x75 ,0x88 ,0x88 ,0x88 ,0x88 , +0x88 ,0x88 ,0xf8 ,0x8f ,0x02 ,0x20 ,0x64 ,0x88 , +0x88 ,0x88 ,0x88 ,0x88 ,0x88 ,0xf8 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , +0x00 ); +mipi_dsi_dcs_write_seq (dsi,ST7703_CMD_UNKNOWN_EF ,0xff ,0xff ,0x01 ); + +return 0 ; +} + +static const struct drm_display_mode rgb10max3_panel_mode = { + .hdisplay =720 , + .hsync_start =720 +40 , + .hsync_end =720 +40 +10 , + .htotal =720 +40 +10 +40 , + .vdisplay =1280 , + .vsync_start =1280 +16 , + .vsync_end =1280 +16 +4 , + .vtotal =1280 +16 +4 +14 , + .clock =63800 , + .flags =DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC , + .width_mm =62 , + .height_mm =109 , +}; + +static const struct st7703_panel_desc rgb10max3_panel_desc = { + .mode = &rgb10max3_panel_mode, + .lanes =4 , + .mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_MODE_NO_EOT_PACKET |MIPI_DSI_MODE_LPM , + .format =MIPI_DSI_FMT_RGB888 , + .init_sequence = rgb10max3_panel_init_sequence, +}; +static int st7703_enable (struct drm_panel *panel) {struct st7703 *ctx =panel_to_st7703 (panel);
drivers/gpu/drm/panel/panel-sitronix-st7703.c static void st7703_remove(struct mipi_dsi_device *dsi) · line 880
Quoted 7 lines
drivers/gpu/drm/panel/panel-sitronix-st7703.c +1
-0@@ -784,6 +874,7 @@ static void st7703_remove(struct mipi_dsi_device *dsi)static const struct of_device_id st7703_of_match[] = { { .compatible ="anbernic,rg353v-panel-v2" , .data = &rg353v2_desc }, + { .compatible ="powkiddy,rgb10max3-panel" , .data = &rgb10max3_panel_desc }, { .compatible ="powkiddy,rgb30-panel" , .data = &rgb30panel_desc }, { .compatible ="rocktech,jh057n00900" , .data = &jh057n00900_panel_desc }, { .compatible ="xingbangda,xbd599" , .data = &xbd599_desc },
Cheers,
-- Guido
Quoted 3 lines
Signature · 1 line
2.34.1
PATCH 3/7 dt-bindings: display: Document ST7703 panel rotation
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Document the rotation property for ST7703 based panels.
--- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +2 -0
@@ -46,6 +46,8 @@ properties: backlight: true + rotation: true + required: - compatible - reg
Signature · 1 line
2.34.1
Guido Günther
maintainerRe: [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation
Hi,
Quoted 14 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Document the rotation property for ST7703 based panels.
Signed-off-by Chris Morgan <[email protected]>--- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +0
-0
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml properties: · line 50
Quoted 5 lines
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +2
-0@@ -46,6 +46,8 @@ properties: backlight: true + rotation: true +
I'd avoid newlines here:
backlight: true
rotation: true
(which also seems to match what other panels do). With that
Cheers,
-- Guido
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +0
-0required: - compatible - regSignature · 1 line
2.34.1
Re: [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation
In reply to Chris MorganQuoted 6 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Document the rotation property for ST7703 based panels.
Signed-off-by Chris Morgan <[email protected]>---
(with or without empty line removal)
Best regards,
Krzysztof
PATCH 4/7 drm/panel: st7703: Add Panel Rotation Support
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Add support for panel rotation to ST7703 based devices.
--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/panel/panel-sitronix-st7703.c +13 -0
@@ -62,6 +62,7 @@ struct st7703 {struct dentry *debugfs;const struct st7703_panel_desc *desc; +enum drm_panel_orientation orientation; };struct st7703_panel_desc {
@@ -743,12 +744,20 @@ static int st7703_get_modes(struct drm_panel *panel,return 1 ; } +static enum drm_panel_orientation st7703_get_orientation (struct drm_panel *panel) +{ +struct st7703 *st7703 =panel_to_st7703 (panel); + +return st7703->orientation; +} +static const struct drm_panel_funcs st7703_drm_funcs = { .disable = st7703_disable, .unprepare = st7703_unprepare, .prepare = st7703_prepare, .enable = st7703_enable, .get_modes = st7703_get_modes, + .get_orientation = st7703_get_orientation, };static int allpixelson_set (void *data,u64 val)
@@ -817,6 +826,10 @@ static int st7703_probe(struct mipi_dsi_device *dsi)return dev_err_probe (dev,PTR_ERR (ctx->iovcc),"Failed to request iovcc regulator\n" ); + ret =of_drm_get_panel_orientation (dsi->dev.of_node, &ctx->orientation); +if (ret <0 ) +return dev_err_probe (&dsi->dev, ret,"Failed to get orientation\n" ); +drm_panel_init (&ctx->panel, dev, &st7703_drm_funcs,DRM_MODE_CONNECTOR_DSI );
Signature · 1 line
2.34.1
Re: [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support
Hi,
Quoted 43 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for panel rotation to ST7703 based devices.
Signed-off-by Chris Morgan <[email protected]>--- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/panel/panel-sitronix-st7703.c +9
-0@@ -62,6 +62,7 @@ struct st7703 {struct dentry *debugfs;const struct st7703_panel_desc *desc; +enum drm_panel_orientation orientation; };struct st7703_panel_desc {@@ -743,12 +744,20 @@ static int st7703_get_modes(struct drm_panel *panel,return 1 ; } +static enum drm_panel_orientation st7703_get_orientation (struct drm_panel *panel) +{ +struct st7703 *st7703 =panel_to_st7703 (panel); + +return st7703->orientation; +} +static const struct drm_panel_funcs st7703_drm_funcs = { .disable = st7703_disable, .unprepare = st7703_unprepare, .prepare = st7703_prepare, .enable = st7703_enable, .get_modes = st7703_get_modes, + .get_orientation = st7703_get_orientation, };static int allpixelson_set (void *data,u64 val)
drivers/gpu/drm/panel/panel-sitronix-st7703.c static int st7703_probe(struct mipi_dsi_device *dsi) · line 834
Quoted 9 lines
drivers/gpu/drm/panel/panel-sitronix-st7703.c +4
-0@@ -817,6 +826,10 @@ static int st7703_probe(struct mipi_dsi_device *dsi)return dev_err_probe (dev,PTR_ERR (ctx->iovcc),"Failed to request iovcc regulator\n" ); + ret =of_drm_get_panel_orientation (dsi->dev.of_node, &ctx->orientation); +if (ret <0 ) +return dev_err_probe (&dsi->dev, ret,"Failed to get orientation\n" ); +drm_panel_init (&ctx->panel, dev, &st7703_drm_funcs,DRM_MODE_CONNECTOR_DSI );
Cheers,
-- Guido
Quoted 4 lines
Signature · 2 lines
-- 2.34.1
PATCH 5/7 arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Move the vdd_cpu regulator to the device specific dts. This is in preparation of adding the Powkiddy RGB10MAX3 device, which uses a different vendor for the CPU regulator at a different i2c address.
Also add an alias to the bluetooth device so that we can change the compatible string for the RGB10MAX3. This device uses the same pinouts but a different bluetooth device.
--- .../dts/rockchip/rk3566-powkiddy-rgb30.dts | 18 ++++++++++++++++++ .../dts/rockchip/rk3566-powkiddy-rk2023.dts | 18 ++++++++++++++++++ .../dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 18 +----------------- 3 files changed, 37 insertions(+), 17 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts +18 -0
@@ -37,3 +37,21 @@ mipi_in_panel: endpoint { }; }; }; + +&i2c0 { + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1390000>; + regulator-name = "vdd_cpu"; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sys>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +};
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts +18 -0
@@ -36,3 +36,21 @@ mipi_in_panel: endpoint { }; }; }; + +&i2c0 { + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1390000>; + regulator-name = "vdd_cpu"; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sys>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +};
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi +1 -17
@@ -614,22 +614,6 @@ rk817_charger: charger { rockchip,sleep-filter-current-microamp = <100000>; }; }; - - vdd_cpu: regulator@1c { - compatible = "tcs,tcs4525"; - reg = <0x1c>; - fcs,suspend-voltage-selector = <1>; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <712500>; - regulator-max-microvolt = <1390000>; - regulator-name = "vdd_cpu"; - regulator-ramp-delay = <2300>; - vin-supply = <&vcc_sys>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; }; &i2c5 {
@@ -805,7 +789,7 @@ &uart1 { uart-has-rtscts; status = "okay"; - bluetooth { + bluetooth: bluetooth { compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt"; device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.34.1
PATCH 6/7 dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
The Powkiddy RGB10MAX3 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
@@ -692,6 +692,7 @@ properties: - description: Powkiddy RK3566 Handheld Gaming Console items: - enum: + - powkiddy,rgb10max3 - powkiddy,rgb30 - powkiddy,rk2023 - powkiddy,x55
Signature · 1 line
2.34.1
Re: [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
Quoted 7 lines · Chris Morgan
From: Chris Morgan <[email protected]>
The Powkiddy RGB10MAX3 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC.
Signed-off-by Chris Morgan <[email protected]>---
Best regards,
Krzysztof
PATCH 7/7 arm64: dts: rockchip: Add Powkiddy RGB10MAX3
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Add support for the Powkiddy RGB10MAX3. The Powkiddy RGB10MAX3 is a handheld gaming device with a 720p 5.0 inch screen powered by the Rockchip RK3566 SoC. It includes a Realtek 8723ds WiFi/BT module, 2 ADC joysticks powered by a 4-way muxed ADC channel, and several GPIO face buttons. There are 2 SDMMC slots (sdmmc1 and sdmmc3), 3 pwm controlled LEDs, and the device includes 1GB of RAM.
--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../rockchip/rk3566-powkiddy-rgb10max3.dts | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353vs.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb10max3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rk2023.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-x55.dtb
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: (subset) [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3
In reply to Chris MorganQuoted 15 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for the Powkiddy RGB10MAX3 handheld gaming console.
[1] https://powkiddy.com/products/pre-sale-powkiddy-rgb10max3-handheld-game-console
Chris Morgan (7):
dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
dt-bindings: display: Document ST7703 panel rotation drm/panel: st7703: Add Panel Rotation Support
arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3
dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
arm64: dts: rockchip: Add Powkiddy RGB10MAX3
Quoted 1 line
[...]
Applied, thanks!
[1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel
commit: 9913a60f318b6c88ea8385048952e3557464bb84
[2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
commit: e0c732291250e205fb834881ad7ecf9ee3ffef45
[3/7] dt-bindings: display: Document ST7703 panel rotation
commit: 20b18c2be4f3dcb5448ecc122484bef6c2852fdd
[4/7] drm/panel: st7703: Add Panel Rotation Support
commit: 762195e5c26936b891fb54ba0183aa3ef366b41eI've adapted the binding subjects to poin to the rocktech,jh057n00900 panel that gets changed and also dropped the one added newline as requested by Guido.
Best regards,
Signature · 6 lines
Heiko Stuebner <[email protected]> _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: (subset) [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3
In reply to Chris MorganQuoted 15 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for the Powkiddy RGB10MAX3 handheld gaming console.
[1] https://powkiddy.com/products/pre-sale-powkiddy-rgb10max3-handheld-game-console
Chris Morgan (7):
dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support
dt-bindings: display: Document ST7703 panel rotation drm/panel: st7703: Add Panel Rotation Support
arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3
dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
arm64: dts: rockchip: Add Powkiddy RGB10MAX3
Quoted 1 line
[...]
Applied, thanks!
[5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3
commit: 039a03c377d64ec832a8fb1b8f8b5badd404989f
[6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3
commit: fbe7823623a8c02759afdfb521709f4fa216849a
[7/7] arm64: dts: rockchip: Add Powkiddy RGB10MAX3
commit: 4b325c0d4f539b553a4529f16476f08757779293Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>