Skip to contentSkip to conversation

Refactor tidss_drv and enable early splash on AM625

PATCH In review swamiljain 2 participants 4 messages Nov 5, 2025 Framebuffer layer

lore
Share & tools
lore

swamiljain

author
#0 lore raw

v3 cover Refactor tidss_drv and enable early splash on AM625

- Refactor tidss_drv
- Add am62x_a53_splashscreen.config to enable splashscreen at u-boot SPL

Note:
- As OLDI specific changes are in progress to be synced to upstream DT, use this[1] branch to enable SD-MMC splash on AM62X. Upstream DT changes can be found here[2][3].
- Use TI logo file(ti_logo_414x97_32bpp.bmp.gz) from this link[4].

[1]: https://github.com/swamiljain/u-boot/tree/v3_splash_final
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://lore.kernel.org/all/[email protected]/
[4]: https://github.com/swamiljain/ti-splash-logo/blob/main/ti_logo_414x97_32bpp.bmp.gz
---
Changelog v2->v3:
- Add splashscreen.config fragment to enable splashscreen
- Align OLDI mode detection logic with kernel side upstreamed OLDI series[1]
- Address styling issue mentioned by Devarsh
- Pick up R-by tag for PATCH 1/2

Link to v2:
https://lore.kernel.org/all/[email protected]/

Changelog v1->v2
- Iterate through all available OLDIs
- Move dss_oldi_tx_power from tidss_drv.c to tidss_oldi.c
- Rename tidss_attach_active_panel to a more generic name
- To handle all active hw video ports, add an array for active hw vps
- Iterate through all active hw vps to enable respective clks

Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---

Devarsh Thakkar (1):
configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot
SPL

Swamil Jain (1):
drivers: video: tidss: Refactor tidss_drv

 configs/am62x_a53_splashscreen.config |  16 ++
 configs/am62x_evm_a53_defconfig       |   4 +-
 drivers/video/tidss/Makefile          |   2 +-
 drivers/video/tidss/tidss_drv.c       | 235 +++++++++++------
 drivers/video/tidss/tidss_drv.h       |  40 ++-
 drivers/video/tidss/tidss_oldi.c      | 364 ++++++++++++++++++++++++++
 drivers/video/tidss/tidss_oldi.h      |  72 +++++
 drivers/video/tidss/tidss_regs.h      |  21 --
 8 files changed, 631 insertions(+), 123 deletions(-)
 create mode 100644 configs/am62x_a53_splashscreen.config
 create mode 100644 drivers/video/tidss/tidss_oldi.c
 create mode 100644 drivers/video/tidss/tidss_oldi.h
author
#1 lore raw

PATCH v3 1/2 drivers: video: tidss: Refactor tidss_drv

From: Swamil Jain <[email protected]>

- Refactor tidss_drv to improve modularity, enabling support for more display interfaces beyond OLDI in the future
- Add detection and initialization of active OLDI panels using the DT
- Port tidss_oldi.c from the upstream Linux kernel oldi series[0] and derive several APIs from it to determine the dual link pixel order
- Add tidss_oldi_init() and helper routines to handle OLDI-specific setup and move related helper routines to tidss_oldi.c

[0]: https://lore.kernel.org/all/[email protected]/

---
 drivers/video/tidss/Makefile     |   2 +-
 drivers/video/tidss/tidss_drv.c  | 235 +++++++++++++-------
 drivers/video/tidss/tidss_drv.h  |  40 ++--
 drivers/video/tidss/tidss_oldi.c | 364 +++++++++++++++++++++++++++++++
 drivers/video/tidss/tidss_oldi.h |  72 ++++++
 drivers/video/tidss/tidss_regs.h |  21 --
 6 files changed, 612 insertions(+), 122 deletions(-)
 create mode 100644 drivers/video/tidss/tidss_oldi.c
 create mode 100644 drivers/video/tidss/tidss_oldi.h
drivers/video/tidss/Makefile +1 -1
index 3381a5fec57..846c19c5a7b 100644
@@ -9,4 +9,4 @@
 # Author: Tomi Valkeinen <[email protected]>
 
 
-obj-${CONFIG_$(PHASE_)VIDEO_TIDSS} = tidss_drv.o
+obj-${CONFIG_$(PHASE_)VIDEO_TIDSS} = tidss_drv.o tidss_oldi.o
drivers/video/tidss/tidss_drv.c +156 -79

321 lines not on this page · raw message

drivers/video/tidss/tidss_drv.h +19 -21
index e229d975ff4..3d36b45fc7b 100644
@@ -13,9 +13,12 @@
 #define __TIDSS_DRV_H__
 
 #include <media_bus_format.h>
+#include <syscon.h>
+#include <regmap.h>
 
 #define TIDSS_MAX_PORTS 4
 #define TIDSS_MAX_PLANES 4
+#define TIDSS_MAX_OLDI_TXES 2
 
 enum dss_vp_bus_type {
 	DSS_VP_DPI,		/* DPI output */
@@ -24,13 +27,17 @@ enum dss_vp_bus_type {
 	DSS_VP_MAX_BUS_TYPE,
 };
 
-enum dss_oldi_modes {
-	OLDI_MODE_OFF,				/* OLDI turned off / tied off in IP. */
-	OLDI_SINGLE_LINK_SINGLE_MODE,		/* Single Output over OLDI 0. */
-	OLDI_SINGLE_LINK_DUPLICATE_MODE,	/* Duplicate Output over OLDI 0 and 1. */
-	OLDI_DUAL_LINK,				/* Combined Output over OLDI 0 and 1. */
+enum tidss_oldi_link_type {
+	OLDI_MODE_UNSUPPORTED,
+	OLDI_MODE_SINGLE_LINK,
+	OLDI_MODE_CLONE_SINGLE_LINK,
+	OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK,
+	OLDI_MODE_DUAL_LINK,
+	OLDI_MODE_SECONDARY_DUAL_LINK,
 };
 
+enum oldi_mode_reg_val { SPWG_18 = 0, JEIDA_24 = 1, SPWG_24 = 2 };
+
 struct dss_features_scaling {
 	u32 in_width_max_5tap_rgb;
 	u32 in_width_max_3tap_rgb;
@@ -96,25 +103,11 @@ struct dss_features {
 	u32 vid_order[TIDSS_MAX_PLANES];
 };
 
-enum dss_oldi_mode_reg_val { SPWG_18 = 0, JEIDA_24 = 1, SPWG_24 = 2 };
-
 struct dss_bus_format {
 	u32 bus_fmt;
 	u32 data_width;
 	bool is_oldi_fmt;
-	enum dss_oldi_mode_reg_val oldi_mode_reg_val;
-};
-
-static struct dss_bus_format dss_bus_formats[] = {
-	{ MEDIA_BUS_FMT_RGB444_1X12,		12, false, 0 },
-	{ MEDIA_BUS_FMT_RGB565_1X16,		16, false, 0 },
-	{ MEDIA_BUS_FMT_RGB666_1X18,		18, false, 0 },
-	{ MEDIA_BUS_FMT_RGB888_1X24,		24, false, 0 },
-	{ MEDIA_BUS_FMT_RGB101010_1X30,		30, false, 0 },
-	{ MEDIA_BUS_FMT_RGB121212_1X36,		36, false, 0 },
-	{ MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,	18, true, SPWG_18 },
-	{ MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,	24, true, SPWG_24 },
-	{ MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,	24, true, JEIDA_24 },
+	enum oldi_mode_reg_val oldi_mode_reg_val;
 };
 
 struct tidss_drv_priv {
@@ -128,10 +121,15 @@ struct tidss_drv_priv {
 	const struct dss_features *feat;
 	struct clk fclk;
 	struct dss_vp_data vp_data[TIDSS_MAX_PORTS];
-	enum dss_oldi_modes oldi_mode;
+	enum tidss_oldi_link_type oldi_mode;
 	struct dss_bus_format *bus_format;
 	u32 pixel_format;
 	u32 memory_bandwidth_limit;
+	unsigned int num_oldis;
+	struct tidss_oldi *oldis[TIDSS_MAX_OLDI_TXES];
+	u8 active_hw_vps[TIDSS_MAX_PORTS];
+	u8 active_pipelines;
 };
 
+struct tidss_oldi;
 #endif
drivers/video/tidss/tidss_oldi.c new file +364 -0

364 lines not on this page · raw message

drivers/video/tidss/tidss_oldi.h new file +72 -0

72 lines not on this page · raw message

drivers/video/tidss/tidss_regs.h +0 -21
index 440db8d1c7a..4ee8b330a20 100644
@@ -231,27 +231,6 @@ enum dss_common_regs {
 #define DSS_VP_DSS_DMA_THREADSIZE		0x170 /* J721E */
 #define DSS_VP_DSS_DMA_THREADSIZE_STATUS	0x174 /* J721E */
 
-/*
- * OLDI IO_CTRL register offsets. On AM654 the registers are found
- * from CTRL_MMR0, there the syscon regmap should map 0x14 bytes from
- * CTRLMMR0P1_OLDI_DAT0_IO_CTRL to CTRLMMR0P1_OLDI_CLK_IO_CTRL
- * register range.
- */
-#define OLDI_DAT0_IO_CTRL			0x00
-#define OLDI_DAT1_IO_CTRL			0x04
-#define OLDI_DAT2_IO_CTRL			0x08
-#define OLDI_DAT3_IO_CTRL			0x0C
-#define OLDI_CLK_IO_CTRL			0x10
-
-/* Only for AM625 OLDI TX */
-#define OLDI_PD_CTRL				0x100
-#define OLDI_LB_CTRL				0x104
-
-#define OLDI_BANDGAP_PWR			BIT(8)
-#define OLDI_PWRDN_TX				BIT(8)
-#define OLDI0_PWRDN_TX				BIT(0)
-#define OLDI1_PWRDN_TX				BIT(1)
-
 /* Supported plane formats */
 #define DSS_FORMAT_ARGB4444 0x0
 #define DSS_FORMAT_ABGR4444 0x1
author
#2 lore raw

PATCH v3 2/2 configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL

In reply to swamiljain

From: Devarsh Thakkar <[email protected]>

Enable A53 splashscreen at u-boot SPL stage. SPL_MAX_SIZE is bumped up to 0x80000 to accommodate splash related code. Bloblist related macros are enabled to preserve splash context till u-boot proper. SPL Board initialization Kconfig is set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.

---
 configs/am62x_a53_splashscreen.config | 16 ++++++++++++++++
 configs/am62x_evm_a53_defconfig       |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 configs/am62x_a53_splashscreen.config
configs/am62x_a53_splashscreen.config new file +16 -0
new file mode 100644
index 00000000000..0419d60e281
@@ -0,0 +1,16 @@
+CONFIG_FDT_SIMPLEFB=y
+CONFIG_VIDEO=y
+CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPL_VIDEO_TIDSS=y
+CONFIG_BMP_24BPP=y
+CONFIG_BMP_32BPP=y
+CONFIG_SPL_VIDEO=y
+CONFIG_SPL_SPLASH_SCREEN=y
+CONFIG_SPL_SYS_WHITE_ON_BLACK=y
+CONFIG_SPL_SPLASH_SCREEN_ALIGN=y
+CONFIG_SPL_SPLASH_SOURCE=y
+CONFIG_SPL_BMP=y
+CONFIG_SPL_VIDEO_BMP_GZIP=y
+CONFIG_SPL_BMP_24BPP=y
+CONFIG_SPL_BMP_32BPP=y
+CONFIG_SPL_HIDE_LOGO_VERSION=y
configs/am62x_evm_a53_defconfig +3 -1
index 4da668396d0..57d0cec2222 100644
@@ -24,7 +24,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
 CONFIG_SPL_BSS_START_ADDR=0x80c80000
 CONFIG_SPL_BSS_MAX_SIZE=0x80000
 CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SIZE_LIMIT=0x40000
+CONFIG_SPL_SIZE_LIMIT=0x80000
 CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800
 CONFIG_SPL_FS_FAT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -88,6 +88,7 @@ CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_OMAP24XX=y
 CONFIG_DM_MAILBOX=y
 CONFIG_K3_SEC_PROXY=y
+CONFIG_FS_LOADER=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_SPL_MMC_IO_VOLTAGE=y
@@ -143,3 +144,4 @@ CONFIG_EFI_SET_TIME=y
 
 #include <configs/k3_efi_capsule.config>
 #include <configs/am62x_a53_usbdfu.config>
+#include <configs/am62x_a53_splashscreen.config>
\ No newline at end of file
#3 lore raw
In reply to swamiljain

Hi All,

Quoted 10 lines · swamiljain

- Refactor tidss_drv
- Add am62x_a53_splashscreen.config to enable splashscreen at u-boot SPL

Note:
- As OLDI specific changes are in progress to be synced to upstream DT, use this[1] branch to enable SD-MMC splash on AM62X. Upstream DT changes can be found here[2][3].
- Use TI logo file(ti_logo_414x97_32bpp.bmp.gz) from this link[4].

Quoted 5 lines

[1]: https://github.com/swamiljain/u-boot/tree/v3_splash_final
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://lore.kernel.org/all/[email protected]/
[4]: https://github.com/swamiljain/ti-splash-logo/blob/main/ti_logo_414x97_32bpp.bmp.gz
---

Please ignore this series, will be resending v3.

Regards,
Swamil

Quoted 40 lines

Changelog v2->v3:
- Add splashscreen.config fragment to enable splashscreen
- Align OLDI mode detection logic with kernel side upstreamed OLDI series[1]
- Address styling issue mentioned by Devarsh
- Pick up R-by tag for PATCH 1/2

Link to v2:
https://lore.kernel.org/all/[email protected]/

Changelog v1->v2
- Iterate through all available OLDIs
- Move dss_oldi_tx_power from tidss_drv.c to tidss_oldi.c
- Rename tidss_attach_active_panel to a more generic name
- To handle all active hw video ports, add an array for active hw vps
- Iterate through all active hw vps to enable respective clks

Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---

Devarsh Thakkar (1):
configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot
SPL

Swamil Jain (1):
drivers: video: tidss: Refactor tidss_drv

  configs/am62x_a53_splashscreen.config |  16 ++
  configs/am62x_evm_a53_defconfig       |   4 +-
  drivers/video/tidss/Makefile          |   2 +-
  drivers/video/tidss/tidss_drv.c       | 235 +++++++++++------
  drivers/video/tidss/tidss_drv.h       |  40 ++-
  drivers/video/tidss/tidss_oldi.c      | 364 ++++++++++++++++++++++++++
  drivers/video/tidss/tidss_oldi.h      |  72 +++++
  drivers/video/tidss/tidss_regs.h      |  21 --
  8 files changed, 631 insertions(+), 123 deletions(-)

create mode 100644 configs/am62x_a53_splashscreen.config create mode 100644 drivers/video/tidss/tidss_oldi.c create mode 100644 drivers/video/tidss/tidss_oldi.h