Skip to content

Commit ee7fb51

Browse files
ngphibangnashif
authored andcommitted
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 78b9f25 commit ee7fb51

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
};
24+
25+
test_flexcomm7_lpi2c7: lpi2c@11112222 {
26+
#address-cells = <1>;
27+
#size-cells = <0>;
28+
compatible = "nxp,lpi2c";
29+
reg = <0x11112222 0x1000>;
30+
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
31+
clock-frequency = <I2C_BITRATE_STANDARD>;
32+
test_ov7670: ov7670@1 {
33+
compatible = "ovti,ov7670";
34+
reset-gpios = <&test_gpio 19 GPIO_ACTIVE_HIGH>;
35+
pwdn-gpios = <&test_gpio 18 GPIO_ACTIVE_HIGH>;
36+
reg = <0x1>;
37+
38+
port {
39+
test_ov7670_ep_out: endpoint {
40+
remote-endpoint-label = "test_sdma_ep_in";
41+
};
42+
};
43+
};
44+
};
45+
46+
test_smartdma: smartdma@22223333 {
47+
compatible = "nxp,smartdma";
48+
reg = <0x22223333 0x1000>;
49+
interrupt-parent = <&nvic>;
50+
interrupts = <0 0>;
51+
program-mem = <0x4000000>;
52+
#dma-cells = <0>;
53+
test_video_sdma: video-sdma {
54+
compatible = "nxp,video-smartdma";
55+
pinctrl-0 = <&pinmux_smartdma_camera>;
56+
pinctrl-names = "default";
57+
vsync-pin = <4>;
58+
hsync-pin = <11>;
59+
pclk-pin = <5>;
60+
61+
port {
62+
test_sdma_ep_in: endpoint {
63+
remote-endpoint-label = "test_ov7670_ep_out";
64+
};
65+
};
66+
};
67+
};
68+
};
69+
};

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)