Skip to content

Commit

Permalink
boards: clean up CDC ACM configuration for nRF52840 based boards
Browse files Browse the repository at this point in the history
Remove CDC ACM UART devicetree nodes, chosen properties and explicit
USB support configuration in favor of generic CDC ACM shield.
For console support via USB CDC ACM, in-tree samples for this boards
is to be built as follows:

west build -b nrf52840dongle_nrf52840
  samples/basic/threads -- -DSHIELD=cdc_acm_console

For shell support via USB CDC ACM, in-tree samples for this boards
is to be built as follows:

west build -b bl654_usb
  samples/subsys/shell/shell_module -- -DSHIELD=cdc_acm_shell

Signed-off-by: Johann Fischer <[email protected]>
  • Loading branch information
jfischer-no committed Nov 15, 2021
1 parent 74b92d7 commit 9c03497
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 65 deletions.
10 changes: 0 additions & 10 deletions boards/arm/arduino_nano_33_ble/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ config BOARD_ARDUINO_NANO_33_BLE
bool "Arduino Nano 33 BLE board"
depends on SOC_NRF52840_QIAA

config BOARD_ARDUINO_NANO_33_BLE_EN_USB_CONSOLE
bool "Sends the console output over the USB port"
depends on BOARD_ARDUINO_NANO_33_BLE
select SERIAL
select USB_DEVICE_STACK
select CONSOLE
select PRINTK
select UART_INTERRUPT_DRIVEN
select USB_UART_CONSOLE

config BOARD_ARDUINO_NANO_33_BLE_INIT_SENSORS
bool "Initializes the internal I2C sensors on the board"
depends on BOARD_ARDUINO_NANO_33_BLE
10 changes: 0 additions & 10 deletions boards/arm/bl654_usb/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ config FLASH_LOAD_OFFSET
default 0x1000
depends on !USE_DT_CODE_PARTITION

if USB_DEVICE_STACK

config USB_UART_CONSOLE
default y

config UART_LINE_CTRL
default y

endif # USB_DEVICE_STACK

if IEEE802154

config IEEE802154_NRF5
Expand Down
8 changes: 0 additions & 8 deletions boards/arm/bl654_usb/bl654_usb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &bl654_cdc_acm_uart;
zephyr,shell-uart = &bl654_cdc_acm_uart;
zephyr,bt-c2h-uart = &bl654_cdc_acm_uart;
zephyr,code-partition = &slot0_partition;
};

Expand Down Expand Up @@ -104,9 +101,4 @@
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";

bl654_cdc_acm_uart: bl654_cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
3 changes: 0 additions & 3 deletions boards/arm/bl654_usb/bl654_usb_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ CONFIG_CONSOLE=y
# Enable GPIO
CONFIG_GPIO=y

# Enable USB
CONFIG_USB_DEVICE_STACK=y

# Additional board options
CONFIG_GPIO_AS_PINRESET=y

Expand Down
16 changes: 0 additions & 16 deletions boards/arm/degu_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@ if BOARD_DEGU_EVK
config BOARD
default "degu_evk"

if USB_DEVICE_STACK

config USB_DEVICE_PRODUCT
default "Degu Evaluation Kit"

config USB_UART_CONSOLE
default y

config UART_INTERRUPT_DRIVEN
default y

config UART_LINE_CTRL
default y

endif # USB_DEVICE_STACK

if DISK_DRIVER_FLASH

config DISK_FLASH_DEV_NAME
Expand Down
9 changes: 2 additions & 7 deletions boards/arm/degu_evk/degu_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &degu_cdc_acm_uart;
zephyr,shell-uart = &degu_cdc_acm_uart;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,code-partition = &slot0_partition;
};

Expand Down Expand Up @@ -143,9 +143,4 @@
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";

degu_cdc_acm_uart: degu_cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
3 changes: 0 additions & 3 deletions boards/arm/degu_evk/degu_evk_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable USB
CONFIG_USB_DEVICE_STACK=y

# additional board options
CONFIG_GPIO=y
CONFIG_GPIO_AS_PINRESET=y
Expand Down
8 changes: 0 additions & 8 deletions boards/arm/nrf52840dongle_nrf52840/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ config FLASH_LOAD_OFFSET
default 0x1000
depends on BOARD_HAS_NRF5_BOOTLOADER && !USE_DT_CODE_PARTITION

if USB_DEVICE_STACK

# Enable UART driver, needed for CDC ACM
config SERIAL
default y

endif # USB_DEVICE_STACK

config BT_CTLR
default BT

Expand Down

0 comments on commit 9c03497

Please sign in to comment.