diff options
author | Tom Rini <trini@konsulko.com> | 2019-10-14 07:30:16 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-14 07:30:16 -0400 |
commit | cd5ffc5de5a26f5b785e25654977fee25779b3e4 (patch) | |
tree | 7b63fdbb8683a9c3258f1901573c4633deec98c7 /test | |
parent | fae79480111be47944cf66a9c052ff3934a09ce5 (diff) | |
parent | d68ed0fad6bb880bd2bbcc1d86cfc9ba971f856f (diff) |
Merge tag 'video-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video
- panel bridge support in stm32 ltdc
- DSI host uclass
- sandbox DSI host uclass test driver and DSI host test
- MIPI DSI helpers
- Synopsys Designware MIPI DSI host bridge driver
- STM32 DSI controller driver
- OTM800A and RM68200 panel support
- DSI host updates for stm32f769 and stm32mp1 dtsi files
- splash screen for stm32f769 and stm32mp1 boards
- stm32 defconfig updates for display support
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/Makefile | 1 | ||||
-rw-r--r-- | test/dm/dsi_host.c | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index 55a7940053e..0c2fd5cb5e2 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_BLK) += blk.o obj-$(CONFIG_BOARD) += board.o obj-$(CONFIG_DM_BOOTCOUNT) += bootcount.o obj-$(CONFIG_CLK) += clk.o clk_ccf.o +obj-$(CONFIG_VIDEO_MIPI_DSI) += dsi_host.o obj-$(CONFIG_DM_ETH) += eth.o obj-$(CONFIG_FIRMWARE) += firmware.o obj-$(CONFIG_DM_GPIO) += gpio.o diff --git a/test/dm/dsi_host.c b/test/dm/dsi_host.c new file mode 100644 index 00000000000..59fcd5558f0 --- /dev/null +++ b/test/dm/dsi_host.c @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +/* + * Copyright (C) 2019 STMicroelectronics - All Rights Reserved + * Author(s): Yannick Fertre <yannick.fertre@st.com> for STMicroelectronics. + */ + +#include <common.h> +#include <dm.h> +#include <dsi_host.h> +#include <asm/state.h> +#include <asm/test.h> +#include <dm/test.h> +#include <test/ut.h> + +static int dm_test_dsi_host_phy_init(void *priv_data) +{ + return 0; +} + +static void dm_test_dsi_host_phy_post_set_mode(void *priv_data, + unsigned long mode_flags) +{ +} + +static int dm_test_dsi_host_phy_get_lane_mbps(void *priv_data, + struct display_timing *timings, + u32 lanes, + u32 format, + unsigned int *lane_mbps) +{ + return 0; +} + +static const struct mipi_dsi_phy_ops dm_test_dsi_host_phy_ops = { + .init = dm_test_dsi_host_phy_init, + .get_lane_mbps = dm_test_dsi_host_phy_get_lane_mbps, + .post_set_mode = dm_test_dsi_host_phy_post_set_mode, +}; + +/* Test that dsi_host driver functions are called */ +static int dm_test_dsi_host(struct unit_test_state *uts) +{ + struct udevice *dev; + struct mipi_dsi_device device; + struct display_timing timings; + unsigned int max_data_lanes = 4; + + ut_assertok(uclass_first_device_err(UCLASS_DSI_HOST, &dev)); + + ut_assertok(dsi_host_init(dev, &device, &timings, max_data_lanes, + &dm_test_dsi_host_phy_ops)); + + ut_assertok(dsi_host_enable(dev)); + + return 0; +} + +DM_TEST(dm_test_dsi_host, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); |