Skip to content

Commit

Permalink
samples: video: capture: rt10xx: Add work-around for init priority issue
Browse files Browse the repository at this point in the history
Similar to the mcxn947 (ov7670/smartDMA) issue, the CSI needs to be
initialized BEFORE the camera sensor to provide clock to the camera
sensor. However, the CSI node refers to the camera sensor node in the DT
so it has to be initialized AFTER the sensor to be able to compiled.

This is a deadlock issue as Zephyr currently does not allow circular
dependency. Disable the init priority check as a work-around for this.

Signed-off-by: Phi Bang Nguyen <[email protected]>
  • Loading branch information
ngphibang committed Oct 18, 2024
1 parent a2ac676 commit 9268c4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/Kconfig.mcux_csi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config VIDEO_MCUX_CSI

config VIDEO_MCUX_CSI_INIT_PRIORITY
int "NXP MCUX CSI init priority"
default 61
default 59
depends on VIDEO_MCUX_CSI
help
Initialization priority for the CSI interface on an NXP MCUX device.
4 changes: 4 additions & 0 deletions samples/drivers/video/capture/boards/mimxrt1060_evkb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
CONFIG_DMA=y
CONFIG_MCUX_ELCDIF_PXP=y
CONFIG_MCUX_ELCDIF_PXP_FLIP_HORIZONTAL=y

# Workaround for issue where the CSI driver needs to initialize before
# the camera sensor, so that it can provide clock for the camera device
CONFIG_CHECK_INIT_PRIORITIES=n
4 changes: 4 additions & 0 deletions samples/drivers/video/capture/boards/mimxrt1064_evk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
CONFIG_DMA=y
CONFIG_MCUX_ELCDIF_PXP=y
CONFIG_MCUX_ELCDIF_PXP_FLIP_HORIZONTAL=y

# Workaround for issue where the CSI driver needs to initialize before
# the camera sensor, so that it can provide clock for the camera device
CONFIG_CHECK_INIT_PRIORITIES=n

0 comments on commit 9268c4e

Please sign in to comment.