Skip to content

Commit 4fbe7d1

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 b6e7b78 commit 4fbe7d1

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+
interrupt-parent = <&nvic>;
19+
20+
test_gpio: gpio@deadbeef {
21+
compatible = "vnd,gpio";
22+
gpio-controller;
23+
reg = <0xdeadbeef 0x1000>;
24+
#gpio-cells = <0x2>;
25+
status = "okay";
26+
};
27+
28+
test_flexcomm7_lpi2c7: i2c@11112222 {
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
compatible = "nxp,lpi2c";
32+
reg = <0x11112222 0x1000>;
33+
status = "okay";
34+
clock-frequency = <I2C_BITRATE_STANDARD>;
35+
test_ov7670: ov7670@1 {
36+
compatible = "ovti,ov7670";
37+
reset-gpios = <&test_gpio 19 GPIO_ACTIVE_HIGH>;
38+
pwdn-gpios = <&test_gpio 18 GPIO_ACTIVE_HIGH>;
39+
reg = <0x1>;
40+
41+
port {
42+
test_ov7670_ep_out: endpoint {
43+
remote-endpoint-label = "test_sdma_ep_in";
44+
};
45+
};
46+
};
47+
};
48+
49+
test_smartdma: smartdma@22223333 {
50+
compatible = "nxp,smartdma";
51+
reg = <0x22223333 0x1000>;
52+
status = "okay";
53+
interrupts = <53 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)