summaryrefslogtreecommitdiff
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* rockchip: video: Add support for RK3568 DSI HostChris Morgan2023-04-214-0/+916
| | | | | | | | | | | | | | | Add support for DSI Host controller on Rockchip RK3568. This driver is heavily based on the Rockchip dw_mipi_dsi_rockchip.c driver in Linux and the stm32_dsi.c driver in U-Boot. It should be easy to add support for other SoCs as the only missing component from the mainline driver is setting the VOP big or VOP little (which the rk3568 does not have). Driver was tested for use in sending commands to a DSI panel in order to obtain the panel ID. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* video: rockchip: rk_vop: add rk3288-dp compare stringJohan Jonker2023-04-211-1/+2
| | | | | | | | | | | | | In the current rk3288.dtsi file the compatible string for the DisplayPort(DP) node ends with "edp". The string in the binding ends with "dp" which conflicts with "cdn-dp" as a search term. Add "rk3288-dp" as compare string to select vop_id. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # chromebook-jerry Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* video: sunxi: dw-hdmi: Use DM for HVCC regulatorSamuel Holland2023-04-121-0/+9
| | | | | | | | | | The HDMI PHY depends on the HVCC supply being enabled. So far we have relied on it being enabled by an earlier firmware stage (SPL or TF-A). Attempt to enable the regulator here, so we can remove that dependency. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
* video: sunxi: dw-hdmi: Use DM for clock gates and resetsSamuel Holland2023-04-121-6/+21
| | | | | | | | | | | This abstracts away the CCU register layout, which is necessary for supporting new SoCs like H6 with a reorganized CCU. One of the resets is referenced from the PHY node instead of the controller node, so it will have to wait until the PHY code is factored out to a separate driver. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
* Merge branch 'master_regulator/fixes' of ↵Tom Rini2023-04-084-8/+8
|\ | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-sh - Fix usage of CONFIG_IS_ENABLED and DM_REGULATOR
| * video: tl070wsh30: Fix use of CONFIG_IS_ENABLED on DM_REGULATORMarek Vasut2023-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | The DM_REGULATOR symbol has SPL counterpart in: drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR Use CONFIG_IS_ENABLED() macro to match on the correct variant depending on the build stage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * video: simple-panel: Fix use of CONFIG_IS_ENABLED on DM_REGULATORMarek Vasut2023-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | The DM_REGULATOR symbol has SPL counterpart in: drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR Use CONFIG_IS_ENABLED() macro to match on the correct variant depending on the build stage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * video: rm68200: Fix use of CONFIG_IS_ENABLED on DM_REGULATORMarek Vasut2023-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | The DM_REGULATOR symbol has SPL counterpart in: drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR Use CONFIG_IS_ENABLED() macro to match on the correct variant depending on the build stage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * video: otm8009a: Fix use of CONFIG_IS_ENABLED on DM_REGULATORMarek Vasut2023-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | The DM_REGULATOR symbol has SPL counterpart in: drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR Use CONFIG_IS_ENABLED() macro to match on the correct variant depending on the build stage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | simple_panel: support simple MIPI DSI panelsSvyatoslav Ryhel2023-04-071-4/+33
| | | | | | | | | | | | | | | | | | | | | | Re-use simple panel driver for MIPI DSI panels which do not require additional DSI commands for setup. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF700T T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | simple_panel: add support for get_display_timingSvyatoslav Ryhel2023-04-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | Some cases may require passing display timings from panel driver. To handle such cases support parsing device tree panel node for timing subnode. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Google Nexus 7 2012 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra20: add DSI controller driverSvyatoslav Ryhel2023-04-075-0/+1056
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for both DSI outputs found on Tegra. Only very minimal functionality is implemented, so advanced features like ganged mode won't work. Driver is heavily based on mainline Tegra DSI and re-uses much of its features. Only T30 is supported for now but T20 support can be added if any supported devices will be found. Driver is wrapped as panel driver since Tegra DC driver supports only panel drivers calls. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF600T T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: pass DC regmap to internal devicesSvyatoslav Ryhel2023-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Internal video devices like DSI and HDMI controllers require sending commands into DC register field. To make this available, lets create platform data, which is restricted to pass DC regmap only to pre-defined devices. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: add panel_set_backlight callSvyatoslav Ryhel2023-04-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Tegra DC driver does not call panel_set_backlight, which can result in absence of backlight on device. Fix this by calling panel_set_backlight with BACKLIGHT_DEFAULT just after panel_enable_backlight. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: add 180 degree panel rotationSvyatoslav Ryhel2023-04-071-4/+19
| | | | | | | | | | | | | | | | | | | | Unlike 90 and 270 degree rotation, 180 degree rotation is more common and does not require scaling. Implement it for correct grouper support. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # Google Nexus 7 2012 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Google Nexus 7 2012 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: assign regmap directlySvyatoslav Ryhel2023-04-071-11/+8
| | | | | | | | | | | | | | | | Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: request timings from panel driver firstSvyatoslav Ryhel2023-04-071-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | Check if panel driver has display timings and get those. If panel driver does not pass timing, try to find timing under rgb node for backwards compatibility. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: tegra-dc: get clocks from device treeSvyatoslav Ryhel2023-04-071-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | DISP1 clock may use PLLP, PLLC and PLLD as parents. Instead of hardcoding, lets pass clock and its parent from device tree. Default parent is PLLP. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Tested-by: Nicolas Chauvet <kwizart@gmail.com> # Paz00 Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30 Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* | video: move tegra dc driver into own folderSvyatoslav Ryhel2023-04-075-10/+14
| | | | | | | | | | | | | | | | | | Move tegra dc driver to tegra20 directory and also mention T30 in description of the driver's config option. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> [agust: add commit description] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | tegra: lcd: video: integrate display driver for t30Marcel Ziswiler2023-04-071-2/+8
|/ | | | | | | | | | | | | | | | | | | | | On popular request make the display driver from T20 work on T30 as well. Turned out to be quite straight forward. However a few notes about some things encountered during porting: Of course the T30 device tree was completely missing host1x as well as PWM support but it turns out this can simply be copied from T20. The only trouble compiling the Tegra video driver for T30 had to do with some hard-coded PWM pin muxing for T20 which is quite ugly anyway. On T30 this gets handled by a board specific complete pin muxing table. The older Chromium U-Boot 2011.06 which to my knowledge was the only prior attempt at enabling a display driver for T30 for whatever reason got some clocking stuff mixed up. Turns out at least for a single display controller T20 and T30 can be clocked quite similar. Enjoy. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Jonas Schwöbel <jonasschwoebel@yahoo.de> # Surface RT T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
* Revert 9f62a472dfb2 ("video: Remove duplicate cursor-positioning function")Tom Rini2023-03-161-10/+34
| | | | | | | | | | | | This reverts commit 9f62a472dfb26ec14408a27938ddd2a25700009d. The changes here aren't quite right, and on platforms such as Raspberry Pi where we can have both serial and video output, the change above causes output to change. This can be seen as the hush tests we have now fail. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video: Clear the vidconsole rather than the videoSimon Glass2023-03-131-0/+12
| | | | | | | | | | It is better to clear the console device rather than the video device, since the console has the text display. We also need to reset the cursor position with the console, but not with the video device. Add a new function to handle this and update the 'cls' command to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Remove duplicate cursor-positioning functionSimon Glass2023-03-131-34/+10
| | | | | | | There are two functions for positioning the cursor on the console. Remove one of them. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Allow a copy framebuffer with pre-allocated fbSimon Glass2023-03-131-8/+24
| | | | | | | | | | | At present it is not possible for the video driver to use a pre-allocated frame buffer (such as is done with EFI) with the copy framebuffer. This can be useful to speed up the display. Adjust the implementation so that copy_size can be set to the required size, with this being allocated if the normal framebuffer size is 0. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi: Support copy framebufferSimon Glass2023-03-131-1/+25
| | | | | | | Add support for this to EFI in case it becomes useful. At present it just slows things down. You can enable CONFIG_VIDEO_COPY to turn it on. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi: Support a 64-bit frame buffer addressSimon Glass2023-03-132-13/+23
| | | | | | | | | | | | The current vesa structure only provides a 32-bit value for the frame buffer. Many modern machines use an address outside the range. It is still useful to have this common struct, but add a separate frame-buffer address as well. Add a comment for vesa_setup_video_priv() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi: video: Return mode info for app alsoSimon Glass2023-03-131-2/+5
| | | | | | | The mode info is currently not initialised for the app. Fix this by returning it from the function. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi: video: Move payload code into a functionSimon Glass2023-03-131-26/+57
| | | | | | | | Put this into a function, as we have done for the app implementation. Comment both functions. FOr now the app still does not access it correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
* video console: add 16x32 Terminus font from linuxDzmitry Sankouski2023-03-071-0/+7
| | | | | | | | Modern mobile phones typically have high pixel density. Bootmenu is hardly readable on those with 8x16 font. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video console: add 12x22 Sun font from linuxDzmitry Sankouski2023-03-071-0/+7
| | | | | | | | Modern mobile phones typically have high pixel density. Bootmenu is hardly readable on those with 8x16 font. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video console: allow font size configuration at runtimeDzmitry Sankouski2023-03-075-0/+61
| | | | | | | | | | | Allow font size configuration at runtime for console_simple.c driver. This needed for unit testing different fonts. Configuring is done by `font` command, also used for font selection in true type console. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video console: move vidconsole_get_font_size() logic to driver opsDzmitry Sankouski2023-03-072-1/+13
| | | | | | | | | | Since multiple vidconsole drivers exists, vidconsole_get_font_size() implementation cannot longer live in vidconsole_uclass.c file. Move current vidconsole_get_font_size logic to truetype driver ops. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video console: implement multiple fonts configurationDzmitry Sankouski2023-03-075-75/+145
| | | | | | | | | | | | This needed for unit testing different fonts. Configured fonts are placed in an array of fonts. First font is selected by default upon console probe. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [agust: fixed build error when bmp logo disabled] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video console: add support for fonts wider than 1 byteDzmitry Sankouski2023-03-074-34/+59
| | | | | | | | | | | Devices with high ppi may benefit from wider fonts. Current width implementation is limited by 1 byte, i.e. 8 bits. New version iterates VIDEO_FONT_BYTE_WIDTH times, to process all width bytes, thus allowing fonts wider than 1 byte. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video console: refactoring and optimizationDzmitry Sankouski2023-03-075-376/+324
| | | | | | | | | | | | | - move common code to vidconsole_internal.h and console_core.c - unite probe functions - get rid of code duplications in switch across bpp values - extract common pixel fill logic in two functions one per horizontal and vertical filling - rearrange statements in put_xy* methods in unified way - replace types - uint*_t to u* Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: treewide: Complete migration to new driver model schemaSimon Glass2023-02-141-2/+2
| | | | | | Update various build and test components to use the new schema. Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL use of PANELSimon Glass2023-02-101-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_PANEL defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL use of VIDEO_BPP32Simon Glass2023-02-101-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_VIDEO_BPP32 defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL use of VIDEO_BPP16Simon Glass2023-02-101-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_VIDEO_BPP16 defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: Drop unused scf0403_lcd driverSimon Glass2023-02-072-298/+0
| | | | | | | | | | This is not used since this commit: 76386d6195a arm: Remove cm_t35 board Drop the driver and Kconfig option. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Drop unused lg4573 driverSimon Glass2023-02-072-332/+0
| | | | | | | | | | This is not used since this commit: 3cf02f5ffa4 imx6: remove not longer supported aristainetos boards Drop the driver and Kconfig option. Signed-off-by: Simon Glass <sjg@chromium.org>
* samsung: Drop CONFIG_EXYNOS_PWM_BLSimon Glass2023-02-071-1/+0
| | | | | | | This is not defined anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* drivers: video: tidss: TIDSS video driver support for AM62xNikhil M Jain2023-02-047-0/+1405
| | | | | | | | | | | | | | | | Added tidss video driver support which enables display on oldi panel using AM62x, it creates a simple pipeline framebuffer==>vidl1==>ovr1==>vp1==>oldi_panel and calculates clock rates for panel from panel node in device tree. To compile TIDSS when user sets CONFIG_VIDEO_TIDSS add rule in Makefile. Include tidss folder location in Kconfig. TIDSS is ported from linux kernel version 5.10.145 Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
* drivers: video: simple_panel: make simple panel independent of backlightNikhil M Jain2023-02-041-2/+5
| | | | | | | | | | This patch updates the necessary Kconfigs to make simple panel driver independent of backlight driver and compiling backlight related code in simple-panel driver conditionally to when user has set CONFIG_BACKLIGHT. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video: ti: am335x: restore driver-model codeDario Binacchi2023-02-048-0/+666
| | | | | | | | | | The commit 82f7b869f5d7a ("video: Drop CONFIG_AM335X_LCD") removed not only the LCD legacy implementation but also the code with driver model support. The patch restores the code with driver model support. Fixes: 82f7b869f5d7a ("video: Drop CONFIG_AM335X_LCD") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* video: sunxi: dw-hdmi: Read address from DT nodeJernej Skrabec2023-01-231-15/+24
| | | | | | | | | Currently HDMI controller MMIO address is hardcoded. Change that so address is read from DT node. That will make adding support for new variants a bit easier. Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Samuel Holland <samuel@sholland.org>
* video: sunxi: dw-hdmi: Probe driver by compatibleJernej Skrabec2023-01-231-8/+10
| | | | | | | | | | | | Currently the sunxi dw-hdmi driver is probed unconditionally, even if there is no such device. Switch the driver to probing via a compatible string. This brings many benefits; the driver is only probed when needed, and now it can read the DT node. Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Remove unused CONFIG definesTom Rini2023-01-203-11/+1
| | | | | | | Remove some CONFIG symbols and related comments, etc, that are unused within the code itself at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
* video: Add font functions to the vidconsole APISimon Glass2023-01-162-8/+52
| | | | | | | | | Support for fonts currently depends on the type of vidconsole in use. Add two new methods to enumerate fonts and to set the font. Fix a few other method comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: truetype: Rename the metrics functionSimon Glass2023-01-161-5/+5
| | | | | | This should really have a 'truetype' prefix. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>