#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_SPI=y
CONFIG_FLASH=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_I2C=y

CONFIG_NFCT_PINS_AS_GPIOS=y

# # USB
# CONFIG_USB_DEVICE_STACK=y
# CONFIG_USB_DEVICE_PRODUCT="Thingy:91 X Wi-Fi Shell"
# CONFIG_USB_CDC_ACM=y
# CONFIG_USB_COMPOSITE_DEVICE=y
# CONFIG_USB_MASS_STORAGE=n
# CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor"
# CONFIG_USB_DEVICE_VID=0x1915
# CONFIG_USB_DEVICE_PID=0x910A

# CONFIG_USB_DEVICE_REMOTE_WAKEUP=n
# CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y

CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
CONFIG_UART_CONSOLE=n

CONFIG_FW_INFO=y
CONFIG_SECURE_BOOT_STORAGE=y


CONFIG_USB_MAX_POWER=250
CONFIG_USB_DEVICE_PRODUCT="Thingy:91 X UART"

CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x910A

CONFIG_USB_MAX_NUM_TRANSFERS=8
# CONFIG_BRIDGE_CMSIS_DAP_BULK_ENABLE=y
CONFIG_RETENTION_BOOT_MODE=y
CONFIG_REBOOT=y
CONFIG_GPIO=y

CONFIG_DK_LIBRARY=y

# Bootloader firmware information
CONFIG_DAP=y
CONFIG_DP_DRIVER=y

CONFIG_CMSIS_DAP_DEVICE_VENDOR="Nordic Semiconductor ASA"
CONFIG_CMSIS_DAP_DEVICE_NAME="nrf91"

# CONFIG_BRIDGE_CMSIS_DAP_NORDIC_COMMANDS=y

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_REMOTE_WAKEUP=n
CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor"
CONFIG_USB_DEVICE_SN="THINGY91 12PLACEHLDRS" # This is overridden at runtime
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=16384
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_POLL=y
CONFIG_REBOOT=y