Refactor tidss_drv and enable early splash on AM625
v4 cover Refactor tidss_drv and enable early splash on AM625
This series:
- Refactors tidss_drv
- Adds 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 v3->v4:
PATCH 1/2 : Don't include "asm/utils.h" in tidss_drv.c
PATCH 2/2 : - Move CONFIG_FS_LOADER from am62x_a53_defconfig to
splashscreen.config fragment
- Minor change in commit message
Link to v3:
https://lore.kernel.org/all/[email protected]/
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 | 17 ++ configs/am62x_evm_a53_defconfig | 3 +- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 236 +++++++++++------ 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(+), 124 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
PATCH v4 1/2 drivers: video: tidss: Refactor tidss_drv
- 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 | 236 +++++++++++++------- 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(+), 123 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
@@ -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 -80
328 lines not on this page · raw message
drivers/video/tidss/tidss_drv.h +19 -21
@@ -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 2enum 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
@@ -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
PATCH v4 2/2 configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
In reply to Swamil JainFrom: 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. SPL Board initialization Kconfig is set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.
--- configs/am62x_a53_splashscreen.config | 17 +++++++++++++++++ configs/am62x_evm_a53_defconfig | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 configs/am62x_a53_splashscreen.config
configs/am62x_a53_splashscreen.config new file +17 -0
@@ -0,0 +1,17 @@ +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 +CONFIG_FS_LOADER=y
configs/am62x_evm_a53_defconfig +2 -1
@@ -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
@@ -143,3 +143,4 @@ CONFIG_EFI_SET_TIME=y #include <configs/k3_efi_capsule.config> #include <configs/am62x_a53_usbdfu.config> +#include <configs/am62x_a53_splashscreen.config>
Re: [PATCH v4 2/2] configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
Quoted 7 lines · Swamil Jain
From: Devarsh Thakkar <[email protected]>
Enable A53 splashscreen at u-boot SPL stage.
SPL_MAX_SIZEis bumped up to0x80000to accommodate splash related code. SPL Board initializationKconfigis set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.
Quoted 7 lines
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>--- configs/am62x_a53_splashscreen.config | 17 +++++++++++++++++ configs/am62x_evm_a53_defconfig | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 configs/am62x_a53_splashscreen.config
This in turn makes am62x_evm_a53_ethboot too big to compile. Please figure out how to re-factor these changes, or update the _ethboot version to disable this again. Thanks.
Signature · 1 line
Tom
Re: [PATCH v4 2/2] configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
Quoted 17 lines · Tom Rini
Quoted 7 lines · Swamil Jain
From: Devarsh Thakkar <[email protected]>
Enable A53 splashscreen at u-boot SPL stage.
SPL_MAX_SIZEis bumped up to0x80000to accommodate splash related code. SPL Board initializationKconfigis set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.Quoted 7 lines
Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>--- configs/am62x_a53_splashscreen.config | 17 +++++++++++++++++ configs/am62x_evm_a53_defconfig | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-)create mode 100644
configs/am62x_a53_splashscreen.config
Quoted 4 lines
This in turn makes
am62x_evm_a53_ethboottoo big to compile. Please figure out how to re-factor these changes, or update the_ethbootversion to disable this again. Thanks.
Thanks Tom, will fix and resend the patch.
Regards,
Swamil.
Quoted 7 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPLSigned-off-by Swamil Jain <[email protected]>---
I also went ahead and did a sandbox build and the driver seems to build fine contrary to what Tom saw[1].
Below are the steps I followed, am I missing something here?
1. make sandbox_defconfig
2. Select CONFIG_VIDEO_TIDSS via menuconfig
3. make -jnproc
[1]: https://lore.kernel.org/u-boot/20251105164114.GQ6688@bill-the-cat/
Regards,
Anshul
Quoted 58 lines
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 logofile(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
---
Changelogv3->v4:
PATCH 1/2 : Don't include "asm/utils.h" intidss_drv.c
PATCH 2/2 : - MoveCONFIG_FS_LOADERfromam62x_a53_defconfigto
splashscreen.config fragment
- Minor change in commit message
Link to v3:
https://lore.kernel.org/all/[email protected]/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/2Link to v2:
https://lore.kernel.org/all/[email protected]/Changelog
v1->v2
- Iterate through all available OLDIs
- Movedss_oldi_tx_powerfromtidss_drv.ctotidss_oldi.c
- Renametidss_attach_active_panelto 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 clksLink to v1: https://lore.kernel.org/u-boot/[email protected]/
---Devarsh Thakkar (1):
configs:am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot
SPLSwamil Jain (1):
drivers: video: tidss: Refactortidss_drvconfigs/am62x_a53_splashscreen.config | 17 ++ configs/am62x_evm_a53_defconfig | 3 +- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 236 +++++++++++------ 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(+), 124 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
Quoted 14 lines · Anshul Dalal
Quoted 7 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPLSigned-off-by Swamil Jain <[email protected]>---
Tested-by Anshul Dalal <[email protected]>I also went ahead and did a sandbox build and the driver seems to build fine contrary to what Tom saw[1].
Quoted 6 lines
Below are the steps I followed, am I missing something here?
1. makesandbox_defconfig
2. SelectCONFIG_VIDEO_TIDSSvia menuconfig
3. make -jnproc[1]: https://lore.kernel.org/u-boot/20251105164114.GQ6688@bill-the-cat/
v4 drops the header in question :)
Signature · 1 line
Tom
Quoted 15 lines · Tom Rini
Quoted 14 lines · Anshul Dalal
Quoted 7 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPLSigned-off-by Swamil Jain <[email protected]>---
Tested-by Anshul Dalal <[email protected]>I also went ahead and did a sandbox build and the driver seems to build fine contrary to what Tom saw[1].
Quoted 9 lines
Quoted 6 lines
Below are the steps I followed, am I missing something here?
1. makesandbox_defconfig
2. SelectCONFIG_VIDEO_TIDSSvia menuconfig
3. make -jnproc[1]: https://lore.kernel.org/u-boot/20251105164114.GQ6688@bill-the-cat/
v4 drops the header in question :)
Hi Tom, as we have the patches tested and sandbox builds also fine, does the series look good, could it be possible to pick it?
Regards,
Swamil
Quoted 22 lines · Swamil Jain
Quoted 20 lines · Tom Rini
Quoted 19 lines · Anshul Dalal
Quoted 7 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPLSigned-off-by Swamil Jain <[email protected]>---
Tested-by Anshul Dalal <[email protected]>I also went ahead and did a sandbox build and the driver seems to build fine contrary to what Tom saw[1].
Below are the steps I followed, am I missing something here?
1. makesandbox_defconfig
2. SelectCONFIG_VIDEO_TIDSSvia menuconfig
3. make -jnproc
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
[1]: https://lore.kernel.org/u-boot/20251105164114.GQ6688@bill-the-cat/
v4 drops the header in question :)
Hi Tom, as we have the patches tested and sandbox builds also fine, does the series look good, could it be possible to pick it?
I've assigned it to the video custodian as yes it looks generally fine, thanks.
Signature · 1 line
Tom
Hi Tom,
Quoted 25 lines · Tom Rini
Quoted 24 lines · Swamil Jain
Quoted 22 lines · Tom Rini
Quoted 20 lines · Anshul Dalal
Quoted 7 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPLSigned-off-by Swamil Jain <[email protected]>---
Tested-by Anshul Dalal <[email protected]>I also went ahead and did a sandbox build and the driver seems to build fine contrary to what Tom saw[1].
Below are the steps I followed, am I missing something here?
1. makesandbox_defconfig
2. SelectCONFIG_VIDEO_TIDSSvia menuconfig
3. make -jnproc[1]: https://lore.kernel.org/u-boot/20251105164114.GQ6688@bill-the-cat/
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
v4 drops the header in question :)
Hi Tom, as we have the patches tested and sandbox builds also fine, does the series look good, could it be possible to pick it?
I've assigned it to the video custodian as yes it looks generally fine, thanks.
Gentle ping.
Regards,
Swamil.
Re: (subset) [PATCH v4 0/2] Refactor tidss_drv and enable early splash on AM625
In reply to Swamil JainQuoted 6 lines · Swamil Jain
This series:
- Refactorstidss_drv
- Adds am62x_a53_splashscreen.config to enable splashscreen at u-boot SPL
Applied to u-boot/next, thanks!
[1/2] drivers: video: tidss: Refactor tidss_drv
commit: 209c5d9da18375a6ea320786254803d28486e739
Signature · 1 line
Tom