summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.tasks
blob: 35dfc1c2f1ccfd3901e12be0a65e51f3b1856e87 (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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# 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 HAS_TASK_CHARGER
	bool "Charger task"
	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 "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 "Charger-ramp task"
	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 "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 "Chipset task"
	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 "Stack size"
	default 1024
	help
	  The stack size of the power button task.

endif # HAS_TASK_CHIPSET

config HAS_TASK_HOOKS
	bool "Hooks task"
	default y
	help
	  This required task runs periodic routines connected to the HOOK_TICK
	  and HOOK_SECOND events. This task is responsible for running
	  deferred routines.

if HAS_TASK_HOOKS

config TASK_HOOKS_STACK_SIZE
	int "Stack size"
	default 1024
	help
	  The stack size of the hooks task.

	  See b/176180736 for checking these stack sizes.

endif # HAS_TASK_HOOKS

config HAS_TASK_HOSTCMD
	bool "Host-command task"
	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

config TASK_HOSTCMD_STACK_SIZE
	int "Stack size"
	default 1024
	help
	  The size of the host-command task stack.

endif # HAS_TASK_HOSTCMD

config HAS_TASK_KEYPROTO
	bool "Keyboard-protocol task (x86)"
	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 "Stack size"
	default 768
	help
	  The stack size of the keyproto task.

endif # HAS_TASK_KEYPROTO

config HAS_TASK_KEYSCAN
	bool "Keyboard-scanning task"
	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 "Stack size"
	default 768
	help
	  The stack size of the keyscan task.

endif # HAS_TASK_KEYSCAN

config HAS_TASK_MOTIONSENSE
	bool "Enable motionsense task"
	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 "Power-button task (x86)"
	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 "Stack size"
	default 1024
	help
	  The stack size of the power-button task.

endif # HAS_TASK_POWERBTN

config HAS_TASK_PD_C0
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	default y
	help
	  This turns on the PD_C0 task which handles the rather complex USB
	  Power Delivery protocol for port 0. There is one of these tasks for
	  each USB-C port on the device, but they are enabled separately
	  depending on how many ports are present.

if HAS_TASK_PD_C0

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

endif # HAS_TASK_PD_C0

config HAS_TASK_PD_C1
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_C1 task for devices with >=2 ports.

config HAS_TASK_PD_C2
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_C2 task for devices with >=3 ports.

config HAS_TASK_PD_C3
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_C3 task for devices with 4 ports.

config HAS_TASK_PD_INT_C0
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	default y
	help
	  This turns on the PD_INT_C0 task which handles servicing of Power
	  Delivery (PD) message interrupts for port 0. There is one of these
	  tasks for each USB-C port on the device, but they are enabled
	  separately depending on how many ports are present.

if HAS_TASK_PD_INT_C0

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

endif # HAS_TASK_PD_INT_C0

config HAS_TASK_PD_INT_C1
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_INT_C1 task for devices with >=2 ports.

config HAS_TASK_PD_INT_C2
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_INT_C2 task for devices with >=3 ports.

config HAS_TASK_PD_INT_C3
	bool "USB Power Delivery task"
	depends on PLATFORM_EC_USB_POWER_DELIVERY
	help
	  This turns on the PD_INT_C3 task for devices with 4 ports.

config HAS_TASK_USB_CHG_P0
	bool "USB Charger (port 0)"
	depends on PLATFORM_EC_USB_CHARGER
	help
	  This turns on the USB charger task for port 0. This handles
	  negotiating power from an attached charger, trying to get the maximum
	  available power consistent with the needs of the device.

	  There is one of these tasks for each USB-C port on the device.

if HAS_TASK_USB_CHG_P0

config TASK_USB_CHG_STACK_SIZE
	int "(all ports) task 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 # HAS_TASK_USB_CHG_P0

config HAS_TASK_USB_CHG_P1
	bool "USB Charger (port 1)"
	help
	  This turns on the USB charger task for port 1. This handles
	  negotiating power from an attached charger, trying to get the maximum
	  available power consistent with the needs of the device.

	  There is one of these tasks for each USB-C port on the device.

config HAS_TASK_USB_CHG_P2
	bool "USB Charger (port 2)"
	help
	  This turns on the USB charger task for port 2. This handles
	  negotiating power from an attached charger, trying to get the maximum
	  available power consistent with the needs of the device.

	  There is one of these tasks for each USB-C port on the device.

endmenu # Tasks