aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2022-10-30Merge tag 'video-20221030' of ↵WIP/30Oct2022Tom Rini31-2283/+414
https://source.denx.de/u-boot/custodians/u-boot-video - fix [hv]sync active vs back porch in dw_mipi_dsi - simplefb rotation support - support splash as raw image from MMC - enhancements to Truetype console (multiple fonts and sizes) - drop old LCD support
2022-10-30video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEOSimon Glass10-13/+13
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30pci: Drop test for DM_VIDEOSimon Glass1-2/+0
This is not needed anymore, since there is no other option. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Make all video options depend on DM_VIDEOSimon Glass1-31/+9
Rather than sprinkly this file with 'depends' statements, make all options depend on DM_VIDEO. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop SPLASHIMAGE_CALLBACKSimon Glass1-13/+0
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop use of the lcd header fileSimon Glass1-1/+0
This file is being removed so drop remaining references to it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCDSimon Glass1-12/+4
This option is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_VIDEOSimon Glass1-9/+0
This option is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30tegra: Drop old LCD codeSimon Glass1-1/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30nexell: Drop old LCD codeSimon Glass1-51/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: samsung: Drop old LCD codeSimon Glass1-1/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop atmel LCD codeSimon Glass2-2/+0
This has not been migrated to DM_VIDEO since 2019. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop ld9040 driverSimon Glass2-113/+0
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: atmel: Drop pre-DM parts of video driverSimon Glass3-289/+2
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_AM335X_LCDSimon Glass10-1060/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop VCXK video controllerSimon Glass3-433/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Drop CONFIG_LCD_LOGOSimon Glass3-43/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_INFOSimon Glass1-4/+0
This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_INFO_BELOW_LOGOSimon Glass1-4/+0
This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Convert CONFIG_VIDEO_LOGO_MAX_SIZE to KconfigSimon Glass1-1/+6
This converts the following to Kconfig: CONFIG_VIDEO_LOGO_MAX_SIZE Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Rename CONFIG_SYS_VIDEO_LOGO_MAX_SIZESimon Glass1-0/+3
This option should not have the SYS_ in it. Drop it so it fits in with the other video options. Also simplify the alignment code in gunzip_bmp(), since malloc() always returns a 32-bit-aligned pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Convert CONFIG_HIDE_LOGO_VERSION to KconfigSimon Glass1-0/+9
This converts the following to Kconfig: CONFIG_HIDE_LOGO_VERSION Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Split SPLASH_SCREEN_ALIGN from bmp commandSimon Glass1-3/+4
The bmp command already has a way to centre the image. Using this CONFIG option to also centre it makes it impossible to control where images are placed on the screen. Drop the extra check. Simplify the Kconfig file we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add a way to get the default font heightSimon Glass1-0/+11
This is not as simple as it seems. Add a function to provide it so that the upcoming menu feature can space lines out correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add a function to get the dimensions of a BMP imageSimon Glass1-4/+12
This is useful for some other users, so break this out into a function. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add commands to list and change fontsSimon Glass1-0/+10
Add a new 'font' command which allows the fonts to be listed as well as selecting a different font and size. Allow the test to run on sandbox, where multiple font/size combinations are supported, as well as sandbox_flattree, where they are not. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add a way to change the font name and sizeSimon Glass1-0/+75
It is useful to be able to support multiple fonts. Add a function to handle this as well as one to list the available fonts. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add a function to select the truetype metricsSimon Glass1-7/+17
Move this code into a function so we can call it later when we want to change the font. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Record the truetype font nameSimon Glass1-10/+13
Add this to the metrics so we can later adjust the font size without changing the font itself. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Refactor to allow more than one font sizeSimon Glass2-42/+113
At present the truetype console supports only a single font and size. It is useful to be able to support different combinations. As a first step, move the metrics into there own structure and allow having multiple metrics. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Tidy up the check for valid fontsSimon Glass1-4/+13
Put this check into a function so we can use it elsewhere. Also drop the macros which do the same thing but are not actually used. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Add function to obtain the U-Boot logoSimon Glass1-0/+5
It is useful to show the logo from other code, coming in a later feature. Add a function to obtain it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Allow filling the display with a colourSimon Glass1-4/+16
Generalise the video_clear() function to allow filling with a different colour. Tidy up the comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Move and rename DM_HX8238D optionSimon Glass2-11/+11
This is actually a panel, not a video device. Rename the option, move it into the right place and make it depend on PANEL. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Move the console commands to cmd/Simon Glass2-58/+0
Move these commands and the implementation to the cmd/ directory, which is where most commands are kept. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> [agust: keep vidconsole_position_cursor() in vidconsole uclass] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2022-10-30video: Use vidconsole_put_string() to write a stringSimon Glass1-4/+5
Use the existing function rather that duplicating the code. Also fix up the missing error handling. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Provide a function to set the cursor positionSimon Glass1-5/+13
Add an exported function which allows the cursor position to be set to pixel granularity. Make use of this in the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Move console colours to the video uclassSimon Glass2-71/+69
At present these are attached to vidconsole which means that the video uclass requires that a console is enabled. This is not the intention. The colours are a reasonable way of indexing common colours in any case, so move them to the video uclass instead. Rename vid_console_color() to video_index_to_colour() now that it is more generic. Also fix the inconsistent spelling in these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: simplefb: add rotation supportTakumi Sueda1-1/+5
It introduces the way to rotate the screen for boards with rotated screen. Signed-off-by: Takumi Sueda <puhitaku@gmail.com>
2022-10-30video: dw_mipi_dsi: fix [hv]sync active vs back porchJohn Keeping1-4/+4
The wrong fields are pulled out of the timings here so the values programmed into the DSI_VID_HSA_LINES/DSI_VID_HBP_LINES and DSI_VID_VSA_LINES/DSI_VID_VBP_LINES registers are swapped. Use the right fields so that the correct values are programmed. Fixes: d4f7ea83fc ("video: add MIPI DSI host controller bridge") Signed-off-by: John Keeping <john@metanate.com>
2022-10-29dm: core: Do not stop uclass iteration on errorMichal Suchanek1-12/+18
When probing a device fails NULL pointer is returned, and following devices in uclass list cannot be iterated. Skip to next device on error instead. With that the only condition under which these simple iteration functions return error is when the dm is not initialized at uclass_get time. This is not all that interesting, change return type to void. Fixes: 6494d708bf ("dm: Add base driver model support") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-29dm: treewide: Do not use the return value of simple uclass iteratorMichal Suchanek4-31/+14
uclass_first_device/uclass_next_device return value will be removed, don't use it. With the current implementation dev is equivalent to !ret. It is redundant to check both, ret check can be replaced with dev check, and ret check inside the iteration is dead code. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-29dm: core: Switch uclass_*_device_err to use uclass_*_device_checkMichal Suchanek2-5/+12
Clarify documentation, fix a few more cases that could be broken by the change. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2022-10-29dm: tpl: Add fdt address translation support in TPLWilliam Zhang1-0/+14
This is needed in the platforms that use "ranges" node property for address translation in their dts for TPL. Signed-off-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-29dm: core: Fix lists_bind_fdt() using non-existent of_matchSimon Glass1-1/+3
The call to device_bind_with_driver_data() passes id->data but if the entry has no of_match then the id has not been set by the selected driver. Normally this passes unnoticed since a previous driver likely had an of_match value, so the id is set to that. Of course it is not correct to pass the id->data from a different driver. With clang-14 the driver ordering is such that the id is never actually set in the 'bind /usb@1 usb_ether' line in test_bind_unbind_with_node() thus causing a crash. Fix this by passing 0 if the of_match for a driver does not exist. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-29gpio-uclass: fix gpio lookup by labelRasmus Villemoes1-3/+1
Matching anything that just happens to have the sought-for label as a prefix is wrong. For example, if the board designer has designated 10 lines for debug purposes, named "debug1" through "debug10", and we are looking up "debug1", if debug10 happens to be met first during the iteration we'd wrongly return that. In theory, this can break existing users that could rely on this quirk, but OTOH keeping the current broken semantics can cause a lot of grief for people hitting this in the future and not understanding why they don't find the line they expect. Considering how few in-tree defconfigs currently set DM_GPIO_LOOKUP_LABEL (ignoring sandbox, only four "real" boards), let's fix it before the use becomes more widespread. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2022-10-26memory: Add TI GPMC driverRoger Quadros4-0/+1558
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like - Asynchronous SRAM-like memories and ASICs - Asynchronous, synchronous, and page mode burst NOR flash - NAND flash - Pseudo-SRAM devices This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-10-26dm: memory: Introduce new uclassRoger Quadros4-0/+50
Introduce UCLASS_MEMORY for future Memory Controller device drivers. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26crypto: hash: sw: fix Kconfig dependenciesBenjamin Bara1-1/+2
Fix SHA512 config name and add missing SHA384 config. Signed-off-by: Benjamin Bara <Benjamin.Bara@skidata.com>
2022-10-26Merge https://source.denx.de/u-boot/custodians/u-boot-pmicWIP/26Oct2022Tom Rini2-2/+8