From 91cbbe88a3bac8deac0d84f76fb8ec8cf6097101 Mon Sep 17 00:00:00 2001 From: Jacob Winther Date: Fri, 30 Aug 2024 12:24:35 +1200 Subject: [PATCH] boards: adaftuit feather nrf52840 Kconfig updates Remove unnecessary Kconfig options. Simplify configuration by removing custom Kconfig option. Make Kconfig generic for all boards by moving usb selection to board_defconfig. These changes should enable the boards to become variants instead. Signed-off-by: Jacob Winther --- boards/adafruit/feather_nrf52840/Kconfig | 12 ------ .../feather_nrf52840/Kconfig.defconfig | 42 ------------------- .../adafruit_feather_nrf52840_sense_defconfig | 12 ++++-- 3 files changed, 9 insertions(+), 57 deletions(-) delete mode 100644 boards/adafruit/feather_nrf52840/Kconfig diff --git a/boards/adafruit/feather_nrf52840/Kconfig b/boards/adafruit/feather_nrf52840/Kconfig deleted file mode 100644 index 1abbe2ee1ee..00000000000 --- a/boards/adafruit/feather_nrf52840/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -# Adafruit Feather nRF52840 Express board configuration - -# Copyright (c) 2020 Tobias Svehagen -# Copyright (c) 2024 Jacob Winther -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE -config BOARD_SERIAL_BACKEND_CDC_ACM - bool "USB CDC" - default y - -endif # BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE diff --git a/boards/adafruit/feather_nrf52840/Kconfig.defconfig b/boards/adafruit/feather_nrf52840/Kconfig.defconfig index 8cdb39e07f0..6e5108280ec 100644 --- a/boards/adafruit/feather_nrf52840/Kconfig.defconfig +++ b/boards/adafruit/feather_nrf52840/Kconfig.defconfig @@ -9,46 +9,4 @@ if (BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_S config BT_CTLR default BT -if BOARD_SERIAL_BACKEND_CDC_ACM - -config USB_DEVICE_STACK - default y - -config USB_CDC_ACM - default SERIAL - -config UART_CONSOLE - default CONSOLE - -config USB_DEVICE_INITIALIZE_AT_BOOT - default y if CONSOLE - -config SHELL_BACKEND_SERIAL_CHECK_DTR - default SHELL - depends on UART_LINE_CTRL - -config UART_LINE_CTRL - default SHELL - -config USB_DEVICE_REMOTE_WAKEUP - default n - -if LOG - -# Logger cannot use itself to log -config USB_CDC_ACM_LOG_LEVEL - default 0 - -# Set USB log level to error only -config USB_DEVICE_LOG_LEVEL - default 1 - -# Wait 1500ms at startup for logging -config LOG_PROCESS_THREAD_STARTUP_DELAY_MS - default 1500 - -endif # LOG - -endif # BOARD_SERIAL_BACKEND_CDC_ACM - endif # BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE diff --git a/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense_defconfig b/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense_defconfig index 5c963e821c3..18c22c337d0 100644 --- a/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense_defconfig +++ b/boards/adafruit/feather_nrf52840/adafruit_feather_nrf52840_sense_defconfig @@ -3,13 +3,13 @@ # Enable MPU CONFIG_ARM_MPU=y -# enable GPIO +# Enable GPIO CONFIG_GPIO=y -# enable uart driver +# Enable UART driver CONFIG_SERIAL=y -# enable console +# Enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -17,5 +17,11 @@ CONFIG_UART_CONSOLE=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y +# Logger cannot use itself to log +CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y + +# Enable USB +CONFIG_USB_DEVICE_STACK=y + # Build UF2 by default, supported by the Adafruit nRF52 Bootloader CONFIG_BUILD_OUTPUT_UF2=y