Skip to contentSkip to conversation

Tegra panel improvements

PATCH In review Svyatoslav Ryhel 3 participants 12 messages Jan 31, 2024 – Apr 20, 2024 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

v2 cover Tegra panel improvements

The current patch set improves the logic of existing panels and bridge used by Tegra 3 devices and brings support for additional DSI panels used by Tegra 4 devices.

New and existing drivers are fully reusable, contain no device specific parts, and are written according to existing datasheets.

---
Changes from v1:
- improved ssd2825 code style
- added TC358768 RGB to DSI bridge bringup commit (used by TF700T)
- added Parade DP501 transmitter bringup (used by Lenovo Ideapad Yoga 11)
---

Anton Bambura (1):
video: panel: add Samsung LTL106HL02 MIPI DSI panel driver

Jonas Schwöbel (1):
video: bridge: add basic support for the Parade DP501 transmitter

Svyatoslav Ryhel (5):
video: panel: add LG LG070WX3 MIPI DSI panel driver
video: bridge: add Toshiba TC358768 RGB to DSI bridge support
video: endeavoru-panel: shift the init sequence by one step earlier
video: bridge: ssd2825: shift the init sequence by one step earlier
video: renesas: shift the init sequence by one step earlier

 drivers/video/Kconfig              |  17 +
 drivers/video/Makefile             |   2 +
 drivers/video/bridge/Kconfig       |  19 +
 drivers/video/bridge/Makefile      |   2 +
 drivers/video/bridge/dp501.c       | 579 +++++++++++++++++
 drivers/video/bridge/ssd2825.c     |  86 +--
 drivers/video/bridge/tc358768.c    | 985 +++++++++++++++++++++++++++++
 drivers/video/endeavoru-panel.c    | 128 ++--
 drivers/video/lg-ld070wx3.c        | 186 ++++++
 drivers/video/renesas-r61307.c     |  93 +--
 drivers/video/renesas-r69328.c     |  81 +--
 drivers/video/samsung-ltl106hl02.c | 157 +++++
 12 files changed, 2155 insertions(+), 180 deletions(-)
 create mode 100644 drivers/video/bridge/dp501.c
 create mode 100644 drivers/video/bridge/tc358768.c
 create mode 100644 drivers/video/lg-ld070wx3.c
 create mode 100644 drivers/video/samsung-ltl106hl02.c
Signature · 1 line
2.40.1
#1 lore raw

PATCH v2 1/7 video: panel: add LG LG070WX3 MIPI DSI panel driver

The LD070WX3 is a Color Active Matrix Liquid Crystal Display with an integral Light Emitting Diode (LED) backlight system. The matrix employs a-Si Thin Film Transistor as the active element. It is a transmissive type display operating in the normally Black mode. This TFT-LCD has 7.0 inches diagonally measured active display area with WXGA resolution (800 by 1280 pixel array).

---
 drivers/video/Kconfig       |   8 ++
 drivers/video/Makefile      |   1 +
 drivers/video/lg-ld070wx3.c | 186 ++++++++++++++++++++++++++++++++++++
 3 files changed, 195 insertions(+)
 create mode 100644 drivers/video/lg-ld070wx3.c
drivers/video/Kconfig +8 -0
index e2016d73d1..05567a0095 100644
@@ -522,6 +522,14 @@ config VIDEO_LCD_ORISETECH_OTM8009A
 	Say Y here if you want to enable support for Orise Technology
 	otm8009a 480x800 dsi 2dl panel.
 
+config VIDEO_LCD_LG_LD070WX3
+	bool "LD070WX3 DSI LCD panel support"
+	depends on PANEL && BACKLIGHT
+	select VIDEO_MIPI_DSI
+	help
+	  Say Y here if you want to enable support for LG LD070WX3
+	  800x1280 DSI video mode panel.
+
 config VIDEO_LCD_RAYDIUM_RM68200
 	bool "RM68200 DSI LCD panel support"
 	select VIDEO_MIPI_DSI
drivers/video/Makefile +1 -0
index fdc2937632..bb6d9b74b9 100644
@@ -58,6 +58,7 @@ obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o
 obj-$(CONFIG_VIDEO_LCD_ENDEAVORU) += endeavoru-panel.o
 obj-$(CONFIG_VIDEO_LCD_HIMAX_HX8394) += himax-hx8394.o
 obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o
+obj-$(CONFIG_VIDEO_LCD_LG_LD070WX3) += lg-ld070wx3.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
drivers/video/lg-ld070wx3.c new file +186 -0

186 lines not on this page · raw message

Signature · 1 line
2.40.1
#2 lore raw

PATCH v2 2/7 video: panel: add Samsung LTL106HL02 MIPI DSI panel driver

In reply to Svyatoslav Ryhel

From: Anton Bambura <[email protected]>

LTL106HL02 is a color active matrix TFT (Thin Film Transistor) liquid crystal display (LCD) that uses amorphous silicon TFT as switching devices. This model is composed of a TFT LCD panel, a driver circuit and a backlight unit. The resolution of a 10.6" contains 1920 x 1080 pixels and can display up to 16,8M color with wide viewing angle.

---
 drivers/video/Kconfig              |   9 ++
 drivers/video/Makefile             |   1 +
 drivers/video/samsung-ltl106hl02.c | 157 +++++++++++++++++++++++++++++
 3 files changed, 167 insertions(+)
 create mode 100644 drivers/video/samsung-ltl106hl02.c
drivers/video/Kconfig +9 -0
index 05567a0095..52b515197d 100644
@@ -555,6 +555,15 @@ config VIDEO_LCD_RENESAS_R69328
 	  IPS-LCD module with Renesas R69328 IC. The panel has a 720x1280
 	  resolution and uses 24 bit RGB per pixel.
 
+config VIDEO_LCD_SAMSUNG_LTL106HL02
+	tristate "Samsung LTL106HL02 1920x1080 DSI video mode panel"
+	depends on PANEL && BACKLIGHT
+	select VIDEO_MIPI_DSI
+	help
+	  Say Y here if you want to enable support for Samsung LTL106HL02
+	  LCD module found in Microsoft Surface 2. The panel has a FullHD
+	  resolution (1920x1080).
+
 config VIDEO_LCD_SSD2828
 	bool "SSD2828 bridge chip"
 	---help---
drivers/video/Makefile +1 -0
index bb6d9b74b9..f3f70cd04a 100644
@@ -63,6 +63,7 @@ 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_SAMSUNG_LTL106HL02) += samsung-ltl106hl02.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/samsung-ltl106hl02.c new file +157 -0

157 lines not on this page · raw message

Signature · 1 line
2.40.1
#3 lore raw

PATCH v2 3/7 video: bridge: add Toshiba TC358768 RGB to DSI bridge support

In reply to Svyatoslav Ryhel

Add initial support for the Toshiba TC358768 RGB to DSI bridge.

The driver is based on the mainline Linux Toshiba TC358768 bridge driver and implements the same set of features.

---
 drivers/video/bridge/Kconfig    |   9 +
 drivers/video/bridge/Makefile   |   1 +
 drivers/video/bridge/tc358768.c | 985 ++++++++++++++++++++++++++++++++
 3 files changed, 995 insertions(+)
 create mode 100644 drivers/video/bridge/tc358768.c
drivers/video/bridge/Kconfig +9 -0
index 2311ca2d1a..6a9e7c1454 100644
@@ -40,3 +40,12 @@ config VIDEO_BRIDGE_SOLOMON_SSD2825
 	select VIDEO_MIPI_DSI
 	help
 	  Solomon SSD2824 SPI RGB-DSI bridge driver wrapped into panel uClass.
+
+config VIDEO_BRIDGE_TOSHIBA_TC358768
+	bool "Support Toshiba TC358768 MIPI DSI bridge"
+	depends on PANEL && DM_GPIO
+	select VIDEO_MIPI_DSI
+	select DM_I2C
+	help
+	  Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver.
+	  Found in Asus Transformer Infinity TF700T.
drivers/video/bridge/Makefile +1 -0
index 22625c8bc6..ed3e7e9ce1 100644
@@ -8,3 +8,4 @@ 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
+obj-$(CONFIG_VIDEO_BRIDGE_TOSHIBA_TC358768) += tc358768.o
drivers/video/bridge/tc358768.c new file +985 -0

985 lines not on this page · raw message

Signature · 1 line
2.40.1
#4 lore raw

PATCH v2 4/7 video: bridge: add basic support for the Parade DP501 transmitter

In reply to Svyatoslav Ryhel

From: Jonas Schwöbel <[email protected]>

The Parade DP501 is a DP & DVI/HDMI dual-mode transmitter. It enables an RGB/Parallel SOC output to be converted, packed and serialized into either DP or TMDS output device. Only DisplayPort functionality of this transmitter has been implemented and tested.

---
 drivers/video/bridge/Kconfig  |  10 +
 drivers/video/bridge/Makefile |   1 +
 drivers/video/bridge/dp501.c  | 579 ++++++++++++++++++++++++++++++++++
 3 files changed, 590 insertions(+)
 create mode 100644 drivers/video/bridge/dp501.c
drivers/video/bridge/Kconfig +10 -0
index 6a9e7c1454..ab91727372 100644
@@ -7,6 +7,16 @@ config VIDEO_BRIDGE
 	  requires LVDS, an eDP->LVDS bridge chip can be used to provide the
 	  necessary conversion. This option enables support for these devices.
 
+config VIDEO_BRIDGE_PARADE_DP501
+	bool "Support Parade DP501 DP & DVI/HDMI dual mode transmitter"
+	depends on PANEL && DM_GPIO
+	select DM_I2C
+	help
+	  The Parade DP501 is a DP & DVI/HDMI dual-mode transmitter. It
+	  enables an RGB/Parallel SOC output to be converted, packed and
+	  serialized into either DP or TMDS output device. Only DisplayPort
+	  functionality of this transmitter has been implemented and tested.
+
 config VIDEO_BRIDGE_PARADE_PS862X
 	bool "Support Parade PS862X DP->LVDS bridge"
 	depends on VIDEO_BRIDGE
drivers/video/bridge/Makefile +1 -0
index ed3e7e9ce1..58697e3cbe 100644
@@ -4,6 +4,7 @@
 #  Written by Simon Glass <[email protected]>
 
 obj-$(CONFIG_VIDEO_BRIDGE) += video-bridge-uclass.o
+obj-$(CONFIG_VIDEO_BRIDGE_PARADE_DP501) += dp501.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
drivers/video/bridge/dp501.c new file +579 -0

579 lines not on this page · raw message

Signature · 1 line
2.40.1
#5 lore raw

PATCH v2 5/7 video: endeavoru-panel: shift the init sequence by one step earlier

In reply to Svyatoslav Ryhel

Shift all setup stages one step earlier to better fit the existing uclass.

---
 drivers/video/endeavoru-panel.c | 128 +++++++++++++++++---------------
 1 file changed, 68 insertions(+), 60 deletions(-)
drivers/video/endeavoru-panel.c +68 -60
index 79a272128b..1bff641434 100644
@@ -57,61 +57,8 @@ static void dcs_write_one(struct mipi_dsi_device *dsi, u8 cmd, u8 data)
 
 static int endeavoru_panel_enable_backlight(struct udevice *dev)
 {
-	struct endeavoru_panel_priv *priv = dev_get_priv(dev);
-	int ret;
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(5);
-
-	ret = regulator_set_enable_if_allowed(priv->vddio, 1);
-	if (ret) {
-		log_err("error enabling iovcc-supply (%d)\n", ret);
-		return ret;
-	}
-	mdelay(1);
-
-	ret = regulator_set_enable_if_allowed(priv->vdd, 1);
-	if (ret) {
-		log_err("error enabling vcc-supply (%d)\n", ret);
-		return ret;
-	}
-	mdelay(20);
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(2);
-
-	/* Reset panel */
-	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(1);
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(25);
-
-	return 0;
-}
-
-static int endeavoru_panel_set_backlight(struct udevice *dev, int percent)
-{
-	struct endeavoru_panel_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;
 
 	dcs_write_one(dsi, 0xc2, 0x08);
 
@@ -160,18 +107,22 @@ static int endeavoru_panel_set_backlight(struct udevice *dev, int percent)
 	dcs_write_one(dsi, 0x55, 0x80);
 	dcs_write_one(dsi, 0x5e, 0x06);
 
-	ret = backlight_enable(priv->backlight);
-	if (ret)
-		return ret;
-
 	/* Set backlight */
 	dcs_write_one(dsi, 0x51, 0x96);
 
-	ret = backlight_set_brightness(priv->backlight, percent);
+	return 0;
+}
+
+static int endeavoru_panel_set_backlight(struct udevice *dev, int percent)
+{
+	struct endeavoru_panel_priv *priv = dev_get_priv(dev);
+	int ret;
+
+	ret = backlight_enable(priv->backlight);
 	if (ret)
 		return ret;
 
-	return 0;
+	return backlight_set_brightness(priv->backlight, percent);
 }
 
 static int endeavoru_panel_timings(struct udevice *dev,
@@ -217,6 +168,63 @@ static int endeavoru_panel_of_to_plat(struct udevice *dev)
 	return 0;
 }
 
+static int endeavoru_panel_hw_init(struct udevice *dev)
+{
+	struct endeavoru_panel_priv *priv = dev_get_priv(dev);
+	int ret;
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(5);
+
+	ret = regulator_set_enable_if_allowed(priv->vddio, 1);
+	if (ret) {
+		log_debug("%s: error enabling iovcc-supply (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(1);
+
+	ret = regulator_set_enable_if_allowed(priv->vdd, 1);
+	if (ret) {
+		log_debug("%s: error enabling vcc-supply (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(20);
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(2);
+
+	/* Reset panel */
+	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(1);
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(25);
+
+	return 0;
+}
+
 static int endeavoru_panel_probe(struct udevice *dev)
 {
 	struct mipi_dsi_panel_plat *plat = dev_get_plat(dev);
@@ -226,7 +234,7 @@ static int endeavoru_panel_probe(struct udevice *dev)
 	plat->format = MIPI_DSI_FMT_RGB888;
 	plat->mode_flags = MIPI_DSI_MODE_VIDEO;
 
-	return 0;
+	return endeavoru_panel_hw_init(dev);
 }
 
 static const struct panel_ops endeavoru_panel_ops = {
Signature · 1 line
2.40.1
#6 lore raw

PATCH v2 6/7 video: bridge: ssd2825: shift the init sequence by one step earlier

In reply to Svyatoslav Ryhel

Shift all setup stages one step earlier to better fit the existing uclass.

---
 drivers/video/bridge/ssd2825.c | 86 ++++++++++++++++++----------------
 1 file changed, 45 insertions(+), 41 deletions(-)
drivers/video/bridge/ssd2825.c +45 -41
index cea20dcffa..f0ef3dafb9 100644
@@ -349,39 +349,6 @@ static int ssd2825_bridge_enable_panel(struct udevice *dev)
 	struct ssd2825_bridge_priv *priv = dev_get_priv(dev);
 	struct mipi_dsi_device *device = &priv->device;
 	struct display_timing *dt = &priv->timing;
-	int ret;
-
-	ret = clk_prepare_enable(priv->tx_clk);
-	if (ret) {
-		log_err("error enabling tx_clk (%d)\n", ret);
-		return ret;
-	}
-
-	ret = dm_gpio_set_value(&priv->power_gpio, 1);
-	if (ret) {
-		log_err("error changing power-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(10);
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(10);
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
-	if (ret) {
-		log_err("error changing reset-gpios (%d)\n", ret);
-		return ret;
-	}
-	mdelay(10);
-
-	/* Perform panel HW setup */
-	ret = panel_enable_backlight(priv->panel);
-	if (ret)
-		return ret;
 
 	/* Perform SW reset */
 	ssd2825_write_register(dev, SSD2825_OPERATION_CTRL_REG, 0x0100);
@@ -417,17 +384,15 @@ static int ssd2825_bridge_enable_panel(struct udevice *dev)
 			       SSD2825_CONF_REG_ECD | SSD2825_CONF_REG_EOT);
 	ssd2825_write_register(dev, SSD2825_VC_CTRL_REG, 0x0000);
 
-	/* Set up SW panel configuration */
-	ret = panel_set_backlight(priv->panel, BACKLIGHT_DEFAULT);
-	if (ret)
-		return ret;
-
-	return 0;
+	/* Perform panel setup */
+	return panel_enable_backlight(priv->panel);
 }
 
 static int ssd2825_bridge_set_panel(struct udevice *dev, int percent)
 {
-	return 0;
+	struct ssd2825_bridge_priv *priv = dev_get_priv(dev);
+
+	return panel_set_backlight(priv->panel, percent);
 }
 
 static int ssd2825_bridge_panel_timings(struct udevice *dev,
@@ -440,6 +405,45 @@ static int ssd2825_bridge_panel_timings(struct udevice *dev,
 	return 0;
 }
 
+static int ssd2825_bridge_hw_init(struct udevice *dev)
+{
+	struct ssd2825_bridge_priv *priv = dev_get_priv(dev);
+	int ret;
+
+	ret = clk_prepare_enable(priv->tx_clk);
+	if (ret) {
+		log_debug("%s: error enabling tx_clk (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+
+	ret = dm_gpio_set_value(&priv->power_gpio, 1);
+	if (ret) {
+		log_debug("%s: error changing power-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(10);
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(10);
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
+	if (ret) {
+		log_debug("%s: error changing reset-gpios (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(10);
+
+	return 0;
+}
+
 static int ssd2825_bridge_probe(struct udevice *dev)
 {
 	struct ssd2825_bridge_priv *priv = dev_get_priv(dev);
@@ -496,7 +500,7 @@ static int ssd2825_bridge_probe(struct udevice *dev)
 		return PTR_ERR(priv->tx_clk);
 	}
 
-	return 0;
+	return ssd2825_bridge_hw_init(dev);
 }
 
 static const struct panel_ops ssd2825_bridge_ops = {
Signature · 1 line
2.40.1
#7 lore raw

PATCH v2 7/7 video: renesas: shift the init sequence by one step earlier

In reply to Svyatoslav Ryhel

Shift all setup stages one step earlier to better fit the existing uclass.

---
 drivers/video/renesas-r61307.c | 93 +++++++++++++++++++---------------
 drivers/video/renesas-r69328.c | 81 +++++++++++++++--------------
 2 files changed, 95 insertions(+), 79 deletions(-)
drivers/video/renesas-r61307.c +51 -42
index 426fdc6224..1eccaf6b1b 100644
@@ -118,42 +118,6 @@ static struct display_timing default_timing = {
 };
 
 static int renesas_r61307_enable_backlight(struct udevice *dev)
-{
-	struct renesas_r61307_priv *priv = dev_get_priv(dev);
-	int ret;
-
-	ret = regulator_set_enable_if_allowed(priv->vcc, 1);
-	if (ret) {
-		log_err("enabling vcc-supply failed (%d)\n", ret);
-		return ret;
-	}
-	mdelay(5);
-
-	ret = regulator_set_enable_if_allowed(priv->iovcc, 1);
-	if (ret) {
-		log_err("enabling iovcc-supply failed (%d)\n", ret);
-		return ret;
-	}
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
-	if (ret) {
-		log_err("changing reset-gpio failed (%d)\n", ret);
-		return ret;
-	}
-	mdelay(5);
-
-	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
-	if (ret) {
-		log_err("changing reset-gpio failed (%d)\n", ret);
-		return ret;
-	}
-
-	mdelay(5);
-
-	return 0;
-}
-
-static int renesas_r61307_set_backlight(struct udevice *dev, int percent)
 {
 	struct renesas_r61307_priv *priv = dev_get_priv(dev);
 	struct mipi_dsi_panel_plat *plat = dev_get_plat(dev);
@@ -205,18 +169,23 @@ static int renesas_r61307_set_backlight(struct udevice *dev, int percent)
 		log_err("failed to set display on: %d\n", ret);
 		return ret;
 	}
-
 	mdelay(50);
 
+	return 0;
+}
+
+static int renesas_r61307_set_backlight(struct udevice *dev, int percent)
+{
+	struct renesas_r61307_priv *priv = dev_get_priv(dev);
+	int ret;
+
 	ret = backlight_enable(priv->backlight);
 	if (ret)
 		return ret;
 
-	ret = backlight_set_brightness(priv->backlight, percent);
-	if (ret)
-		return ret;
+	mdelay(5);
 
-	return 0;
+	return backlight_set_brightness(priv->backlight, percent);
 }
 
 static int renesas_r61307_timings(struct udevice *dev,
@@ -266,6 +235,46 @@ static int renesas_r61307_of_to_plat(struct udevice *dev)
 	return 0;
 }
 
+static int renesas_r61307_hw_init(struct udevice *dev)
+{
+	struct renesas_r61307_priv *priv = dev_get_priv(dev);
+	int ret;
+
+	ret = regulator_set_enable_if_allowed(priv->vcc, 1);
+	if (ret) {
+		log_debug("%s: enabling vcc-supply failed (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(5);
+
+	ret = regulator_set_enable_if_allowed(priv->iovcc, 1);
+	if (ret) {
+		log_debug("%s: enabling iovcc-supply failed (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 0);
+	if (ret) {
+		log_debug("%s: changing reset-gpio failed (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+	mdelay(5);
+
+	ret = dm_gpio_set_value(&priv->reset_gpio, 1);
+	if (ret) {
+		log_debug("%s: changing reset-gpio failed (%d)\n",
+			  __func__, ret);
+		return ret;
+	}
+
+	mdelay(5);
+
+	return 0;
+}
+
 static int renesas_r61307_probe(struct udevice *dev)
 {
 	struct mipi_dsi_panel_plat *plat = dev_get_plat(dev);
@@ -275,7 +284,7 @@ static int renesas_r61307_probe(struct udevice *dev)
 	plat->format = MIPI_DSI_FMT_RGB888;
 	plat->mode_flags = MIPI_DSI_MODE_VIDEO;
 
-	return 0;
+	return renesas_r61307_hw_init(dev);
 }
 
 static const struct panel_ops renesas_r61307_ops = {
drivers/video/renesas-r69328.c +44 -37

112 lines not on this page · raw message

Signature · 1 line
2.40.1
#8 lore raw
In reply to Svyatoslav Ryhel

Hello Tom! This patch set is hanging in patchwork for 3 month without any comments. If no one has anything to say, may you pick it into master?

Best regards,
Svyatoslav R.

ср, 31 січ. 2024 р. о 08:57 Svyatoslav Ryhel <[email protected]> пише:

Quoted 49 lines

The current patch set improves the logic of existing panels and bridge used by Tegra 3 devices and brings support for additional DSI panels used by Tegra 4 devices.

New and existing drivers are fully reusable, contain no device specific parts, and are written according to existing datasheets.

---
Changes from v1:
- improved ssd2825 code style
- added TC358768 RGB to DSI bridge bringup commit (used by TF700T)
- added Parade DP501 transmitter bringup (used by Lenovo Ideapad Yoga 11)
---

Anton Bambura (1):
video: panel: add Samsung LTL106HL02 MIPI DSI panel driver

Jonas Schwöbel (1):
video: bridge: add basic support for the Parade DP501 transmitter

Svyatoslav Ryhel (5):
video: panel: add LG LG070WX3 MIPI DSI panel driver
video: bridge: add Toshiba TC358768 RGB to DSI bridge support
video: endeavoru-panel: shift the init sequence by one step earlier
video: bridge: ssd2825: shift the init sequence by one step earlier
video: renesas: shift the init sequence by one step earlier

 drivers/video/Kconfig              |  17 +
 drivers/video/Makefile             |   2 +
 drivers/video/bridge/Kconfig       |  19 +
 drivers/video/bridge/Makefile      |   2 +
 drivers/video/bridge/dp501.c       | 579 +++++++++++++++++
 drivers/video/bridge/ssd2825.c     |  86 +--
 drivers/video/bridge/tc358768.c    | 985 +++++++++++++++++++++++++++++
 drivers/video/endeavoru-panel.c    | 128 ++--
 drivers/video/lg-ld070wx3.c        | 186 ++++++
 drivers/video/renesas-r61307.c     |  93 +--
 drivers/video/renesas-r69328.c     |  81 +--
 drivers/video/samsung-ltl106hl02.c | 157 +++++
 12 files changed, 2155 insertions(+), 180 deletions(-)
 create mode 100644 drivers/video/bridge/dp501.c
 create mode 100644 drivers/video/bridge/tc358768.c
 create mode 100644 drivers/video/lg-ld070wx3.c
 create mode 100644 drivers/video/samsung-ltl106hl02.c

--
2.40.1

#9 lore raw
Quoted 3 lines · Svyatoslav Ryhel

Hello Tom! This patch set is hanging in patchwork for 3 month without any comments. If no one has anything to say, may you pick it into master?

There's a number of video related patches outstanding currently, Anatolij will you be able to put together a PR soon? Thanks.

Quoted 54 lines

Best regards,
Svyatoslav R.

ср, 31 січ. 2024 р. о 08:57 Svyatoslav Ryhel <[email protected]> пише:

Quoted 49 lines

The current patch set improves the logic of existing panels and bridge used by Tegra 3 devices and brings support for additional DSI panels used by Tegra 4 devices.

New and existing drivers are fully reusable, contain no device specific parts, and are written according to existing datasheets.

---
Changes from v1:
- improved ssd2825 code style
- added TC358768 RGB to DSI bridge bringup commit (used by TF700T)
- added Parade DP501 transmitter bringup (used by Lenovo Ideapad Yoga 11)
---

Anton Bambura (1):
video: panel: add Samsung LTL106HL02 MIPI DSI panel driver

Jonas Schwöbel (1):
video: bridge: add basic support for the Parade DP501 transmitter

Svyatoslav Ryhel (5):
video: panel: add LG LG070WX3 MIPI DSI panel driver
video: bridge: add Toshiba TC358768 RGB to DSI bridge support
video: endeavoru-panel: shift the init sequence by one step earlier
video: bridge: ssd2825: shift the init sequence by one step earlier
video: renesas: shift the init sequence by one step earlier

 drivers/video/Kconfig              |  17 +
 drivers/video/Makefile             |   2 +
 drivers/video/bridge/Kconfig       |  19 +
 drivers/video/bridge/Makefile      |   2 +
 drivers/video/bridge/dp501.c       | 579 +++++++++++++++++
 drivers/video/bridge/ssd2825.c     |  86 +--
 drivers/video/bridge/tc358768.c    | 985 +++++++++++++++++++++++++++++
 drivers/video/endeavoru-panel.c    | 128 ++--
 drivers/video/lg-ld070wx3.c        | 186 ++++++
 drivers/video/renesas-r61307.c     |  93 +--
 drivers/video/renesas-r69328.c     |  81 +--
 drivers/video/samsung-ltl106hl02.c | 157 +++++
 12 files changed, 2155 insertions(+), 180 deletions(-)
 create mode 100644 drivers/video/bridge/dp501.c
 create mode 100644 drivers/video/bridge/tc358768.c
 create mode 100644 drivers/video/lg-ld070wx3.c
 create mode 100644 drivers/video/samsung-ltl106hl02.c

--
2.40.1

Signature · 1 line
Tom
#10 lore raw
Quoted 8 lines · On Fri, 19 Apr 2024 08:05:22 -0600 Tom Rini [email protected] wrote:
Quoted 3 lines · Svyatoslav Ryhel

Hello Tom! This patch set is hanging in patchwork for 3 month without any comments. If no one has anything to say, may you pick it into master?

There's a number of video related patches outstanding currently, Anatolij will you be able to put together a PR soon? Thanks.

I'll prepare a new PR today.

--
Anatolij

#11 lore raw
In reply to Svyatoslav Ryhel
Quoted 6 lines · On Wed, 31 Jan 2024 08:57:14 +0200 Svyatoslav Ryhel [email protected] wrote:

The current patch set improves the logic of existing panels and bridge used by Tegra 3 devices and brings support for additional DSI panels used by Tegra 4 devices.

New and existing drivers are fully reusable, contain no device specific parts, and are written according to existing datasheets.

Series applied to u-boot-video.

--
Anatolij