* [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 @ 2024-02-12 18:49 Chris Morgan 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan ` (8 more replies) 0 siblings, 9 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> 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 -- 2.34.1 ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-13 8:00 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Chris Morgan ` (7 subsequent siblings) 8 siblings, 2 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> 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 <macromorgan@hotmail.com> --- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml index 97cccd8a8479..8dfe8951bf5b 100644 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -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 -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan @ 2024-02-13 8:00 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Guido Günther @ 2024-02-13 8:00 UTC (permalink / raw) To: Chris Morgan Cc: linux-rockchip, devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan Hi, On Mon, Feb 12, 2024 at 12:49:44PM -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 <macromorgan@hotmail.com> > --- > .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > index 97cccd8a8479..8dfe8951bf5b 100644 > --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > @@ -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 Reviewed-by: Guido Günther <agx@sigxcpu.org> Cheers, -- Guido > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan 2024-02-13 8:00 ` Guido Günther @ 2024-02-13 11:51 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Krzysztof Kozlowski @ 2024-02-13 11:51 UTC (permalink / raw) To: Chris Morgan, linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan On 12/02/2024 19:49, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 <macromorgan@hotmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-12 21:13 ` Jessica Zhang 2024-02-13 8:01 ` Guido Günther 2024-02-12 18:49 ` [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Chris Morgan ` (6 subsequent siblings) 8 siblings, 2 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> 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 <macromorgan@hotmail.com> --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index b55bafd1a8be..939ba05c9b58 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -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 }, -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support 2024-02-12 18:49 ` [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Chris Morgan @ 2024-02-12 21:13 ` Jessica Zhang 2024-02-13 8:01 ` Guido Günther 1 sibling, 0 replies; 18+ messages in thread From: Jessica Zhang @ 2024-02-12 21:13 UTC (permalink / raw) To: Chris Morgan, linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan On 2/12/2024 10:49 AM, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 <macromorgan@hotmail.com> Hi Chris, Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> Thanks, Jessica Zhang > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ > 1 file changed, 91 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index b55bafd1a8be..939ba05c9b58 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -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 }, > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support 2024-02-12 18:49 ` [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Chris Morgan 2024-02-12 21:13 ` Jessica Zhang @ 2024-02-13 8:01 ` Guido Günther 1 sibling, 0 replies; 18+ messages in thread From: Guido Günther @ 2024-02-13 8:01 UTC (permalink / raw) To: Chris Morgan Cc: linux-rockchip, devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan Hi, On Mon, Feb 12, 2024 at 12:49:45PM -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 <macromorgan@hotmail.com> > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ > 1 file changed, 91 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index b55bafd1a8be..939ba05c9b58 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -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 }, Reviewed-by: Guido Günther <agx@sigxcpu.org> Cheers, -- Guido > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan 2024-02-12 18:49 ` [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-13 8:04 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support Chris Morgan ` (5 subsequent siblings) 8 siblings, 2 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> Document the rotation property for ST7703 based panels. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> --- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml index 8dfe8951bf5b..97e0d14790e3 100644 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -46,6 +46,8 @@ properties: backlight: true + rotation: true + required: - compatible - reg -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation 2024-02-12 18:49 ` [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Chris Morgan @ 2024-02-13 8:04 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Guido Günther @ 2024-02-13 8:04 UTC (permalink / raw) To: Chris Morgan Cc: linux-rockchip, devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan Hi, On Mon, Feb 12, 2024 at 12:49:46PM -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Document the rotation property for ST7703 based panels. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- > .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > index 8dfe8951bf5b..97e0d14790e3 100644 > --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml > @@ -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 Reviewd-by: Guido Günther <agx@sigxcpu.org> Cheers, -- Guido > required: > - compatible > - reg > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation 2024-02-12 18:49 ` [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Chris Morgan 2024-02-13 8:04 ` Guido Günther @ 2024-02-13 11:51 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Krzysztof Kozlowski @ 2024-02-13 11:51 UTC (permalink / raw) To: Chris Morgan, linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan On 12/02/2024 19:49, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Document the rotation property for ST7703 based panels. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> (with or without empty line removal) Best regards, Krzysztof ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (2 preceding siblings ...) 2024-02-12 18:49 ` [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-13 8:05 ` Guido Günther 2024-02-12 18:49 ` [PATCH 5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3 Chris Morgan ` (4 subsequent siblings) 8 siblings, 1 reply; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> Add support for panel rotation to ST7703 based devices. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 939ba05c9b58..a3e142f156d5 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -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); -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support 2024-02-12 18:49 ` [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support Chris Morgan @ 2024-02-13 8:05 ` Guido Günther 0 siblings, 0 replies; 18+ messages in thread From: Guido Günther @ 2024-02-13 8:05 UTC (permalink / raw) To: Chris Morgan Cc: linux-rockchip, devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan Hi, On Mon, Feb 12, 2024 at 12:49:47PM -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Add support for panel rotation to ST7703 based devices. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index 939ba05c9b58..a3e142f156d5 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -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); Reviewed-by: Guido Günther <agx@sigxcpu.org> Cheers, -- Guido > > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (3 preceding siblings ...) 2024-02-12 18:49 ` [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-12 18:49 ` [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 Chris Morgan ` (3 subsequent siblings) 8 siblings, 0 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> 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. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> --- .../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(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts index 0ac64f043b80..1f567a14ac84 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts @@ -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; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts index ba32d0793dca..bc9933d9e262 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts @@ -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; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi index 0fa8f06f94cd..3ab751a01cb2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi @@ -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>; -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (4 preceding siblings ...) 2024-02-12 18:49 ` [PATCH 5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3 Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-13 11:52 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 7/7] arm64: dts: " Chris Morgan ` (2 subsequent siblings) 8 siblings, 1 reply; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> The Powkiddy RGB10MAX3 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> --- Documentation/devicetree/bindings/arm/rockchip.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index 5cf5cbef2cf5..4ab0b92cf241 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -692,6 +692,7 @@ properties: - description: Powkiddy RK3566 Handheld Gaming Console items: - enum: + - powkiddy,rgb10max3 - powkiddy,rgb30 - powkiddy,rk2023 - powkiddy,x55 -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 2024-02-12 18:49 ` [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 Chris Morgan @ 2024-02-13 11:52 ` Krzysztof Kozlowski 0 siblings, 0 replies; 18+ messages in thread From: Krzysztof Kozlowski @ 2024-02-13 11:52 UTC (permalink / raw) To: Chris Morgan, linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan On 12/02/2024 19:49, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > The Powkiddy RGB10MAX3 is a handheld gaming device made by Powkiddy and > powered by the Rockchip RK3566 SoC. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 7/7] arm64: dts: rockchip: Add Powkiddy RGB10MAX3 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (5 preceding siblings ...) 2024-02-12 18:49 ` [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 Chris Morgan @ 2024-02-12 18:49 ` Chris Morgan 2024-02-13 18:55 ` (subset) [PATCH 0/7] Add Support for RK3566 " Heiko Stuebner 2024-02-13 19:16 ` Heiko Stuebner 8 siblings, 0 replies; 18+ messages in thread From: Chris Morgan @ 2024-02-12 18:49 UTC (permalink / raw) To: linux-rockchip Cc: devicetree, dri-devel, tzimmermann, mripard, maarten.lankhorst, daniel, airlied, sam, quic_jesszhan, neil.armstrong, megi, kernel, agx, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan From: Chris Morgan <macromorgan@hotmail.com> 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. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> --- 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 diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index a7b30e11beaf..3c4f87e4db61 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -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 diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts new file mode 100644 index 000000000000..fd1a01744a25 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/linux-event-codes.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3566-powkiddy-rk2023.dtsi" + +/ { + model = "Powkiddy RGB10MAX3"; + compatible = "powkiddy,rgb10max3", "rockchip,rk3566"; +}; + +&bluetooth { + compatible = "realtek,rtl8723ds-bt"; +}; + +&cru { + assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>, + <&pmucru PLL_PPLL>, <&cru PLL_VPLL>; + assigned-clock-rates = <32768>, <1200000000>, + <200000000>, <126400000>; +}; + +&dsi0 { + panel: panel@0 { + compatible = "powkiddy,rgb10max3-panel"; + reg = <0>; + backlight = <&backlight>; + iovcc-supply = <&vcc3v3_lcd0_n>; + pinctrl-0 = <&lcd_rst>; + pinctrl-names = "default"; + reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; + rotation = <270>; + vcc-supply = <&vcc3v3_lcd0_n>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; +}; + +&green_led { + default-state = "on"; + function = LED_FUNCTION_POWER; +}; + +&i2c0 { + vdd_cpu: regulator@40 { + compatible = "fcs,fan53555"; + reg = <0x40>; + 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; + }; + }; +}; + +&leds { + amber_led: led-2 { + color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_CHARGING; + max-brightness = <255>; + pwms = <&pwm0 0 25000 0>; + }; +}; + +&pwm0 { + pinctrl-0 = <&pwm0m1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&red_led { + default-state = "off"; + function = LED_FUNCTION_STATUS; +}; -- 2.34.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: (subset) [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (6 preceding siblings ...) 2024-02-12 18:49 ` [PATCH 7/7] arm64: dts: " Chris Morgan @ 2024-02-13 18:55 ` Heiko Stuebner 2024-02-13 19:16 ` Heiko Stuebner 8 siblings, 0 replies; 18+ messages in thread From: Heiko Stuebner @ 2024-02-13 18:55 UTC (permalink / raw) To: linux-rockchip, Chris Morgan Cc: Heiko Stuebner, conor+dt, quic_jesszhan, tzimmermann, agx, Chris Morgan, neil.armstrong, megi, kernel, dri-devel, robh+dt, airlied, daniel, mripard, maarten.lankhorst, devicetree, sam, krzysztof.kozlowski+dt On Mon, 12 Feb 2024 12:49:43 -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 > > [...] 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: 762195e5c26936b891fb54ba0183aa3ef366b41e I'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, -- Heiko Stuebner <heiko@sntech.de> ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: (subset) [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan ` (7 preceding siblings ...) 2024-02-13 18:55 ` (subset) [PATCH 0/7] Add Support for RK3566 " Heiko Stuebner @ 2024-02-13 19:16 ` Heiko Stuebner 8 siblings, 0 replies; 18+ messages in thread From: Heiko Stuebner @ 2024-02-13 19:16 UTC (permalink / raw) To: linux-rockchip, Chris Morgan Cc: Heiko Stuebner, sam, tzimmermann, krzysztof.kozlowski+dt, robh+dt, kernel, quic_jesszhan, conor+dt, maarten.lankhorst, daniel, airlied, Chris Morgan, megi, devicetree, dri-devel, neil.armstrong, mripard, agx On Mon, 12 Feb 2024 12:49:43 -0600, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > 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 > > [...] 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: 4b325c0d4f539b553a4529f16476f08757779293 Best regards, -- Heiko Stuebner <heiko@sntech.de> ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2024-02-13 19:16 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-02-12 18:49 [PATCH 0/7] Add Support for RK3566 Powkiddy RGB10MAX3 Chris Morgan 2024-02-12 18:49 ` [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Chris Morgan 2024-02-13 8:00 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Chris Morgan 2024-02-12 21:13 ` Jessica Zhang 2024-02-13 8:01 ` Guido Günther 2024-02-12 18:49 ` [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Chris Morgan 2024-02-13 8:04 ` Guido Günther 2024-02-13 11:51 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support Chris Morgan 2024-02-13 8:05 ` Guido Günther 2024-02-12 18:49 ` [PATCH 5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3 Chris Morgan 2024-02-12 18:49 ` [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 Chris Morgan 2024-02-13 11:52 ` Krzysztof Kozlowski 2024-02-12 18:49 ` [PATCH 7/7] arm64: dts: " Chris Morgan 2024-02-13 18:55 ` (subset) [PATCH 0/7] Add Support for RK3566 " Heiko Stuebner 2024-02-13 19:16 ` Heiko Stuebner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).