1# BL654 USB adapter board configuration
2
3# Copyright (c) 2021-2022 Laird Connectivity
4# SPDX-License-Identifier: Apache-2.0
5
6if BOARD_BL654_USB
7
8config BOARD
9	default "bl654_usb"
10
11# To let the nRF5 bootloader load an application, the application
12# must be linked after Nordic MBR, that is factory-programmed on the board.
13
14# Nordic nRF5 bootloader exists outside of the partitions specified in the
15# DTS file, so we manually override FLASH_LOAD_OFFSET to link the application
16# correctly, after Nordic MBR, and limit the maximum size to not protude into
17# the bootloader at the end of flash.
18
19# When building MCUBoot, MCUBoot itself will select USE_DT_CODE_PARTITION
20# which will make it link into the correct partition specified in DTS file,
21# so no override or limit is necessary.
22
23config FLASH_LOAD_OFFSET
24	default 0x1000
25	depends on !USE_DT_CODE_PARTITION
26
27config FLASH_LOAD_SIZE
28	default 0xdf000
29	depends on !USE_DT_CODE_PARTITION
30
31config USB_CDC_ACM
32	default n if USB_DEVICE_BLUETOOTH
33
34if BL654_USB_SERIAL_BACKEND_CDCACM
35
36config UART_CONSOLE
37	default CONSOLE
38
39config USB_DEVICE_INITIALIZE_AT_BOOT
40	default y if !MCUBOOT
41
42config SHELL_BACKEND_SERIAL_CHECK_DTR
43	default SHELL
44	depends on UART_LINE_CTRL
45
46config UART_LINE_CTRL
47	default SHELL
48
49# Logger cannot use itself to log
50config USB_CDC_ACM_LOG_LEVEL
51	default 0
52
53# Set USB log level to error only
54config USB_DEVICE_LOG_LEVEL
55	default 1
56
57endif #BL654_USB_SERIAL_BACKEND_CDCACM
58
59config BT_CTLR
60	default BT
61
62endif # BOARD_BL654_USB
63