forked from FrameworkComputer/EmbeddedController
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.h
7183 lines (6004 loc) · 227 KB
/
config.h
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
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Copyright 2016 The ChromiumOS Authors
* 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
/*
* When building for Zephyr tests, a shimmed_tasks.h header is defined
* to create all the HAS_TASK_* definitions. Since those are used in
* config.h, we need to include that header first.
*/
#ifdef CONFIG_ZEPHYR
#include "shimmed_tasks.h"
#endif /* CONFIG_ZEPHYR */
#ifdef INCLUDE_ENV_CONFIG
/*
* When building for an EC target, pick up the .h file which allows to
* keep track of changing make variables.
*/
#include "env_config.h"
#endif
/*
* 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_*.
*/
/* Add support for sensor FIFO */
#undef CONFIG_ACCEL_FIFO
/* Define the size of the global fifo, must be a power of 2. */
#undef CONFIG_ACCEL_FIFO_SIZE
/* The amount of free entries that trigger an interrupt to the AP. */
#undef CONFIG_ACCEL_FIFO_THRES
/*
* Sensors in this mask are in forced mode: they needed to be polled
* at their data rate frequency.
*/
#undef CONFIG_ACCEL_FORCE_MODE_MASK
/* Enable accelerometer interrupts. */
#undef CONFIG_ACCEL_INTERRUPTS
/*
* Support "spoof" mode for sensors. This allows sensors to have their values
* spoofed to any arbitrary value. This is useful for testing.
*/
#define CONFIG_ACCEL_SPOOF_MODE
/* Specify type of accelerometers attached. */
#undef CONFIG_ACCEL_BMA255
#undef CONFIG_ACCEL_BMA4XX
#undef CONFIG_ACCEL_KXCJ9
#undef CONFIG_ACCEL_KX022
/*
* lis2dh/lis2de/lng2dm have the same register interface but different
* supported resolution. In normal mode, lis2dh works in 10-bit resolution,
* but lis2de/lng2dm only support 8bit resolution.
*
* Use the define for your correct chip and the CONFIG_ACCEL_LIS2D_COMMON will
* automatically get defined.
*/
#undef CONFIG_ACCEL_LIS2DE
#undef CONFIG_ACCEL_LIS2DH
#undef CONFIG_ACCEL_LIS2DS
#undef CONFIG_ACCEL_LNG2DM
#undef CONFIG_ACCEL_LIS2D_COMMON
/*
* lis2dw12 and lis2dwl have almost the same register interface.
* lis2dw12 supports 4 low power modes but lis2dwl only supports one. lis2dwl
* only supports 12 bit resolution under low power mode. But lis2dw12 can
* support 12 bit or 14 bit resolution at different low power modes. In order
* to get 14 bit resolution, lis2dwl does not use low power mode and lis2dw12
* only uses 3 of 4 low power modes.
*
* Use the define for your correct chip and the CONFIG_ACCEL_LIS2DW_COMMON will
* automatically get defined.
*/
#undef CONFIG_ACCEL_LIS2DW12
#undef CONFIG_ACCEL_LIS2DWL
#undef CONFIG_ACCEL_LIS2DW_COMMON
#undef CONFIG_ACCELGYRO_BMI160
#undef CONFIG_ACCELGYRO_BMI220
#undef CONFIG_ACCELGYRO_BMI260
#undef CONFIG_ACCELGYRO_BMI3XX
#undef CONFIG_ACCELGYRO_ICM426XX
#undef CONFIG_ACCELGYRO_ICM42607
#undef CONFIG_ACCELGYRO_LSM6DS0
/* Use CONFIG_ACCELGYRO_LSM6DSM for LSM6DSL, LSM6DSM, and/or LSM6DS3 */
#undef CONFIG_ACCELGYRO_LSM6DSM
#undef CONFIG_ACCELGYRO_LSM6DSO
/* Select the communication mode for the accelgyro ICM. Only one of these should
* be set. To set the value manually, simply define one or the other. If neither
* is defined, but I2C_PORT_ACCEL is defined, then CONFIG_ACCELGYRO_ICM_I2C will
* automatically be set.
*/
#undef CONFIG_ACCELGYRO_ICM_COMM_SPI
#undef CONFIG_ACCELGYRO_ICM_COMM_I2C
/* Select the communication mode for the accelgyro BMI. Only one of these should
* be set. To set the value manually, simply define one or the other. If neither
* is defined, but I2C_PORT_ACCEL is defined, then CONFIG_ACCELGYRO_BMI_I2C will
* automatically be set.
*/
#undef CONFIG_ACCELGYRO_BMI_COMM_SPI
#undef CONFIG_ACCELGYRO_BMI_COMM_I2C
/*
* Some chips have a portion of memory which will remain powered even
* during a reset. This is called Always-On, or AON memory, and
* typically has a separate firmware to manage the memory. These
* values can be used to configure the RAM layout for Always-On.
*
* See chip/ish/ for an example implementation.
*/
#undef CONFIG_AON_PERSISTENT_BASE
#undef CONFIG_AON_PERSISTENT_SIZE
#undef CONFIG_AON_RAM_BASE
#undef CONFIG_AON_RAM_SIZE
/* Add sensorhub function for LSM6DSM, required if 2nd device attached. */
#undef CONFIG_SENSORHUB_LSM6DSM
/* Specify type of Magnetometer attached. */
#undef CONFIG_MAG_LIS2MDL
#undef CONFIG_MAG_BMM150
/* Presence of a Bosh Sensortec BMM150 magnetometer behind a BMIxxx. */
#undef CONFIG_MAG_BMI_BMM150
/* Presence of a Bosh Sensortec BMM150 magnetometer behind a LSM6DSM. */
#undef CONFIG_MAG_LSM6DSM_BMM150
/* Presence of a ST LIS2MDL magnetometer behind a BMIxxx. */
#undef CONFIG_MAG_BMI_LIS2MDL
/* Presence of a ST LIS2MDL magnetometer behind a LSM6DSM. */
#undef CONFIG_MAG_LSM6DSM_LIS2MDL
/* Specify barometer attached */
#undef CONFIG_BARO_BMP280
/* When set, it indicates a secondary sensor is attached behind a BMIxxx. */
#undef CONFIG_BMI_SEC_I2C
/* When set, it indicates a secondary sensor is attached behind a LSM6DSM/L. */
#undef CONFIG_LSM6DSM_SEC_I2C
/* Support for BMIxxx hardware orientation sensor */
#undef CONFIG_BMI_ORIENTATION_SENSOR
/* Support for KIONIX KX022 hardware orientation sensor */
#undef CONFIG_KX022_ORIENTATION_SENSOR
/* Define the i2c address of the sensor behind the main sensor, if present. */
#undef CONFIG_ACCELGYRO_SEC_ADDR_FLAGS
/*
* Define if either CONFIG_BMI_ORIENTATION_SENSOR or
* CONFIG_KX022_ORIENTATION_SENSOR is set.
*/
#undef CONFIG_ORIENTATION_SENSOR
/* Support the orientation gesture */
#undef CONFIG_GESTURE_ORIENTATION
/* Support the body_detection */
#undef CONFIG_BODY_DETECTION
/* Which sensor body_detection use */
#undef CONFIG_BODY_DETECTION_SENSOR
/* The max number of sampling data for 1 second */
#undef CONFIG_BODY_DETECTION_MAX_WINDOW_SIZE
/* The threshold of acceleration variance */
#undef CONFIG_BODY_DETECTION_VAR_THRESHOLD
#undef CONFIG_BODY_DETECTION_CONFIDENCE_DELTA
/* How much noise affect threshold of variance */
#undef CONFIG_BODY_DETECTION_VAR_NOISE_FACTOR
/* The confidence limit of on_body/off_body */
#undef CONFIG_BODY_DETECTION_ON_BODY_CON
#undef CONFIG_BODY_DETECTION_OFF_BODY_CON
/* The threshold duration to change to off_body */
#undef CONFIG_BODY_DETECTION_STATIONARY_DURATION
/* Send the SCI event to notify host when body status change */
#undef CONFIG_BODY_DETECTION_NOTIFY_MODE_CHANGE
/* Send the MKBP event to notify host when body status change */
#undef CONFIG_BODY_DETECTION_NOTIFY_MKBP
/* Always enable the body detection function in S0 */
#undef CONFIG_BODY_DETECTION_ALWAYS_ENABLE_IN_S0
/*
* Use the old standard reference frame for accelerometers. The old
* reference frame is:
* Z-axis: perpendicular to keyboard, pointing up, such that if the device
* is sitting flat on a table, the accel reads +G.
* X-axis: in the plane of the keyboard, pointing from the front lip to the
* hinge, such that if the device is oriented with the front lip touching
* the table and the hinge directly above, the accel reads +G.
* Y-axis: in the plane of the keyboard, pointing to the right, such that
* if the device is on it's left side, the accel reads +G.
*
* Also, in the old reference frame, the lid accel matches the base accel
* readings when lid is closed.
*/
#undef CONFIG_ACCEL_STD_REF_FRAME_OLD
/* Set when INT2 is an output */
#undef CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT
#undef CONFIG_ACCELGYRO_BMI260_INT2_OUTPUT
/* Specify type of Gyrometers attached. */
#undef CONFIG_GYRO_L3GD20H
/*
* If this is defined, motion_sense sends sensor events to the AP in the format
* +-----------+
* | Timestamp |
* | Payload |
* | Timestamp |
* | Payload |
* | ... |
* +-----------+
*
* If this is not defined, the events will be sent in the format
* +-----------+
* | Payload |
* | Payload |
* | Payload |
* | ... |
* | Timestamp |
* +-----------+
*
* The former format enables improved filtering of sensor event timestamps on
* the AP, but comes with stricter jitter requirements.
*/
#define CONFIG_SENSOR_TIGHT_TIMESTAMPS
/* Sync event driver */
#undef CONFIG_SYNC
/*
* How many sync events to buffer before motion_sense gets a chance to run.
* This is similar to sensor side fifos.
* Note: for vsync, anything above 2 is probably plenty.
*/
#define CONFIG_SYNC_QUEUE_SIZE 8
/* Simulate command for sync */
#undef CONFIG_SYNC_COMMAND
/*
* Define the event to raise when the sync event happens.
* Must be within TASK_EVENT_MOTION_INTERRUPT_MASK.
*/
#undef CONFIG_SYNC_INT_EVENT
#ifndef CONFIG_ZEPHYR
/* Compile chip support for digital-to-analog converter */
#undef CONFIG_DAC
#endif /* CONFIG_ZEPHYR */
/*
* Allow runtime configuration of the adc_channels[] array
*/
#undef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG
/*
* ADC sample time selection. The value is chip-dependent.
* TODO: Replace this with CONFIG_ADC_PROFILE entries.
*/
#undef CONFIG_ADC_SAMPLE_TIME
/* Support voltage comparator */
#undef CONFIG_ADC_VOLTAGE_COMPARATOR
/* Include the ADC analog watchdog feature in the ADC code */
#define CONFIG_ADC_WATCHDOG
/*
* Chip-dependent ADC configuration - select one.
* SINGLE - Sample all inputs once when requested.
* FAST_CONTINUOUS - Sample all inputs continuously using DMA, with minimal
* sample time.
*/
#define CONFIG_ADC_PROFILE_SINGLE
#undef CONFIG_ADC_PROFILE_FAST_CONTINUOUS
/*
* Some ALS modules may be connected to the EC. We need the command, and
* specific drivers for each module.
*/
#ifdef HAS_TASK_ALS
#define CONFIG_ALS
#else
#undef CONFIG_ALS
#endif
#undef CONFIG_ALS_AL3010
#undef CONFIG_ALS_BH1730
/*
* If defined, BH1730 uses board specific lux calculation formula parameters.
* If not defined, BH1730 uses default parameters to calculate lux.
*/
#undef CONFIG_ALS_BH1730_LUXTH_PARAMS
#undef CONFIG_ALS_ISL29035
#undef CONFIG_ALS_OPT3001
#undef CONFIG_ALS_CM32183
/* Define the exact model ID present on the board: SI1141 = 41, SI1142 = 42, */
#undef CONFIG_ALS_SI114X
/* Check if the device revision is supported */
#undef CONFIG_ALS_SI114X_CHECK_REVISION
/* Define to include the clear channel driver for the tcs3400 light sensor */
#undef CONFIG_ALS_TCS3400
/*
* Define the event to raise when a sensor interrupt triggers.
* Must be within TASK_EVENT_MOTION_INTERRUPT_MASK.
*/
#undef CONFIG_ACCELGYRO_BMI160_INT_EVENT
#undef CONFIG_ACCELGYRO_BMI260_INT_EVENT
#undef CONFIG_ACCELGYRO_BMI3XX_INT_EVENT
#undef CONFIG_ACCELGYRO_ICM426XX_INT_EVENT
#undef CONFIG_ACCELGYRO_ICM42607_INT_EVENT
#undef CONFIG_ACCEL_BMA4XX_INT_EVENT
#undef CONFIG_ACCEL_LSM6DSM_INT_EVENT
#undef CONFIG_ACCEL_LSM6DSO_INT_EVENT
#undef CONFIG_ACCEL_LIS2DS_INT_EVENT
#undef CONFIG_ACCEL_LIS2DW12_INT_EVENT
#undef CONFIG_ALS_SI114X_INT_EVENT
#undef CONFIG_ALS_TCS3400_INT_EVENT
/*
* Enable Si114x to operate in polling mode. This config is used in conjunction
* with CONFIG_ALS_SI114X_INT_EVENT. When polling is enabled, the read is
* initiated in the same manner as when interrupts are used, but the event which
* triggers the irq_handler is generated by deferred call using a fixed delay.
*/
#undef CONFIG_ALS_SI114X_POLLING
/*
* Enable tcs3400 to operate without interrupt pin. This config is used in
* conjunction with CONFIG_ALS_TCS3400_INT_EVENT. When this option is enabled,
* the read is initiated in the same manner as when interrupts are used, but the
* event which triggers the irq_handler is generated by deferred call.
*/
#undef CONFIG_ALS_TCS3400_EMULATED_IRQ_EVENT
/* Define which ALS sensor is used for dimming the lightbar when dark */
#undef CONFIG_ALS_LIGHTBAR_DIMMING
/* Link against third_party/cryptoc. */
#undef CONFIG_LIBCRYPTOC
/* Support AP hang detection host command and state machine */
#undef CONFIG_AP_HANG_DETECT
/* Support AP Warm reset Interrupt. */
#undef CONFIG_AP_WARM_RESET_INTERRUPT
/*
* Enable support for CPU caches behaving according to the ARMv7-M ISA.
* (so far, only the Cortex-M7 has such caches)
*/
#undef CONFIG_ARMV7M_CACHE
/*
* Defined if core/ code provides assembly optimized implementation of
* multiply-accumulate operations (32-bit operands, 64-bit result), for the
* cores that lack native instructions.
*/
#undef CONFIG_ASSEMBLY_MULA32
#ifndef CONFIG_ZEPHYR
/* Support audio codec. */
#undef CONFIG_AUDIO_CODEC
#endif /* CONFIG_ZEPHYR */
/* Audio codec caps. */
#undef CONFIG_AUDIO_CODEC_CAP_WOV_AUDIO_SHM
#undef CONFIG_AUDIO_CODEC_CAP_WOV_LANG_SHM
/* Support audio codec on DMIC. */
#undef CONFIG_AUDIO_CODEC_DMIC
/* Support audio codec software gain on DMIC. */
#undef CONFIG_AUDIO_CODEC_DMIC_SOFTWARE_GAIN
#undef CONFIG_AUDIO_CODEC_DMIC_MAX_SOFTWARE_GAIN
/* Support audio codec on I2S RX. */
#undef CONFIG_AUDIO_CODEC_I2S_RX
/* Support audio codec on WoV. */
#undef CONFIG_AUDIO_CODEC_WOV
/* Audio codec buffers. */
#undef CONFIG_AUDIO_CODEC_WOV_AUDIO_BUF_LEN
#undef CONFIG_AUDIO_CODEC_WOV_AUDIO_BUF_TYPE
#undef CONFIG_AUDIO_CODEC_WOV_LANG_BUF_LEN
#undef CONFIG_AUDIO_CODEC_WOV_LANG_BUF_TYPE
/*
* Support controlling the display backlight based on the state of the lid
* switch. The EC will disable the backlight when the lid is closed.
*
* The GPIO should be named GPIO_ENABLE_BACKLIGHT if active high, or
* GPIO_ENABLE_BACKLIGHT_L if active low. See CONFIG_BACKLIGHT_LID_ACTIVE_LOW.
*/
#undef CONFIG_BACKLIGHT_LID
/*
* The backlight GPIO pin is active low and named GPIO_BACKLIGHT_ENABLED_L
*/
#undef CONFIG_BACKLIGHT_LID_ACTIVE_LOW
/*
* 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
/* Support base32 text encoding */
#undef CONFIG_BASE32
/*****************************************************************************/
/* Battery config */
/*
* Support battery management and interrogation.
*
* This is implied by CONFIG_BATTERY_<device> (below); if not enabled and
* CONFIG_BATTERY_PRESENT_CUSTOM is also disabled, the board is assumed to not
* have or support a battery.
*/
#undef CONFIG_BATTERY
/**
* Enable Battery-config-in-CBI. It makes a board read battery info from CBI.
*/
#undef CONFIG_BATTERY_CONFIG_IN_CBI
/*
* Config to indicate the battery type that cannot be auto detected.
*/
#undef CONFIG_BATTERY_TYPE_NO_AUTO_DETECT
/*
* Compile battery-specific code.
*
* 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.
* Defining one of these will automatically define CONFIG_BATTERY near the end
* of this file. If you add a new config here, you'll need to update that
* check.
*/
#undef CONFIG_BATTERY_BQ20Z453
#undef CONFIG_BATTERY_BQ27541
#undef CONFIG_BATTERY_BQ27621
#undef CONFIG_BATTERY_BQ4050
#undef CONFIG_BATTERY_MAX17055
#undef CONFIG_BATTERY_MM8013
/*
* MAX17055 support alert on voltage, current, temperature, and state-of-charge.
*/
#undef CONFIG_BATTERY_MAX17055_ALERT
/*
* Enable full model driver of MAX17055.
*
* It provides a better soc estimation. ocv_table needs to be supplied.
*/
#undef CONFIG_BATTERY_MAX17055_FULL_MODEL
/* Compile mock battery support; used by tests. */
#undef CONFIG_BATTERY_MOCK
/* Maximum time to wake a non-responsive battery, in second */
#define CONFIG_BATTERY_PRECHARGE_TIMEOUT 30
/*
* If defined, the charger will check a board specific function for battery hw
* presence as an additional condition to determine if power on is allowed for
* factory override, where allowing booting of a bare board with no battery and
* no power button press is required.
*/
#undef CONFIG_BATTERY_HW_PRESENT_CUSTOM
/*
* battery_is_present() support.
*
* Choice of battery driver normally determines the implementation of
* battery_is_present(); it is also possible to provide a board-specific
* implementation or note its presence from a GPIO level.
*
* If CONFIG_BATTERY is not enabled, a stub implementation that always returns
* "not present" is provided unless CONFIG_BATTERY_PRESENT_CUSTOM is enabled.
*
* These options are mutually exclusive.
*/
/* The board provides a custom battery_is_present() implementation. */
#undef CONFIG_BATTERY_PRESENT_CUSTOM
/* Battery is present if the GPIO named by this define reads logic-low. */
#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
/* Chemistry of the battery device */
#undef CONFIG_BATTERY_DEVICE_CHEMISTRY
/*
* If defined, the board must supply fuel gauge and battery information for
* each supported battery. This information is then used for battery cut off
* and to check the charge/discharge FET status.
*/
#undef CONFIG_BATTERY_FUEL_GAUGE
/*
* Critical battery shutdown timeout (seconds)
*
* If the battery is at extremely low charge (and discharging) or extremely
* high temperature, the EC will notify the AP and start a timer with the
* timeout defined here. If the critical condition is not corrected before
* the timeout expires, the EC will shut down the AP (if the AP is not already
* off) and then optionally hibernate or cut off battery.
*/
#define CONFIG_BATTERY_CRITICAL_SHUTDOWN_TIMEOUT 30
/* Perform a battery cut-off when we reach the battery critical level */
#undef CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
/* If the battery is too hot or too cold, stop charging */
#undef CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS
/*
* 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 default delay is 1 second. Define this if a board prefers
* different delay.
*/
#undef CONFIG_BATTERY_CUTOFF_DELAY_US
/*
* 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
/*
* TODO(crosbug.com/p/29467): allows charging of a dead battery that
* requests nil for current and voltage. Remove this workaround when
* possible.
*/
#undef CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD
/*
* Check for battery in disconnect state (similar to cut-off state). If this
* battery is found to be in disconnect state, take it out of this state by
* force-applying a charge current. This option requires
* battery_get_disconnect_state() to be defined.
*/
#undef CONFIG_BATTERY_REVIVE_DISCONNECT
/*
* Low voltage protection for a battery (a.k.a. deep charge inspection):
* If battery voltage is lower than voltage_min, deep charge for more
* than precharge time The battery voltage is still lower than voltage_min,
* the system will stop charging
*/
#undef CONFIG_BATTERY_LOW_VOLTAGE_PROTECTION
/*
* If battery voltage is lower than voltage_min, precharge voltage & current
* are supplied and charging will be disabled after
* CONFIG_BATTERY_LOW_VOLTAGE_TIMEOUT seconds.
*/
#define CONFIG_BATTERY_LOW_VOLTAGE_TIMEOUT (30 * 60 * SECOND)
/*
* Use memory mapped region to store battery information. It supports only
* single battery systems. V2 should be used unless there is a reason not to.
*/
#undef CONFIG_BATTERY_V1
/*
* Use an alternative method to store battery information: Instead of writing
* directly to host memory mapped region, this keeps the battery information in
* ec_response_battery_static/dynamic_info structures, that can then be fetched
* using host commands, or via EC_ACPI_MEM_BATTERY_INDEX command, which tells
* the EC to update the shared memory.
*
* This is required on dual-battery systems and hostless bases with a battery.
*/
#undef CONFIG_BATTERY_V2
/*
* Number of batteries, only matters when CONFIG_BATTERY_V2 is used.
*/
#undef CONFIG_BATTERY_COUNT
/*
* Smart battery driver should measure the voltage cell imbalance in the battery
* pack. This requires a battery driver capable of the measurement.
*/
#undef CONFIG_BATTERY_MEASURE_IMBALANCE
/*
* Some boards needs to lower input voltage when battery is full and chipset
* is in S5/G3. This should be defined to integer value in mV.
*/
#undef CONFIG_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV
/*
* Check the specific battery status to judge whether the battery is
* initialized and stable when the battery wakes up from ship mode.
*/
#undef CONFIG_BATTERY_STBL_STAT
/*
* Some batteries don't update full capacity timely or don't update it at all.
* On such systems, compensation is required to guarantee remaining_capacity
* will be equal to full_capacity eventually. This used to be done in ACPI.
*
* Powerd uses CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE as the threshold for low
* battery shutdown.
*
* We want to show the low battery alert whenever we can. Thus, we make EC not
* inhibit power-on even if it knows the host would immediately shut down. To
* get that behavior, we need:
*
* MIN_BAT_PCT_FOR_POWER_ON < HOST_SHUTDOWN_PER = BATTERY_LEVEL_SHUTDOWN
*
* Thus, we set them as follows by default:
*
* CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 2 (don't boot if soc < 2%)
* CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 4 (shutdown if soc <= 4%)
* BATTERY_LEVEL_SHUTDOWN = 3 (shutdown if soc < 3%)
*
* This produces the following behavior:
*
* - If soc = 1%, system doesn't boot. User wouldn't know why.
* - If soc = 2~4%, system boots. Alert is shown. System immediately shuts down.
* - If battery discharges to 4% while the system is running, system shuts down.
* If that happens while a user is away, they can press the power button to
* learn what happened.
* - If system fails to shutdown for some reason and battery further discharges
* to 2%, EC will trigger shutdown.
*/
#define CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE 4 /* shutdown if soc <= 4% */
/*
* Powerd's full_factor. The value comes from:
* src/platform2/power_manager/default_prefs/power_supply_full_factor
*
* This value is used by the host to calculate the ETA for full charge.
*/
#define CONFIG_BATT_HOST_FULL_FACTOR 97
/*
* Expose some data when it is needed.
* For example, battery disconnect state
*/
#undef CONFIG_CHARGE_STATE_DEBUG
/* Include support for Bluetooth LE */
#undef CONFIG_BLUETOOTH_LE
/* Include support for testing the radio for Bluetooth LE */
#undef CONFIG_BLUETOOTH_LE_RADIO_TEST
/* Include support for the HCI and link layers for Bluetooth LE */
#undef CONFIG_BLUETOOTH_LE_STACK
/* Include debugging support for the Bluetooth link layer */
#undef CONFIG_BLUETOOTH_LL_DEBUG
/* Include debugging support for Bluetooth HCI */
#undef CONFIG_BLUETOOTH_HCI_DEBUG
/* Boot header storage offset. */
#undef CONFIG_BOOT_HEADER_STORAGE_OFF
/* Size of boot header in storage. */
#undef CONFIG_BOOT_HEADER_STORAGE_SIZE
/*****************************************************************************/
/* Bootblock config */
/* Pack AP-FW bootblock in EC image. */
#undef CONFIG_BOOTBLOCK
/*****************************************************************************/
/* EC can choose power signal gpio by schematic version */
#undef CONFIG_POWER_SIGNAL_RUNTIME_CONFIG
/* EC has GPIOs to allow board to reset RTC */
#undef CONFIG_BOARD_HAS_RTC_RESET
/*
* 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
/* The board version comes from Cros Board Info within EEPROM. */
#undef CONFIG_BOARD_VERSION_CBI
/*
* The board version is encoded with 3 GPIO signals where GPIO_BOARD_VERSION1
* is the LSB.
*/
#undef CONFIG_BOARD_VERSION_GPIO
/* EC responses to a board defined I2C address */
#undef CONFIG_BOARD_I2C_ADDR_FLAGS
/*
* The board is unable to distinguish EC reset from power-on so it should treat
* all resets as triggered by RESET_PIN even if it is a POWER_ON reset.
*/
#undef CONFIG_BOARD_FORCE_RESET_PIN
/*
* For some boards on power-on, the EC is reset by the H1 after power-on,
* so the EC sees 2 resets. This config enables the EC to save a flag
* on the first power-up restart, and then wait for the second reset before
* any other setup is done (such as GPIOs, timers, UART etc.)
* On the second reset, the saved flag is used to detect the previous
* power-on, and treat the second reset as a power-on instead of a reset.
*
* NOTE: Implemented only for npcx and ite
*/
#undef CONFIG_BOARD_RESET_AFTER_POWER_ON
/* Permanent LM4 boot configuration */
#undef CONFIG_BOOTCFG_VALUE
/*****************************************************************************/
/* Modify the default behavior to make system bringup easier. */
#undef CONFIG_BRINGUP
/*
* Enable debug prints / asserts that may helpful for debugging board bring-up,
* but probably shouldn't be enabled for production for performance reasons.
*/
#undef CONFIG_DEBUG_BRINGUP
/*****************************************************************************/
/*
* Support for entering recovery mode using the volume buttons or a dedicated
* recovery button. Note that these are *buttons* and not keys in the keyboard
* matrix.
*/
#undef CONFIG_BUTTON_TRIGGERED_RECOVERY
/*
* Compile detachable base support
*
* Enabled on all boards that have a detachable base.
*/
#undef CONFIG_DETACHABLE_BASE
/*
* Indicates there is a dedicated recovery button. Note, that if there are
* volume buttons, a dedicated recovery button is not needed. This is intended
* because if a board has volume buttons, they can do everything a dedicated
* recovery button can do.
* For various reasons, on some platforms there may be multiple recovery inputs.
* See b/149967026.
*/
#undef CONFIG_DEDICATED_RECOVERY_BUTTON
#undef CONFIG_DEDICATED_RECOVERY_BUTTON_2
/* Configure recovery button. e.g. BUTTON_FLAG_ACTIVE_HIGH */
#undef CONFIG_DEDICATED_RECOVERY_BUTTON_FLAGS
#undef CONFIG_DEDICATED_RECOVERY_BUTTON_2_FLAGS
/*
* RISC-V core specific panic data is bigger than Cortex-M core specific panic
* data. Including this into union in panic_data structure causes whole
* to grow by 28 bytes. In many boards EC RO is still obtaining pointer to
* beginning of panic data by subtracting its panic data structure size from
* the end of RAM. When EC RW saves panic data it will be corrupted by EC RO.
* Moreover, during next boot EC RW won't be able to find jump data (see
* b/165773837 for more details).
*
* This config allows boards to not include RV32I panic data if their EC RO
* doesn't include it to keep panic data structure in sync.
*/
#undef CONFIG_DO_NOT_INCLUDE_RV32I_PANIC_DATA
/*
* The board has volume up and volume down buttons. Note, these are *buttons*
* and not keys in the keyboard matrix.
*/
#undef CONFIG_VOLUME_BUTTONS
/*
* The board has buttons that are connected to ADC pins which pressed and
* released values are determined by the analog voltage
*/
#undef CONFIG_ADC_BUTTONS
/*
* Allow runtime configuration of the buttons[] array
*/
#undef CONFIG_BUTTONS_RUNTIME_CONFIG
/* Support simulation of a button press using EC tool command */
#undef CONFIG_HOSTCMD_BUTTON
/*
* Configuration for button simulation i.e. dependent on
* CONFIG_HOSTCMD_BUTTON or CONFIG_CMD_BUTTON config.
*/
#undef CONFIG_SIMULATED_BUTTON
/* Set the default button debounce time in us */
#define CONFIG_BUTTON_DEBOUNCE (30 * MSEC)
/*
* Capsense chip has buttons, too.
*/
#undef CONFIG_CAPSENSE
/*****************************************************************************/
/* Support CEC */
#undef CONFIG_CEC
#undef CONFIG_CEC_DEBUG
/* CEC drivers */
#undef CONFIG_CEC_BITBANG
/*****************************************************************************/
/* Compile charge manager */
#undef CONFIG_CHARGE_MANAGER
/*
* Number of charge ports excluding type-c ports
*
* If defined, the board must define a macro DEDICATED_CHARGE_PORT indicates
* the dedicated port number.
*
* See include/charge_manager.h for more details about dedicated port.
*/
#define CONFIG_DEDICATED_CHARGE_PORT_COUNT 0
/* Allow charge manager to default to charging from dual-role partners */
#undef CONFIG_CHARGE_MANAGER_DRP_CHARGING
/* Handle the external power limit host command in charge manager */
#undef CONFIG_CHARGE_MANAGER_EXTERNAL_POWER_LIMIT
/* Initially enter safe mode, with relaxed port / current selection rules */
#define CONFIG_CHARGE_MANAGER_SAFE_MODE
/* Leave safe mode when battery pct meets or exceeds this value */
#define CONFIG_CHARGE_MANAGER_BAT_PCT_SAFE_MODE_EXIT 2
/* The hardware has some input current ramping/back-off mechanism */
#undef CONFIG_CHARGE_RAMP_HW
/* Compile input current ramping support using software control */
#undef CONFIG_CHARGE_RAMP_SW
/* Enable EC support for charging splashscreen */
#undef CONFIG_CHARGESPLASH
#undef CONFIG_CHARGESPLASH_PERIOD
#undef CONFIG_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD
/*****************************************************************************/
/* Charger config */
/* Compile common charge state code. */
#undef CONFIG_CHARGER
/* Compile charger-specific code for these chargers (pick at most one) */
#undef CONFIG_CHARGER_BD9995X
#undef CONFIG_CHARGER_BQ24715
#undef CONFIG_CHARGER_BQ24770
#undef CONFIG_CHARGER_BQ24773
#undef CONFIG_CHARGER_BQ25710
#undef CONFIG_CHARGER_BQ25720
#undef CONFIG_CHARGER_ISL9237
#undef CONFIG_CHARGER_ISL9238 /* For ISL9238 A/B */
#undef CONFIG_CHARGER_ISL9238C
#undef CONFIG_CHARGER_ISL9241
#undef CONFIG_CHARGER_MT6370
#undef CONFIG_CHARGER_RAA489000
#undef CONFIG_CHARGER_RAA489110
#undef CONFIG_CHARGER_RT9466
#undef CONFIG_CHARGER_RT9467
#undef CONFIG_CHARGER_RT9490
#undef CONFIG_CHARGER_SM5803
#undef CONFIG_CHARGER_SY21612
/* Allow run-time completion of the charger driver structure */
#undef CONFIG_CHARGER_RUNTIME_CONFIG
/* Allow the customized initial configuration */
#undef CONFIG_CHARGER_INIT_CUSTOM
/*
* Board has only one charger chip (default, undef when board contains multiple
* charger chips
*/
#define CONFIG_CHARGER_SINGLE_CHIP
/*
* Enable the CHG_EN at initialization to turn-on the BGATE which allows voltage
* to be applied to the battery PACK & wakes the battery if it is in shipmode.
*/
#undef CONFIG_CHARGER_BD9995X_CHGEN
/*
* BD9995X Power Save Mode
*
* Which power save mode should the charger enter when VBUS is removed. Check
* driver/bd9995x.h for the power save settings. By default, no power save mode
* is enabled.
*/
#undef CONFIG_BD9995X_POWER_SAVE_MODE
/*
* If the battery temperature sense pin is connected to charger,
* get the battery temperature from the charger.
*/
#undef CONFIG_CHARGER_BATTERY_TSENSE
/*
* 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
/*
* MT6370 backlight control settings.
* If defined, Panel backlight power is controlled by MT6370.
*/
#undef CONFIG_CHARGER_MT6370_BACKLIGHT
/*
* MT6360/MT6370 BC1.2 USB-PHY control.