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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
|
/* Copyright (c) 2013 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.
*/
/*
* config.h - Top-level configuration Chrome EC
*
* All configuration settings (CONFIG_*) are defined in this file or in a
* sub-configuration file (config_chip.h, board.h, etc.) included by this file.
*
* Note that this file is included by assembly (.S) files. Any C-isms such as
* struct definitions or enums in a sub-configuration file MUST be guarded with
* #ifndef __ASSEMBLER__ to prevent those C-isms from being evaluated by the
* assembler.
*/
#ifndef __CROS_EC_CONFIG_H
#define __CROS_EC_CONFIG_H
/*
* All config options are listed alphabetically and described here.
*
* If you add a new config option somewhere in the code, you must add a
* default value here and describe what it does.
*
* To get a list current list, run this command:
* git grep " CONFIG_" | grep -o "CONFIG_[A-Za-z0-9_]\+" | sort | uniq
*
* Some options are #defined here to enable them by default. Chips or boards
* may override this by #undef'ing them in config_chip.h or board.h,
* respectively.
*
* TODO(crosbug.com/p/23758): Describe all of these. Also describe the
* HAS_TASK_* macro and how/when it should be used vs. a config define. And
* BOARD_*, CHIP_*, and CHIP_FAMILY_*.
*/
/* Enable EC console functions for calibrating accelerometers. */
#undef CONFIG_ACCEL_CALIBRATE
/* Enable accelerometer interrupts. */
#undef CONFIG_ACCEL_INTERRUPTS
/* Specify type of accelerometers attached. */
#undef CONFIG_ACCEL_KXCJ9
/* Compile chip support for analog-to-digital convertor */
#undef CONFIG_ADC
/*
* ADC module has certain clock requirement. If this is defined, the ADC module
* should call clock_enable_module() to configure clock for ADC.
*/
#undef CONFIG_ADC_CLOCK
/*
* Some ALS modules may be connected to the EC. We need the command, and
* specific drivers for each module.
*/
#undef CONFIG_ALS
#undef CONFIG_ALS_ISL29035
/* Support AP hang detection host command and state machine */
#undef CONFIG_AP_HANG_DETECT
/*
* Support controlling the display backlight based on the state of the lid
* switch. The EC will disable the backlight when the lid is closed.
*/
#undef CONFIG_BACKLIGHT_LID
/*
* If defined, EC will enable the backlight signal only if this GPIO is
* asserted AND the lid is open. This supports passing the backlight-enable
* signal from the AP through EC.
*/
#undef CONFIG_BACKLIGHT_REQ_GPIO
/*****************************************************************************/
/* Battery config */
/*
* Compile battery-specific code. Choose at most one.
*
* Note that some boards have their own unique battery constants / functions.
* In this case, those are provided in board/(boardname)/battery.c, and none of
* these are defined.
*/
#undef CONFIG_BATTERY_BQ20Z453 /* BQ20Z453 battery used on some ARM laptops */
#undef CONFIG_BATTERY_BQ27541 /* BQ27541 battery */
#undef CONFIG_BATTERY_LINK /* Battery used on Link */
/* Compile mock battery support; used by tests. */
#undef CONFIG_BATTERY_MOCK
/*
* Charger should call battery_override_params() to limit/correct the voltage
* and current requested by the battery pack before acting on the request.
*
* This is valid with CONFIG_CHARGER_V1 only.
*/
#undef CONFIG_BATTERY_OVERRIDE_PARAMS
/*
* If defined, the charger will check for battery presence before attempting
* to communicate with it. This avoids the 30 second delay when booting
* without a battery present. Do not use with CONFIG_BATTERY_PRESENT_GPIO.
*
* Replace the default battery_is_present() function with a board-specific
* implementation in board.c
*/
#undef CONFIG_BATTERY_PRESENT_CUSTOM
/*
* If defined, GPIO which is driven low when battery is present.
* Charger will check for battery presence before attempting to communicate
* with it. This avoids the 30 second delay when booting without a battery
* present. Do not use with CONFIG_BATTERY_PRESENT_CUSTOM.
*/
#undef CONFIG_BATTERY_PRESENT_GPIO
/*
* Compile smart battery support
*
* For batteries which support this specification:
* http://sbs-forum.org/specs/sbdat110.pdf)
*/
#undef CONFIG_BATTERY_SMART
/*
* Support battery cut-off as host command and console command.
*
* Once defined, you have to implement a board_cut_off_battery() function
* in board/???/battery.c file.
*/
#undef CONFIG_BATTERY_CUT_OFF
/*
* The board-specific battery.c implements get and set functions to read and
* write arbirary vendor-specific parameters stored in the battery.
* See include/battery.h for prototypes.
*/
#undef CONFIG_BATTERY_VENDOR_PARAM
/*****************************************************************************/
/*
* Call board_config_post_gpio_init() after GPIOs are initialized. See
* include/board_config.h for more information.
*/
#undef CONFIG_BOARD_POST_GPIO_INIT
/*
* Call board_config_pre_init() before any inits are called. See
* include/board_config.h for more information.
*/
#undef CONFIG_BOARD_PRE_INIT
/* EC has GPIOs attached to board version stuffing resistors */
#undef CONFIG_BOARD_VERSION
/* Permanent LM4 boot configuration */
#undef CONFIG_BOOTCFG_VALUE
/*****************************************************************************/
/*
* Number of extra buttons not on the keyboard scan matrix. Doesn't include
* the power button, which has its own handler.
*/
#undef CONFIG_BUTTON_COUNT
/*
* Capsense chip has buttons, too.
*/
#undef CONFIG_CAPSENSE
/*****************************************************************************/
/* Charger config */
/* Compile common charge state code. You must pick an implementation. */
#undef CONFIG_CHARGER
#undef CONFIG_CHARGER_V1
#undef CONFIG_CHARGER_V2
/* Compile charger-specific code for these chargers (pick at most one) */
#undef CONFIG_CHARGER_BQ24707A
#undef CONFIG_CHARGER_BQ24715
#undef CONFIG_CHARGER_BQ24725
#undef CONFIG_CHARGER_BQ24738
#undef CONFIG_CHARGER_BQ24773
#undef CONFIG_CHARGER_TPS65090 /* Note: does not use CONFIG_CHARGER */
/*
* Board specific charging current limit, in mA. If defined, the charge state
* machine will not allow the battery to request more current than this.
*/
#undef CONFIG_CHARGER_CURRENT_LIMIT
/*
* Board supports discharge mode. In this mode, the battery will discharge
* even if AC is present. Used for testing.
*/
#undef CONFIG_CHARGER_DISCHARGE_ON_AC
/*
* Board specific flag used to disable external ILIM pin used to determine input
* current limit. When defined, the input current limit is decided only by
* the software register value.
*/
#undef CONFIG_CHARGER_ILIM_PIN_DISABLED
/*
* Maximum amount of input current the charger can receive, in mA.
*
* This value should depend on external power adapter, designed charging
* voltage, and the maximum power of the running system.
*/
#undef CONFIG_CHARGER_INPUT_CURRENT
/*
* Equivalent of CONFIG_BATTERY_OVERRIDE_PARAMS for use with
* CONFIG_CHARGER_V2
*/
#undef CONFIG_CHARGER_PROFILE_OVERRIDE
/* Value of the charge sense resistor, in mOhms */
#undef CONFIG_CHARGER_SENSE_RESISTOR
/* Value of the input current sense resistor, in mOhms */
#undef CONFIG_CHARGER_SENSE_RESISTOR_AC
/*
* Maximum time to charge the battery, in hours.
*
* If this timeout is reached, the charger will enter force-idle state.
* If not defined, charger will provide current until the battery asks it to
* stop.
*/
#undef CONFIG_CHARGER_TIMEOUT_HOURS
/*
* Board has an GPIO pin to enable or disable charging.
*
* This GPIO should be named GPIO_CHARGER_EN, if active high. Or
* GPIO_CHARGER_EN_L if active low.
*/
#undef CONFIG_CHARGER_EN_GPIO
/* Charger enable GPIO is active low */
#undef CONFIG_CHARGER_EN_ACTIVE_LOW
/*****************************************************************************/
/* Chipset config */
/* AP chipset support; pick at most one */
#undef CONFIG_CHIPSET_BAYTRAIL /* Intel Bay Trail (x86) */
#undef CONFIG_CHIPSET_GAIA /* Gaia and Ares (ARM) */
#undef CONFIG_CHIPSET_HASWELL /* Intel Haswell (x86) */
#undef CONFIG_CHIPSET_IVYBRIDGE /* Intel Ivy Bridge (x86) */
#undef CONFIG_CHIPSET_TEGRA /* nVidia Tegra 5 */
/* Support chipset throttling */
#undef CONFIG_CHIPSET_CAN_THROTTLE
/* Enable additional chipset debugging */
#undef CONFIG_CHIPSET_DEBUG
/* Support power rail control */
#define CONFIG_CHIPSET_HAS_PP1350
#define CONFIG_CHIPSET_HAS_PP5000
/*****************************************************************************/
/*
* Optional console commands
*
* Defining these options will enable the corresponding command on the EC
* console.
*/
#undef CONFIG_CMD_ACCELS
#undef CONFIG_CMD_BATDEBUG
#undef CONFIG_CMD_CLOCKGATES
#undef CONFIG_CMD_COMXTEST
#undef CONFIG_CMD_ECTEMP
#undef CONFIG_CMD_GSV
#undef CONFIG_CMD_ILIM
#undef CONFIG_CMD_JUMPTAGS
#define CONFIG_CMD_LID_ANGLE
#undef CONFIG_CMD_PLL
#undef CONFIG_CMD_PMU
#undef CONFIG_CMD_POWERLED
#undef CONFIG_CMD_RTC_ALARM
#undef CONFIG_CMD_SCRATCHPAD
#undef CONFIG_CMD_SLEEP
#undef CONFIG_CMD_STACKOVERFLOW
/*****************************************************************************/
/* Provide common core code to output panic information without interrupts. */
#define CONFIG_COMMON_PANIC_OUTPUT
/*
* Provide the default GPIO abstraction layer.
* You want this unless you are doing a really tiny firmware.
*/
#define CONFIG_COMMON_GPIO
/*
* Provide common runtime layer code (tasks, hooks ...)
* You want this unless you are doing a really tiny firmware.
*/
#define CONFIG_COMMON_RUNTIME
/* Provide common core code to handle the operating system timers. */
#define CONFIG_COMMON_TIMER
/*****************************************************************************/
/*
* Provide additional help on console commands, such as the supported
* options/usage.
*
* Boards may #undef this to reduce image size.
*/
#define CONFIG_CONSOLE_CMDHELP
/*
* Number of entries in console history buffer.
*
* Boards may #undef this to reduce memory usage.
*/
#define CONFIG_CONSOLE_HISTORY 8
/* Max length of a single line of input */
#define CONFIG_CONSOLE_INPUT_LINE_SIZE 80
/*
* Disable EC console input if the system is locked. This is needed for
* security on platforms where the EC console is accessible from outside the
* case - for example, via a special USB dongle.
*/
#undef CONFIG_CONSOLE_RESTRICTED_INPUT
/*****************************************************************************/
/*
* Debugging config
*
* Note that these options are enabled by default, because they're really
* handy for debugging systems during bringup and even at factory time.
*
* A board may undefine any or all of these to reduce image size and RAM usage,
* at the cost of debuggability.
*/
/*
* ASSERT() macros are checked at runtime. See CONFIG_DEBUG_ASSERT_REBOOTS
* to see what happens if one fails.
*
* Boards may #undef this to reduce image size.
*/
#define CONFIG_DEBUG_ASSERT
/*
* Prints a message and reboots if an ASSERT() macro fails at runtime. When
* enabled, an ASSERT() which fails will produce a message of the form:
*
* ASSERTION FAILURE '<expr>' in function() at file:line
*
* If this is not defined, failing ASSERT() will trigger a BKPT instruction
* instead.
*
* Ignored if CONFIG_DEBUG_ASSERT is not defined.
*
* Boards may #undef this to reduce image size.
*/
#define CONFIG_DEBUG_ASSERT_REBOOTS
/*
* Disable the write buffer used for default memory map accesses.
* This turns "Imprecise data bus errors" into "Precise" errors
* in exception traces at the cost of some performance.
* This may help identify the offending instruction causing an
* exception. Supported on cortex-m.
*/
#undef CONFIG_DEBUG_DISABLE_WRITE_BUFFER
/*
* Print additional information when exceptions are triggered, such as the
* fault address, here shown as bfar. This shows the reason for the fault
* and may help to determine the cause.
*
* === EXCEPTION: 03 ====== xPSR: 01000000 ===========
* r0 :0000000b r1 :00000047 r2 :60000000 r3 :200013dd
* r4 :00000000 r5 :080053f4 r6 :200013d0 r7 :00000002
* r8 :00000000 r9 :200013de r10:00000000 r11:00000000
* r12:00000000 sp :200009a0 lr :08002b85 pc :08003a8a
* Precise data bus error, Forced hard fault, Vector catch, bfar = 60000000
* mmfs = 00008200, shcsr = 00000000, hfsr = 40000000, dfsr = 00000008
*
* If this is not defined, only a register dump will be printed.
*
* Boards may #undef this to reduce image size.
*/
#define CONFIG_DEBUG_EXCEPTIONS
/* Check for stack overflows on every context switch */
#define CONFIG_DEBUG_STACK_OVERFLOW
/*****************************************************************************/
/* Support DMA transfers inside the EC */
#undef CONFIG_DMA
/* Compile extra debugging and tests for the DMA module */
#undef CONFIG_DMA_HELP
/* Support EC chip internal data EEPROM */
#undef CONFIG_EEPROM
/*
* Compile the eoption module, which provides a higher-level interface to
* options stored in internal data EEPROM.
*/
#undef CONFIG_EOPTION
/* Support turbo-mode chargers */
#undef CONFIG_EXTPOWER_FALCO
/* Support detecting external power presence via a GPIO */
#undef CONFIG_EXTPOWER_GPIO
/*
* Support detecting external power presence via a pair of GPIOs, as used
* on Snow.
*/
#undef CONFIG_EXTPOWER_SNOW
/* Support providing power to the device via USB on Spring. */
#undef CONFIG_EXTPOWER_SPRING
/*****************************************************************************/
/* Number of cooling fans. Undef if none. */
#undef CONFIG_FANS
/*
* Replace the default fan_percent_to_rpm() function with a board-specific
* implementation in board.c
*/
#undef CONFIG_FAN_RPM_CUSTOM
/*****************************************************************************/
/* Flash configuration */
/* Support programming on-chip flash */
#define CONFIG_FLASH
#undef CONFIG_FLASH_BANK_SIZE
#undef CONFIG_FLASH_BASE
#undef CONFIG_FLASH_ERASED_VALUE32
#undef CONFIG_FLASH_ERASE_SIZE
#undef CONFIG_FLASH_PHYSICAL_SIZE
#undef CONFIG_FLASH_PROTECT_NEXT_BOOT
#undef CONFIG_FLASH_SIZE
#undef CONFIG_FLASH_WRITE_IDEAL_SIZE
#undef CONFIG_FLASH_WRITE_SIZE
/*****************************************************************************/
/* Include a flashmap in the compiled firmware image */
#define CONFIG_FMAP
/* Allow EC serial console input to wake up the EC from STOP mode */
#undef CONFIG_FORCE_CONSOLE_RESUME
/* Enable support for floating point unit */
#undef CONFIG_FPU
/*****************************************************************************/
/* Firmware region configuration */
#undef CONFIG_FW_IMAGE_SIZE
#undef CONFIG_FW_PSTATE_OFF
#undef CONFIG_FW_PSTATE_SIZE
#undef CONFIG_FW_RO_OFF
#undef CONFIG_FW_RO_SIZE
#undef CONFIG_FW_RW_OFF
#undef CONFIG_FW_RW_SIZE
#undef CONFIG_FW_WP_RO_OFF
#undef CONFIG_FW_WP_RO_SIZE
/*****************************************************************************/
/*
* Support the host asking the EC about the status of the most recent host
* command.
*
* When the AP is attached to the EC via a serialized bus such as I2C or SPI,
* it needs a way to minimize the length of time an EC command will tie up the
* bus (and the kernel driver on the AP). If this config is defined, the EC
* may return an in-progress result code for slow commands such as flash
* erase/write instead of stalling until the command finishes processing, and
* the AP may then inquire the status of the current command and/or the result
* of the previous command.
*/
#undef CONFIG_HOST_COMMAND_STATUS
/*****************************************************************************/
/* Enable debugging and profiling statistics for hook functions */
#undef CONFIG_HOOK_DEBUG
/*****************************************************************************/
/* CRC configuration */
/* Enable the hardware accelerator for CRC computation */
#undef CONFIG_HW_CRC
/* Enable the software routine for CRC computation */
#undef CONFIG_SW_CRC
/*****************************************************************************/
/* I2C configuration */
#undef CONFIG_I2C
#undef CONFIG_I2C_ARBITRATION
#undef CONFIG_I2C_DEBUG
#undef CONFIG_I2C_DEBUG_PASSTHRU
#undef CONFIG_I2C_PASSTHROUGH
#undef CONFIG_I2C_PASSTHRU_RESTRICTED
/*****************************************************************************/
/* Number of IRQs supported on the EC chip */
#undef CONFIG_IRQ_COUNT
/*****************************************************************************/
/* Keyboard config */
/*
* The Silego reset chip sits in between the EC and the physical keyboard on
* column 2. To save power in low-power modes, some Silego variants require
* the signal to be inverted so that the open-drain output from the EC isn't
* costing power due to the pull-up resistor in the Silego.
*/
#undef CONFIG_KEYBOARD_COL2_INVERTED
/* Enable extra debugging output from keyboard modules */
#undef CONFIG_KEYBOARD_DEBUG
/* The board uses a negative edge-triggered GPIO for keyboard interrupts. */
#undef CONFIG_KEYBOARD_IRQ_GPIO
/* Compile code for 8042 keyboard protocol */
#undef CONFIG_KEYBOARD_PROTOCOL_8042
/* Compile code for MKBP keyboard protocol */
#undef CONFIG_KEYBOARD_PROTOCOL_MKBP
/*
* Keyboard config (struct keyboard_scan_config) is in board.c. If this is
* not defined, default values from common/keyboard_scan.c will be used.
*/
#undef CONFIG_KEYBOARD_BOARD_CONFIG
/*
* Minimum CPU clocks between scans. This ensures that keyboard scanning
* doesn't starve the other EC tasks of CPU when running at a decreased system
* clock.
*/
#undef CONFIG_KEYBOARD_POST_SCAN_CLOCKS
/*
* Call board-supplied keyboard_suppress_noise() function when the debounced
* keyboard state changes. Some boards use this to send a signal to the audio
* codec to suppress typing noise picked up by the microphone.
*/
#undef CONFIG_KEYBOARD_SUPPRESS_NOISE
/*
* Enable keyboard testing functionality. This enables a message which receives
* a list of keyscan events from the AP and processes them. This will cause
* keypresses to appear on the AP through the same mechanism as a normal
* keyboard press.
*
* This can be used to spoof keyboard events, so is not normally defined,
* except during internal testing.
*/
#undef CONFIG_KEYBOARD_TEST
/*****************************************************************************/
/* Support common LED interface */
#undef CONFIG_LED_COMMON
/* Support for LED driver chip(s) */
#undef CONFIG_LED_DRIVER_DS2413 /* Maxim DS2413, on one-wire interface */
#undef CONFIG_LED_DRIVER_LP5562 /* LP5562, on I2C interface */
/*
* Allows using the lid angle measurement to determine if key scanning should
* be enabled or disabled when chipset is suspended.
*/
#undef CONFIG_LID_ANGLE_KEY_SCAN
/*
* Compile lid switch support.
*
* This is enabled by default because all boards other than reference boards
* are for laptops with lid switchs. Reference boards #undef it.
*/
#define CONFIG_LID_SWITCH
/*
* Low power idle options. These are disabled by default and all boards that
* want to use low power idle must define it. When using the LFIOSC, the low
* frequency clock will be used to conserve even more power when possible.
*
* GPIOs which need to trigger interrupts in low power idle must specify the
* GPIO_INT_DSLEEP flag in gpio_list[].
*
* Note that for some processors (e.g. LM4), an active JTAG connection will
* prevent the EC from using low-power idle.
*/
#undef CONFIG_LOW_POWER_IDLE
#undef CONFIG_LOW_POWER_USE_LFIOSC
/* Support LPC interface */
#undef CONFIG_LPC
/* Support memory protection unit (MPU) */
#undef CONFIG_MPU
/* Support one-wire interface */
#undef CONFIG_ONEWIRE
/* Support PECI interface to x86 processor */
#undef CONFIG_PECI
/*
* Maximum operating temperature in degrees Celcius used on some x86
* processors. CPU chip temperature is reported relative to this value and
* is never reported greater than this value. Processor asserts PROCHOT#
* and starts throttling frequency and voltage at this temp. Operation may
* become unreliable if temperature exceeds this limit.
*/
#undef CONFIG_PECI_TJMAX
/*****************************************************************************/
/* PMU config */
/*
* Force switching on and off the FETs on the PMU controlling various power
* rails during AP startup and shutdown sequences. This is mainly useful for
* bringup when we don't have the corresponding sequences in the AP code.
*
* Currently supported only on spring platform.
*/
#undef CONFIG_PMU_FORCE_FET
/*
* Enable hard-resetting the PMU from the EC. The implementation is rather
* hacky; it simply shorts out the 3.3V rail to force the PMIC to panic. We
* need this unfortunate hack because it's the only way to reset the I2C engine
* inside the PMU.
*/
#undef CONFIG_PMU_HARD_RESET
/* Support TPS65090 PMU */
#undef CONFIG_PMU_TPS65090
/*
* Support PMU powerinfo host and console commands. Note that the
* implementation is currently specific to the Pit board, so don't blindly
* enable this for another board without fixing that first.
*/
#undef CONFIG_PMU_POWERINFO
/*****************************************************************************/
/* Compile common code to support power button debouncing */
#undef CONFIG_POWER_BUTTON
/* Allow the power button to send events while the lid is closed */
#undef CONFIG_POWER_BUTTON_IGNORE_LID
/* Support sending the power button signal to x86 chipsets */
#undef CONFIG_POWER_BUTTON_X86
/* Compile common code for AP power state machine */
#undef CONFIG_POWER_COMMON
/*
* The EC stores persistent state information for flash write protect in a
* block of flash. If this option is defined, the information is in the last
* bank of flash, instead of the last bank in the nominally read-only section
* of flash.
*/
#undef CONFIG_PSTATE_AT_END
/* Use part of the EC's data EEPROM to hold persistent storage for the AP. */
#undef CONFIG_PSTORE
/*****************************************************************************/
/* Support PWM control */
#undef CONFIG_PWM
/* Support PWM control while in low-power idle */
#undef CONFIG_PWM_DSLEEP
/*****************************************************************************/
/* Support PWM output to keyboard backlight */
#undef CONFIG_PWM_KBLIGHT
/* Base address of RAM for the chip */
#undef CONFIG_RAM_BASE
/* Size of RAM available on the chip, in bytes */
#undef CONFIG_RAM_SIZE
/* Support IR357x Link voltage regulator debugging / reprogramming */
#undef CONFIG_REGULATOR_IR357X
/*
* If defined, the hash module will save its last computed hash when jumping
* between EC images.
*/
#undef CONFIG_SAVE_VBOOT_HASH
/* Allow the board to use a GPIO for the SCI# signal. */
#undef CONFIG_SCI_GPIO
/* Support computing SHA-1 hash */
#undef CONFIG_SHA1
/* Emulate the CLZ (Count Leading Zeros) in software for CPU lacking support */
#undef CONFIG_SOFTWARE_CLZ
/* Support SPI interfaces */
#undef CONFIG_SPI
/* Default stack size to use for tasks, in bytes */
#undef CONFIG_STACK_SIZE
/* Fake hibernate mode */
#undef CONFIG_STM32L_FAKE_HIBERNATE
/*
* Compile common code to handle simple switch inputs such as the recovery
* button input from the servo debug interface.
*/
#undef CONFIG_SWITCH
/* Support dedicated recovery signal from servo board */
#undef CONFIG_SWITCH_DEDICATED_RECOVERY
/*
* System should remain unlocked even if write protect is enabled.
*
* NOTE: This should ONLY be defined during bringup, and should never be
* defined on a shipping / released platform.
*/
#undef CONFIG_SYSTEM_UNLOCKED
/*****************************************************************************/
/* Task config */
/*
* List of enabled tasks in ascending priority order. This is normally
* defined in each board's ec.tasklist file.
*
* For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and
* TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries,
* where :
* 'n' is the name of the task
* 'r' is the main routine of the task
* 'd' is an opaque parameter passed to the routine at startup
* 's' is the stack size in bytes; must be a multiple of 8
*/
#undef CONFIG_TASK_LIST
/*
* List of test tasks. Same format as CONFIG_TASK_LIST, but used to define
* additional tasks for a unit test. Normally defined in
* test/{testname}.tasklist.
*/
#undef CONFIG_TEST_TASK_LIST
/*
* Enable task profiling.
*
* Boards may #undef this to reduce image size and RAM usage.
*/
#define CONFIG_TASK_PROFILING
/*****************************************************************************/
/* Temperature sensor config */
/* Compile common code for temperature sensor support */
#undef CONFIG_TEMP_SENSOR
/* Support particular temperature sensor chips */
#undef CONFIG_TEMP_SENSOR_G781 /* G781 sensor, on I2C bus */
#undef CONFIG_TEMP_SENSOR_TMP006 /* TI TMP006 sensor, on I2C bus */
#undef CONFIG_TEMP_SENSOR_TMP432 /* TI TMP432 sensor, on I2C bus */
/*
* If defined, active-high GPIO which indicates temperature sensor chips are
* powered. If not defined, temperature sensors are assumed to be always
* powered.
*/
#undef CONFIG_TEMP_SENSOR_POWER_GPIO
/*****************************************************************************/
/* UART config */
/* Baud rate for UARTs */
#define CONFIG_UART_BAUD_RATE 115200
/* UART index (number) for EC console */
#undef CONFIG_UART_CONSOLE
/* UART index (number) for host UART, if present */
#undef CONFIG_UART_HOST
/*
* UART receive buffer size in bytes. Must be a power of 2 for macros in
* common/uart_buffering.c to work properly. Must be larger than
* CONFIG_CONSOLE_INPUT_LINE_SIZE to copy and paste scripts.
*/
#define CONFIG_UART_RX_BUF_SIZE 128
/* Use DMA for UART input */
#undef CONFIG_UART_RX_DMA
/*
* On some platforms, UART receive DMA can't trigger an interrupt when a single
* character is received. Those platforms poll for characters every HOOK_TICK.
* When a character is received, make this many additional checks between then
* and the next HOOK_TICK, to increase responsiveness of the console to input.
*/
#define CONFIG_UART_RX_DMA_RECHECKS 5
/*
* UART transmit buffer size in bytes. Must be a power of 2 for macros in
* common/uart_buffering.c to work properly.
*/
#define CONFIG_UART_TX_BUF_SIZE 512
/* Use DMA for UART output */
#undef CONFIG_UART_TX_DMA
/*****************************************************************************/
/* USB PD transmit uses SPI master */
#undef CONFIG_USB_PD_TX_USES_SPI_MASTER
/* Support simple control of power to the device's USB ports */
#undef CONFIG_USB_PORT_POWER_DUMB
/*
* Support supplying USB power in S3, if the host leaves the port enabled when
* entering S3.
*/
#undef CONFIG_USB_PORT_POWER_IN_S3
/*
* Support smart power control to the device's USB ports, using
* dedicated power control chips. This potentially enables automatic
* negotiation of supplying more power to peripherals.
*/
#undef CONFIG_USB_PORT_POWER_SMART
/*
* Smart USB power control can use a full set of control signals to the USB
* port power chip, or a reduced set. If this is defined, use the reduced set.
*/
#undef CONFIG_USB_PORT_POWER_SMART_SIMPLE
/* Support the TSU6721 I2C smart switch */
#undef CONFIG_USB_SWITCH_TSU6721
/*****************************************************************************/
/* Support computing hash of code for verified boot */
#undef CONFIG_VBOOT_HASH
/*****************************************************************************/
/* Watchdog config */
/*
* Compile watchdog timer support. The watchdog timer will reboot the system
* if the hook task (which is the lowest-priority task on the system) gets
* starved for CPU time and isn't able to fire its HOOK_TICK event.
*/
#define CONFIG_WATCHDOG
/*
* Try to detect a watchdog that is about to fire, and print a trace. This is
* required on chips such as STM32 where the watchdog timer simply reboots the
* system without any early warning.
*/
#undef CONFIG_WATCHDOG_HELP
/*****************************************************************************/
/*
* Support controlling power to WiFi, WWAN (3G/LTE), and/or bluetooth modules.
*/
#undef CONFIG_WIRELESS
/*
* Support for WiFi devices that must remain powered in suspend. Set to the
* combination of EC_WIRELESS_SWITCH flags (from ec_commands.h) which should
* be set in suspend.
*/
#undef CONFIG_WIRELESS_SUSPEND
/*
* Write protect signal is active-high. If this is defined, there must be a
* GPIO named GPIO_WP; if not defined, there must be a GPIO names GPIO_WP_L.
*/
#undef CONFIG_WP_ACTIVE_HIGH
/*****************************************************************************/
/*
* Include board and core configs, since those hold the CONFIG_ constants for a
* given configuration. This guarantees they get included everywhere, and
* fixes a fairly common bug where we gate out code with #ifndef
* CONFIG_SOMETHING and but forget to include both of these.
*
* Board is included after chip, so that chip defaults can be overridden on a
* per-board basis as needed.
*/
#include "config_chip.h"
#include "board.h"
/*****************************************************************************/
/*
* Handle task-dependent configs.
*
* This prevent sub-modules from being compiled when the task and parent module
* are not present.
*/
#ifndef HAS_TASK_CHIPSET
#undef CONFIG_CHIPSET_BAYTRAIL
#undef CONFIG_CHIPSET_GAIA
#undef CONFIG_CHIPSET_HASWELL
#undef CONFIG_CHIPSET_IVYBRIDGE
#undef CONFIG_CHIPSET_TEGRA
#undef CONFIG_POWER_COMMON
#endif
#ifndef HAS_TASK_KEYPROTO
#undef CONFIG_KEYBOARD_PROTOCOL_8042
/*
* Note that we don't undef CONFIG_KEYBOARD_PROTOCOL_MKBP, because it doesn't
* have its own task.
*/
#endif
#ifndef HAS_TASK_KEYSCAN
#undef CONFIG_KEYBOARD_PROTOCOL_8042
#undef CONFIG_KEYBOARD_PROTOCOL_MKBP
#endif
#ifndef HAS_TASK_MOTIONSENSE
#undef CONFIG_ACCEL_CALIBRATE
#endif
/*****************************************************************************/
/*
* Apply test config overrides last, since tests need to override some of the
* config flags in non-standard ways to mock only parts of the system.
*/
#include "test_config.h"
#endif /* __CROS_EC_CONFIG_H */
|