summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.tasks
blob: d329150e221901047c850da88d897ac14dfe2547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Please keep these tasks in alphabetical order

menu "Tasks"

config TASKS_SET_TEST_RUNNER_TID_RULE
	bool "Automatically call set_test_runner_tid() for each test"
	depends on ZTEST && ZTEST_NEW_API
	help
	  This enables the test rule which will run before each unit test and
	  call set_test_runner_tid(). This function is needed to allow-list the
	  new thread created by ztest to access some of the components in the
	  EC.

config HAS_TASK_CHARGER
	bool
	depends on PLATFORM_EC_BATTERY
	help
	  This turns on the charger task. This deals with monitoring the
	  battery to make sure it is present and is responding properly to
	  requests. If the battery is not full, it enables charging from a
	  suitable power source.

if HAS_TASK_CHARGER

config TASK_CHARGER_STACK_SIZE
	int "CHARGER task stack size"
	default 1024	# EC uses VENTI_TASK_STACK_SIZE which is 896
	help
	  The stack size of the charger task.

	  See b/176180736 for checking these stack sizes.

endif # HAS_TASK_CHARGER

config HAS_TASK_CHG_RAMP
	bool
	depends on PLATFORM_EC_BATTERY
	help
	  This turns on the charger ramp task. This attempts to ramp up the
	  current from an attached charger to the maximum available current.
	  It handles the incoming VBUS voltage sagging as well as the user
	  attaching different chargers.

if HAS_TASK_CHG_RAMP

config TASK_CHG_RAMP_STACK_SIZE
	int "CHG_RAMP task stack size"
	default 768	# EC uses TASK_STACK_SIZE which is 512 for npcx
	help
	  The stack size of the charger task.

	  See b/176180736 for checking these stack sizes.

endif # HAS_TASK_CHG_RAMP

config HAS_TASK_CHIPSET
	bool
	depends on PLATFORM_EC_POWERSEQ
	help
	  This turns on the chipset task which handles powering the chipset
	  on and off. Powering on involves going through a sequence of enabling
	  different power rails (e.g. by enabling GPIOs that control a PMIC)
	  and monitoring power-good indicators to meet the specifications
	  defined by the vendor.

if HAS_TASK_CHIPSET

config TASK_CHIPSET_STACK_SIZE
	int "CHIPSET task stack size"
	default 1024
	help
	  The stack size of the power button task.

endif # HAS_TASK_CHIPSET

config HAS_TASK_HOSTCMD
	bool
	depends on PLATFORM_EC_HOSTCMD
	help
	  This turns on the hostcmd task which handles communication with the
	  AP. The AP sends a command to the EC and it responds when able. An
	  interrupt can be used to indicate to the AP that the EC has something
	  for it.

if HAS_TASK_HOSTCMD

choice TASK_HOSTCMD_THREAD_MODE
	prompt "Host command thread selection"
	default TASK_HOSTCMD_THREAD_DEDICATED if ZTEST

config TASK_HOSTCMD_THREAD_MAIN
	bool "Run the host command in the main thread"
	help
	  Run the HOSTCMD task in the main thread, reusing the main thread
	  resources. Set the stack size using MAIN_STACK_SIZE.

config TASK_HOSTCMD_THREAD_DEDICATED
	bool "Run the host command in a dedicated thread"
	help
	  Run the HOSTCMD task in a dedicated thread.

endchoice

config TASK_HOSTCMD_STACK_SIZE
	int "HOSTCMD task stack size"
	depends on TASK_HOSTCMD_THREAD_DEDICATED
	default 1024
	help
	  The size of the host-command task stack.

endif # HAS_TASK_HOSTCMD

config HAS_TASK_KEYPROTO
	bool
	depends on PLATFORM_EC_KEYBOARD_PROTOCOL_8042
	help
	  This turns on the keyproto task which handles conversion of keyboard
	  scans into i8042 messages on x86 platforms. This is not used or needed
	  on ARM platforms, which send the raw keyboard scans to the AP for
	  processing.

if HAS_TASK_KEYPROTO

config TASK_KEYPROTO_STACK_SIZE
	int "KEYPROTO task stack size"
	default 768
	help
	  The stack size of the keyproto task.

endif # HAS_TASK_KEYPROTO

config HAS_TASK_KEYSCAN
	bool
	depends on PLATFORM_EC_KEYBOARD
	help
	  This turns on the keyscan task which handles scanning the keyboard
	  and producing a list of changes in the key state. This list can either
	  be sent to the keyboard-protocol task or directly to the AP for
	  processing.

if HAS_TASK_KEYSCAN

config TASK_KEYSCAN_STACK_SIZE
	int "KEYSCAN task stack size"
	default 768
	help
	  The stack size of the keyscan task.

endif # HAS_TASK_KEYSCAN

config HAS_TASK_MOTIONSENSE
	bool
	help
	  This turns on the motion sense task which collects sensor data from the
	  sensors and reports them to AP. Using the data, it also produces other
	  meaningful reports to AP like lid angle and tablet mode.

if HAS_TASK_MOTIONSENSE

config TASK_MOTIONSENSE_STACK_SIZE
	int "MOTIONSENSE task stack size"
	default 4096
	help
	  The size of the motion sense task stack.

endif # HAS_TASK_MOTIONSENSE

config HAS_TASK_POWERBTN
	bool
	depends on PLATFORM_EC_POWER_BUTTON
	help
	  This turns on the powerbtn task which handles monitoring the power
	  button. When the application processor (AP) is off (S5 or G3 states),
	  this task triggers a power-up sequence on a power-button press. When
	  the AP is on (S3 or above state) x86 machines normally reset when the
	  power button is held for 4 seconds but this tasks adjusts that to 8
	  seconds, to allow time for the usual Chromium OS shutdown sequence.

if HAS_TASK_POWERBTN

config TASK_POWERBTN_STACK_SIZE
	int "POWERBTN task stack size"
	default 1024
	help
	  The stack size of the power-button task.

endif # HAS_TASK_POWERBTN

if PLATFORM_EC_USB_POWER_DELIVERY

config TASK_PD_STACK_SIZE
	int "PD tasks stack size"
	default 1024	# EC uses VENTI_TASK_STACK_SIZE which is 896
	help
	  The stack size of the PD_Cx tasks.

config TASK_PD_INT_STACK_SIZE
	int "PD_INT task stack size"
	default 1280
	help
	  The stack size of the PD_Cn_INT tasks.

endif # PLATFORM_EC_USB_POWER_DELIVERY

if HAS_TASK_DPS

config TASK_DPS_STACK_SIZE
	int "DPS task stack size"
	default 1024
	help
	  The stack size of the DPS task.

endif # HAS_TASK_DPS

config HAS_TASK_DPS
	bool
	depends on PLATFORM_EC_USB_PD_DPS
	help
	  This turns on the DPS task which evalutes the SRCCAP from all the SNK
	  ports and issues a new power request to the port which has the most
	  efficient power data object (PDO).


config HAS_TASK_PD_INT_SHARED
	bool # Selected by PLATFORM_EC_USB_PD_INT_SHARED
	help
	  This turns on the PD_INT_SHARED task which services PD message
	  interrupts for any port which has a shared IRQ enabled.


if PLATFORM_EC_USB_POWER_DELIVERY

config TASK_USB_CHG_STACK_SIZE
	int "USB_CHG tasks stack size"
	default 1280	# EC uses VENTI_TASK_STACK_SIZE which is 896
	help
	  The stack size of the USB charger task. If there are multiple tasks,
	  each one gets the same stack size.

	  See b/176180736 for checking these stack sizes.

endif # PLATFORM_EC_USB_POWER_DELIVERY

endmenu # Tasks