drm: panel: add support for the Khadas TS050 panel
Subsystems (4)
v2 cover drm: panel: add support for the Khadas TS050 panel
This add support & bindings for the Khadas TS050 1080x1920 5" LCD DSI panel designed to work with the Khadas Edge-V, Captain, VIM3 and VIM3L Single Board Computers. It provides a MIPI DSI interface to the host, a built-in LED backlight and touch controller.
Changes since v1:
- removed drm_print include
- added reset_gpio to 1 after prepare failure
- now ignore regulator_disable() on prepare failure
- mark prepared=false whatever the result of the unprepare function errors
- also reset_gpio to 1 on unprepare
- do not return on mipi_dsi_dcs_enter_sleep_mode error on unprepare
- mark enabled=true unconditionnally
- use dev_err_probe in probe()
Neil Armstrong (2):
dt-bindings: panel-simple-dsi: add Khadas TS050 panel bindings
drm: panel: add Khadas TS050 panel driver
.../display/panel/panel-simple-dsi.yaml | 2 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-khadas-ts050.c | 866 ++++++++++++++++++ 4 files changed, 880 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-khadas-ts050.c
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/2 dt-bindings: panel-simple-dsi: add Khadas TS050 panel bindings
This add the bindings for the Khadas TS050 1080x1920 5" LCD DSI panel designed to work with the Khadas Edge-V, Captain, VIM3 and VIM3L Single Board Computers.
--- .../devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml +2 -0
@@ -35,6 +35,8 @@ properties: - boe,tv080wum-nl0 # Innolux P079ZCA 7.85" 768x1024 TFT LCD panel - innolux,p079zca + # Khadas TS050 5" 1080x1920 LCD panel + - khadas,ts050 # Kingdisplay KD097D04 9.7" 1536x2048 TFT LCD panel - kingdisplay,kd097d04 # LG ACX467AKM-7 4.95" 1080×1920 LCD Panel
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 2/2 drm: panel: add Khadas TS050 panel driver
In reply to Neil ArmstrongThis add support for the Khadas TS050 1080x1920 5" LCD DSI panel designed to work with the Khadas Edge-V, Captain, VIM3 and VIM3L Single Board Computers. It provides a MIPI DSI interface to the host, a built-in LED backlight and touch controller.
The init values was taken from the vendor source tree, comments were added to the know values but most of the init table is undocumented.
--- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-khadas-ts050.c | 866 +++++++++++++++++++++ 3 files changed, 878 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-khadas-ts050.c
drivers/gpu/drm/panel/Kconfig +11 -0
@@ -145,6 +145,17 @@ config DRM_PANEL_JDI_LT070ME05000 The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses 24 bit per pixel. +config DRM_PANEL_KHADAS_TS050 + tristate "Khadas TS050 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Khadas TS050 TFT-LCD + panel module. The panel has a 1080x1920 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host, a built-in LED backlight and touch controller. + config DRM_PANEL_KINGDISPLAY_KD097D04 tristate "Kingdisplay kd097d04 panel" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o +obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o
drivers/gpu/drm/panel/panel-khadas-ts050.c new file +866 -0
866 lines not on this page · raw message
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 2/2] drm: panel: add Khadas TS050 panel driver
Hi Neil,
Quoted 15 lines
drivers/gpu/drm/panel/panel-khadas-ts050.c new file +15
-0+ +static int khadas_ts050_panel_probe (struct mipi_dsi_device *dsi) +{ +struct khadas_ts050_panel *khadas_ts050; +int err; + + dsi->lanes =4 ; + dsi->format =MIPI_DSI_FMT_RGB888 ; + dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_MODE_LPM |MIPI_DSI_MODE_EOT_PACKET ; + + khadas_ts050 =devm_kzalloc (&dsi->dev,sizeof (*khadas_ts050), +GFP_KERNEL ); +if (!khadas_ts050) +return -ENOMEM ;
drivers/gpu/drm/panel/panel-khadas-ts050.c line 827
Quoted 10 lines
drivers/gpu/drm/panel/panel-khadas-ts050.c new file +10
-0+ +mipi_dsi_set_drvdata (dsi, khadas_ts050); + khadas_ts050->link = dsi; + + err =khadas_ts050_panel_add (khadas_ts050); +if (err <0 ) +return err; + +return mipi_dsi_attach (dsi); +}
If mipi_dsi_attach() failes then da a drm_panel_remove() like this:
ret = mipi_dsi_attach(dsi); if (ret) drm_panel_remove(&khadas_ts050->base); return ret;
This is again something several panels gets wrong.
With this fixed:
I assume you will fix it while applying.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 2/2] drm: panel: add Khadas TS050 panel driver
Hi,
Quoted 36 lines · Sam Ravnborg
Hi Neil,
Quoted 15 lines
drivers/gpu/drm/panel/panel-khadas-ts050.c new file +15
-0+ +static int khadas_ts050_panel_probe (struct mipi_dsi_device *dsi) +{ +struct khadas_ts050_panel *khadas_ts050; +int err; + + dsi->lanes =4 ; + dsi->format =MIPI_DSI_FMT_RGB888 ; + dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST | +MIPI_DSI_MODE_LPM |MIPI_DSI_MODE_EOT_PACKET ; + + khadas_ts050 =devm_kzalloc (&dsi->dev,sizeof (*khadas_ts050), +GFP_KERNEL ); +if (!khadas_ts050) +return -ENOMEM ;drivers/gpu/drm/panel/panel-khadas-ts050.c line 827
Quoted 10 lines
drivers/gpu/drm/panel/panel-khadas-ts050.c new file +10
-0+ +mipi_dsi_set_drvdata (dsi, khadas_ts050); + khadas_ts050->link = dsi; + + err =khadas_ts050_panel_add (khadas_ts050); +if (err <0 ) +return err; + +return mipi_dsi_attach (dsi); +}If
mipi_dsi_attach()failes then da adrm_panel_remove()like this:ret = mipi_dsi_attach(dsi); if (ret) drm_panel_remove(&khadas_ts050->base); return ret;
Quoted 6 lines
This is again something several panels gets wrong.
With this fixed:
Reviewed-by Sam Ravnborg <[email protected]>I assume you will fix it while applying.
Sure, thanks !
Neil
Quoted 3 lines
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel