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
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
|
/* 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 <zephyr/devicetree.h>
#include <autoconf.h>
#define SENSOR_NODE DT_PATH(motionsense_sensor)
#define SENSOR_INFO_NODE DT_PATH(motionsense_sensor_info)
#define SENSOR_ALT_NODE DT_PATH(motionsense_sensor_alt)
/*
* 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_KEYBOARD_KSO_HIGH_DRIVE /* Used by the Chromium EC chip 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
/* 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
#ifdef CONFIG_AP_X86_INTEL_MTL
#define CONFIG_CHIPSET_METEORLAKE
#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_THROTTLE_AP_ON_BAT_DISCHG_CURRENT
#undef BAT_MAX_DISCHG_CURRENT
#ifdef CONFIG_PLATFORM_EC_THROTTLE_AP_ON_BAT_DISCHG_CURRENT
#define CONFIG_THROTTLE_AP_ON_BAT_DISCHG_CURRENT
#define BAT_MAX_DISCHG_CURRENT \
CONFIG_PLATFORM_EC_THROTTLE_AP_ON_BAT_DISCHG_CURRENT_LIMIT
#endif
#undef CONFIG_THROTTLE_AP_ON_BAT_VOLTAGE
#undef BAT_LOW_VOLTAGE_THRESH
#ifdef CONFIG_PLATFORM_EC_THROTTLE_AP_ON_BAT_LOW_VOLTAGE
#define CONFIG_THROTTLE_AP_ON_BAT_VOLTAGE
#define BAT_LOW_VOLTAGE_THRESH \
CONFIG_PLATFORM_EC_THROTTLE_AP_ON_BAT_LOW_VOLTAGE_THRESH
#endif
#undef CONFIG_BACKLIGHT_LID
#ifdef CONFIG_PLATFORM_EC_BACKLIGHT_LID
#define CONFIG_BACKLIGHT_LID
#endif
#undef CONFIG_BACKLIGHT_LID_ACTIVE_LOW
#ifdef CONFIG_PLATFORM_EC_BACKLIGHT_LID_ACTIVE_LOW
#define CONFIG_BACKLIGHT_LID_ACTIVE_LOW
#endif
/* Battery configuration */
#undef CONFIG_BATTERY
#ifdef CONFIG_PLATFORM_EC_BATTERY
#define CONFIG_BATTERY
#endif /* CONFIG_PLATFORM_EC_BATTERY */
#undef CONFIG_BATTERY_FUEL_GAUGE
#ifdef CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE
#define CONFIG_BATTERY_FUEL_GAUGE
#endif /* CONFIG_PLATFORM_EC_BATTERY_FUEL_GAUGE */
#undef CONFIG_BATTERY_V1
#ifdef CONFIG_PLATFORM_EC_BATTERY_V1
#define CONFIG_BATTERY_V1
#endif
#undef CONFIG_BATTERY_V2
#ifdef CONFIG_PLATFORM_EC_BATTERY_V2
#define CONFIG_BATTERY_V2
#endif
#undef CONFIG_HOSTCMD_BATTERY_V2
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_BATTERY_V2
#define CONFIG_HOSTCMD_BATTERY_V2
#endif
#undef CONFIG_BATTERY_TYPE_NO_AUTO_DETECT
#ifdef CONFIG_PLATFORM_EC_BATTERY_TYPE_NO_AUTO_DETECT
#define CONFIG_BATTERY_TYPE_NO_AUTO_DETECT
#endif
#undef CONFIG_BATTERY_COUNT
#define CONFIG_BATTERY_COUNT CONFIG_PLATFORM_EC_BATTERY_COUNT
#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
#undef CONFIG_SMART_BATTERY_OPTIONAL_MFG_FUNC
#ifdef CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY
#define CONFIG_I2C_VIRTUAL_BATTERY
#define VIRTUAL_BATTERY_ADDR_FLAGS CONFIG_PLATFORM_EC_I2C_VIRTUAL_BATTERY_ADDR
#ifdef CONFIG_PLATFORM_EC_SMART_BATTERY_OPTIONAL_MFG_FUNC
#define CONFIG_SMART_BATTERY_OPTIONAL_MFG_FUNC
#endif
#endif
#undef CONFIG_I2C_PASSTHRU_RESTRICTED
#ifdef CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED
#define CONFIG_I2C_PASSTHRU_RESTRICTED
#endif
#undef CONFIG_CMD_I2C_SPEED
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_I2C_SPEED
#define CONFIG_CMD_I2C_SPEED
#endif
#undef CONFIG_HOSTCMD_I2C_CONTROL
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_I2C_CONTROL
#define CONFIG_HOSTCMD_I2C_CONTROL
#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_CRITICAL_SHUTDOWN_CUT_OFF
#ifdef CONFIG_PLATFORM_EC_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
#define CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
#endif
#undef CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS
#ifdef CONFIG_PLATFORM_EC_BATTERY_CHECK_CHARGE_TEMP_LIMITS
#define CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS
#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_BATTERY_MEASURE_IMBALANCE
#ifdef CONFIG_PLATFORM_EC_BATTERY_MEASURE_IMBALANCE
#define CONFIG_BATTERY_MEASURE_IMBALANCE
#define CONFIG_BATTERY_MAX_IMBALANCE_MV \
CONFIG_PLATFORM_EC_BATTERY_MAX_IMBALANCE_MV
#define CONFIG_CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON \
CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON
#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
#undef CONFIG_OCPC
#ifdef CONFIG_PLATFORM_EC_OCPC
#define CONFIG_OCPC
#define CONFIG_OCPC_DEF_RBATT_MOHMS CONFIG_PLATFORM_EC_OCPC_DEF_RBATT_MOHMS
#endif
#undef CONFIG_CHARGER_SINGLE_CHIP
#ifdef CONFIG_PLATFORM_EC_CHARGER_SINGLE_CHIP
#define CONFIG_CHARGER_SINGLE_CHIP
#endif
#undef CONFIG_CHARGER_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_CHARGER_RUNTIME_CONFIG
#define CONFIG_CHARGER_RUNTIME_CONFIG
#endif
/*
* Note - ISL9241 chargers for all channels are configured with the same
* switching frequency set with the Kconfig config.
*/
#undef CONFIG_ISL9241_SWITCHING_FREQ
#if CONFIG_PLATFORM_EC_ISL9241_SWITCHING_FREQ != -1
#define CONFIG_ISL9241_SWITCHING_FREQ CONFIG_PLATFORM_EC_ISL9241_SWITCHING_FREQ
#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_RAA489000
#ifdef CONFIG_PLATFORM_EC_CHARGER_RAA489000
#define CONFIG_CHARGER_RAA489000
#endif
#undef CONFIG_CHARGER_SM5803
#ifdef CONFIG_PLATFORM_EC_CHARGER_SM5803
#define CONFIG_CHARGER_SM5803
#endif
#undef CONFIG_CHARGER_MAINTAIN_VBAT
#ifdef CONFIG_PLATFORM_EC_CHARGER_MAINTAIN_VBAT
#define CONFIG_CHARGER_MAINTAIN_VBAT
#endif
#undef CONFIG_CHARGER_TRICKLE
#ifdef CONFIG_PLATFORM_EC_CHARGER_TRICKLE
#define CONFIG_TRICKLE_CHARGING
#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
#undef CONFIG_CHIP_INIT_ROM_REGION
#ifdef CONFIG_PLATFORM_EC_CHIP_INIT_ROM_REGION
#define CONFIG_CHIP_INIT_ROM_REGION
#endif
#ifdef CONFIG_PLATFORM_EC_EXTPOWER
#define CONFIG_EXTPOWER
#endif
#ifdef CONFIG_PLATFORM_EC_EXTPOWER_GPIO
#define CONFIG_EXTPOWER_GPIO
#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
/* Host interface selection */
#undef CONFIG_HOST_INTERFACE_ESPI
#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_ESPI
#define CONFIG_HOST_INTERFACE_ESPI
#endif
#undef CONFIG_HOST_INTERFACE_HECI
#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_HECI
#define CONFIG_HOST_INTERFACE_HECI
#endif
#undef CONFIG_HOST_INTERFACE_LPC
#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_LPC
#define CONFIG_HOST_INTERFACE_LPC
#endif
#undef CONFIG_HOST_INTERFACE_SHI
#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_SHI
#define CONFIG_HOST_INTERFACE_SHI
#endif
#undef CONFIG_HOST_INTERFACE_USB
#ifdef CONFIG_PLATFORM_EC_HOST_INTERFACE_USB
#define CONFIG_HOST_INTERFACE_USB
#endif
/* eSPI signals */
#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#endif
#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S4
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
#endif
#undef CONFIG_HOSTCMD_ESPI_VW_SLP_S5
#ifdef CONFIG_PLATFORM_EC_ESPI_VW_SLP_S5
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S5
#endif
#undef CONFIG_HOSTCMD_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#ifdef CONFIG_PLATFORM_EC_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#define CONFIG_HOSTCMD_ESPI_RESET_SLP_SX_VW_ON_ESPI_RST
#endif
#undef CONFIG_ESPI_DEFAULT_VW_WIDTH_US
#ifdef CONFIG_PLATFORM_EC_DEFAULT_SCI_WIDTH_US
#define CONFIG_ESPI_DEFAULT_VW_WIDTH_US CONFIG_PLATFORM_EC_DEFAULT_SCI_WIDTH_US
#endif
#if DT_HAS_CHOSEN(zephyr_flash)
#define CONFIG_PROGRAM_MEMORY_BASE DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
#else
#error "A zephyr,flash device must be chosen in the device tree"
#endif
#if DT_HAS_CHOSEN(zephyr_sram)
#define CONFIG_RAM_BASE DT_REG_ADDR(DT_CHOSEN(zephyr_sram))
#define CONFIG_DATA_RAM_SIZE DT_REG_SIZE(DT_CHOSEN(zephyr_sram))
#elif defined(CONFIG_ARCH_POSIX)
/* The jump data goes at the end of data ram, so for posix, the end of ram is
* wherever the jump data ended up.
*/
extern struct jump_data mock_jump_data;
#define CONFIG_RAM_BASE 0x0
#define CONFIG_DATA_RAM_SIZE \
(((uintptr_t)&mock_jump_data) + sizeof(struct jump_data))
#else
#error "A zephyr,sram device must be chosen in the device tree"
#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
/*
* ROM resident area in flash used to store data objects that are not copied
* into code RAM. Enable using the CONFIG_CHIP_INIT_ROM_REGION option.
*/
#define CONFIG_RO_ROM_RESIDENT_MEM_OFF CONFIG_RO_SIZE
#define CONFIG_RO_ROM_RESIDENT_SIZE \
(CONFIG_EC_PROTECTED_STORAGE_SIZE - CONFIG_RO_SIZE)
/*
* RW firmware in program memory - Identical to RO, only one image loaded at
* a time.
*/
#define CONFIG_RW_ROM_RESIDENT_MEM_OFF CONFIG_RW_SIZE
#define CONFIG_RW_ROM_RESIDENT_SIZE \
(CONFIG_EC_WRITABLE_STORAGE_SIZE - CONFIG_RW_SIZE)
/* Flash settings */
#undef CONFIG_EXTERNAL_STORAGE
#undef CONFIG_INTERNAL_STORAGE
#undef CONFIG_MAPPED_STORAGE
#undef CONFIG_FLASH_PSTATE
#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_MAPPED_STORAGE_BASE
#ifdef CONFIG_PLATFORM_EC_MAPPED_STORAGE_BASE
#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PLATFORM_EC_MAPPED_STORAGE_BASE
#endif
#undef CONFIG_FLASH_SIZE_BYTES
#ifdef CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES
/*
* Flash size of IT81202 is 1MB.
* We use only 3/4 space of flash to save time of erasing RW image from flash.
*/
#ifdef CONFIG_SOC_IT8XXX2
#define CONFIG_FLASH_SIZE_BYTES (CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES * 3 / 4)
#else
#define CONFIG_FLASH_SIZE_BYTES CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES
#endif
#endif /* CONFIG_PLATFORM_EC_FLASH_SIZE_BYTES */
#undef CONFIG_ADC
#ifdef CONFIG_PLATFORM_EC_ADC
#define CONFIG_ADC
#endif
#undef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_ADC_CHANNELS_RUNTIME_CONFIG
#define CONFIG_ADC_CHANNELS_RUNTIME_CONFIG
#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_TEMP_SENSOR_POWER
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_POWER
#define CONFIG_TEMP_SENSOR_POWER
#endif
#undef CONFIG_THERMISTOR
#ifdef CONFIG_PLATFORM_EC_THERMISTOR
#define CONFIG_THERMISTOR
#endif
#undef CONFIG_TEMP_SENSOR_PCT2075
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_PCT2075
#define CONFIG_TEMP_SENSOR_PCT2075
#endif
#undef CONFIG_TEMP_SENSOR_SB_TSI
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_SB_TSI
#define CONFIG_TEMP_SENSOR_SB_TSI
#endif
#undef CONFIG_TEMP_SENSOR_TMP112
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_TMP112
#define CONFIG_TEMP_SENSOR_TMP112
#endif
#undef CONFIG_FANS
#ifdef CONFIG_PLATFORM_EC_NUM_FANS
#define CONFIG_FANS CONFIG_PLATFORM_EC_NUM_FANS
#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_I2C_DEBUG
#ifdef CONFIG_PLATFORM_EC_I2C_DEBUG
#define CONFIG_I2C_DEBUG
#endif
#undef CONFIG_I2C_DEBUG_PASSTHRU
#ifdef CONFIG_PLATFORM_EC_I2C_DEBUG_PASSTHRU
#define CONFIG_I2C_DEBUG_PASSTHRU
#endif
#undef CONFIG_SMBUS_PEC
#ifdef CONFIG_PLATFORM_EC_SMBUS_PEC
#define CONFIG_SMBUS_PEC
#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_KEYBOARD_DEBUG
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_DEBUG
#define CONFIG_KEYBOARD_DEBUG
#endif
#undef CONFIG_KEYBOARD_DISCRETE
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_DISCRETE
#define CONFIG_KEYBOARD_DISCRETE
#define KB_DISCRETE_I2C_ADDR_FLAGS DT_REG_ADDR(DT_NODELABEL(kb_discrete))
#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_REFRESH_ROW3
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_REFRESH_ROW3
#define CONFIG_KEYBOARD_REFRESH_ROW3
#endif /* CONFIG_PLATFORM_EC_KEYBOARD_REFRESH_ROW3 */
#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_BUTTONS_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_BUTTONS_RUNTIME_CONFIG
#define CONFIG_BUTTONS_RUNTIME_CONFIG
#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_KBLIGHT_ENABLE_PIN
#ifdef CONFIG_PLATFORM_EC_KBLIGHT_ENABLE_PIN
#define CONFIG_KBLIGHT_ENABLE_PIN
#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_TASK_DISABLED
#ifdef CONFIG_PLATFORM_EC_LED_PWM_TASK_DISABLED
#define CONFIG_LED_PWM_TASK_DISABLED
#endif
#undef CONFIG_LED_PWM_COUNT
#if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_pwm_leds)
#define CONFIG_LED_PWM_COUNT DT_PROP_LEN(DT_INST(0, cros_ec_pwm_leds), leds)
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_CHARGE_COLOR
#undef CONFIG_LED_PWM_CHARGE_COLOR
#define CONFIG_LED_PWM_CHARGE_COLOR CONFIG_PLATFORM_EC_LED_PWM_CHARGE_COLOR
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_NEAR_FULL_COLOR
#undef CONFIG_LED_PWM_NEAR_FULL_COLOR
#define CONFIG_LED_PWM_NEAR_FULL_COLOR \
CONFIG_PLATFORM_EC_LED_PWM_NEAR_FULL_COLOR
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_CHARGE_ERROR_COLOR
#undef CONFIG_LED_PWM_CHARGE_ERROR_COLOR
#define CONFIG_LED_PWM_CHARGE_ERROR_COLOR \
CONFIG_PLATFORM_EC_LED_PWM_CHARGE_ERROR_COLOR
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_SOC_ON_COLOR
#undef CONFIG_LED_PWM_SOC_ON_COLOR
#define CONFIG_LED_PWM_SOC_ON_COLOR CONFIG_PLATFORM_EC_LED_PWM_SOC_ON_COLOR
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_SOC_SUSPEND_COLOR
#undef CONFIG_LED_PWM_SOC_SUSPEND_COLOR
#define CONFIG_LED_PWM_SOC_SUSPEND_COLOR \
CONFIG_PLATFORM_EC_LED_PWM_SOC_SUSPEND_COLOR
#endif
#ifdef CONFIG_PLATFORM_EC_LED_PWM_LOW_BATT_COLOR
#undef CONFIG_LED_PWM_LOW_BATT_COLOR
#define CONFIG_LED_PWM_LOW_BATT_COLOR CONFIG_PLATFORM_EC_LED_PWM_LOW_BATT_COLOR
#endif
#undef CONFIG_CMD_LEDTEST
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_LEDTEST
#define CONFIG_CMD_LEDTEST
#endif
#undef CONFIG_LED_ONOFF_STATES
#ifdef CONFIG_PLATFORM_EC_LED_ONOFF_STATES
#define CONFIG_LED_ONOFF_STATES
#endif
#undef CONFIG_LED_ONOFF_STATES_BAT_LOW
#ifdef CONFIG_PLATFORM_EC_LED_ONOFF_STATES_BAT_LOW
#define CONFIG_LED_ONOFF_STATES_BAT_LOW \
CONFIG_PLATFORM_EC_LED_ONOFF_STATES_BAT_LOW
#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_CPU_PROCHOT_GATE_ON_C10
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_CPU_PROCHOT_GATE_ON_C10
#define CONFIG_CPU_PROCHOT_GATE_ON_C10
#endif
#undef CONFIG_POWER_TRACK_HOST_SLEEP_STATE
#if defined(CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP) || \
defined(CONFIG_AP_PWRSEQ_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_RSMRST_AFTER_S5
#define CONFIG_CHIPSET_X86_RSMRST_AFTER_S5
#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
#define CONFIG_S5_EXIT_WAIT CONFIG_PLATFORM_EC_S5_EXIT_WAIT
#endif
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL
#define CONFIG_POWER_PP5000_CONTROL
#endif
#undef CONFIG_POWER_S0IX
#if defined(CONFIG_PLATFORM_EC_POWERSEQ_S0IX) || defined(CONFIG_AP_PWRSEQ_S0IX)
#define CONFIG_POWER_S0IX
#endif
#undef CONFIG_POWER_S4_RESIDENCY
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_S4
#define CONFIG_POWER_S4_RESIDENCY
#endif
#undef CONFIG_POWER_BUTTON_X86
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_INTEL
#define CONFIG_POWER_BUTTON_X86
#endif
#undef CONFIG_POWER_BUTTON_TO_PCH_CUSTOM
#ifdef CONFIG_PLATFORM_EC_POWER_BUTTON_TO_PCH_CUSTOM
#define CONFIG_POWER_BUTTON_TO_PCH_CUSTOM
#endif
#undef CONFIG_POWER_BUTTON_INIT_TIMEOUT
#ifdef CONFIG_PLATFORM_EC_POWER_BUTTON_INIT_TIMEOUT
#define CONFIG_POWER_BUTTON_INIT_TIMEOUT \
CONFIG_PLATFORM_EC_POWER_BUTTON_INIT_TIMEOUT
#endif
#undef CONFIG_POWERSEQ_FAKE_CONTROL
#ifdef CONFIG_PLATFORM_EC_POWERSEQ_FAKE_CONTROL
#define CONFIG_POWERSEQ_FAKE_CONTROL
#endif
#undef CONFIG_FAKE_SHMEM
#ifdef CONFIG_ARCH_POSIX
#define CONFIG_FAKE_SHMEM
#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
#undef CONFIG_CROS_FWID_VERSION
#ifdef CONFIG_PLATFORM_EC_CROS_FWID_VERSION
#define CONFIG_CROS_FWID_VERSION
#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
#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_CHARGESPLASH
#ifdef CONFIG_PLATFORM_EC_CHARGESPLASH
#define CONFIG_CHARGESPLASH
#endif
#undef CONFIG_CHARGESPLASH_PERIOD
#ifdef CONFIG_PLATFORM_EC_CHARGESPLASH_PERIOD
#define CONFIG_CHARGESPLASH_PERIOD CONFIG_PLATFORM_EC_CHARGESPLASH_PERIOD
#endif
#undef CONFIG_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD
#ifdef CONFIG_PLATFORM_EC_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD
#define CONFIG_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD \
CONFIG_PLATFORM_EC_CHARGESPLASH_MAX_REQUESTS_PER_PERIOD
#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_CMD_CHARGER_DUMP
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_CHARGER_DUMP
#define CONFIG_CMD_CHARGER_DUMP
#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
#undef CONFIG_USB_MS_EXTENDED_COMPAT_ID_DESCRIPTOR
#ifdef CONFIG_PLATFORM_EC_USB_MS_EXTENDED_COMPAT_ID_DESCRIPTOR
#define CONFIG_USB_MS_EXTENDED_COMPAT_ID_DESCRIPTOR \
CONFIG_PLATFORM_EC_USB_MS_EXTENDED_COMPAT_ID_DESCRIPTOR
#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
#undef CONFIG_USB_PD_VBUS_MEASURE_BY_BOARD
#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
#elif defined(CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_BY_BOARD)
#define CONFIG_USB_PD_VBUS_MEASURE_BY_BOARD
#endif /* VBUS-voltage measurement */
#undef CONFIG_CMD_VBUS
#ifdef CONFIG_PLATFORM_EC_CMD_VBUS
#define CONFIG_CMD_VBUS
#endif
#undef CONFIG_USB_CHARGER
#ifdef CONFIG_PLATFORM_EC_USB_CHARGER
#define CONFIG_USB_CHARGER
#endif
#define USB_PORT_COUNT \
COND_CODE_1(DT_NODE_EXISTS(DT_INST(0, cros_ec_usba_port_enable_pins)), \
(DT_PROP_LEN(DT_INST(0, cros_ec_usba_port_enable_pins), \
enable_pins)), \
(0))
#undef CONFIG_USB_PORT_ENABLE_DYNAMIC
#ifdef CONFIG_PLATFORM_EC_USB_PORT_ENABLE_DYNAMIC
#define CONFIG_USB_PORT_ENABLE_DYNAMIC
#endif
#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_USB_PORT_POWER_SMART
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART
#define CONFIG_USB_PORT_POWER_SMART
#endif
#undef CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_CDP_SDP_ONLY
#define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
#endif
#undef CONFIG_USB_PORT_POWER_SMART_SIMPLE
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_SIMPLE
#define CONFIG_USB_PORT_POWER_SMART_SIMPLE
#endif
#undef CONFIG_USB_PORT_POWER_SMART_INVERTED
#ifdef CONFIG_PLATFORM_EC_USB_PORT_POWER_SMART_INVERTED
#define CONFIG_USB_PORT_POWER_SMART_INVERTED
#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_BC12_DETECT_DATA_ROLE_TRIGGER
#ifdef CONFIG_PLATFORM_EC_BC12_DETECT_DATA_ROLE_TRIGGER
#define CONFIG_BC12_DETECT_DATA_ROLE_TRIGGER
#endif
#undef CONFIG_MT6360_BC12_GPIO
#ifdef CONFIG_PLATFORM_EC_MT6360_BC12_GPIO
#define CONFIG_MT6360_BC12_GPIO
#endif
#undef CONFIG_HOSTCMD_REGULATOR
#ifdef CONFIG_PLATFORM_EC_HOSTCMD_REGULATOR
#define CONFIG_HOSTCMD_REGULATOR
#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
#ifdef CONFIG_PLATFORM_EC_USB_PD_DISCHARGE
#define CONFIG_USB_PD_DISCHARGE
#endif
#undef CONFIG_USB_PD_DISCHARGE_GPIO
#ifdef CONFIG_PLATFORM_EC_USB_PD_DISCHARGE_GPIO
#define CONFIG_USB_PD_DISCHARGE_GPIO
#endif
#undef CONFIG_USB_PD_DISCHARGE_TCPC
#ifdef CONFIG_PLATFORM_EC_USB_PD_DISCHARGE_TCPC
#define CONFIG_USB_PD_DISCHARGE_TCPC
#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_PD_5V_CHARGER_CTRL
#ifdef CONFIG_PLATFORM_EC_USB_PD_5V_CHARGER_CTRL
#define CONFIG_USB_PD_5V_CHARGER_CTRL
#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_FUSB302
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_FUSB302
#define CONFIG_USB_PD_TCPM_FUSB302
#endif
#undef CONFIG_USB_PD_TCPM_NCT38XX
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_NCT38XX
#define CONFIG_USB_PD_TCPM_NCT38XX
#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_PS8805_FORCE_DID
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805_FORCE_DID
#define CONFIG_USB_PD_TCPM_PS8805_FORCE_DID
#endif
#undef CONFIG_USB_PD_TCPM_PS8815
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815
#define CONFIG_USB_PD_TCPM_PS8815
#endif
#undef CONFIG_USB_PD_TCPM_PS8815_FORCE_DID
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8815_FORCE_DID
#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_RT1718S
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_RT1718S
#define CONFIG_USB_PD_TCPM_RT1718S
#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
/* Individual setting CC1 and CC2 resistance. */
#define IT83XX_USBPD_CC1_CC2_RESISTANCE_SEPARATE
#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_TCPM_RAA489000
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_RAA489000
#define CONFIG_USB_PD_TCPM_RAA489000
#endif
#undef CONFIG_USB_PD_TCPM_ANX7447
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_ANX7447
#define CONFIG_USB_PD_TCPM_ANX7447
#endif
#undef CONFIG_USB_PD_TCPM_ANX7447_AUX_PU_PD
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_ANX7447_AUX_PU_PD
#define CONFIG_USB_PD_TCPM_ANX7447_AUX_PU_PD
#endif
#undef CONFIG_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND
#define CONFIG_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND
#endif
#undef CONFIG_USB_PD_PORT_MAX_COUNT
#define CONFIG_USB_PD_PORT_MAX_COUNT DT_NUM_INST_STATUS_OKAY(named_usbc_port)
#ifdef CONFIG_PLATFORM_EC_USB_POWER_DELIVERY
/* USBC-PD Port 0 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 0
#define HAS_TASK_PD_C0 1
#ifndef CONFIG_PLATFORM_EC_USB_PD_PORT_0_SHARED
#define HAS_TASK_PD_INT_C0 1
#endif /* !CONFIG_PLATFORM_EC_USB_PD_PORT_0_SHARED */
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 0 */
/* USBC-PD Port 1 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 1
#define HAS_TASK_PD_C1 1
#ifndef CONFIG_PLATFORM_EC_USB_PD_PORT_1_SHARED
#define HAS_TASK_PD_INT_C1 1
#endif /* !CONFIG_PLATFORM_EC_USB_PD_PORT_1_SHARED */
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 1 */
/* USBC-PD Port 2 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 2
#define HAS_TASK_PD_C2 1
#ifndef CONFIG_PLATFORM_EC_USB_PD_PORT_2_SHARED
#define HAS_TASK_PD_INT_C2 1
#endif /* !CONFIG_PLATFORM_EC_USB_PD_PORT_2_SHARED */
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 2 */
/* USBC-PD Port 3 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 3
#define HAS_TASK_PD_C3 1
#ifndef CONFIG_PLATFORM_EC_USB_PD_PORT_3_SHARED
#define HAS_TASK_PD_INT_C3 1
#endif /* !CONFIG_PLATFORM_EC_USB_PD_PORT_3_SHARED */
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 3 */
#endif /* CONFIG_PLATFORM_EC_USB_POWER_DELIVERY */
#ifdef CONFIG_PLATFORM_EC_USB_CHARGER
#ifndef CONFIG_PLATFORM_EC_USB_CHARGER_SINGLE_TASK
#define HAS_TASK_USB_CHG_P0 1
#if CONFIG_USB_PD_PORT_MAX_COUNT > 1
#define HAS_TASK_USB_CHG_P1 1
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 1 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 2
#define HAS_TASK_USB_CHG_P2 1
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 2 */
#if CONFIG_USB_PD_PORT_MAX_COUNT > 3
#define HAS_TASK_USB_CHG_P3 1
#endif /* CONFIG_USB_PD_PORT_MAX_COUNT > 3 */
#endif /* !PLATFORM_EC_USB_CHARGER_SINGLE_TASK */
#endif /* CONFIG_PLATFORM_EC_USB_CHARGER */
#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
/* Remove PD_INT_C* task for ports managed by ITE embedded TCPC */
#ifdef CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT
#if CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT >= 1
#undef HAS_TASK_PD_INT_C0
#endif
#if CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT >= 2
#undef HAS_TASK_PD_INT_C1
#endif
#if CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT >= 3
#undef HAS_TASK_PD_INT_C2
#endif
#if CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT >= 4
#undef HAS_TASK_PD_INT_C3
#endif
#endif /* CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT */
#undef CONFIG_USB_PD_PPC
#ifdef CONFIG_PLATFORM_EC_USB_PD_PPC
#define CONFIG_USB_PD_PPC
#endif
#undef CONFIG_USBC_PPC
#ifdef CONFIG_PLATFORM_EC_USBC_PPC
#define CONFIG_USBC_PPC
#endif
#undef CONFIG_USBC_PPC_AOZ1380
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_AOZ1380
#define CONFIG_USBC_PPC_AOZ1380
#endif
#undef CONFIG_USBC_PPC_KTU1125
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_KTU1125
#define CONFIG_USBC_PPC_KTU1125
#endif
#undef CONFIG_USBC_PPC_NX20P3483
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_NX20P3483
#define CONFIG_USBC_PPC_NX20P3483
#endif
#undef CONFIG_USBC_PPC_RT1718S
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_RT1718S
#define CONFIG_USBC_PPC_RT1718S
#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_HV_ILIM
#define CONFIG_SYV682X_HV_ILIM CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_HV_ILIM
#undef CONFIG_USBC_PPC_SYV682X_NO_CC
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_NO_CC
#define CONFIG_USBC_PPC_SYV682X_NO_CC
#endif
#undef CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE
#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE
#define CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE
#endif
#undef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG
#define CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
#endif
#undef CONFIG_USB_MUX_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USB_MUX_RUNTIME_CONFIG
#define CONFIG_USB_MUX_RUNTIME_CONFIG
#endif
#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_USB_PD_DPS
#ifdef CONFIG_PLATFORM_EC_USB_PD_DPS
#define CONFIG_USB_PD_DPS
#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 CONFIG_USBC_RETIMER_INTEL_BB
#endif
#undef CONFIG_USBC_RETIMER_INTEL_HB
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_HB
#define USBC_PORT_C0_HB_RETIMER_I2C_ADDR \
DT_REG_ADDR(DT_NODELABEL(usb_c0_hb_retimer))
#define USBC_PORT_C1_HB_RETIMER_I2C_ADDR \
DT_REG_ADDR(DT_NODELABEL(usb_c1_hb_retimer))
#define USBC_PORT_C2_HB_RETIMER_I2C_ADDR \
DT_REG_ADDR(DT_NODELABEL(usb_c2_hb_retimer))
#define USBC_PORT_C3_HB_RETIMER_I2C_ADDR \
DT_REG_ADDR(DT_NODELABEL(usb_c3_hb_retimer))
#define CONFIG_USBC_RETIMER_INTEL_HB
#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_INTEL_BB_VPRO_CAPABLE
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB_VPRO_CAPABLE
#define CONFIG_USBC_RETIMER_INTEL_BB_VPRO_CAPABLE
#endif
#undef CONFIG_USBC_RETIMER_ANX7451
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_ANX7451
#define CONFIG_USBC_RETIMER_ANX7451
#endif
#undef CONFIG_USBC_RETIMER_ANX7483
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_ANX7483
#define CONFIG_USBC_RETIMER_ANX7483
#endif
#undef CONFIG_USBC_RETIMER_PS8811
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_PS8811
#define CONFIG_USBC_RETIMER_PS8811
#endif
#undef CONFIG_USBC_RETIMER_PS8818
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_PS8818
#define CONFIG_USBC_RETIMER_PS8818
#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_AP_CONTROL
#ifdef CONFIG_PLATFORM_EC_USB_MUX_AP_CONTROL
#define CONFIG_USB_MUX_AP_CONTROL
#endif
#undef CONFIG_USB_MUX_AMD_FP6
#ifdef CONFIG_PLATFORM_EC_USB_MUX_AMD_FP6
#define CONFIG_USB_MUX_AMD_FP6
#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_TUSB546
#ifdef CONFIG_PLATFORM_EC_USB_MUX_TUSB546
#define CONFIG_USB_MUX_TUSB546
#endif
#undef CONFIG_USB_MUX_TUSB1044
#ifdef CONFIG_PLATFORM_EC_USB_MUX_TUSB1044
#define CONFIG_USB_MUX_TUSB1044
#endif
#undef CONFIG_USB_MUX_TUSB1064
#ifdef CONFIG_PLATFORM_EC_USB_MUX_TUSB1064
#define CONFIG_USB_MUX_TUSB1064
#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_USB_PD_TCPM_SBU
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_SBU
#define CONFIG_USB_PD_TCPM_SBU
#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 defined(CONFIG_PLATFORM_EC_MKBP_USE_HOST_EVENT)
#define CONFIG_MKBP_USE_HOST_EVENT
#elif defined(CONFIG_PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT)
#define CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT
#elif defined(CONFIG_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_USB_PD_STARTUP_DELAY_MS
#ifdef CONFIG_PLATFORM_EC_USB_PD_STARTUP_DELAY_MS
#define CONFIG_USB_PD_STARTUP_DELAY_MS \
CONFIG_PLATFORM_EC_USB_PD_STARTUP_DELAY_MS
#endif
#undef CONFIG_USB_PD_3A_PORTS
#ifdef CONFIG_PLATFORM_EC_CONFIG_USB_PD_3A_PORTS
#define CONFIG_USB_PD_3A_PORTS CONFIG_PLATFORM_EC_CONFIG_USB_PD_3A_PORTS
#endif
#undef CONFIG_USB_PD_TEMP_SENSOR
#ifdef CONFIG_PLATFORM_EC_USB_PD_TEMP_SENSOR
#define CONFIG_USB_PD_TEMP_SENSOR CONFIG_PLATFORM_EC_USB_PD_TEMP_SENSOR
#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_EC_MAX_SENSOR_FREQ_MILLIHZ
#ifdef CONFIG_PLATFORM_EC_MAX_SENSOR_FREQ_MILLIHZ
#define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ \
CONFIG_PLATFORM_EC_MAX_SENSOR_FREQ_MILLIHZ
#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_ALS
#undef CONFIG_ALS_COUNT
#if DT_NODE_HAS_PROP(SENSOR_INFO_NODE, als_sensors)
#define CONFIG_ALS
#define ALS_COUNT DT_PROP_LEN(SENSOR_INFO_NODE, als_sensors)
#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_EMULATED_IRQ_EVENT
#ifdef CONFIG_PLATFORM_EC_ALS_TCS3400_EMULATED_IRQ_EVENT
#define CONFIG_ALS_TCS3400_EMULATED_IRQ_EVENT
#endif
#undef CONFIG_ALS_TCS3400
#ifdef CONFIG_PLATFORM_EC_ALS_TCS3400
#define CONFIG_ALS_TCS3400
#endif
#undef CONFIG_ALS_CM32183
#ifdef CONFIG_PLATFORM_EC_ALS_CM32183
#define CONFIG_ALS_CM32183
#endif
#undef CONFIG_ACCELGYRO_ICM426XX
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM426XX
#define CONFIG_ACCELGYRO_ICM426XX
#endif
#undef CONFIG_ACCELGYRO_ICM42607
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM42607
#define CONFIG_ACCELGYRO_ICM42607
#endif
#undef CONFIG_ACCELGYRO_LSM6DSO
#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_LSM6DSO
#define CONFIG_ACCELGYRO_LSM6DSO
#endif
#endif /* CONFIG_PLATFORM_EC_MOTIONSENSE */
#undef CONFIG_MATH_UTIL
#ifdef CONFIG_PLATFORM_EC_MATH_UTIL
#define CONFIG_MATH_UTIL
#endif
#undef CONFIG_MAX695X_SEVEN_SEGMENT_DISPLAY
#ifdef CONFIG_PLATFORM_EC_MAX695X_SEVEN_SEGMENT_DISPLAY
#define CONFIG_MAX695X_SEVEN_SEGMENT_DISPLAY
#define PORT80_I2C_ADDR DT_REG_ADDR(DT_NODELABEL(seven_seg_display))
#endif
#undef CONFIG_CMD_SEVEN_SEG_DISPLAY
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SEVEN_SEGMENT_DISPLAY
#define CONFIG_CMD_SEVEN_SEG_DISPLAY
#endif
#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_PANIC_CONSOLE_OUTPUT
#ifdef CONFIG_PLATFORM_EC_PANIC_CONSOLE_OUTPUT
#define CONFIG_PANIC_CONSOLE_OUTPUT
#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_HOST_COMMAND_STATUS
#ifdef CONFIG_PLATFORM_EC_HOST_COMMAND_STATUS
#define CONFIG_HOST_COMMAND_STATUS
#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_EEPROM_CBI_WP
#ifdef CONFIG_PLATFORM_EC_EEPROM_CBI_WP
#define CONFIG_EEPROM_CBI_WP
#endif
#undef CONFIG_CBI_GPIO
#ifdef CONFIG_PLATFORM_EC_CBI_GPIO
#define CONFIG_CBI_GPIO
#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 CONFIG_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_SCRATCHPAD
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SCRATCHPAD
#define CONFIG_CMD_SCRATCHPAD
#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_EFS2
#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_BQ257X0_ILIM2_VTH_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ257X0_ILIM2_VTH_CUSTOM
#define CONFIG_CHARGER_BQ257X0_ILIM2_VTH_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ257X0_ILIM2_VTH
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ257X0_ILIM2_VTH
#define CONFIG_CHARGER_BQ257X0_ILIM2_VTH \
CONFIG_PLATFORM_EC_CHARGER_BQ257X0_ILIM2_VTH
#endif
#undef CONFIG_CHARGER_BQ25720_VSYS_TH2_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_CUSTOM
#define CONFIG_CHARGER_BQ25720_VSYS_TH2_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25720_VSYS_TH2_DV
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_DV
#define CONFIG_CHARGER_BQ25720_VSYS_TH2_DV \
CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_TH2_DV
#endif
#undef CONFIG_CHARGER_BQ25720_VSYS_UVP_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_UVP_CUSTOM
#define CONFIG_CHARGER_BQ25720_VSYS_UVP_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25720_VSYS_UVP
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_UVP
#define CONFIG_CHARGER_BQ25720_VSYS_UVP \
CONFIG_PLATFORM_EC_CHARGER_BQ25720_VSYS_UVP
#endif
#undef CONFIG_CHARGER_BQ25720_IDCHG_DEG2_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_DEG2_CUSTOM
#define CONFIG_CHARGER_BQ25720_IDCHG_DEG2_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25720_IDCHG_DEG2
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_DEG2
#define CONFIG_CHARGER_BQ25720_IDCHG_DEG2 \
CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_DEG2
#endif
#undef CONFIG_CHARGER_BQ25720_IDCHG_TH2_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_TH2_CUSTOM
#define CONFIG_CHARGER_BQ25720_IDCHG_TH2_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25720_IDCHG_TH2
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_TH2
#define CONFIG_CHARGER_BQ25720_IDCHG_TH2 \
CONFIG_PLATFORM_EC_CHARGER_BQ25720_IDCHG_TH2
#endif
#undef CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_CUSTOM
#define CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_MV
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_MV
#define CONFIG_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_MV \
CONFIG_PLATFORM_EC_CHARGER_BQ25710_VSYS_MIN_VOLTAGE_MV
#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_CHARGER_BQ25710_PSYS_SENSING
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PSYS_SENSING
#define CONFIG_CHARGER_BQ25710_PSYS_SENSING
#endif
#undef CONFIG_CHARGER_BQ25710_CMP_REF_1P2
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_CMP_REF_1P2
#define CONFIG_CHARGER_BQ25710_CMP_REF_1P2
#endif
#undef CONFIG_CHARGER_BQ25710_CMP_POL_EXTERNAL
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_CMP_POL_EXTERNAL
#define CONFIG_CHARGER_BQ25710_CMP_POL_EXTERNAL
#endif
#undef CONFIG_CHARGER_BQ25710_PKPWR_TOVLD_DEG_CUSTOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PKPWR_TOVLD_DEG_CUSTOM
#define CONFIG_CHARGER_BQ25710_PKPWR_TOVLD_DEG_CUSTOM
#endif
#undef CONFIG_CHARGER_BQ25710_PKPWR_TOVLD_DEG
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PKPWR_TOVLD_DEG
#define CONFIG_CHARGER_BQ25710_PKPWR_TOVLD_DEG \
CONFIG_PLATFORM_EC_CHARGER_BQ25710_PKPWR_TOVLD_DEG
#endif
#undef CONFIG_CHARGER_BQ25710_EN_ACOC
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_EN_ACOC
#define CONFIG_CHARGER_BQ25710_EN_ACOC
#endif
#undef CONFIG_CHARGER_BQ25710_ACOC_VTH_1P33
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_ACOC_VTH_1P33
#define CONFIG_CHARGER_BQ25710_ACOC_VTH_1P33
#endif
#undef CONFIG_CHARGER_BQ25710_BATOC_VTH_MINIMUM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_BATOC_VTH_MINIMUM
#define CONFIG_CHARGER_BQ25710_BATOC_VTH_MINIMUM
#endif
#undef CONFIG_CHARGER_BQ25710_SENSE_RESISTOR
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_SENSE_RESISTOR
#define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR \
CONFIG_PLATFORM_EC_CHARGER_BQ25710_SENSE_RESISTOR
#endif
#undef CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_SENSE_RESISTOR_AC
#define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC \
CONFIG_PLATFORM_EC_CHARGER_BQ25710_SENSE_RESISTOR_AC
#endif
#undef CONFIG_CHARGER_BQ25710_PP_INOM
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PP_INOM
#define CONFIG_CHARGER_BQ25710_PP_INOM
#endif
#undef CONFIG_CHARGER_BQ25710_PP_BATPRES
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PP_BATPRES
#define CONFIG_CHARGER_BQ25710_PP_BATPRES
#endif
#undef CONFIG_CHARGER_BQ25710_PP_ACOK
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PP_ACOK
#define CONFIG_CHARGER_BQ25710_PP_ACOK
#endif
#undef CONFIG_CHARGER_BQ25710_PP_COMP
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25710_PP_COMP
#define CONFIG_CHARGER_BQ25710_PP_COMP
#endif
#undef CONFIG_CHARGER_BQ25720_PP_IDCHG2
#ifdef CONFIG_PLATFORM_EC_CHARGER_BQ25720_PP_IDCHG2
#define CONFIG_CHARGER_BQ25720_PP_IDCHG2
#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_PULLUP
#define CONFIG_USB_PD_PULLUP CONFIG_PLATFORM_EC_USB_PD_PULLUP
#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
#define I2C_ADDR_MP2964_FLAGS DT_REG_ADDR(DT_NODELABEL(pmic_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_POWER_COMMON
#ifdef CONFIG_PLATFORM_EC_POWER_COMMON
#define CONFIG_POWER_COMMON
#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_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
#undef CONFIG_TEMP_SENSOR_FIRST_READ_DELAY_MS
#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_FIRST_READ_DELAY
#define CONFIG_TEMP_SENSOR_FIRST_READ_DELAY_MS \
CONFIG_PLATFORM_EC_TEMP_SENSOR_FIRST_READ_DELAY_MS
#endif
#undef CONFIG_CMD_S5_TIMEOUT
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_S5_TIMEOUT
#define CONFIG_CMD_S5_TIMEOUT
#endif
#undef CONFIG_FW_RESET_VECTOR
#ifdef CONFIG_PLATFORM_EC_FW_RESET_VECTOR
#define CONFIG_FW_RESET_VECTOR
#endif
#undef CONFIG_HOSTCMD_DEBUG_MODE
#if defined(CONFIG_HCDEBUG_OFF)
#define CONFIG_HOSTCMD_DEBUG_MODE 0
#elif defined(CONFIG_HCDEBUG_NORMAL)
#define CONFIG_HOSTCMD_DEBUG_MODE 1
#elif defined(CONFIG_HCDEBUG_EVERY)
#define CONFIG_HOSTCMD_DEBUG_MODE 2
#elif defined(CONFIG_HCDEBUG_PARAMS)
#define CONFIG_HOSTCMD_DEBUG_MODE 3
#endif
#undef CONFIG_AMD_SB_RMI
#ifdef CONFIG_PLATFORM_EC_AMD_SB_RMI
#define CONFIG_AMD_SB_RMI
#endif
#undef CONFIG_AMD_STT
#ifdef CONFIG_PLATFORM_EC_AMD_STT
#define CONFIG_AMD_STT
#endif
#ifdef CONFIG_PLATFORM_EC_IOEX_CROS_DRV
#define CONFIG_IO_EXPANDER_SUPPORT_GET_PORT
#endif
#undef CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY
#ifdef CONFIG_PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY
#define CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY
#endif
#undef CONFIG_DEDICATED_CHARGE_PORT_COUNT
#ifdef CONFIG_PLATFORM_EC_DEDICATED_CHARGE_PORT
#define CONFIG_DEDICATED_CHARGE_PORT_COUNT 1
#define DEDICATED_CHARGE_PORT CONFIG_USB_PD_PORT_MAX_COUNT
#else
#define CONFIG_DEDICATED_CHARGE_PORT_COUNT 0
#endif
#undef CONFIG_IO_EXPANDER_CCGXXF
#ifdef CONFIG_PLATFORM_EC_IOEX_CCGXXF
#define CONFIG_IO_EXPANDER_CCGXXF
#endif
#endif /* __CROS_EC_CONFIG_CHIP_H */
|