-
Notifications
You must be signed in to change notification settings - Fork 7.3k
boards: frdm_mcxn947: turn OV7670 into a shield #89131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
boards: frdm_mcxn947: turn OV7670 into a shield #89131
Conversation
Tested with UVC (by cherry-picking commits): Before: After: It does not really look like correct data, but it is showing the same thing before and after, which shows the current PR does not break the sensor operation. :) [EDIT: no problem with other hardware on UVC (i.e. Arducam Nicla or virtual source), I'll try with other sensors to debug this, which this PR helps doing] |
a0d81be
to
e03e9da
Compare
e03e9da
to
283745b
Compare
283745b
to
d171799
Compare
d171799
to
c159802
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the added shield.
Did you test the video capture sample ? I think you need to update the frdm_mcxn947_cpu0.overlay
in the sample as well because the camera is now moved out of the board.
port { | ||
sdma_ep_in: endpoint { | ||
remote-endpoint-label = "ov7670_ep_out"; | ||
dvp_20pin_ep_in: endpoint { | ||
remote-endpoint-label = "dvp_20pin_ep_out"; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be here but in the overlay as it is out of the board. If there are multiple ports / endpoints, you can reserve a port for it as below (but it's not the case here):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the remote-endpoint-label = "dvp_20pin_ep_out";
and it still works!
Is that what I should remove?
I am not sure how to remove the label itself dvp_20pin_ep_in:
as the shield cannot know where it should insert itself on every board, the board.dts
has to provide a label for the shield insertion point?
Thank you for your help as I learn DTS further.
8f6cc03
to
a094905
Compare
Good point! Now I can remove it as the shield would select the Trying again after enabling the debug logging:
|
a094905
to
ecee1dd
Compare
I was hitting a CI error when removing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I am not sure if this 20-pin shield is generic and not specific only to NXP boards. If it is generic (as currently implemented), it will be similar to the dvp_fpc24_mt9m114 shield used on the mimxrt1064_evk. Could you take a look at
https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/arm/nxp/nxp_rt10xx.dtsi#L885-#L890
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/nxp/mimxrt1064_evk/mimxrt1064_evk.dts#L352-#L354
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/shields/dvp_fpc24_mt9m114/dvp_fpc24_mt9m114.overlay -
Could you add an entry for the frdm_mcxn947_cpu0 in the video capture sample README, section "Build and Running" as well ?
https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/drivers/video/capture/README.rst
Thanks
13ea982
to
cb237fc
Compare
Force-push:
It is the closest thing from a standard for DVP we might have, plenty of Arducam modules available via UCTRONICS, and some 3rd-party too, like the Olimex one for the OV7670. But a de-facto standard, no official document describing it. This will help for testing all these drivers! |
Add the 20-pin camera connector used by at least Arducam, Waveshare, Olimex, Arduino, NXP, ST, Adafruit that connects image sensor module boards and devkits. Signed-off-by: Josuah Demangeon <[email protected]>
cb237fc
to
b1d86c1
Compare
The OV7670 was defined as part of the FRDM-MCXN947 board attached to the SmartDMA and I2C peripheral. Migrate the devicetree to a reusable shield that can be swapped with other image sensors. Signed-off-by: Josuah Demangeon <[email protected]>
Add FRDM-MCXN947 to the video capture sample documentation and twister YAML configuration, using the DVP OV7670 camera module newly introduced. Signed-off-by: Josuah Demangeon <[email protected]>
b1d86c1
to
29d6608
Compare
The script zephyr/scripts/kconfig/kconfigfunctions.py used by Kconfig's "shields_list_contains" searches shield names in lower-case, like they are passed through the SHIELD in CMake, --shield argument in west. Make the mt9m114 shield upper-case. This has no effect currently as this Kconfig entry is not used anywhere in Zephyr. Signed-off-by: Josuah Demangeon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for using the Olimex OV7670 camera with the FRDM-MCXN947 board by adding a new shield configuration and related GPIO nexus definitions. Key changes include:
- Adding a new board configuration entry in the sample YAML file for frdm_mcxn947 using the set shield parameters.
- Introducing a new header file (dvp-20pin-connector.h) defining pin mappings for the Arducam DVP 20-pin connector.
- Updating vendor prefixes and adding a device tree binding YAML for the new arducam,dvp-20pin-connector.
Reviewed Changes
Copilot reviewed 4 out of 11 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
samples/drivers/video/capture/sample.yaml | Added new board configuration for frdm_mcxn947 shield. |
include/zephyr/dt-bindings/gpio/dvp-20pin-connector.h | Added definitions for the Arducam DVP 20-pin connector. |
dts/bindings/vendor-prefixes.txt | Included vendor prefix for Arducam. |
dts/bindings/gpio/arducam,dvp-20pin-connector.yaml | Added YAML binding for the Arducam DVP 20-pin connector nexus. |
Files not reviewed (7)
- boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi: Language not supported
- boards/shields/dvp_20pin_ov7670/Kconfig.shield: Language not supported
- boards/shields/dvp_20pin_ov7670/doc/index.rst: Language not supported
- boards/shields/dvp_20pin_ov7670/dvp_20pin_ov7670.overlay: Language not supported
- boards/shields/dvp_fpc24_mt9m114/Kconfig.shield: Language not supported
- samples/drivers/video/capture/README.rst: Language not supported
- samples/drivers/video/capture/boards/frdm_mcxn947_cpu0.overlay: Language not supported
/** Pin number mask (0..20). */ | ||
#define DVP_20PIN_MASK 0xff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment indicates a valid range of 0..20, but the mask value 0xff does not clearly reflect this range. Consider updating the comment or adjusting the mask value to avoid confusion.
/** Pin number mask (0..20). */ | |
#define DVP_20PIN_MASK 0xff | |
/** Pin number mask (0..20). Covers values from 0 to 31 (0x1f). */ | |
#define DVP_20PIN_MASK 0x1f |
Copilot uses AI. Check for mistakes.
- dvp_20pin_gpio: the GPIO nexus using the arducam,dvp-20pin-connector | ||
that defines the camera pins ('reset' (PEN), 'power-down' (PDN)...) | ||
|
||
See <zephyr/dt-bindings/gpio/dvp-20pin-gpio.h> for pin description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference to 'dvp-20pin-gpio.h' appears inconsistent with the new header file 'dvp-20pin-connector.h'; please update the reference for consistency.
See <zephyr/dt-bindings/gpio/dvp-20pin-gpio.h> for pin description. | |
See <zephyr/dt-bindings/gpio/dvp-20pin-connector.h> for pin description. |
Copilot uses AI. Check for mistakes.
Dependencies:
The FRDM-MCXN board is featuring an Arducam connector originally designed for the Arduino GIGA R1, and spread broadly since then for inexpensive OmniVision and low-power Himax image sensor modules.
Other modules than the Olimex OV7670 can be used.
This also proposes an
arducam,dvp-20pin-connector
GPIO nexus:https://github.com/zephyrproject-rtos/zephyr/pull/89131/files#diff-a39283efe7f5b76e206c8d2b9b65c4b45d130ceb1aa6bb8a0083486793172537