Skip to content

Commit

Permalink
drivers: video: add emulated Imager driver and RX driver
Browse files Browse the repository at this point in the history
Add a new implementation of a test pattern generator, with the same
architecture as real drivers: split receiver core and
I2C-controlled sub-device, with changes of video format in
"zephyr,emul-imager" leads to different data produced by
"zephyr,emul-rx".

Signed-off-by: Josuah Demangeon <[email protected]>
  • Loading branch information
josuah authored and nashif committed Dec 6, 2024
1 parent 46a262f commit 9e908b1
Show file tree
Hide file tree
Showing 12 changed files with 1,173 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drivers/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ zephyr_library_sources_ifdef(CONFIG_VIDEO_OV5640 ov5640.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7670 ov7670.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_ESP32 video_esp32_dvp.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_SDMA video_mcux_smartdma.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_IMAGER video_emul_imager.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_RX video_emul_rx.c)
4 changes: 4 additions & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ source "drivers/video/Kconfig.gc2145"

source "drivers/video/Kconfig.mcux_sdma"

source "drivers/video/Kconfig.emul_imager"

source "drivers/video/Kconfig.emul_rx"

endif # VIDEO
18 changes: 18 additions & 0 deletions drivers/video/Kconfig.emul_imager
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 tinyVision.ai Inc.
# SPDX-License-Identifier: Apache-2.0

config VIDEO_EMUL_IMAGER
bool "Software implementation of an imager"
depends on DT_HAS_ZEPHYR_VIDEO_EMUL_IMAGER_ENABLED
default y
help
Enable driver for the emulated Imager.

config VIDEO_EMUL_IMAGER_FRAMEBUFFER_SIZE
int "Internal framebuffer size used for link emulation purpose"
default 4096
help
Configure the size of the internal framebuffer the emulated Imager
driver uses to simulate MIPI transfers. This is the first field of
dev->data, and the emulated video MIPI driver will `memcpy()` it
into the video buffer.
10 changes: 10 additions & 0 deletions drivers/video/Kconfig.emul_rx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2024 tinyVision.ai Inc.
# SPDX-License-Identifier: Apache-2.0

config VIDEO_EMUL_RX
bool "Software implementation of video frame RX core"
depends on DT_HAS_ZEPHYR_VIDEO_EMUL_RX_ENABLED
depends on VIDEO_EMUL_IMAGER
default y
help
Enable driver for the MIPI RX emulated DMA engine.
Loading

0 comments on commit 9e908b1

Please sign in to comment.