1# Copyright 2023 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig WDT_NXP_FS26
5	bool "NXP FS26 SBC watchdog driver"
6	default y
7	depends on DT_HAS_NXP_FS26_WDOG_ENABLED
8	select SPI
9	select GPIO
10	help
11	  Enable the NXP FS26 SBC watchdog driver.
12
13if WDT_NXP_FS26
14
15config WDT_NXP_FS26_INIT_PRIORITY
16	int
17	default 80
18	help
19	  Device driver initialization priority. Device is connected to SPI bus,
20	  so it has to be initialized after SPI driver.
21
22config WDT_NXP_FS26_ERROR_COUNTER_LIMIT
23	int "Watchdog error counter limit"
24	default 6
25	help
26	  Sets the maximum value of the watchdog error counter. Each time a
27	  watchdog failure occurs, the device increments this counter by 2. The
28	  watchdog error counter is decremented by 1 each time the watchdog is
29	  properly refreshed.
30
31	  Possible values are 2, 4, 6, 8.
32
33config WDT_NXP_FS26_REFRESH_COUNTER_LIMIT
34	int "Watchdog refresh counter limit"
35	default 6
36	help
37	  Sets the maximum value of the watchdog refresh counter. Each time the
38	  watchdog is properly refreshed, this counter is incremented by 1. Each
39	  time this counter reaches its maximum value and if the next refresh is
40	  also good, the fault error counter is decremented by 1. Each time
41	  there is a bad watchdog refresh, this counter is reset to 0.
42
43	  Possible values are 1, 2, 4, 6.
44
45config WDT_NXP_FS26_SEED
46	hex "Watchdog seed"
47	default 0x5ab2
48	range 0x0 0xffff
49	help
50	  Seed to pass to the device. This property can be used with both simple
51	  and challenger watchdog configurations. In simple watchdog
52	  configuration, values 0xffff and 0x0000 are not allowed. In challenger
53	  watchdog configuration, value 0x0000 is not allowed.
54
55config WDT_NXP_FS26_EXIT_DEBUG_MODE
56	bool "Exit DEBUG mode"
57	help
58	  If the device is started in DEBUG mode, the driver will exit this mode
59	  so that the watchdog is enabled. Otherwise, if the device is in DEBUG
60	  mode and this driver is enabled, it will fail to initialize.
61
62config WDT_NXP_FS26_INT_THREAD_STACK_SIZE
63	int "Stack size for internal interrupt handler"
64	default 1024
65	help
66	  Size of the stack used for internal thread which is ran for
67	  interrupt processing.
68
69config WDT_NXP_FS26_INT_THREAD_PRIO
70	int "Priority for internal incoming packet handler"
71	default 2
72	help
73	  Priority level for internal cooperative thread which is ran for
74	  interrupt processing.
75
76endif # WDT_NXP_FS26
77