Skip to content

Commit 9e03d5a

Browse files
ngphibangcarlescufi
authored andcommitted
tests: drivers: build_all: video: Add test for mipi csi2rx
Add test case for mipi csi2rx driver. As this driver selects the csi driver, the csi node has to be enabled as well. Signed-off-by: Phi Bang Nguyen <[email protected]>
1 parent ae81152 commit 9e03d5a

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2024 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+
/ {
12+
test {
13+
#address-cells = <1>;
14+
#size-cells = <1>;
15+
16+
test_gpio: gpio@deadbeef {
17+
compatible = "vnd,gpio";
18+
gpio-controller;
19+
reg = <0xdeadbeef 0x1000>;
20+
#gpio-cells = <0x2>;
21+
status = "okay";
22+
};
23+
24+
test_i2c: i2c@11112222 {
25+
#address-cells = <1>;
26+
#size-cells = <0>;
27+
compatible = "vnd,i2c";
28+
reg = <0x11112222 0x1000>;
29+
status = "okay";
30+
clock-frequency = <100000>;
31+
32+
test_i2c_ov5640: ov5640@1 {
33+
compatible = "ovti,ov5640";
34+
reg = <0x1>;
35+
reset-gpios = <&test_gpio 0 0>;
36+
powerdown-gpios = <&test_gpio 1 0>;
37+
};
38+
};
39+
40+
test_csi: csi@22223333 {
41+
compatible = "nxp,imx-csi";
42+
reg = <0x22223333 0x4000>;
43+
status = "okay";
44+
interrupt-parent = <&nvic>;
45+
interrupts = <56 1>;
46+
source = <&test_mipi_csi2rx>;
47+
};
48+
49+
test_mipi_csi2rx: mipi_csi2rx@33334444 {
50+
compatible = "nxp,mipi-csi2rx";
51+
reg = <0x33334444 0x200>;
52+
status = "okay";
53+
sensor = <&test_i2c_ov5640>;
54+
};
55+
};
56+
};

tests/drivers/build_all/video/testcase.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ tests:
1616
platform_allow:
1717
- mimxrt1064_evk
1818
- mimxrt1170_evk/mimxrt1176/cm7
19+
drivers.video.mcux_mipi_csi2rx.build:
20+
platform_allow:
21+
- mimxrt1170_evk/mimxrt1176/cm7
22+
- mimxrt1170_evk@B/mimxrt1176/cm7

0 commit comments

Comments
 (0)