File tree Expand file tree Collapse file tree 7 files changed +123
-0
lines changed
tests/drivers/build_all/usb Expand file tree Collapse file tree 7 files changed +123
-0
lines changed Original file line number Diff line number Diff line change @@ -4354,6 +4354,7 @@ USB:
4354
4354
- samples/subsys/usb/
4355
4355
- subsys/usb/
4356
4356
- tests/subsys/usb/
4357
+ - tests/drivers/build_all/usb/
4357
4358
- tests/drivers/usb/
4358
4359
- tests/drivers/udc/
4359
4360
- doc/connectivity/usb/
Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: Apache-2.0
2
+
3
+ cmake_minimum_required (VERSION 3.20.0 )
4
+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
5
+ project (build_all )
6
+
7
+ FILE (GLOB app_sources src/*.c )
8
+ target_sources (app PRIVATE ${app_sources} )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 TOKITA Hiroshi
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ / {
7
+ test {
8
+ #address-cells = <1>;
9
+ #size-cells = <1>;
10
+
11
+ test_gpio: gpio@deadbeef {
12
+ compatible = "vnd,gpio";
13
+ gpio-controller;
14
+ reg = <0xdeadbeef 0x1000>;
15
+ #gpio-cells = <0x2>;
16
+ status = "okay";
17
+ };
18
+
19
+ test_i2c: i2c@11112222 {
20
+ #address-cells = <1>;
21
+ #size-cells = <0>;
22
+ compatible = "vnd,i2c";
23
+ reg = <0x11112222 0x1000>;
24
+ status = "okay";
25
+ clock-frequency = <100000>;
26
+
27
+ test_i2c_pi3usb9201: pi3usb9201@0 {
28
+ compatible = "diodes,pi3usb9201";
29
+ reg = <0x0>;
30
+ charging-mode = "BC12_TYPE_NONE";
31
+ intb-gpios = <&test_gpio 0 0>;
32
+ };
33
+ };
34
+ };
35
+ };
Original file line number Diff line number Diff line change
1
+ CONFIG_TEST=y
2
+ CONFIG_TEST_USERSPACE=y
3
+ CONFIG_USB_BC12=y
4
+ CONFIG_UHC_DRIVER=y
5
+ CONFIG_GPIO=y
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 TOKITA Hiroshi
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ / {
7
+ test {
8
+ #address-cells = <1>;
9
+ #size-cells = <1>;
10
+
11
+ test_gpio: gpio@deadbeef {
12
+ compatible = "vnd,gpio";
13
+ gpio-controller;
14
+ reg = <0xdeadbeef 0x1000>;
15
+ #gpio-cells = <0x2>;
16
+ status = "okay";
17
+ };
18
+
19
+ test_spi: spi@33334444 {
20
+ #address-cells = <1>;
21
+ #size-cells = <0>;
22
+ compatible = "vnd,spi";
23
+ reg = <0x33334444 0x1000>;
24
+ status = "okay";
25
+ clock-frequency = <2000000>;
26
+
27
+ /* one entry for every devices at spi.dtsi */
28
+ cs-gpios = <&test_gpio 0 0>,
29
+ <&test_gpio 0 0>,
30
+ <&test_gpio 0 0>,
31
+ <&test_gpio 0 0>,
32
+ <&test_gpio 0 0>;
33
+
34
+ max3421e_spi: max3421e_spi@0 {
35
+ compatible = "maxim,max3421e_spi";
36
+ reg = <0>;
37
+ spi-max-frequency = <5000000>;
38
+ int-gpios = <&test_gpio 0 0>;
39
+ status = "okay";
40
+ };
41
+ };
42
+ };
43
+ };
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright © 2024 TOKITA Hiroshi
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ int main (void )
8
+ {
9
+ return 0 ;
10
+ }
Original file line number Diff line number Diff line change
1
+ common :
2
+ build_only : true
3
+ tags :
4
+ - drivers
5
+ - usb
6
+ tests :
7
+ drivers.usb.build.i2c :
8
+ extra_args : DTC_OVERLAY_FILE="i2c_devices.overlay"
9
+ extra_configs :
10
+ - CONFIG_I2C=y
11
+ platform_allow :
12
+ - native_sim
13
+ - native_sim/native/64
14
+
15
+ drivers.usb.build.spi :
16
+ extra_args : DTC_OVERLAY_FILE="spi_devices.overlay"
17
+ extra_configs :
18
+ - CONFIG_SPI=y
19
+ platform_allow :
20
+ - native_sim
21
+ - native_sim/native/64
You can’t perform that action at this time.
0 commit comments