Add video drivers for endeavoru and p880/p895
Subsystems (2)
cover Add video drivers for endeavoru and p880/p895
This patchset contains mostly generic drivers used by endeavoru and p895/p880 (which are currently in the process of merging). Drivers do not contain any device specific parts and mostly can be used by any device with supported hardware.
LG P880\P895 related drivers:
- lm3533 backlight driver implements only backlight part for bank A. Unfortunately, I can not test and set up bank B since my device does not use it.
- Solomon ssd2825 bridge is fully implemented for 3wire-9bit mode. It uses SPI interface and is wrapped into panel DM for wider compatibility.
- 2 DSI panels which use Renesas R61307 and R69328 controllers are fully implemented as well.
HTC One X (endeavoru) related drivers:
- backlight driver which uses a PWM source provided by the display controller.
- endeavoru uses panels made by 3 different vendors but the command sequence seems to be generally the same. Endeavoru panel driver is set to support all 3 variants of this panel.
Svyatoslav Ryhel (6):
video: add lm3533 backlight driver
video: bridge: add Solomon SSD2825 DSI/LVDS driver
video: panel: add Renesas R61307 MIPI DSI panel driver
video: panel: add Renesas R69328 MIPI DSI panel driver
video: tegra: add DC based PWM backlight driver
video: panel: add generic endeavoru panel
drivers/video/Kconfig | 37 ++ drivers/video/Makefile | 4 + drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 ++++++++++++++++++++ drivers/video/endeavoru-panel.c | 252 ++++++++++ drivers/video/lm3533_backlight.c | 135 +++++ drivers/video/renesas-r61307.c | 296 +++++++++++ drivers/video/renesas-r69328.c | 232 +++++++++ drivers/video/tegra20/Kconfig | 7 + drivers/video/tegra20/Makefile | 1 + drivers/video/tegra20/tegra-pwm-backlight.c | 155 ++++++ 12 files changed, 1650 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c create mode 100644 drivers/video/endeavoru-panel.c create mode 100644 drivers/video/lm3533_backlight.c create mode 100644 drivers/video/renesas-r61307.c create mode 100644 drivers/video/renesas-r69328.c create mode 100644 drivers/video/tegra20/tegra-pwm-backlight.c
Signature · 1 line
2.37.2
PATCH 1/6 video: add lm3533 backlight driver
This is basic lm3533 driver only with bank A and
backlight cell support.
--- drivers/video/Kconfig | 8 ++ drivers/video/Makefile | 1 + drivers/video/lm3533_backlight.c | 135 +++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 drivers/video/lm3533_backlight.c
drivers/video/Kconfig +8 -0
@@ -606,6 +606,14 @@ config ATMEL_HLCD help HLCDC supports video output to an attached LCD panel. +config BACKLIGHT_LM3533 + bool "Backlight Driver for LM3533" + depends on BACKLIGHT + select DM_I2C + help + Say Y to enable the backlight driver for National Semiconductor / TI + LM3533 Lighting Power chips. + source "drivers/video/ti/Kconfig" source "drivers/video/exynos/Kconfig"
drivers/video/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o endif +obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_backlight.o obj-${CONFIG_EXYNOS_FB} += exynos/ obj-${CONFIG_VIDEO_ROCKCHIP} += rockchip/ obj-${CONFIG_VIDEO_STM32} += stm32/
drivers/video/lm3533_backlight.c new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.37.2
Re: [PATCH v1 1/6] video: add lm3533 backlight driver
Quoted 7 lines · Svyatoslav Ryhel
This is basic lm3533 driver only with bank A and
backlight cell support.
Quoted 7 lines
--- drivers/video/Kconfig | 8 ++ drivers/video/Makefile | 1 + drivers/video/lm3533_backlight.c | 135 +++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 drivers/video/lm3533_backlight.c
Quoted 5 lines
drivers/video/Kconfig +0
-0
drivers/video/Kconfig config ATMEL_HLCD · line 615
Quoted 10 lines
drivers/video/Kconfig +7
-0@@ -606,6 +606,14 @@ config ATMEL_HLCD help HLCDC supports video output to an attached LCD panel. +config BACKLIGHT_LM3533 + bool "Backlight Driver for LM3533" + depends on BACKLIGHT + select DM_I2C + help + Say Y to enable the backlight driver for National Semiconductor / TI + LM3533 Lighting Power chips.
Would be good to mention that it supports a programmable brightness level. We are supposed to have at least 3 lines of help, so think of useful info to add.
Regards,
Simon
PATCH 2/6 video: bridge: add Solomon SSD2825 DSI/LVDS driver
In reply to Svyatoslav RyhelSSD2825 is an innovative and cost-effective MIPI Bridge Chip solution targeting high resolution smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive extremely high resolution display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS advanced panel technologies for smartphone applications.
Bridge is wrapped in panel uClass model for wider compatibility.
--- drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 +++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c
drivers/video/bridge/Kconfig +7 -0
@@ -33,3 +33,10 @@ config VIDEO_BRIDGE_ANALOGIX_ANX6345 help The Analogix ANX6345 is RGB-to-DP converter. It enables an eDP LCD panel to be connected to an parallel LCD interface. + +config VIDEO_BRIDGE_SOLOMON_SSD2825 + bool "Solomon SSD2825 bridge driver" + depends on PANEL && DM_GPIO + select VIDEO_MIPI_DSI + help + Solomon SSD2824 SPI RGB-DSI bridge driver wrapped into panel uClass.
drivers/video/bridge/Makefile +1 -0
@@ -7,3 +7,4 @@ obj-$(CONFIG_VIDEO_BRIDGE) += video-bridge-uclass.o obj-$(CONFIG_VIDEO_BRIDGE_PARADE_PS862X) += ps862x.o obj-$(CONFIG_VIDEO_BRIDGE_NXP_PTN3460) += ptn3460.o obj-$(CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345) += anx6345.o +obj-$(CONFIG_VIDEO_BRIDGE_SOLOMON_SSD2825) += ssd2825.o
drivers/video/bridge/ssd2825.c new file +523 -0
523 lines not on this page · raw message
Signature · 1 line
2.37.2
Re: [PATCH v1 2/6] video: bridge: add Solomon SSD2825 DSI/LVDS driver
Hi Svyatoslav,
Quoted 19 lines · Svyatoslav Ryhel
SSD2825 is an innovative and cost-effective MIPI Bridge Chip solution targeting high resolution smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive extremely high resolution display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS advanced panel technologies for smartphone applications.
Bridge is wrapped in panel uClass model for wider compatibility.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 +++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c
[..]
drivers/video/bridge/ssd2825.c line 135
Quoted 11 lines
drivers/video/bridge/ssd2825.c new file +11
-0+static int ssd2825_spi_write (struct udevice *dev,int reg, +const void *buf,int flags) +{ +struct spi_slave *slave =dev_get_parent_priv (dev); +u8 command[2 ]; + +if (flags &SSD2825_CMD_SEND ) { + command[0 ] =SSD2825_CMD_MASK ; + command[1 ] = reg; +spi_xfer (slave,9 , &command, +NULL ,SPI_XFER_ONCE );
Please can you use dm_spi_xfer() instead, thoughout?
Also note that when you add a printf() for errors, the string is stored and it increases code size. It might be better to use log_debug(), unless the errors are likely.
[..]
Regards,
Simon
Re: [PATCH v1 2/6] video: bridge: add Solomon SSD2825 DSI/LVDS driver
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 26 lines
Hi Svyatoslav,
Quoted 19 lines · Svyatoslav Ryhel
SSD2825 is an innovative and cost-effective MIPI Bridge Chip solution targeting high resolution smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive extremely high resolution display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS advanced panel technologies for smartphone applications.
Bridge is wrapped in panel uClass model for wider compatibility.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 +++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c[..]
Quoted 14 lines
drivers/video/bridge/ssd2825.c line 135
Quoted 11 lines
drivers/video/bridge/ssd2825.c new file +11
-0+static int ssd2825_spi_write (struct udevice *dev,int reg, +const void *buf,int flags) +{ +struct spi_slave *slave =dev_get_parent_priv (dev); +u8 command[2 ]; + +if (flags &SSD2825_CMD_SEND ) { + command[0 ] =SSD2825_CMD_MASK ; + command[1 ] = reg; +spi_xfer (slave,9 , &command, +NULL ,SPI_XFER_ONCE );Please can you use
dm_spi_xfer()instead, thoughout?
I will replace it, but isn't spi_xfer preferable over dm_spi_xfer? I remember that I had doubts about which to use.
Quoted 8 lines
Also note that when you add a
printf()for errors, the string is stored and it increases code size. It might be better to uselog_debug(), unless the errors are likely.[..]
Regards,
Simon
Re: [PATCH v1 2/6] video: bridge: add Solomon SSD2825 DSI/LVDS driver
Hi Svyatoslav,
Quoted 43 lines · Svyatoslav Ryhel
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 26 lines
Hi Svyatoslav,
Quoted 19 lines · Svyatoslav Ryhel
SSD2825 is an innovative and cost-effective MIPI Bridge Chip solution targeting high resolution smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive extremely high resolution display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS advanced panel technologies for smartphone applications.
Bridge is wrapped in panel uClass model for wider compatibility.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 +++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c[..]
Quoted 14 lines
drivers/video/bridge/ssd2825.c line 135
Quoted 11 lines
drivers/video/bridge/ssd2825.c new file +11
-0+static int ssd2825_spi_write (struct udevice *dev,int reg, +const void *buf,int flags) +{ +struct spi_slave *slave =dev_get_parent_priv (dev); +u8 command[2 ]; + +if (flags &SSD2825_CMD_SEND ) { + command[0 ] =SSD2825_CMD_MASK ; + command[1 ] = reg; +spi_xfer (slave,9 , &command, +NULL ,SPI_XFER_ONCE );Please can you use
dm_spi_xfer()instead, thoughout?
Quoted 2 lines
I will replace it, but isn't
spi_xferpreferable overdm_spi_xfer? I remember that I had doubts about which to use.
No, we should use the dm variants where available, since then we can drop the old ones.
It might be time for the SPI maintainer to take a look.
+Jagan Teki +Vignesh R for that
[..]
Regards,
Simon
Re: [PATCH v1 2/6] video: bridge: add Solomon SSD2825 DSI/LVDS driver
чт, 20 квіт. 2023 р. о 19:30 Simon Glass <[email protected]> пише:
Quoted 47 lines
Hi Svyatoslav,
Quoted 43 lines · Svyatoslav Ryhel
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 40 lines
Hi Svyatoslav,
Quoted 19 lines · Svyatoslav Ryhel
SSD2825 is an innovative and cost-effective MIPI Bridge Chip solution targeting high resolution smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI interface to drive extremely high resolution display modules of up to 800 x 1366, while supporting AMOLED, a-si LCD or LTPS advanced panel technologies for smartphone applications.
Bridge is wrapped in panel uClass model for wider compatibility.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/video/bridge/Kconfig | 7 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/ssd2825.c | 523 +++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 drivers/video/bridge/ssd2825.c[..]
drivers/video/bridge/ssd2825.c line 135
Quoted 11 lines
drivers/video/bridge/ssd2825.c new file +11
-0+static int ssd2825_spi_write (struct udevice *dev,int reg, +const void *buf,int flags) +{ +struct spi_slave *slave =dev_get_parent_priv (dev); +u8 command[2 ]; + +if (flags &SSD2825_CMD_SEND ) { + command[0 ] =SSD2825_CMD_MASK ; + command[1 ] = reg; +spi_xfer (slave,9 , &command, +NULL ,SPI_XFER_ONCE );Please can you use
dm_spi_xfer()instead, thoughout?
Quoted 6 lines
Quoted 2 lines
I will replace it, but isn't
spi_xferpreferable overdm_spi_xfer? I remember that I had doubts about which to use.No, we should use the dm variants where available, since then we can drop the old ones.
I have switched to the dm version and it seems to fit even better, everything works perfectly fine.
Quoted 8 lines
It might be time for the SPI maintainer to take a look.
+Jagan Teki +Vignesh R for that
[..]
Regards,
Simon
Re: [PATCH v1 2/6] video: bridge: add Solomon SSD2825 DSI/LVDS driver
Quoted 15 lines · Svyatoslav Ryhel
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
..]
drivers/video/bridge/ssd2825.c line 135
Quoted 11 lines
drivers/video/bridge/ssd2825.c new file +11
-0+static int ssd2825_spi_write (struct udevice *dev,int reg, +const void *buf,int flags) +{ +struct spi_slave *slave =dev_get_parent_priv (dev); +u8 command[2 ]; + +if (flags &SSD2825_CMD_SEND ) { + command[0 ] =SSD2825_CMD_MASK ; + command[1 ] = reg; +spi_xfer (slave,9 , &command, +NULL ,SPI_XFER_ONCE );Please can you use
dm_spi_xfer()instead, thoughout?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I will replace it, but isn't
spi_xferpreferable overdm_spi_xfer? I remember that I had doubts about which to use.No, we should use the dm variants where available, since then we can drop the old ones.
I have switched to the dm version and it seems to fit even better, everything works perfectly fine.
Yes, please switch to dm_spi_xfer() for DM compatible clients.
Signature · 2 lines
Regards Vignesh
PATCH 3/6 video: panel: add Renesas R61307 MIPI DSI panel driver
In reply to Svyatoslav RyhelR61307 is liquid crystal driver for high-definition amorphous silicon (a-Si) panels and is ideal for tablets and smartphones.
Supported compatibles are:
- koe,tx13d100vm0eaa
- hitachi,tx13d100vm0eaa
--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/renesas-r61307.c | 296 +++++++++++++++++++++++++++++++++ 3 files changed, 306 insertions(+) create mode 100644 drivers/video/renesas-r61307.c
drivers/video/Kconfig +9 -0
@@ -480,6 +480,15 @@ config VIDEO_LCD_RAYDIUM_RM68200 Say Y here if you want to enable support for Raydium RM68200 720x1280 DSI video mode panel. +config VIDEO_LCD_RENESAS_R61307 + tristate "Renesas R61307 DSI video mode panel" + depends on PANEL && BACKLIGHT + select VIDEO_MIPI_DSI + help + Say Y here if you want to enable support for KOE tx13d100vm0eaa + IPS-LCD module with Renesas R69328 IC. The panel has a 1024x768 + resolution and uses 24 bit RGB per pixel. + config VIDEO_LCD_SSD2828 bool "SSD2828 bridge chip" ---help---
drivers/video/Makefile +1 -0
@@ -56,6 +56,7 @@ obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o +obj-$(CONFIG_VIDEO_LCD_RENESAS_R61307) += renesas-r61307.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o obj-$(CONFIG_VIDEO_LCD_TDO_TL070WSH30) += tdo-tl070wsh30.o obj-$(CONFIG_VIDEO_MCDE_SIMPLE) += mcde_simple.o
drivers/video/renesas-r61307.c new file +296 -0
296 lines not on this page · raw message
Signature · 1 line
2.37.2
Re: [PATCH v1 3/6] video: panel: add Renesas R61307 MIPI DSI panel driver
Quoted 12 lines · Svyatoslav Ryhel
R61307 is liquid crystal driver for high-definition amorphous silicon (a-Si) panels and is ideal for tablets and smartphones.
Supported compatibles are:
- koe,tx13d100vm0eaa
- hitachi,tx13d100vm0eaa
Quoted 7 lines
--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/renesas-r61307.c | 296 +++++++++++++++++++++++++++++++++ 3 files changed, 306 insertions(+) create mode 100644 drivers/video/renesas-r61307.c
Best to use lower-case hex consistently.
PATCH 4/6 video: panel: add Renesas R69328 MIPI DSI panel driver
In reply to Svyatoslav RyhelDriver adds support for panels with Renesas R69328 IC
Currently supported compatible is:
- jdi,dx12d100vm0eaa
--- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/renesas-r69328.c | 232 +++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 drivers/video/renesas-r69328.c
drivers/video/Kconfig +9 -0
@@ -489,6 +489,15 @@ config VIDEO_LCD_RENESAS_R61307 IPS-LCD module with Renesas R69328 IC. The panel has a 1024x768 resolution and uses 24 bit RGB per pixel. +config VIDEO_LCD_RENESAS_R69328 + tristate "Renesas R69328 720x1280 DSI video mode panel" + depends on PANEL && BACKLIGHT + select VIDEO_MIPI_DSI + help + Say Y here if you want to enable support for JDI dx12d100vm0eaa + IPS-LCD module with Renesas R69328 IC. The panel has a 720x1280 + resolution and uses 24 bit RGB per pixel. + config VIDEO_LCD_SSD2828 bool "SSD2828 bridge chip" ---help---
drivers/video/Makefile +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o obj-$(CONFIG_VIDEO_LCD_RENESAS_R61307) += renesas-r61307.o +obj-$(CONFIG_VIDEO_LCD_RENESAS_R69328) += renesas-r69328.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o obj-$(CONFIG_VIDEO_LCD_TDO_TL070WSH30) += tdo-tl070wsh30.o obj-$(CONFIG_VIDEO_MCDE_SIMPLE) += mcde_simple.o
drivers/video/renesas-r69328.c new file +232 -0
232 lines not on this page · raw message
Signature · 1 line
2.37.2
Re: [PATCH v1 4/6] video: panel: add Renesas R69328 MIPI DSI panel driver
Hi Svyatoslav,
Quoted 9 lines · Svyatoslav Ryhel
Driver adds support for panels with Renesas R69328 IC
Currently supported compatible is:
- jdi,dx12d100vm0eaa
Quoted 6 lines
--- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/renesas-r69328.c | 232 +++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 drivers/video/renesas-r69328.c
Please see below
[..]
drivers/video/renesas-r69328.c line 67
Quoted 8 lines
drivers/video/renesas-r69328.c new file +8
-0+static int renesas_r69328_enable_backlight (struct udevice *dev) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +int ret; + + ret =dm_gpio_set_value (&priv->enable_gpio,1 ); +if (ret) { +printf ("%s: error changing enable-gpios (%d)\n" , __func__, ret);
If you use log_err() then the function name is should automatically if CONFIG_LOGF_FUNC is enabled
Quoted 8 lines
drivers/video/renesas-r69328.c new file +8
-0+return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,0 ); +if (ret) { +printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret;
drivers/video/renesas-r69328.c line 85
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+ } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,1 ); +if (ret) { +printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } + +mdelay (5 );
Please add a comment about the delays so people know how they were chosen. E.g. it might be in the datasheet.
Quoted 17 lines
drivers/video/renesas-r69328.c new file +17
-0+ +return 0 ; +} + +static int renesas_r69328_set_backlight (struct udevice *dev,int percent) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +struct mipi_dsi_panel_plat *plat =dev_get_plat (dev); +struct mipi_dsi_device *dsi = plat->device; +int ret; + +mipi_dsi_dcs_write_buffer (dsi, address_mode, +sizeof (address_mode)); + + ret =mipi_dsi_dcs_set_pixel_format (dsi,MIPI_DCS_PIXEL_FMT_24BIT <<4 ); +if (ret <0 ) { +printf ("%s: failed to set pixel format: %d\n" , __func__, ret);
drivers/video/renesas-r69328.c line 112
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+return ret; + } + + ret =mipi_dsi_dcs_exit_sleep_mode (dsi); +if (ret <0 ) { +printf ("%s: failed to exit sleep mode: %d\n" , __func__, ret); +return ret; + } + +mdelay (100 );
Wow that is a long time. Please add a comment.
Quoted 4 lines
drivers/video/renesas-r69328.c new file +4
-0+ +/* MACP Off */ +dsi_generic_write_seq (dsi,R69328_MACP ,0x04 ); +
drivers/video/renesas-r69328.c line 126
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+dsi_generic_write_seq (dsi,R69328_POWER_SET ,0x14 , +0x1D ,0x21 ,0x67 ,0x11 ,0x9A ); + +dsi_generic_write_seq (dsi,R69328_GAMMA_SET_A ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 );
lower-case hex
Quoted 16 lines
drivers/video/renesas-r69328.c new file +16
-0+dsi_generic_write_seq (dsi,R69328_GAMMA_SET_B ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 ); +dsi_generic_write_seq (dsi,R69328_GAMMA_SET_C ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 ); + +/* MACP On */
drivers/video/renesas-r69328.c line 152
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+dsi_generic_write_seq (dsi,R69328_MACP ,0x03 ); + + ret =mipi_dsi_dcs_set_display_on (dsi); +if (ret <0 ) { +printf ("%s: failed to set display on: %d\n" , __func__, ret); +return ret; + } + +mdelay (50 ); +
[..]
Regards,
Simon
Re: [PATCH v1 4/6] video: panel: add Renesas R69328 MIPI DSI panel driver
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 51 lines
Hi Svyatoslav,
Quoted 9 lines · Svyatoslav Ryhel
Driver adds support for panels with Renesas R69328 IC
Currently supported compatible is:
- jdi,dx12d100vm0eaaQuoted 6 lines
--- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/renesas-r69328.c | 232 +++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 drivers/video/renesas-r69328.cReviewed-by Simon Glass <[email protected]>Please see below
[..]
drivers/video/renesas-r69328.c line 67
Quoted 8 lines
drivers/video/renesas-r69328.c new file +8
-0+static int renesas_r69328_enable_backlight (struct udevice *dev) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +int ret; + + ret =dm_gpio_set_value (&priv->enable_gpio,1 ); +if (ret) { +printf ("%s: error changing enable-gpios (%d)\n" , __func__, ret);If you use
log_err()then the function name is should automatically ifCONFIG_LOGF_FUNCis enabledQuoted 13 lines
drivers/video/renesas-r69328.c new file +13
-0+return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,0 ); +if (ret) { +printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,1 ); +if (ret) {
Quoted 9 lines
drivers/video/renesas-r69328.c line 85
Quoted 5 lines
drivers/video/renesas-r69328.c new file +5
-0+printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } + +mdelay (5 );Please add a comment about the delays so people know how they were chosen. E.g. it might be in the datasheet.
I would love to add reasonable arguments for these delays but unfortunately I am not LG developer and there are no public datasheets available for either of the panels. I have used the downstream kernel as a reference and built it to a more modern look. In case someone can provide datasheets for this panel or for a similar one with the same controller, this driver may be completed and further extended for new panels. As for now it was extensively tested on p895 and p880 respectively and did not fail any time.
Quoted 77 lines
Quoted 17 lines
drivers/video/renesas-r69328.c new file +17
-0+ +return 0 ; +} + +static int renesas_r69328_set_backlight (struct udevice *dev,int percent) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +struct mipi_dsi_panel_plat *plat =dev_get_plat (dev); +struct mipi_dsi_device *dsi = plat->device; +int ret; + +mipi_dsi_dcs_write_buffer (dsi, address_mode, +sizeof (address_mode)); + + ret =mipi_dsi_dcs_set_pixel_format (dsi,MIPI_DCS_PIXEL_FMT_24BIT <<4 ); +if (ret <0 ) { +printf ("%s: failed to set pixel format: %d\n" , __func__, ret);drivers/video/renesas-r69328.c line 112
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+return ret; + } + + ret =mipi_dsi_dcs_exit_sleep_mode (dsi); +if (ret <0 ) { +printf ("%s: failed to exit sleep mode: %d\n" , __func__, ret); +return ret; + } + +mdelay (100 );Wow that is a long time. Please add a comment.
Quoted 4 lines
drivers/video/renesas-r69328.c new file +4
-0+ +/* MACP Off */ +dsi_generic_write_seq (dsi,R69328_MACP ,0x04 ); +drivers/video/renesas-r69328.c line 126
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+dsi_generic_write_seq (dsi,R69328_POWER_SET ,0x14 , +0x1D ,0x21 ,0x67 ,0x11 ,0x9A ); + +dsi_generic_write_seq (dsi,R69328_GAMMA_SET_A ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 );lower-case hex
Quoted 16 lines
drivers/video/renesas-r69328.c new file +16
-0+dsi_generic_write_seq (dsi,R69328_GAMMA_SET_B ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 ); +dsi_generic_write_seq (dsi,R69328_GAMMA_SET_C ,0x00 , +0x1A ,0x20 ,0x28 ,0x25 ,0x24 , +0x26 ,0x15 ,0x13 ,0x11 ,0x18 , +0x1E ,0x1C ,0x00 ,0x00 ,0x1A , +0x20 ,0x28 ,0x25 ,0x24 ,0x26 , +0x15 ,0x13 ,0x11 ,0x18 ,0x1E , +0x1C ,0x00 ); + +/* MACP On */ drivers/video/renesas-r69328.c line 152
Quoted 10 lines
drivers/video/renesas-r69328.c new file +10
-0+dsi_generic_write_seq (dsi,R69328_MACP ,0x03 ); + + ret =mipi_dsi_dcs_set_display_on (dsi); +if (ret <0 ) { +printf ("%s: failed to set display on: %d\n" , __func__, ret); +return ret; + } + +mdelay (50 ); +[..]
Regards,
Simon
Re: [PATCH v1 4/6] video: panel: add Renesas R69328 MIPI DSI panel driver
Hi Svyatoslav,
Quoted 63 lines · Svyatoslav Ryhel
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 51 lines
Hi Svyatoslav,
Quoted 9 lines · Svyatoslav Ryhel
Driver adds support for panels with Renesas R69328 IC
Currently supported compatible is:
- jdi,dx12d100vm0eaaQuoted 6 lines
--- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/renesas-r69328.c | 232 +++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 drivers/video/renesas-r69328.cReviewed-by Simon Glass <[email protected]>Please see below
[..]
drivers/video/renesas-r69328.c line 67
Quoted 8 lines
drivers/video/renesas-r69328.c new file +8
-0+static int renesas_r69328_enable_backlight (struct udevice *dev) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +int ret; + + ret =dm_gpio_set_value (&priv->enable_gpio,1 ); +if (ret) { +printf ("%s: error changing enable-gpios (%d)\n" , __func__, ret);If you use
log_err()then the function name is should automatically ifCONFIG_LOGF_FUNCis enabledQuoted 13 lines
drivers/video/renesas-r69328.c new file +13
-0+return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,0 ); +if (ret) { +printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,1 ); +if (ret) {Quoted 9 lines
drivers/video/renesas-r69328.c line 85
Quoted 5 lines
drivers/video/renesas-r69328.c new file +5
-0+printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } + +mdelay (5 );Please add a comment about the delays so people know how they were chosen. E.g. it might be in the datasheet.
Quoted 7 lines
I would love to add reasonable arguments for these delays but unfortunately I am not LG developer and there are no public datasheets available for either of the panels. I have used the downstream kernel as a reference and built it to a more modern look. In case someone can provide datasheets for this panel or for a similar one with the same controller, this driver may be completed and further extended for new panels. As for now it was extensively tested on p895 and p880 respectively and did not fail any time.
A comment like that in the source code would go a long way to help someone looking at these delays later.
Regards,
Simon
Re: [PATCH v1 4/6] video: panel: add Renesas R69328 MIPI DSI panel driver
чт, 20 квіт. 2023 р. о 19:35 Simon Glass <[email protected]> пише:
Quoted 75 lines
Hi Svyatoslav,
Quoted 63 lines · Svyatoslav Ryhel
чт, 20 квіт. 2023 р. о 01:41 Simon Glass <[email protected]> пише:
Quoted 51 lines
Hi Svyatoslav,
Quoted 9 lines · Svyatoslav Ryhel
Driver adds support for panels with Renesas R69328 IC
Currently supported compatible is:
- jdi,dx12d100vm0eaaQuoted 6 lines
--- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/renesas-r69328.c | 232 +++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 drivers/video/renesas-r69328.cReviewed-by Simon Glass <[email protected]>Please see below
[..]
drivers/video/renesas-r69328.c line 67
Quoted 8 lines
drivers/video/renesas-r69328.c new file +8
-0+static int renesas_r69328_enable_backlight (struct udevice *dev) +{ +struct renesas_r69328_priv *priv =dev_get_priv (dev); +int ret; + + ret =dm_gpio_set_value (&priv->enable_gpio,1 ); +if (ret) { +printf ("%s: error changing enable-gpios (%d)\n" , __func__, ret);If you use
log_err()then the function name is should automatically ifCONFIG_LOGF_FUNCis enabledQuoted 13 lines
drivers/video/renesas-r69328.c new file +13
-0+return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,0 ); +if (ret) { +printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } +mdelay (5 ); + + ret =dm_gpio_set_value (&priv->reset_gpio,1 ); +if (ret) {Quoted 9 lines
drivers/video/renesas-r69328.c line 85
Quoted 5 lines
drivers/video/renesas-r69328.c new file +5
-0+printf ("%s: error changing reset-gpios (%d)\n" , __func__, ret); +return ret; + } + +mdelay (5 );Please add a comment about the delays so people know how they were chosen. E.g. it might be in the datasheet.
Quoted 7 lines
I would love to add reasonable arguments for these delays but unfortunately I am not LG developer and there are no public datasheets available for either of the panels. I have used the downstream kernel as a reference and built it to a more modern look. In case someone can provide datasheets for this panel or for a similar one with the same controller, this driver may be completed and further extended for new panels. As for now it was extensively tested on p895 and p880 respectively and did not fail any time.
Quoted 3 lines
A comment like that in the source code would go a long way to help someone looking at these delays later.
Ok, I will add some comments on the next iteration if such will be needed.
Quoted 2 lines
Regards,
Simon
PATCH 5/6 video: tegra: add DC based PWM backlight driver
In reply to Svyatoslav RyhelDC based PWM backlight is found on some T20 and T30 devices (HTC One X). This backlight is controlled by Tegra DC and is adjustable by the DC PM0 or PM1 signal.
--- drivers/video/tegra20/Kconfig | 7 + drivers/video/tegra20/Makefile | 1 + drivers/video/tegra20/tegra-pwm-backlight.c | 155 ++++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 drivers/video/tegra20/tegra-pwm-backlight.c
drivers/video/tegra20/Kconfig +7 -0
@@ -15,3 +15,10 @@ config VIDEO_DSI_TEGRA30 help T30 has native support for DSI panels. This option enables support for such panels which can be used on endeavoru and tf600t. + +config TEGRA_BACKLIGHT_PWM + bool "Enable Tegra DC PWM backlight support" + depends on BACKLIGHT + select VIDEO_TEGRA20 + help + Tegra DC dependent backlight.
drivers/video/tegra20/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_VIDEO_TEGRA20) += tegra-dc.o obj-$(CONFIG_VIDEO_DSI_TEGRA30) += tegra-dsi.o mipi-phy.o +obj-$(CONFIG_TEGRA_BACKLIGHT_PWM) += tegra-pwm-backlight.o
drivers/video/tegra20/tegra-pwm-backlight.c new file +155 -0
155 lines not on this page · raw message
Signature · 1 line
2.37.2
Re: [PATCH v1 5/6] video: tegra: add DC based PWM backlight driver
Quoted 8 lines · Svyatoslav Ryhel
DC based PWM backlight is found on some T20 and T30 devices (HTC One X). This backlight is controlled by Tegra DC and is adjustable by the DC PM0 or PM1 signal.
Quoted 6 lines
--- drivers/video/tegra20/Kconfig | 7 + drivers/video/tegra20/Makefile | 1 + drivers/video/tegra20/tegra-pwm-backlight.c | 155 ++++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 drivers/video/tegra20/tegra-pwm-backlight.c
PATCH 6/6 video: panel: add generic endeavoru panel
In reply to Svyatoslav RyhelFamily of panels used by HTC in One X. Though were used variants at least from 3 vendors, this driver provides generic support for all of them.
--- drivers/video/Kconfig | 11 ++ drivers/video/Makefile | 1 + drivers/video/endeavoru-panel.c | 252 ++++++++++++++++++++++++++++++++ 3 files changed, 264 insertions(+) create mode 100644 drivers/video/endeavoru-panel.c
drivers/video/Kconfig +11 -0
@@ -466,6 +466,17 @@ config VIDEO_BCM2835 that same resolution (or as near as possible) and 32bpp depth, so that U-Boot can access it with full colour depth. +config VIDEO_LCD_ENDEAVORU + tristate "Endeavoru 720x1280 DSI video mode panel" + depends on PANEL && BACKLIGHT + select VIDEO_MIPI_DSI + help + Say Y here if you want to enable support for the IPS-LCD panel + module for HTC One X. Driver supports a family of panels, + made at least by 3 vendors (Sharp, Sony and AUO), but set up + using the same DSI command sequence. The panel has a 720x1280 + resolution and uses 24 bit RGB per pixel. + config VIDEO_LCD_ORISETECH_OTM8009A bool "OTM8009A DSI LCD panel support" select VIDEO_MIPI_DSI
drivers/video/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_VIDEO_EFI) += efi.o obj-$(CONFIG_VIDEO_IPUV3) += imx/ obj-$(CONFIG_VIDEO_IVYBRIDGE_IGD) += ivybridge_igd.o obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o +obj-$(CONFIG_VIDEO_LCD_ENDEAVORU) += endeavoru-panel.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_ORISETECH_OTM8009A) += orisetech_otm8009a.o obj-$(CONFIG_VIDEO_LCD_RAYDIUM_RM68200) += raydium-rm68200.o
drivers/video/endeavoru-panel.c new file +252 -0
252 lines not on this page · raw message
Signature · 1 line
2.37.2