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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
|
/* 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.
*/
#ifndef __CROS_EC_CONFIG_CHIP_H
#define __CROS_EC_CONFIG_CHIP_H
#include <devicetree.h>
#include <autoconf.h>
/*
* The battery enum is used in various drivers and these assume that it is
* always available (defined in board.h). With Zephyr we don't include board.h
* so we have a battery_enum.h header in the shim which defines
* enum battery_type based on settings in the device tree. Include that here.
*/
#ifdef CONFIG_PLATFORM_EC_BATTERY
#include "battery_enum.h"
#endif
/*
* This file translates Kconfig options to platform/ec options.
*
* Options which are from Zephyr platform/ec module (Kconfig) start
* with CONFIG_PLATFORM_EC_, and can be found in the Kconfig file.
*
* Options which are for the platform/ec configuration can be found in
* common/config.h.
*/
/*
* Obsolete configs - these are options that are not needed, either because
* Zephyr features directly replace the option, or because the config option
* will not be used with Zephyr OS.
*/
/*
* ROM resident support. The ROM resident capabilities in the Chromium OS
* code are used with EC chipsets that provide more flash space than
* executable RAM. These options allow storing the initialized data into
* an unused area of flash where it is copied directly from flash into data
* RAM by the early boot code.
*
* When ROM resident is disabled, the initialized data is stored in the main
* image, copied from flash to executable RAM by the chip boot loader, and
* then copied from executable RAM to data RAM by the early boot code.
*
* Supporting this under Zephyr would require linker changes to the common
* Zephyr linking.
*/
#undef CONFIG_CHIP_DATA_IN_INIT_ROM
#undef CONFIG_CHIP_INIT_ROM_REGION
#undef CONFIG_RO_ROM_RESIDENT_MEM_OFF
#undef CONFIG_RO_ROM_RESIDENT_SIZE
#undef CONFIG_RW_ROM_RESIDENT_MEM_OFF
#undef CONFIG_RW_ROM_RESIDENT_SIZE
/*
* ECOS specific options, not used in Zephyr.
*/
#undef CONFIG_CONSOLE_UART /* Only used by the Chromium EC chip drivers */
#undef CONFIG_I2C_MULTI_PORT_CONTROLLER /* Not required by I2C shim */
#undef CONFIG_IRQ_COUNT /* Only used by Chromium EC core drivers */
#undef CONFIG_LTO /* Link time optimization enabled by Zephyr build system */
#undef CONFIG_STACK_SIZE /* Only used in Chromium EC core init code */
#ifndef CONFIG_FPU
#undef CONFIG_FPU /* Used in Zephyr as well, enabled in Kconfig directly */
#endif
#ifndef CONFIG_WATCHDOG
#undef CONFIG_WATCHDOG /* Used in Zephyr as well, enabled in Kconfig directly */
#endif
/*
* The Zephyr I2C shell command provides the same functionality as the Chromium
* EC i2cscan and i2cxfer commands, so they are always disabled.
*/
#undef CONFIG_CMD_I2C_SCAN
#undef CONFIG_CMD_I2C_XFER
/*
* This not used by the Zephyr code since we always make cros_crc8() available.
* Define it here to reduce the delta from the ECOS CONFIG.
*/
#undef CONFIG_CRC8
#define CONFIG_CRC8
/*
* This is not used by the Zephyr code.
* Define it here to reduce the delta from the ECOS CONFIG.
*/
#undef CONFIG_CHIP_PRE_INIT
#define CONFIG_CHIP_PRE_INIT
#undef CONFIG_BC12_SINGLE_DRIVER
#ifdef CONFIG_PLATFORM_EC_BC12_SINGLE_DRIVER
#define CONFIG_BC12_SINGLE_DRIVER
#endif
#undef CONFIG_CHARGER_SINGLE_CHIP
#define CONFIG_CHARGER_SINGLE_CHIP
/* EC chipset configuration */
#define HOOK_TICK_INTERVAL CONFIG_CROS_EC_HOOK_TICK_INTERVAL
#define HOOK_TICK_INTERVAL_MS (HOOK_TICK_INTERVAL / 1000)
/* Chipset and power configuration */
#ifdef CONFIG_AP_ARM_QUALCOMM_SC7180
#define CONFIG_CHIPSET_SC7180
#endif
#ifdef CONFIG_AP_ARM_QUALCOMM_SC7280
#define CONFIG_CHIPSET_SC7280
#endif
#ifdef CONFIG_AP_X86_INTEL_CML
#define CONFIG_CHIPSET_COMETLAKE
#define CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK
#endif
#ifdef CONFIG_AP_X86_INTEL_TGL
#define CONFIG_CHIPSET_TIGERLAKE
#endif
#undef CONFIG_THROTTLE_AP
#ifdef CONFIG_PLATFORM_EC_THROTTLE_AP
#define CONFIG_THROTTLE_AP
#endif
#undef CONFIG_CHIPSET_CAN_THROTTLE
#ifdef CONFIG_PLATFORM_EC_CHIPSET_CAN_THROTTLE
#define CONFIG_CHIPSET_CAN_THROTTLE
#endif
#undef CONFIG_CMD_APTHROTTLE
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_APTHROTTLE
#define CONFIG_CMD_APTHROTTLE
#endif
#undef CONFIG_BACKLIGHT_LID
#ifdef CONFIG_PLATFORM_EC_BACKLIGHT_LID
#define CONFIG_BACKLIGHT_LID
#endif
/* Battery configuration */
#undef CONFIG_BATTERY
#undef CONFIG_BATTERY_FUEL_GAUGE
#ifdef CONFIG_PLATFORM_EC_BATTERY
#define CONFIG_BATTERY
#define CONFIG_BATTERY_FUEL_GAUGE
#endif /* CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE */
#undef CONFIG_BATTERY_SMART
#ifdef CONFIG_PLATFORM_EC_BATTERY_SMART
#define CONFIG_BATTERY_SMART
#endif
#undef CONFIG_I2C_VIRTUAL_BATTERY
#undef I2C_PORT_VIRTUAL_BATTERY
#ifdef CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY
#define CONFIG_I2C_VIRTUAL_BATTERY
#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY
#endif
#undef CONFIG_I2C_PASSTHRU_RESTRICTED
#ifdef CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED
#define CONFIG_I2C_PASSTHRU_RESTRICTED
#endif
#undef CONFIG_BATTERY_PRESENT_CUSTOM
#ifdef CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM
#define CONFIG_BATTERY_PRESENT_CUSTOM
#endif
#undef CONFIG_BATTERY_PRESENT_GPIO
#ifdef CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO
/* This is always GPIO_BATT_PRES_ODL with Zephyr */
#define CONFIG_BATTERY_PRESENT_GPIO GPIO_BATT_PRES_ODL
#endif
#undef CONFIG_BATTERY_CUT_OFF
#ifdef CONFIG_PLATFORM_EC_BATTERY_CUT_OFF
#define CONFIG_BATTERY_CUT_OFF
#endif
#undef CONFIG_BATTERY_HW_PRESENT_CUSTOM
#ifdef CONFIG_PLATFORM_EC_BATTERY_HW_PRESENT_CUSTOM
#define CONFIG_BATTERY_HW_PRESENT_CUSTOM
#endif
#undef CONFIG_BATTERY_REVIVE_DISCONNECT
#ifdef CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT
#define CONFIG_BATTERY_REVIVE_DISCONNECT
#endif
#undef CONFIG_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV
#if defined(CONFIG_PLATFORM_EC_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV) && \
(CONFIG_PLATFORM_EC_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV > 0)
#define CONFIG_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV \
CONFIG_PLATFORM_EC_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV
#endif
#undef CONFIG_BOARD_RESET_AFTER_POWER_ON
#ifdef CONFIG_PLATFORM_EC_BOARD_RESET_AFTER_POWER_ON
#define CONFIG_BOARD_RESET_AFTER_POWER_ON
#endif
#undef CONFIG_CHARGER_ISL9241
#ifdef CONFIG_PLATFORM_EC_CHARGER_ISL9241
#define CONFIG_CHARGER_ISL9241
#endif
/*
* Note - ISL9241 chargers for all channels are configured with the same
* switching frequency. Use the first ISL9241 instance found in the device tree.
*/
#undef CONFIG_ISL9241_SWITCHING_FREQ
#define ISL9241_NODE DT_INST(0, intersil_isl9241)
#if DT_NODE_EXISTS(ISL9241_NODE) && \
DT_NODE_HAS_PROP(ISL9241_NODE, switching_frequency)
#define CONFIG_ISL9241_SWITCHING_FREQ \
DT_PROP(ISL9241_NODE, switching_frequency)
#endif
#undef CONFIG_CHARGER_ISL9237
#ifdef CONFIG_PLATFORM_EC_CHARGER_ISL9237
#define CONFIG_CHARGER_ISL9237
#endif
#undef CONFIG_CHARGER_ISL9238
#ifdef CONFIG_PLATFORM_EC_CHARGER_ISL9238
#define CONFIG_CHARGER_ISL9238
#endif
#undef CONFIG_CHARGER_ISL9238C
#ifdef CONFIG_PLATFORM_EC_CHARGER_ISL9238C
#define CONFIG_CHARGER_ISL9238C
#endif
#undef CONFIG_CHARGER_MAINTAIN_VBAT
#ifdef CONFIG_PLATFORM_EC_CHARGER_MAINTAIN_VBAT
#define CONFIG_CHARGER_MAINTAIN_VBAT
#endif
#undef CONFIG_CHARGER_NARROW_VDC
#ifdef CONFIG_PLATFORM_EC_CHARGER_NARROW_VDC
#define CONFIG_CHARGER_NARROW_VDC
#endif
#undef CONFIG_CHARGER_OTG
#ifdef CONFIG_PLATFORM_EC_CHARGER_OTG
#define CONFIG_CHARGER_OTG
#endif
#undef CONFIG_CHIPSET_RESET_HOOK
#ifdef CONFIG_PLATFORM_EC_CHIPSET_RESET_HOOK
#define CONFIG_CHIPSET_RESET_HOOK
#endif
#undef CONFIG_CHIPSET_RESUME_INIT_HOOK
#ifdef CONFIG_PLATFORM_EC_CHIPSET_RESUME_INIT_HOOK
#define CONFIG_CHIPSET_RESUME_INIT_HOOK
#endif
#ifdef CONFIG_PLATFORM_EC_EXTPOWER_GPIO
#define CONFIG_EXTPOWER_GPIO
/* This always needs to be defined for this option to work */
#define CONFIG_EXTPOWER
#endif
/* Bringup configuration */
#ifdef CONFIG_PLATFORM_EC_BRINGUP
#define CONFIG_BRINGUP
#endif
#undef CONFIG_EMULATED_SYSRQ
#ifdef CONFIG_PLATFORM_EC_EMULATED_SYSRQ
#define CONFIG_EMULATED_SYSRQ
#endif
/* eSPI configuration */
#ifdef CONFIG_PLATFORM_EC_ESPI
#ifdef CONFIG_PLATFORM_EC_HOSTCMD
#define CONFIG_HOSTCMD_ESPI
#endif
/* eSPI signals */
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#endif
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#endif
#ifdef CONFIG_PLATFORM_EC_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#define CONFIG_HOSTCMD_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#endif
#endif /* CONFIG_PLATFORM_EC_ESPI */
#if DT_NODE_EXISTS(DT_NODELABEL(flash0))
#define CONFIG_PROGRAM_MEMORY_BASE DT_REG_ADDR(DT_NODELABEL(flash0))
#else
#define CONFIG_PROGRAM_MEMORY_BASE 0X0
#endif
#if DT_NODE_EXISTS(DT_NODELABEL(sram0))
#define CONFIG_RAM_BASE DT_REG_ADDR(DT_NODELABEL(sram0))
#define CONFIG_DATA_RAM_SIZE DT_REG_SIZE(DT_NODELABEL(sram0))
#else
#define CONFIG_RAM_BASE 0x0
#define CONFIG_DATA_RAM_SIZE 0x0
#endif
#define CONFIG_RO_MEM_OFF CONFIG_CROS_EC_RO_MEM_OFF
#define CONFIG_RO_MEM_SIZE CONFIG_CROS_EC_RO_MEM_SIZE
#define CONFIG_RW_MEM_OFF CONFIG_CROS_EC_RW_MEM_OFF
#define CONFIG_RW_MEM_SIZE CONFIG_CROS_EC_RW_MEM_SIZE
#define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF
#define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE
#define CONFIG_RO_SIZE CONFIG_CROS_EC_RO_SIZE
#define CONFIG_RW_SIZE CONFIG_CROS_EC_RW_SIZE
/* Flash settings */
#undef CONFIG_EXTERNAL_STORAGE
#undef CONFIG_INTERNAL_STORAGE
#undef CONFIG_MAPPED_STORAGE
#undef CONFIG_FLASH_PSTATE
#undef CONFIG_FLASH_SIZE_BYTES
#ifdef CONFIG_PLATFORM_EC_FLASH_CROS
#include "flash_chip.h"
#define CONFIG_FLASH_CROS
/* Internal, don't use outside this header */
#define _BINMAN_RO_PATH DT_PATH(binman, wp_ro)
#define _BINMAN_RW_PATH DT_PATH(binman, ec_rw)
#define CONFIG_EC_PROTECTED_STORAGE_OFF DT_PROP(_BINMAN_RO_PATH, offset)
#define CONFIG_EC_PROTECTED_STORAGE_SIZE DT_PROP(_BINMAN_RO_PATH, size)
#define CONFIG_EC_WRITABLE_STORAGE_OFF DT_PROP(_BINMAN_RW_PATH, offset)
#define CONFIG_EC_WRITABLE_STORAGE_SIZE DT_PROP(_BINMAN_RW_PATH, size)
#define CONFIG_RAM_SIZE CONFIG_DATA_RAM_SIZE
#ifdef CONFIG_PLATFORM_EC_EXTERNAL_STORAGE
#define CONFIG_EXTERNAL_STORAGE
#endif
#ifdef CONFIG_PLATFORM_EC_INTERNAL_STORAGE
#define CONFIG_INTERNAL_STORAGE
#endif
#ifdef CONFIG_PLATFORM_EC_MAPPED_STORAGE
#define CONFIG_MAPPED_STORAGE
#endif
#ifdef CONFIG_PLATFORM_EC_FLASH_PSTATE
#define CONFIG_FLASH_PSTATE
#endif
#undef CONFIG_CMD_FLASH
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASH
#define CONFIG_CMD_FLASH
#endif
#undef CONFIG_CMD_FLASHINFO
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASHINFO
#define CONFIG_CMD_FLASHINFO
#endif
#undef CONFIG_CMD_FLASH_WP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASH_WP
#define CONFIG_CMD_FLASH_WP
#endif
#endif /* CONFIG_PLATFORM_EC_FLASH_CROS */
#undef CONFIG_ADC
#ifdef CONFIG_PLATFORM_EC_ADC
#define CONFIG_ADC
#endif
#undef CONFIG_CMD_ADC
#ifdef CONFIG_PLATFORM_EC_ADC_CMD
#define CONFIG_CMD_ADC
#endif
#undef CONFIG_TEMP_SENSOR
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR
#define CONFIG_TEMP_SENSOR
#endif
#undef CONFIG_THERMISTOR
#ifdef CONFIG_PLATFORM_EC_THERMISTOR
#define CONFIG_THERMISTOR
#endif
#undef CONFIG_STEINHART_HART_3V0_22K6_47K_4050B
#ifdef CONFIG_PLATFORM_EC_STEINHART_HART_3V0_22K6_47K_4050B
#define CONFIG_STEINHART_HART_3V0_22K6_47K_4050B
#endif
#undef CONFIG_STEINHART_HART_3V3_13K7_47K_4050B
#ifdef CONFIG_PLATFORM_EC_STEINHART_HART_3V3_13K7_47K_4050B
#define CONFIG_STEINHART_HART_3V3_13K7_47K_4050B
#endif
#undef CONFIG_STEINHART_HART_3V3_30K9_47K_4050B
#ifdef CONFIG_PLATFORM_EC_STEINHART_HART_3V3_30K9_47K_4050B
#define CONFIG_STEINHART_HART_3V3_30K9_47K_4050B
#endif
#undef CONFIG_STEINHART_HART_3V3_51K1_47K_4050B
#ifdef CONFIG_PLATFORM_EC_STEINHART_HART_3V3_51K1_47K_4050B
#define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B
#endif
#ifdef CONFIG_PLATFORM_EC_I2C
/* Also see shim/include/i2c/i2c.h which defines the ports enum */
#define CONFIG_I2C_CONTROLLER
#endif
#undef CONFIG_KEYBOARD_PROTOCOL_8042
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif /* CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 */
#undef CONFIG_KEYBOARD_PROTOCOL_MKBP
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
#endif
#undef CONFIG_MKBP_INPUT_DEVICES
#ifdef CONFIG_PLATFORM_EC_MKBP_INPUT_DEVICES
#define CONFIG_MKBP_INPUT_DEVICES
#endif
#undef CONFIG_MKBP_EVENT_WAKEUP_MASK
#if defined(CONFIG_PLATFORM_EC_MKBP_EVENT_WAKEUP_MASK) && \
DT_NODE_EXISTS(DT_PATH(ec_mkbp_event_wakeup_mask))
#define CONFIG_MKBP_EVENT_WAKEUP_MASK \
DT_PROP(DT_PATH(ec_mkbp_event_wakeup_mask), wakeup_mask)
#endif
#undef CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK
#if defined(CONFIG_PLATFORM_EC_MKBP_HOST_EVENT_WAKEUP_MASK) && \
DT_NODE_EXISTS(DT_PATH(ec_mkbp_host_event_wakeup_mask))
#define CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK \
DT_PROP(DT_PATH(ec_mkbp_host_event_wakeup_mask), wakeup_mask)
#endif
#undef CONFIG_CMD_KEYBOARD
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_KEYBOARD
#define CONFIG_CMD_KEYBOARD
#endif
#undef CONFIG_KEYBOARD_COL2_INVERTED
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_COL2_INVERTED
#endif /* CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED */
#undef CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_BOARD_CONFIG
#endif
#undef CONFIG_KEYBOARD_KEYPAD
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_KEYPAD
#define CONFIG_KEYBOARD_KEYPAD
#endif
#undef CONFIG_KEYBOARD_VIVALDI
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_VIVALDI
#define CONFIG_KEYBOARD_VIVALDI
#endif
#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI2
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
#endif
#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI3
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
#endif
#undef CONFIG_VOLUME_BUTTONS
#ifdef CONFIG_PLATFORM_EC_VOLUME_BUTTONS
#define CONFIG_VOLUME_BUTTONS
#endif
#undef CONFIG_CMD_BUTTON
#ifdef CONFIG_PLATFORM_EC_CMD_BUTTON
#define CONFIG_CMD_BUTTON
#endif
#undef CONFIG_PWM_KBLIGHT
#undef CONFIG_KEYBOARD_BACKLIGHT
#ifdef CONFIG_PLATFORM_EC_PWM_KBLIGHT
#define CONFIG_PWM_KBLIGHT
#define CONFIG_KEYBOARD_BACKLIGHT
#endif
#undef CONFIG_LED_COMMON
#ifdef CONFIG_PLATFORM_EC_LED_COMMON
#define CONFIG_LED_COMMON
#endif
#undef CONFIG_LED_PWM
#ifdef CONFIG_PLATFORM_EC_LED_PWM
#define CONFIG_LED_PWM
#endif
#undef CONFIG_LED_PWM_COUNT
#ifdef CONFIG_PLATFORM_EC_LED_PWM_COUNT
#define CONFIG_LED_PWM_COUNT CONFIG_PLATFORM_EC_LED_PWM_COUNT
#endif
#undef CONFIG_CMD_LEDTEST
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_LEDTEST
#define CONFIG_CMD_LEDTEST
#endif
#undef CONFIG_PWM_DISPLIGHT
#ifdef CONFIG_PLATFORM_EC_PWM_DISPLIGHT
#define CONFIG_PWM_DISPLIGHT
#endif
#undef CONFIG_CPU_PROCHOT_ACTIVE_LOW
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_CPU_PROCHOT_ACTIVE_LOW
#define CONFIG_CPU_PROCHOT_ACTIVE_LOW
#endif
#undef CONFIG_POWER_TRACK_HOST_SLEEP_STATE
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP
#define CONFIG_POWER_TRACK_HOST_SLEEP_STATE
#endif
#undef CONFIG_POWER_SLEEP_FAILURE_DETECTION
#ifdef CONFIG_PLATFORM_EC_POWER_SLEEP_FAILURE_DETECTION
#define CONFIG_POWER_SLEEP_FAILURE_DETECTION
#endif
#undef CONFIG_HOSTCMD_AP_RESET
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_AP_RESET
#define CONFIG_HOSTCMD_AP_RESET
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_RSMRST_DELAY
#define CONFIG_CHIPSET_X86_RSMRST_DELAY
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_SLP_S3_L_OVERRIDE
#define CONFIG_CHIPSET_SLP_S3_L_OVERRIDE
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_PP3300_RAIL_FIRST
#define CONFIG_CHIPSET_PP3300_RAIL_FIRST
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_RTC_RESET
#define CONFIG_BOARD_HAS_RTC_RESET
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL
#define CONFIG_POWER_PP5000_CONTROL
#endif
#undef CONFIG_POWER_S0IX
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_S0IX
#define CONFIG_POWER_S0IX
#endif
#undef CONFIG_POWER_BUTTON_X86
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_INTEL
#define CONFIG_POWER_BUTTON_X86
#endif
#undef CONFIG_FAKE_SHMEM
#ifdef CONFIG_ARCH_POSIX
#define CONFIG_FAKE_SHMEM
#endif
#undef CONFIG_PWM
#ifdef CONFIG_PLATFORM_EC_PWM
#define CONFIG_PWM
#endif
#undef CONFIG_CMD_S5_TIMEOUT
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_S5_TIMEOUT
#define CONFIG_CMD_S5_TIMEOUT
#endif
#undef CONFIG_CMD_SHMEM
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SHMEM
#define CONFIG_CMD_SHMEM
#endif
#ifdef CONFIG_PLATFORM_EC_TIMER
#define CONFIG_HWTIMER_64BIT
#define CONFIG_HW_SPECIFIC_UDELAY
#undef CONFIG_CMD_GETTIME
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_GETTIME
#define CONFIG_CMD_GETTIME
#endif /* CONFIG_PLATFORM_EC_CONSOLE_CMD_GETTIME */
#undef CONFIG_CMD_TIMERINFO
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_TIMERINFO
#define CONFIG_CMD_TIMERINFO
#endif /* CONFIG_PLATFORM_EC_CONSOLE_CMD_TIMERINFO */
#undef CONFIG_CMD_WAITMS
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_WAITMS
#define CONFIG_CMD_WAITMS
#endif /* CONFIG_PLATFORM_EC_CONSOLE_CMD_TIMERINFO */
#endif /* CONFIG_PLATFORM_EC_TIMER */
/* USB-C things */
#ifdef CONFIG_PLATFORM_EC_USBC
/* Zephyr only supports v2 so we always define this */
#define CONFIG_USB_PD_TCPMV2
/*
* Define these here for now. They are not actually CONFIG options in the EC
* code base. Ideally they would be defined in the devicetree (perhaps for a
* 'board' driver if not in the USB chip driver itself).
*
* SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C
* cables only support up to 60W.
*/
#define PD_OPERATING_POWER_MW 15000
#define PD_MAX_POWER_MW 60000
#define PD_MAX_CURRENT_MA 3000
#define PD_MAX_VOLTAGE_MV 20000
/* TODO: b/144165680 - measure and check these values on Volteer */
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */
#endif
#undef CONFIG_CMD_PPC_DUMP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_PPC_DUMP
#define CONFIG_CMD_PPC_DUMP
#endif
#undef CONFIG_CMD_TCPC_DUMP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_TCPC_DUMP
#define CONFIG_CMD_TCPC_DUMP
#endif
#undef CONFIG_USB_POWER_DELIVERY
#ifdef CONFIG_PLATFORM_EC_USB_POWER_DELIVERY
#define CONFIG_USB_POWER_DELIVERY
#endif
#undef CONFIG_CHARGER
#undef CONFIG_CHARGE_MANAGER
#ifdef CONFIG_PLATFORM_EC_CHARGE_MANAGER
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGER
/* TODO: Put these charger defines in the devicetree? */
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
#endif
#undef CONFIG_CHARGER_INPUT_CURRENT
#ifdef CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT
#define CONFIG_CHARGER_INPUT_CURRENT CONFIG_PLATFORM_EC_CHARGER_INPUT_CURRENT
#endif
#undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
#ifdef CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON \
CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
#endif
#undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC
#ifdef CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC \
CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC
#endif
#undef CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT
#ifdef CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT \
CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT
#endif
#undef CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON
#ifdef CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON \
CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON
#endif
#undef CONFIG_CHARGE_RAMP_SW
#ifdef CONFIG_PLATFORM_EC_CHARGE_RAMP_SW
#define CONFIG_CHARGE_RAMP_SW
#endif
#undef CONFIG_CHARGE_RAMP_HW
#ifdef CONFIG_PLATFORM_EC_CHARGE_RAMP_HW
#define CONFIG_CHARGE_RAMP_HW
#endif
#undef CONFIG_CMD_CHGRAMP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_CHGRAMP
#define CONFIG_CMD_CHGRAMP
#endif
#undef CONFIG_USB_PID
#ifdef CONFIG_PLATFORM_EC_USB_PID
#define CONFIG_USB_PID CONFIG_PLATFORM_EC_USB_PID
#endif
#undef CONFIG_USB_BCD_DEV
#ifdef CONFIG_PLATFORM_EC_USB_BCD_DEV
#define CONFIG_USB_BCD_DEV CONFIG_PLATFORM_EC_USB_BCD_DEV
#endif
#undef CONFIG_USB_VID
#ifdef CONFIG_PLATFORM_EC_USB_VID
#define CONFIG_USB_VID CONFIG_PLATFORM_EC_USB_VID
#endif
/* VBUS-voltage measurement */
#undef CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT
#undef CONFIG_USB_PD_VBUS_MEASURE_CHARGER
#undef CONFIG_USB_PD_VBUS_MEASURE_TCPC
#undef CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT
#ifdef CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_NOT_PRESENT
#define CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT
#elif defined(CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER)
#define CONFIG_USB_PD_VBUS_MEASURE_CHARGER
#elif defined(CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_TCPC)
#define CONFIG_USB_PD_VBUS_MEASURE_TCPC
#elif defined(CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_ADC_EACH_PORT)
#define CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT
#endif /* VBUS-voltage measurement */
#undef CONFIG_USB_CHARGER
#ifdef CONFIG_PLATFORM_EC_USB_CHARGER
#define CONFIG_USB_CHARGER
#endif
#define USB_PORT_COUNT CONFIG_PLATFORM_EC_USB_A_PORT_COUNT
#undef CONFIG_USB_PORT_POWER_DUMB
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_DUMB
#define CONFIG_USB_PORT_POWER_DUMB
#endif
#undef CONFIG_USB_PORT_POWER_DUMB_CUSTOM_HOOK
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_DUMB_CUSTOM_HOOK
#define CONFIG_USB_PORT_POWER_DUMB_CUSTOM_HOOK
#endif
#undef CONFIG_BC12_DETECT_PI3USB9201
#ifdef CONFIG_PLATFORM_EC_BC12_DETECT_PI3USB9201
#define CONFIG_BC12_DETECT_PI3USB9201
#endif
#undef CONFIG_BC12_DETECT_MT6360
#ifdef CONFIG_PLATFORM_EC_BC12_DETECT_MT6360
#define CONFIG_BC12_DETECT_MT6360
#endif
#undef CONFIG_MT6360_BC12_GPIO
#ifdef CONFIG_PLATFORM_EC_MT6360_BC12_GPIO
#define CONFIG_MT6360_BC12_GPIO
#endif
#undef CONFIG_USB_PD_DUAL_ROLE
#ifdef CONFIG_PLATFORM_EC_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_DUAL_ROLE
#endif
#undef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
#ifdef CONFIG_PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE
#define CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
#endif
#undef CONFIG_USB_PD_DISCHARGE_PPC
#ifdef CONFIG_PLATFORM_EC_USB_PD_DISCHARGE_PPC
#define CONFIG_USB_PD_DISCHARGE_PPC
#endif
#undef CONFIG_USB_PD_LOGGING
#ifdef CONFIG_PLATFORM_EC_USB_PD_LOGGING
#define CONFIG_USB_PD_LOGGING
#endif
#undef CONFIG_USBC_OCP
#ifdef CONFIG_PLATFORM_EC_USBC_OCP
#define CONFIG_USBC_OCP
#endif
#undef CONFIG_USB_PD_CONSOLE_CMD
#ifdef CONFIG_PLATFORM_EC_USB_PD_CONSOLE_CMD
#define CONFIG_USB_PD_CONSOLE_CMD
#endif
#undef CONFIG_USB_PD_HOST_CMD
#ifdef CONFIG_PLATFORM_EC_USB_PD_HOST_CMD
#define CONFIG_USB_PD_HOST_CMD
#endif
#undef CONFIG_USB_PD_REV30
#ifdef CONFIG_PLATFORM_EC_USB_PD_REV30
#define CONFIG_USB_PD_REV30
/*
* Support USB PD 3.0 Extended Messages. Note that Chromebooks disabling this
* config item are non-compliant with PD 3.0, because they have batteries but do
* not support Get_Battery_Cap or Get_Battery_Status.
*/
#define CONFIG_USB_PD_EXTENDED_MESSAGES
#endif
#undef CONFIG_USB_PD_VBUS_DETECT_TCPC
#undef CONFIG_USB_PD_VBUS_DETECT_CHARGER
#undef CONFIG_USB_PD_VBUS_DETECT_GPIO
#undef CONFIG_USB_PD_VBUS_DETECT_PPC
#undef CONFIG_USB_PD_VBUS_DETECT_NONE
#ifdef CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC
#define CONFIG_USB_PD_VBUS_DETECT_TCPC
#endif
#ifdef CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER
#define CONFIG_USB_PD_VBUS_DETECT_CHARGER
#endif
#ifdef CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
#define CONFIG_USB_PD_VBUS_DETECT_PPC
#endif
#ifdef CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
#define CONFIG_USB_PD_VBUS_DETECT_NONE
#endif
#undef CONFIG_USB_PD_5V_EN_CUSTOM
#ifdef CONFIG_PLATFORM_EC_USB_PD_5V_EN_CUSTOM
#define CONFIG_USB_PD_5V_EN_CUSTOM
#endif
#undef CONFIG_USB_TYPEC_SM
#ifdef CONFIG_PLATFORM_EC_USB_TYPEC_SM
#define CONFIG_USB_TYPEC_SM
#endif
#undef CONFIG_USB_PRL_SM
#ifdef CONFIG_PLATFORM_EC_USB_PRL_SM
#define CONFIG_USB_PRL_SM
#endif
#undef CONFIG_USB_PE_SM
#ifdef CONFIG_PLATFORM_EC_USB_PE_SM
#define CONFIG_USB_PE_SM
#endif
#undef CONFIG_USB_PD_DECODE_SOP
#ifdef CONFIG_PLATFORM_EC_USB_PD_DECODE_SOP
#define CONFIG_USB_PD_DECODE_SOP
#endif
#undef CONFIG_USB_VPD
#ifdef CONFIG_PLATFORM_EC_USB_VPD
#define CONFIG_USB_VPD
#endif
#undef CONFIG_USB_CTVPD
#ifdef CONFIG_PLATFORM_EC_USB_CTVPD
#define CONFIG_USB_CTVPD
#endif
#undef CONFIG_USB_DRP_ACC_TRYSRC
#ifdef CONFIG_PLATFORM_EC_USB_DRP_ACC_TRYSRC
#define CONFIG_USB_DRP_ACC_TRYSRC
#endif
#undef CONFIG_USB_PD_TCPM_PS8751
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8751
#define CONFIG_USB_PD_TCPM_PS8751
#endif
#undef CONFIG_USB_PD_TCPM_PS8805
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805
#define CONFIG_USB_PD_TCPM_PS8805
#endif
#undef CONFIG_USB_PD_TCPM_PS8815
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815
#define CONFIG_USB_PD_TCPM_PS8815
#define CONFIG_USB_PD_TCPM_PS8815_FORCE_DID
#endif
#undef CONFIG_USB_PD_TCPM_MULTI_PS8XXX
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_MULTI_PS8XXX
#define CONFIG_USB_PD_TCPM_MULTI_PS8XXX
#endif
#undef CONFIG_USB_PD_TCPM_RT1715
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_RT1715
#define CONFIG_USB_PD_TCPM_RT1715
#endif
#undef CONFIG_USB_PD_TCPM_TUSB422
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_TUSB422
#define CONFIG_USB_PD_TCPM_TUSB422
#endif
#undef CONFIG_USB_PD_TCPM_TCPCI
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_TCPCI
#define CONFIG_USB_PD_TCPM_TCPCI
#endif
#undef CONFIG_USB_PD_TCPM_ITE_ON_CHIP
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
#define CONFIG_USB_PD_TCPM_ITE_ON_CHIP
/* TODO(b:189855648): hard-code a few things here; move to zephyr? */
#define IT83XX_USBPD_PHY_PORT_COUNT 2
#endif
#undef CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_DRIVER_IT8XXX2
#define CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2
#endif
#undef CONFIG_USB_PD_TCPM_DRIVER_IT83XX
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_DRIVER_IT83XX
#define CONFIG_USB_PD_TCPM_DRIVER_IT83XX
#endif
#undef CONFIG_USB_PD_PORT_MAX_COUNT
#ifdef CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT
#define CONFIG_USB_PD_PORT_MAX_COUNT CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT
#endif
#undef CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT
#ifdef CONFIG_PLATFORM_EC_USB_PD_ITE_ACTIVE_PORT_COUNT
#define CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT \
CONFIG_PLATFORM_EC_USB_PD_ITE_ACTIVE_PORT_COUNT
#endif
#undef CONFIG_USBC_PPC
#ifdef CONFIG_PLATFORM_EC_USBC_PPC
#define CONFIG_USBC_PPC
#endif
#undef CONFIG_USBC_PPC_SN5S330
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SN5S330
#define CONFIG_USBC_PPC_SN5S330
#endif
#undef CONFIG_USBC_PPC_SYV682X
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682X
#define CONFIG_USBC_PPC_SYV682X
#endif
#undef CONFIG_USBC_PPC_SYV682C
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682C
#define CONFIG_USBC_PPC_SYV682C
#endif
#undef CONFIG_SYV682X_NO_CC
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_NO_CC
#define CONFIG_SYV682X_NO_CC
#endif
#undef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
#undef CONFIG_USB_MUX_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG
#define CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USB_MUX_RUNTIME_CONFIG
#define CONFIG_USB_MUX_RUNTIME_CONFIG
#endif /* CONFIG_PLATFORM_EC_USB_MUX_RUNTIME_CONFIG */
#endif /* CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG */
#undef CONFIG_USB_PD_ALT_MODE
#ifdef CONFIG_PLATFORM_EC_USB_PD_ALT_MODE
#define CONFIG_USB_PD_ALT_MODE
#endif
#undef CONFIG_USB_PD_ALT_MODE_DFP
#ifdef CONFIG_PLATFORM_EC_USB_PD_ALT_MODE_DFP
#define CONFIG_USB_PD_ALT_MODE_DFP
#endif
#undef CONFIG_USB_PD_ALT_MODE_UFP
#ifdef CONFIG_PLATFORM_EC_USB_PD_ALT_MODE_UFP
#define CONFIG_USB_PD_ALT_MODE_UFP
#endif
#undef CONFIG_DP_REDRIVER_TDP142
#ifdef CONFIG_PLATFORM_EC_DP_REDRIVER_TDP142
#define CONFIG_DP_REDRIVER_TDP142
#endif
#undef CONFIG_USBC_RETIMER_FW_UPDATE
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_FW_UPDATE
#define CONFIG_USBC_RETIMER_FW_UPDATE
#endif
#undef CONFIG_USBC_RETIMER_INTEL_BB
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB
#define USBC_PORT_C1_BB_RETIMER_I2C_ADDR \
DT_REG_ADDR(DT_NODELABEL(usb_c1_bb_retimer))
#define CONFIG_USBC_RETIMER_INTEL_BB
#endif
#undef CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
#define CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
#endif
#undef CONFIG_USBC_RETIMER_ANX7451
#ifdef PLATFORM_EC_USBC_RETIMER_ANX7451
#define CONFIG_USBC_RETIMER_ANX7451
#endif
#undef CONFIG_USBC_RETIMER_PS8811
#ifdef PLATFORM_EC_USBC_RETIMER_PS8811
#define CONFIG_USBC_RETIMER_PS8811
#endif
#undef CONFIG_USBC_SS_MUX
#ifdef CONFIG_PLATFORM_EC_USBC_SS_MUX
#define CONFIG_USBC_SS_MUX
#endif
#undef CONFIG_USBC_SS_MUX_DFP_ONLY
#ifdef CONFIG_PLATFORM_EC_USBC_SS_MUX_DFP_ONLY
#define CONFIG_USBC_SS_MUX_DFP_ONLY
#endif
#undef CONFIG_USB_MUX_IT5205
#ifdef CONFIG_PLATFORM_EC_USB_MUX_IT5205
#define CONFIG_USB_MUX_IT5205
#endif
#undef CONFIG_USB_MUX_PS8743
#ifdef CONFIG_PLATFORM_EC_USB_MUX_PS8743
#define CONFIG_USB_MUX_PS8743
#endif
#undef CONFIG_USB_MUX_VIRTUAL
#ifdef CONFIG_PLATFORM_EC_USB_MUX_VIRTUAL
#define CONFIG_USB_MUX_VIRTUAL
#endif
#undef CONFIG_USB_PD_TCPM_MUX
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_MUX
#define CONFIG_USB_PD_TCPM_MUX
#endif
#undef CONFIG_USBC_PPC_DEDICATED_INT
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_DEDICATED_INT
#define CONFIG_USBC_PPC_DEDICATED_INT
#endif
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_PD
#define CONFIG_CONSOLE_CMD_PD
#endif
#ifdef CONFIG_HAS_TASK_PD_INT_C0
/* This must be defined if any task is active */
#define CONFIG_HAS_TASK_PD_INT
#endif
#undef CONFIG_MKBP_EVENT
#undef CONFIG_MKBP_USE_GPIO
#undef CONFIG_MKBP_USE_HOST_EVENT
#undef CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT
#undef CONFIG_MKBP_USE_CUSTOM
#ifdef CONFIG_PLATFORM_EC_MKBP_EVENT
#define CONFIG_MKBP_EVENT
#ifdef CONFIG_PLATFORM_EC_MKBP_USE_GPIO
#define CONFIG_MKBP_USE_GPIO
#elif PLATFORM_EC_MKBP_USE_HOST_EVENT
#define CONFIG_MKBP_USE_HOST_EVENT
#elif PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT
#define CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT
#elif PLATFORM_EC_MKBP_USE_CUSTOM
#define CONFIG_MKBP_USE_CUSTOM
#endif
#endif /* CONFIG_PLATFORM_EC_MKBP_EVENT */
#undef CONFIG_USB_PD_TCPC_LOW_POWER
#undef CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER
#define CONFIG_USB_PD_TCPC_LOW_POWER
#define CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE \
CONFIG_PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US
#endif /* CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER */
#undef CONFIG_USB_PD_DEBUG_LEVEL
#ifdef CONFIG_PLATFORM_EC_USB_PD_DEBUG_FIXED_LEVEL
#define CONFIG_USB_PD_DEBUG_LEVEL CONFIG_PLATFORM_EC_USB_PD_DEBUG_LEVEL
#endif
#undef CONFIG_USBC_VCONN
#ifdef CONFIG_PLATFORM_EC_USBC_VCONN
#define CONFIG_USBC_VCONN
/* This must be defined as well */
#define CONFIG_USBC_VCONN_SWAP
#endif /* CONFIG_PLATFORM_EC_USBC_VCONN */
#undef CONFIG_USB_PD_TRY_SRC
#ifdef CONFIG_PLATFORM_EC_USB_PD_TRY_SRC
#define CONFIG_USB_PD_TRY_SRC
#endif
#undef CONFIG_USBC_PPC_POLARITY
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_POLARITY
#define CONFIG_USBC_PPC_POLARITY
#endif
#undef CONFIG_USBC_PPC_SBU
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SBU
#define CONFIG_USBC_PPC_SBU
#endif
#undef CONFIG_USBC_PPC_VCONN
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_VCONN
#define CONFIG_USBC_PPC_VCONN
#endif
#undef CONFIG_USB_PD_USB32_DRD
#ifdef CONFIG_PLATFORM_EC_USB_PD_USB32_DRD
#define CONFIG_USB_PD_USB32_DRD
#endif
#undef CONFIG_HOSTCMD_PD_CONTROL
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_PD_CONTROL
#define CONFIG_HOSTCMD_PD_CONTROL
#endif
#undef CONFIG_CMD_HCDEBUG
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_HCDEBUG
#define CONFIG_CMD_HCDEBUG
#endif
#undef CONFIG_CMD_USB_PD_PE
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_USB_PD_PE
#define CONFIG_CMD_USB_PD_PE
#endif
#undef CONFIG_CMD_USB_PD_CABLE
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_USB_PD_CABLE
#define CONFIG_CMD_USB_PD_CABLE
#endif
#undef CONFIG_USB_PD_TBT_COMPAT_MODE
#ifdef CONFIG_PLATFORM_EC_USB_PD_TBT_COMPAT_MODE
#define CONFIG_USB_PD_TBT_COMPAT_MODE
#endif
#undef CONFIG_USB_PD_USB4
#ifdef CONFIG_PLATFORM_EC_USB_PD_USB4
#define CONFIG_USB_PD_USB4
#endif
#undef CONFIG_USB_PD_FRS
#ifdef CONFIG_PLATFORM_EC_USB_PD_FRS
#define CONFIG_USB_PD_FRS
#endif
#undef CONFIG_USB_PD_FRS_TCPC
#ifdef CONFIG_PLATFORM_EC_USB_PD_FRS_TCPC
#define CONFIG_USB_PD_FRS_TCPC
#endif
#undef CONFIG_USB_PD_FRS_PPC
#ifdef CONFIG_PLATFORM_EC_USB_PD_FRS_PPC
#define CONFIG_USB_PD_FRS_PPC
#endif
#undef CONFIG_VSTORE
#undef VSTORE_SLOT_COUNT
#ifdef CONFIG_PLATFORM_EC_VSTORE
#define CONFIG_VSTORE
#define CONFIG_VSTORE_SLOT_COUNT CONFIG_PLATFORM_EC_VSTORE_SLOT_COUNT
#endif
/* motion sense */
#undef CONFIG_MOTIONSENSE
#ifdef CONFIG_PLATFORM_EC_MOTIONSENSE
#define CONFIG_MOTIONSENSE
#undef CONFIG_ACCEL_FIFO
#undef CONFIG_ACCEL_FIFO_SIZE
#undef CONFIG_ACCEL_FIFO_THRES
#ifdef CONFIG_PLATFORM_EC_ACCEL_FIFO
#define CONFIG_ACCEL_FIFO
#define CONFIG_ACCEL_FIFO_SIZE CONFIG_PLATFORM_EC_ACCEL_FIFO_SIZE
#define CONFIG_ACCEL_FIFO_THRES CONFIG_PLATFORM_EC_ACCEL_FIFO_THRES
#endif /* CONFIG_PLATFORM_EC_ACCEL_FIFO */
#undef CONFIG_CMD_ACCELS
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCELS
#define CONFIG_CMD_ACCELS
#endif
#undef CONFIG_CMD_ACCEL_INFO
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_INFO
#define CONFIG_CMD_ACCEL_INFO
#endif
#undef CONFIG_ACCEL_SPOOF_MODE
#ifdef CONFIG_PLATFORM_EC_ACCEL_SPOOF_MODE
#define CONFIG_ACCEL_SPOOF_MODE
#endif
#undef CONFIG_CMD_ACCEL_SPOOF
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_SPOOF
#define CONFIG_CMD_ACCEL_SPOOF
#endif
#undef CONFIG_SENSOR_TIGHT_TIMESTAMPS
#ifdef CONFIG_PLATFORM_EC_SENSOR_TIGHT_TIMESTAMPS
#define CONFIG_SENSOR_TIGHT_TIMESTAMPS
#endif
#undef CONFIG_ACCEL_INTERRUPTS
#ifdef CONFIG_PLATFORM_EC_ACCEL_INTERRUPTS
#define CONFIG_ACCEL_INTERRUPTS
#endif
#undef CONFIG_ALS
#undef CONFIG_ALS_COUNT
#ifdef CONFIG_PLATFORM_EC_ALS
#define CONFIG_ALS
#define ALS_COUNT CONFIG_PLATFORM_EC_ALS_COUNT
#else
#define ALS_COUNT 0
#endif
#undef CONFIG_DYNAMIC_MOTION_SENSOR_COUNT
#ifdef CONFIG_PLATFORM_EC_DYNAMIC_MOTION_SENSOR_COUNT
#define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT
#endif
#undef CONFIG_LID_ANGLE
#ifdef CONFIG_PLATFORM_EC_LID_ANGLE
#define CONFIG_LID_ANGLE
#endif
#undef CONFIG_LID_ANGLE_UPDATE
#ifdef CONFIG_PLATFORM_EC_LID_ANGLE_UPDATE
#define CONFIG_LID_ANGLE_UPDATE
#endif
#undef CONFIG_TABLET_MODE
#ifdef CONFIG_PLATFORM_EC_TABLET_MODE
#define CONFIG_TABLET_MODE
#endif
#undef CONFIG_TABLET_MODE_SWITCH
#ifdef CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH
#define CONFIG_TABLET_MODE_SWITCH
#endif
#undef CONFIG_GMR_TABLET_MODE
#ifdef CONFIG_PLATFORM_EC_GMR_TABLET_MODE
#define CONFIG_GMR_TABLET_MODE
#endif
/* sensors */
#undef CONFIG_ACCELGYRO_BMI160
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_BMI160
#define CONFIG_ACCELGYRO_BMI160
#endif
#undef CONFIG_ACCELGYRO_BMI260
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_BMI260
#define CONFIG_ACCELGYRO_BMI260
#endif
#undef CONFIG_ACCELGYRO_BMI3XX
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_BMI3XX
#define CONFIG_ACCELGYRO_BMI3XX
#endif
#undef CONFIG_ACCEL_BMA255
#ifdef CONFIG_PLATFORM_EC_ACCEL_BMA255
#define CONFIG_ACCEL_BMA255
#endif
#undef CONFIG_ACCEL_BMA4XX
#ifdef CONFIG_PLATFORM_EC_ACCEL_BMA4XX
#define CONFIG_ACCEL_BMA4XX
#endif
#undef CONFIG_ACCEL_KX022
#ifdef CONFIG_PLATFORM_EC_ACCEL_KX022
#define CONFIG_ACCEL_KX022
#endif
#undef CONFIG_ALS_TCS3400
#ifdef CONFIG_PLATFORM_EC_ALS_TCS3400
#define CONFIG_ALS_TCS3400
#endif
#endif /* CONFIG_PLATFORM_EC_MOTIONSENSE */
#undef CONFIG_HOSTCMD_GET_UPTIME_INFO
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_GET_UPTIME_INFO
#define CONFIG_HOSTCMD_GET_UPTIME_INFO
#endif
#undef CONFIG_CMD_AP_RESET_LOG
#ifdef CONFIG_PLATFORM_EC_AP_RESET_LOG
#define CONFIG_CMD_AP_RESET_LOG
#endif
#undef CONFIG_POWER_BUTTON
#ifdef CONFIG_PLATFORM_EC_POWER_BUTTON
#define CONFIG_POWER_BUTTON
#endif
#undef CONFIG_COMMON_PANIC_OUTPUT
#ifdef CONFIG_PLATFORM_EC_PANIC
#define CONFIG_COMMON_PANIC_OUTPUT
#endif
#undef CONFIG_SOFTWARE_PANIC
#ifdef CONFIG_PLATFORM_EC_SOFTWARE_PANIC
#define CONFIG_SOFTWARE_PANIC
#endif
#undef CONFIG_CMD_CRASH
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_CRASH
#define CONFIG_CMD_CRASH
#endif
#undef CONFIG_CMD_STACKOVERFLOW
#ifdef CONFIG_PLATFORM_EC_STACKOVERFLOW
#define CONFIG_CMD_STACKOVERFLOW
#endif
#undef CONFIG_CMD_MEM
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_MEM
#define CONFIG_CMD_MEM
#endif
#undef CONFIG_CMD_MD
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_MD
#define CONFIG_CMD_MD
#endif
#undef CONFIG_CMD_RW
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_RW
#define CONFIG_CMD_RW
#endif
#undef CONFIG_RTC
#ifdef CONFIG_PLATFORM_EC_RTC
#define CONFIG_RTC
#endif
#undef CONFIG_CMD_RTC
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC
#define CONFIG_CMD_RTC
#endif
#undef CONFIG_CMD_RTC_ALARM
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC_ALARM
#define CONFIG_CMD_RTC_ALARM
#endif
#undef CONFIG_HOSTCMD_RTC
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_RTC
#define CONFIG_HOSTCMD_RTC
#endif
#undef CONFIG_SWITCH
#ifdef CONFIG_PLATFORM_EC_SWITCH
#define CONFIG_SWITCH
#endif
#undef CONFIG_LN9310
#ifdef CONFIG_PLATFORM_EC_SWITCHCAP_LN9310
#define CONFIG_LN9310
#endif
#undef CONFIG_BOARD_VERSION_CBI
#ifdef CONFIG_PLATFORM_EC_BOARD_VERSION_CBI
#define CONFIG_BOARD_VERSION_CBI
#endif
#undef CONFIG_BOARD_VERSION_GPIO
#ifdef CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO
#define CONFIG_BOARD_VERSION_GPIO
#endif
#undef CONFIG_CBI_EEPROM
#ifdef CONFIG_PLATFORM_EC_CBI_EEPROM
#define CONFIG_CBI_EEPROM
#define I2C_ADDR_EEPROM_FLAGS DT_REG_ADDR(DT_NODELABEL(cbi_eeprom))
#endif
#undef CONFIG_VBOOT_HASH
#ifdef CONFIG_PLATFORM_EC_VBOOT_HASH
#define CONFIG_VBOOT_HASH
#endif
#undef CONFIG_SHA256_HW_ACCELERATE
#ifdef CONFIG_PLATFORM_EC_SHA256_HW_ACCELERATE
#define CONFIG_SHA256_HW_ACCELERATE
#endif
#undef CONFIG_RO_HDR_MEM_OFF
#ifdef CONFIG_PLATFORM_EC_RO_HEADER_OFFSET
#define CONFIG_RO_HDR_MEM_OFF CONFIG_PLATFORM_EC_RO_HEADER_OFFSET
#else
#define CONFIG_RO_HDR_MEM_OFF 0
#endif
#undef CONFIG_RO_HDR_SIZE
#ifdef CONFIG_PLATFORM_EC_RO_HEADER_SIZE
#define CONFIG_RO_HDR_SIZE CONFIG_PLATFORM_EC_RO_HEADER_SIZE
#else
#define CONFIG_RO_HDR_SIZE 0
#endif
#undef CONFIG_SYSTEM_UNLOCKED
#ifdef CONFIG_PLATFORM_EC_SYSTEM_UNLOCKED
#define CONFIG_SYSTEM_UNLOCKED
#endif
#undef CONFIG_BYPASS_CBI_EEPROM_WP_CHECK
#ifdef CONFIG_PLATFORM_EC_BYPASS_CBI_EEPROM_WP_CHECK
#define CONFIG_BYPASS_CBI_EEPROM_WP_CHECK
#endif
#undef CONFIG_SPI_FLASH_REGS
#ifdef CONFIG_PLATFORM_EC_SPI_FLASH_REGS
#define CONFIG_SPI_FLASH_REGS
#endif
#undef CONFIG_CMD_CHARGEN
#ifdef PLATFORM_EC_CONSOLE_CMD_CHARGEN
#define CONFIG_CMD_CHARGEN
#endif
#undef CONFIG_DEBUG_ASSERT
#ifdef CONFIG_PLATFORM_EC_DEBUG_ASSERT
#define CONFIG_DEBUG_ASSERT
#endif
#undef CONFIG_DEBUG_ASSERT_BRIEF
#ifdef CONFIG_PLATFORM_EC_DEBUG_ASSERT_BRIEF
#define CONFIG_DEBUG_ASSERT_BRIEF
#endif
#undef CONFIG_DEBUG_ASSERT_REBOOTS
#ifdef CONFIG_PLATFORM_EC_DEBUG_ASSERT_REBOOTS
#define CONFIG_DEBUG_ASSERT_REBOOTS
#endif
#undef CONFIG_MPU
#ifdef CONFIG_PLATFORM_EC_MPU
#define CONFIG_MPU
#endif
#undef CONFIG_CMD_SYSINFO
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSINFO
#define CONFIG_CMD_SYSINFO
#endif
#undef CONFIG_CMD_SYSJUMP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSJUMP
#define CONFIG_CMD_SYSJUMP
#endif
#undef CONFIG_WATCHDOG_PERIOD_MS
#ifdef CONFIG_PLATFORM_EC_WATCHDOG_PERIOD_MS
#define CONFIG_WATCHDOG_PERIOD_MS CONFIG_PLATFORM_EC_WATCHDOG_PERIOD_MS
#endif
#undef CONFIG_WATCHDOG_WARNING_LEADING_TIME_MS
#if defined(CONFIG_PLATFORM_EC_WATCHDOG_WARNING_LEADING_TIME_MS) || \
defined(CONFIG_WDT_NPCX_DELAY_CYCLES) || \
defined(CONFIG_WDT_ITE_WARNING_LEADING_TIME_MS)
/*
* Note:
* NPCX wdt driver uses CONFIG_WDT_NPCX_DELAY_CYCLES to set the leading
* time of the watchdog warning timer.
* IT8XXX2 WDT driver uses CONFIG_WDT_ITE_WARNING_LEADING_TIME_MS period
* between watchdog warning and reset.
*/
#ifdef CONFIG_WDT_NPCX_DELAY_CYCLES
#define CONFIG_WATCHDOG_WARNING_LEADING_TIME_MS \
(CONFIG_WDT_NPCX_DELAY_CYCLES * 31)
#elif CONFIG_WDT_ITE_WARNING_LEADING_TIME_MS
#define CONFIG_WATCHDOG_WARNING_LEADING_TIME_MS \
CONFIG_WDT_ITE_WARNING_LEADING_TIME_MS
#else
#define CONFIG_WATCHDOG_WARNING_LEADING_TIME_MS \
CONFIG_PLATFORM_EC_WATCHDOG_WARNING_LEADING_TIME_MS
#endif
#endif
#undef CONFIG_VBOOT_EFS
#undef CONFIG_VBOOT_EFS2
#ifdef CONFIG_PLATFORM_EC_VBOOT
#define CONFIG_VBOOT_EFS2
#endif
#undef CONFIG_USB_PD_TCPC_VCONN
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_VCONN
#define CONFIG_USB_PD_TCPC_VCONN
#endif
#undef CONFIG_DPTF
#ifdef CONFIG_PLATFORM_EC_DPTF
#define CONFIG_DPTF
#endif
#undef CONFIG_CHARGER_BQ25710
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710
#define CONFIG_CHARGER_BQ25710
#endif
#undef CONFIG_CHARGER_BQ25720
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720
#define CONFIG_CHARGER_BQ25720
#endif
#undef CONFIG_CHARGER_BQ25720_VSYS_TH2_DV
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_CUSTOM
#define CONFIG_CHARGER_BQ25720_VSYS_TH2_DV \
CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_DV
#endif
#undef CONFIG_HIBERNATE_PSL
#ifdef CONFIG_PLATFORM_EC_HIBERNATE_PSL
#define CONFIG_HIBERNATE_PSL
#endif
#undef CONFIG_BATTERY_DEVICE_CHEMISTRY
#ifdef CONFIG_PLATFORM_EC_USE_BATTERY_DEVICE_CHEMISTRY
#define CONFIG_BATTERY_DEVICE_CHEMISTRY \
CONFIG_PLATFORM_EC_BATTERY_DEVICE_CHEMISTRY
#endif
#undef CONFIG_BATTERY_REVIVE_DISCONNECT
#ifdef CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT
#define CONFIG_BATTERY_REVIVE_DISCONNECT
#endif
#undef CONFIG_CHARGER_DISCHARGE_ON_AC
#ifdef CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
#define CONFIG_CHARGER_DISCHARGE_ON_AC
#endif
#undef CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_DISCHARGE_ON_AC_CUSTOM
#define CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM
#endif
#undef CONFIG_CHARGER_SENSE_RESISTOR
#ifdef CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR
#define CONFIG_CHARGER_SENSE_RESISTOR \
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR
#endif
#undef CONFIG_CHARGER_SENSE_RESISTOR_AC
#ifdef CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC
#define CONFIG_CHARGER_SENSE_RESISTOR_AC \
CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC
#endif
#undef CONFIG_CHARGER_PROFILE_OVERRIDE
#ifdef CONFIG_PLATFORM_EC_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_PROFILE_OVERRIDE
#endif
#undef CONFIG_CHARGER_PSYS
#ifdef CONFIG_PLATFORM_EC_CHARGER_PSYS
#define CONFIG_CHARGER_PSYS
#endif
#undef CONFIG_CHARGER_PSYS_READ
#ifdef CONFIG_PLATFORM_EC_CHARGER_PSYS_READ
#define CONFIG_CHARGER_PSYS_READ
#endif
#undef CONFIG_CMD_CHARGER_ADC_AMON_BMON
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_CHARGER_ADC_AMON_BMON
#define CONFIG_CMD_CHARGER_ADC_AMON_BMON
#endif
#undef CONFIG_USB_PD_ONLY_FIXED_PDOS
#ifdef CONFIG_PLATFORM_EC_USB_PD_ONLY_FIXED_PDOS
#define CONFIG_USB_PD_ONLY_FIXED_PDOS
#endif
#undef CONFIG_MP2964
#ifdef CONFIG_PLATFORM_EC_MP2964
#define CONFIG_MP2964
#endif
#undef CONFIG_ACCELGYRO_ICM_COMM_SPI
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM_COMM_SPI
#define CONFIG_ACCELGYRO_ICM_COMM_SPI
#endif
#undef CONFIG_ACCELGYRO_ICM_COMM_I2C
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM_COMM_I2C
#define CONFIG_ACCELGYRO_ICM_COMM_I2C
#endif
#undef CONFIG_ACCELGYRO_BMI_COMM_SPI
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_SPI
#define CONFIG_ACCELGYRO_BMI_COMM_SPI
#endif
#undef CONFIG_ACCELGYRO_BMI_COMM_I2C
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C
#define CONFIG_ACCELGYRO_BMI_COMM_I2C
#endif
#undef CONFIG_CMD_SLEEPMASK
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SLEEPMASK
#define CONFIG_CMD_SLEEPMASK
#endif
#undef CONFIG_CMD_SLEEPMASK_SET
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SLEEPMASK_SET
#define CONFIG_CMD_SLEEPMASK_SET
#endif
#undef CONFIG_LOW_POWER_IDLE
#ifdef CONFIG_PLATFORM_EC_LOW_POWER_IDLE
#define CONFIG_LOW_POWER_IDLE
#endif
#undef CONFIG_PORT80_4_BYTE
#ifdef CONFIG_PLATFORM_EC_PORT80_4_BYTE
#define CONFIG_PORT80_4_BYTE
#endif
#undef CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECT
#ifdef CONFIG_PLATFORM_EC_ASSERT_CCD_MODE_ON_DTS_CONNECT
#define CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECT
#endif
#undef CONFIG_CCD_USBC_PORT_NUMBER
#ifdef CONFIG_PLATFORM_EC_CCD_USBC_PORT_NUMBER
#define CONFIG_CCD_USBC_PORT_NUMBER CONFIG_PLATFORM_EC_CCD_USBC_PORT_NUMBER
#endif
#undef CONFIG_ACCEL_LIS2DW12
#ifdef CONFIG_PLATFORM_EC_ACCEL_LIS2DW12
#define CONFIG_ACCEL_LIS2DW12
#endif
#undef CONFIG_ACCEL_LIS2DW_AS_BASE
#ifdef CONFIG_PLATFORM_EC_ACCEL_LIS2DW12_AS_BASE
#define CONFIG_ACCEL_LIS2DW_AS_BASE
#endif
#undef CONFIG_CONSOLE_CHANNEL
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CHANNEL
#define CONFIG_CONSOLE_CHANNEL
#endif
#undef CONFIG_USB_PD_DP_HPD_GPIO
#ifdef CONFIG_PLATFORM_EC_USB_PD_DP_HPD_GPIO
#define CONFIG_USB_PD_DP_HPD_GPIO
#endif
#undef CONFIG_USB_PD_DP_HPD_GPIO_CUSTOM
#ifdef CONFIG_PLATFORM_EC_USB_PD_DP_HPD_GPIO_CUSTOM
#define CONFIG_USB_PD_DP_HPD_GPIO_CUSTOM
#endif
#undef CONSOLE_CMD_MFALLOW
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_MFALLOW
#define CONSOLE_CMD_MFALLOW
#endif
#endif /* __CROS_EC_CONFIG_CHIP_H */
|