Skip to content

Commit f10be69

Browse files
committed
boards: remove USB and any CDC ACM UART configuration
Many boards have similar code to configure the USB and CDC ACM UART that they want to use as a logging or shell backend. Also, many boards have incorrect or incomplete configuration. Remove all USB and CDC ACM configuration in favor of snippet cdc-acm-console (west build -S cdc-acm-console ...). Signed-off-by: Johann Fischer <[email protected]>
1 parent 4245f34 commit f10be69

File tree

53 files changed

+6
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6
-751
lines changed

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_nrf52840_sense_uf2.dts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
model = "Adafruit Feather nRF52840 Sense";
1414
compatible = "adafruit,feather-nrf52840-sense-uf2";
1515

16-
chosen {
17-
zephyr,console = &cdc_acm_uart0;
18-
zephyr,shell-uart = &cdc_acm_uart0;
19-
zephyr,uart-mcumgr = &cdc_acm_uart0;
20-
zephyr,bt-mon-uart = &cdc_acm_uart0;
21-
zephyr,bt-c2h-uart = &cdc_acm_uart0;
22-
};
23-
2416
leds {
2517
led0: led_0 {
2618
gpios = <&gpio1 9 0>;
@@ -34,9 +26,3 @@
3426
reg = <0x44>;
3527
};
3628
};
37-
38-
zephyr_udc0: &usbd {
39-
cdc_acm_uart0: cdc_acm_uart0 {
40-
compatible = "zephyr,cdc-acm-uart";
41-
};
42-
};

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_nrf52840_sense_uf2_defconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,5 @@ CONFIG_UART_CONSOLE=y
1717
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
1818
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
1919

20-
# Logger cannot use itself to log
21-
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
22-
23-
# Enable USB
24-
CONFIG_USB_DEVICE_STACK=y
25-
2620
# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
2721
CONFIG_BUILD_OUTPUT_UF2=y

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_nrf52840_uf2.dts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,9 @@
1212
model = "Adafruit Feather nRF52840 Express";
1313
compatible = "adafruit,feather-nrf52840-uf2";
1414

15-
chosen {
16-
zephyr,console = &cdc_acm_uart0;
17-
zephyr,shell-uart = &cdc_acm_uart0;
18-
zephyr,uart-mcumgr = &cdc_acm_uart0;
19-
zephyr,bt-mon-uart = &cdc_acm_uart0;
20-
zephyr,bt-c2h-uart = &cdc_acm_uart0;
21-
};
22-
2315
leds {
2416
led0: led_0 {
2517
gpios = <&gpio1 15 0>;
2618
};
2719
};
2820
};
29-
30-
zephyr_udc0: &usbd {
31-
cdc_acm_uart0: cdc_acm_uart0 {
32-
compatible = "zephyr,cdc-acm-uart";
33-
};
34-
};

boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_nrf52840_uf2_defconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,5 @@ CONFIG_SERIAL=y
1313
CONFIG_CONSOLE=y
1414
CONFIG_UART_CONSOLE=y
1515

16-
# Logger cannot use itself to log
17-
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
18-
19-
# Enable USB
20-
CONFIG_USB_DEVICE_STACK=y
21-
2216
# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
2317
CONFIG_BUILD_OUTPUT_UF2=y

boards/adafruit/itsybitsy/Kconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

boards/adafruit/itsybitsy/Kconfig.defconfig

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,4 @@ if BOARD_ADAFRUIT_ITSYBITSY
88
config BT_CTLR
99
default BT
1010

11-
if BOARD_SERIAL_BACKEND_CDC_ACM
12-
13-
config USB_DEVICE_STACK
14-
default y
15-
16-
config USB_CDC_ACM
17-
default SERIAL
18-
19-
config UART_CONSOLE
20-
default CONSOLE
21-
22-
config USB_DEVICE_INITIALIZE_AT_BOOT
23-
default y if CONSOLE
24-
25-
config SHELL_BACKEND_SERIAL_CHECK_DTR
26-
default SHELL
27-
depends on UART_LINE_CTRL
28-
29-
config UART_LINE_CTRL
30-
default SHELL
31-
32-
config USB_DEVICE_REMOTE_WAKEUP
33-
default n
34-
35-
if LOG
36-
37-
# Logger cannot use itself to log
38-
config USB_CDC_ACM_LOG_LEVEL
39-
default 0
40-
41-
# Set USB log level to error only
42-
config USB_DEVICE_LOG_LEVEL
43-
default 1
44-
45-
# Wait 1500ms at startup for logging
46-
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
47-
default 1500
48-
49-
endif # LOG
50-
51-
endif # BOARD_SERIAL_BACKEND_CDC_ACM
52-
5311
endif # BOARD_ADAFRUIT_ITSYBITSY

boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.dts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
compatible = "adafruit,itsybitsy-nrf52840";
1717

1818
chosen {
19-
zephyr,console = &cdc_acm_uart0;
20-
zephyr,shell-uart = &cdc_acm_uart0;
21-
zephyr,uart-mcumgr = &cdc_acm_uart0;
22-
zephyr,bt-mon-uart = &cdc_acm_uart0;
23-
zephyr,bt-c2h-uart = &cdc_acm_uart0;
2419
zephyr,ieee802154 = &ieee802154;
2520
};
2621

@@ -155,8 +150,4 @@
155150
zephyr_udc0: &usbd {
156151
compatible = "nordic,nrf-usbd";
157152
status = "okay";
158-
159-
cdc_acm_uart0: cdc_acm_uart0 {
160-
compatible = "zephyr,cdc-acm-uart";
161-
};
162153
};

boards/arduino/opta/Kconfig.defconfig

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,4 @@ config NET_L2_ETHERNET
1111

1212
endif # NETWORKING
1313

14-
if USB_DEVICE_STACK
15-
16-
config USB_DEVICE_PRODUCT
17-
default "Arduino Opta"
18-
19-
config USB_DEVICE_PID
20-
default 0x0164
21-
22-
config USB_DEVICE_VID
23-
default 0x35d1
24-
25-
config USB_DEVICE_INITIALIZE_AT_BOOT
26-
default y
27-
28-
if LOG
29-
30-
# Logger cannot use itself to log
31-
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
32-
default USB_CDC_ACM_LOG_LEVEL_OFF
33-
endchoice
34-
35-
# Set USB log level to error only
36-
choice USB_DEVICE_LOG_LEVEL_CHOICE
37-
default USB_DEVICE_LOG_LEVEL_ERR
38-
endchoice
39-
40-
endif # LOG
41-
42-
endif # USB_DEVICE_STACK
43-
4414
endif # BOARD_ARDUINO_OPTA

boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
compatible = "arduino,opta-m7";
1717

1818
chosen {
19-
zephyr,console = &cdc_acm_uart0;
20-
zephyr,shell-uart = &cdc_acm_uart0;
21-
zephyr,cdc-acm-uart0 = &cdc_acm_uart0;
2219
zephyr,sram = &sram0;
2320
zephyr,flash = &flash0;
2421
zephyr,code-partition = &slot0_partition;
@@ -45,10 +42,6 @@ zephyr_udc0: &usbotg_fs {
4542
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
4643
pinctrl-names = "default";
4744
status = "okay";
48-
49-
cdc_acm_uart0: cdc_acm_uart0 {
50-
compatible = "zephyr,cdc-acm-uart";
51-
};
5245
};
5346

5447
&clk_hse {
@@ -109,10 +102,6 @@ zephyr_udc0: &usbotg_fs {
109102
status = "disabled";
110103
};
111104

112-
&cdc_acm_uart0 {
113-
status = "okay";
114-
};
115-
116105
&mac {
117106
pinctrl-0 = <
118107
&eth_ref_clk_pa1

boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ CONFIG_CONSOLE=y
2929
CONFIG_UART_CONSOLE=y
3030
CONFIG_UART_LINE_CTRL=y
3131

32-
# Enable USB Stack (needed for the console to work)
33-
CONFIG_USB_DEVICE_STACK=y
34-
3532
# Enable regulator (needed to enable eth)
3633
CONFIG_REGULATOR=y
3734
CONFIG_REGULATOR_FIXED=y

0 commit comments

Comments
 (0)