Skip to content

Commit 72394c7

Browse files
committed
tests: drivers: build_all: video: Add test case for smartdma
Add built-only test case for smartdma driver Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 8ee0836 commit 72394c7

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Names in this file should be chosen in a way that won't conflict
7+
* with real-world devicetree nodes, to allow these tests to run on
8+
* (and be extended to test) real hardware.
9+
*/
10+
11+
#include <zephyr/dt-bindings/video/video-interfaces.h>
12+
13+
/ {
14+
test {
15+
#address-cells = <1>;
16+
#size-cells = <1>;
17+
18+
test_gpio: gpio@deadbeef {
19+
compatible = "vnd,gpio";
20+
gpio-controller;
21+
reg = <0xdeadbeef 0x1000>;
22+
#gpio-cells = <0x2>;
23+
status = "okay";
24+
};
25+
26+
test_flexcomm7_lpi2c7: lpi2c@11112222 {
27+
#address-cells = <1>;
28+
#size-cells = <0>;
29+
compatible = "nxp,lpi2c";
30+
reg = <0x11112222 0x1000>;
31+
status = "okay";
32+
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
33+
clock-frequency = <I2C_BITRATE_STANDARD>;
34+
test_ov7670: ov7670@1 {
35+
compatible = "ovti,ov7670";
36+
reset-gpios = <&test_gpio 19 GPIO_ACTIVE_HIGH>;
37+
pwdn-gpios = <&test_gpio 18 GPIO_ACTIVE_HIGH>;
38+
reg = <0x1>;
39+
40+
port {
41+
test_ov7670_ep_out: endpoint {
42+
remote-endpoint-label = "test_sdma_ep_in";
43+
};
44+
};
45+
};
46+
};
47+
48+
test_smartdma: smartdma@22223333 {
49+
compatible = "nxp,smartdma";
50+
reg = <0x22223333 0x1000>;
51+
status = "okay";
52+
interrupt-parent = <&nvic>;
53+
interrupts = <0 0>;
54+
program-mem = <0x4000000>;
55+
#dma-cells = <0>;
56+
test_video_sdma: video-sdma {
57+
compatible = "nxp,video-smartdma";
58+
status = "okay";
59+
pinctrl-0 = <&pinmux_smartdma_camera>;
60+
pinctrl-names = "default";
61+
vsync-pin = <4>;
62+
hsync-pin = <11>;
63+
pclk-pin = <5>;
64+
65+
port {
66+
test_sdma_ep_in: endpoint {
67+
remote-endpoint-label = "test_ov7670_ep_out";
68+
};
69+
};
70+
};
71+
};
72+
};
73+
};

tests/drivers/build_all/video/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ tests:
1919
platform_allow:
2020
- mimxrt1170_evk/mimxrt1176/cm7
2121
- mimxrt1170_evk@B/mimxrt1176/cm7
22+
drivers.video.mcux_smartdma.build:
23+
platform_allow:
24+
- frdm_mcxn947/mcxn947/cpu0

0 commit comments

Comments
 (0)