#
#   Copyright (c) 2023-2024 Project CHIP Authors
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#

rsource "../../zephyr/Kconfig"

if CHIP

# See config/zephyr/Kconfig for full definition
config CHIP_DEVICE_VENDOR_NAME
	default "Telink Semiconductor"

config CHIP_NFC_COMMISSIONING
	bool "Share onboarding payload in NFC tag"
	default n
	imply I2C
	imply ST25DVXXKC
	imply NFC		
	imply NFC_NDEF
	imply NFC_NDEF_MSG
	imply NFC_NDEF_RECORD
	imply NFC_NDEF_URI_REC
	imply NFC_NDEF_URI_MSG
	help
	  Enables sharing the onboarding payload in the NFC tag.

# See config/zephyr/Kconfig for full definition
config CHIP_OTA_REQUESTOR
	bool
	select BOOTLOADER_MCUBOOT

config BOOTLOADER_MCUBOOT
	bool
	select IMG_MANAGER
	select STREAM_FLASH
	select STREAM_FLASH_ERASE
	select TELINK_W91_N22_MATTER_OTA_LAYOUT if BOARD_TLSR9118BDK40D

config CHIP_OTA_REQUESTOR_BUFFER_SIZE
	int "OTA Requestor image buffer size"
	default 256
	depends on CHIP_OTA_REQUESTOR
	help
	  Configures the size of the buffer used by OTA Requestor when downloading
	  and writing a new firmware image to flash.

config CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY
	bool "Auto-reboot when firmware update is applied"
	default y
	depends on CHIP_OTA_REQUESTOR
	imply REBOOT
	help
	  Reboots the device automatically after downloading a new firmware update
	  to swap the old and the new firmware images. The reboot happens only when
	  a user consents to apply the firmware update.

# See config/zephyr/Kconfig for full definition
config CHIP_OTA_IMAGE_BUILD
	bool
	default y if CHIP_OTA_REQUESTOR

config SIGNED_OTA_IMAGE_FILE_NAME
	string "Zephyr signed image file name"
	default "zephyr.signed.lzma.signed.bin" if COMPRESS_LZMA
	default "zephyr.signed.bin"
	depends on CHIP_OTA_REQUESTOR
	help
	  Provides the file name of the generated Zephyr signed image.

config TELINK_OTA_BUTTON_TEST
	bool "Enable image update initiation via button press"
	default n
	depends on CHIP_OTA_REQUESTOR
	help
	  Merge the signed binary with the same version as the main into slot-1 of merged.hex.
	  Pressing the button initiates a forced image update.

config TELINK_OTA_PARTITION_ADDR
	hex "image-1 partition address"
	default $(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition),0)
	depends on TELINK_OTA_BUTTON_TEST

config CHIP_ROTATING_DEVICE_ID
	bool "Generate rotating device ID"
	default y
	help
	  Enables the rotating device identifier that provides a non-trackable
	  identifier. The identifier is unique per device and rotates at pre-defined
	  moments.

config CHIP_EXAMPLE_DEVICE_INFO_PROVIDER
	bool "Include default device information provider build"
	default y

config CHIP_FACTORY_DATA
	bool "Enable Factory Data support"
	select ZCBOR
	help
	  Enables support for reading factory data from flash memory partition.
	  It requires factory_data partition to exist.

config CHIP_FACTORY_DATA_CUSTOM_BACKEND
	bool "Enable Factory Data custom backend"
	depends on !CHIP_FACTORY_DATA
	help
	  Enables user custom factory data implementation. It cannot be used
	  with the CHIP_FACTORY_DATA that enabled default Telink factory data
	  implementation.

config CHIP_FACTORY_DATA_BUILD
	bool "Enable Factory Data build"
	default n
	help
	  Enables generation of factory data during the building.
	  It requires factory_data partition to exist.
	  As a result a new output file factory_data.bin will be created.

config CHIP_FACTORY_DATA_VERSION
	int
	default 1
	help
	  The Factory data version contains a current version of a factory data 
	  parameter set that the user cannot change. 
	  After moving to the next version of the factory data set, change the default value. 
	  This config is used to validate the version of a factory data set on a device-side 
	  with the version of factory data saved in the Flash memory.

if CHIP_FACTORY_DATA_BUILD

# Factory data definitions
config CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE
	bool "Enable merging generated factory data with the build target .bin file"
	default y
	help
	  Enables merging generated factory data with the build target zephyr.bin file.
	  As a result, output file merged.bin will consist of all partitions including 
	  factory data.

config TELINK_FACTORY_DATA_PARTITION_ADDR
	hex "factory-data partition address"
	default $(dt_node_reg_addr_hex,$(dt_nodelabel_path,factory_partition),0)
	depends on CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE

# Use default certificates without generating or providing them
config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS
	bool "Use default certificates located in Matter repository"
	default y
	help
	  Pre-generated certificates can be used for development purpose.
	  This config includes default pre-generated certificates 
	  which are located in credentials/development/attestation/ directory 
	  instead of generating new ones.
	  If this config is set to `n` new certificates will be generated.

# Configs for SPAKE2 generation
config CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER
	bool "Enable spake2 verifier generation"
	help
	  Enables generation of spake2 verifier according to 
	  given iteration counter, salt and passcode.
	  To generate Spake2 verifier a spake2p executable must be available 
	  from system variables environment.

config CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID
	bool "Enable generation of a new Rotating device id unique id"
	default y
	help
	  Enables generation of a new Rotating device id unique id.

endif #CHIP_FACTORY_DATA_BUILD

# See config/zephyr/Kconfig for full definition
config CHIP_FACTORY_RESET_ERASE_NVS
	bool
	default n

endif

config CHIP_LOG_SIZE_OPTIMIZATION
	bool "Disable some detailed logs to decrease flash usage"
	help
	  Disables some log levels for specific Matter log modules that provide
	  information that is too detailed to be used in most cases. You can find
	  full configuration enabled by this option in the
	  platform/telink/CHIPPlatformConfig.h file.

config CHIP_IPV4
	bool "IPv4 support for Matter"
	default n
	depends on NET_IPV4
	help
	  If disabled, it allows to build Telink SDK application
	  with IPv4 support independently of the Matter stack still
	  running over IPv6.

config CHIP_BUTTON_MANAGER_IRQ_MODE
	bool "Use GPIO in an IRQ mode instead of polling the GPIO"
	default y if BOARD_TLSR9118BDK40D
	default PM
	help
	  Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event. 
	  GPIO events are working only with GPIO IRQ. This option changes button matrix configuration. 
	
config CHIP_ENABLE_APPLICATION_STATUS_LED
	bool "Enable application status LED"
	default !(PM)
	help
	  Enable application status LED.

config CHIP_ENABLE_PM_DURING_BLE
	bool "Enable PM during BLE operation"
	default PM
	help
	  Enable PM during BLE operation.

config CHIP_OPENTHREAD_TX_POWER
	int "OpenThread Transmission power"
	range -30 9
	default 0
	help
	  OpenThread Transmission power in dBm.

config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
	int
	default 255 if SHELL_BACKEND_SERIAL

config CHIP_ENABLE_POWER_ON_FACTORY_RESET
	bool "Enable power on factory reset sequence"
	default n
	help
	  Enable power on factory reset sequence. If device power triggered off during
	  first 5 seconds after power on and this sequence repeated 5 times - factory
	  reset will be involved.

config CHIP_TASK_STACK_SIZE
	int
	default 4864 if PM
	default 8192

config CHIP_USE_MARS_SENSOR
	bool "Use Mars board sensor"
	depends on SOC_SERIES_RISCV_TELINK_B9X && (BOARD_TLSR9518ADK80D || BOARD_TLSR9518ADK80D_RETENTION)
	default n
