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
|
# 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.
# TODO(sjg): Not USB-C: perhaps we should have a 'power' thing at the top level?
config PLATFORM_EC_USB_A_PORT_COUNT
int "Number of USB-A ports"
default 0
help
This sets the number of USB-A ports on the device. These ports do
not support USB Power Delivery features but can be used to power
external devices (according to the USB 3 spec, not the Battery Charger
standard) and to charge devices slowly if power is enabled to them.
config PLATFORM_EC_USB_PORT_POWER_DUMB
bool "Simple control of power to USB-A ports"
depends on PLATFORM_EC_USB_A_PORT_COUNT > 0
default y
help
Enable this to provide simple control of the power to USB ports
using GPIOs. To use this your board code must provide a
usb_port_enable[] array with the GPIOs to use for each port. This
implements the EC_CMD_USB_CHARGE_SET_MODE host command and provides
a 'usbchargemode' console command.
config PLATFORM_EC_USB_PORT_POWER_DUMB_CUSTOM_HOOK
bool "Simple control of power to USB-A ports"
depends on PLATFORM_EC_USB_PORT_POWER_DUMB
help
Enable this if your board does not want to use the default S3 hooks
from USB_PORT_POWER_DUMB.
menuconfig PLATFORM_EC_USBC
bool "USB Type-C"
default y if PLATFORM_EC_BATTERY
depends on PLATFORM_EC_MATH_UTIL
help
Enable this to support various USB Type-C features chosen by the
options below. USB-C is widely used on modern Chromebooks and the EC's
role is to negotiate power contracts (for sourcing or sinking power
over USB). The EC is also responsible for discovering the capabilities
of attached USB-C partners and enabling alternate operational modes,
including Display Port, Thunderbolt, and USB4.
if PLATFORM_EC_USBC
config PLATFORM_EC_CHARGER_INPUT_CURRENT
int "Charger input current in mA"
depends on PLATFORM_EC_CHARGE_MANAGER
default 512
help
This is the default input current for the board in mA. Many boards
also use this as the least maximum input current during transients.
This value should depend on external power adapter, designed charging
voltage, and the maximum power of the running system. For type-C
chargers, this should be set to 512 mA in order to not brown-out
low-current USB charge ports in accordance with USB-PD r3.0 Sec. 7.3
menuconfig PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS
bool "Power requirements to boot AP"
default y
help
Power thresholds for AP boot.
If one of the following conditions is met, EC boots AP:
1. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON.
2. AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON.
3. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC
and
AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT.
if PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS
config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
int "Minimal battery level to boot AP without AC"
depends on PLATFORM_EC_BATTERY
default 3
help
Sets the minimum battery capacity, as a percentage, needed to boot
the AP when AC power is not supplied.
config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC
int "Minimal battery level to boot AP with AC"
depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER
default 1
help
Sets the minimum battery capacity, as a percentage, needed to boot
the AP when AC power is supplied. The AC power supplied must also
be greater than CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT.
config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT
int "Minimal AC power to boot AP with battery"
depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER
default 15000
help
Sets the minimum power, in milliwatts, supplied by an external
charger required to boot the AP when the battery capacity is also
above CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC.
config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON
int "Minimal AC power to boot AP without battery"
depends on PLATFORM_EC_CHARGE_MANAGER
default 15000
help
Sets the minimum power, in milliwatts, supplied by an external
charger requires to boot the AP when no battery is present or
under dead battery conditions. If the AP requires greater than
15W to boot, check the
CONFIG_PLATFORM_EC_CHARGER_LIMIT_POWER_THRESH_CHG_MW setting.
endif # PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS
config PLATFORM_EC_USBC_OCP
bool
help
USB-C overcurrent protection: Enable this to detect when a connected
USB-C partner draws too much power from the Chromebook and
automatically shut off power to the USB-C partner.
This should be enabled by drivers which can detect over-current. It
cannot be set otherwise, even in prj.conf
config PLATFORM_EC_USB_PID
hex "USB Product ID"
help
Each platform (e.g. baseboard set) should have a single VID/PID
combination. If there is a big enough change within a platform,
then we can differentiate USB topologies by varying the hardware
version field in the Sink and Source Capabilities Extended messages.
To reserve a new PID within Google, use go/usb and see
http://google3/hardware/standards/usb
config PLATFORM_EC_USB_BCD_DEV
hex "USB Device ID"
default 0
help
This specifies the USB device version, reported by board when acting
as the upstream facing port (UFP). This is a 16-bit unsigned integer
and should be set to a version number relevant to the release version
of the product.
config PLATFORM_EC_USB_VID
hex "USB Vendor ID"
default 0x18d1
help
This specifies the USB vendor ID used for boards which expose a
USB endpont when the port is in UFP mode. The default value is
set to Google's assigned VID and typically would not need to be
changed. But, in certain cases this may need to be changed to
match an OEM's vendor ID.
config PLATFORM_EC_USB_MS_EXTENDED_COMPAT_ID_DESCRIPTOR
bool "USB MS Extended Compat ID Feature Descriptor"
help
This enables USB-EP to contain a MS Windows USB string descriptor
which is then used by MS Windows to request a Extended Compatible
ID Feature descriptor so that Windows will know to load its WINUSB
driver.
config PLATFORM_EC_USBC_RETIMER_INTEL_BB
bool "Support Intel Burnside Bridge retimer"
help
Enable this to support the Intel Burnside Bridge Thunderbolt / USB /
DisplayPort retimer.
Intel Burnside Bridge is a Type-C multi-protocol retimer to be used
in on-board applications. Burnside Bridge offers the ability to latch
protocol signals into on-chip memory before retransmitting them
onwards. It can be used to extend the physical length of the system
without increasing high-frequency jitter.
Burnside Bridge supports spec compliant retimer of following
protocols:
- Display Port: four unidirectional DP lanes
- USB3.1 Gen1/2: one bi-directional USB lane
- Thunderbolt: two bi-directional CIO lanes
- Multifunction Display (MFD): two unidirectional lanes of DP and
one bidirectional lane of USB3.1 Gen1/2
config PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
bool "Use runtime configuration of Intel Burnside Bridge"
depends on PLATFORM_EC_USBC_RETIMER_INTEL_BB
default y
help
Enable this to allow run-time configuration of the Burnside Bridge
driver structure. This makes the bb_controls[] array writable, i.e.
not const. It should be declared as such in the board config.
This is useful when the board has runtime information that changes
the configuration, such as Chromium OS Board Info (CBI set in the
factory. Without this, multiple EC images would need to be installed
depending on the board.
config PLATFORM_EC_USBC_RETIMER_ANX7451
bool "Support Analogix ANX7451 10G Active Mux and Retimer"
help
ANX7451 is a 4x4 re-timing mux capable of switching DisplayPort (DP)
and USB3.2 Gen 2 10Gbps signals to support a single USB Type-C port.
ANX7451 has built-in re-timers to recover both the USB and DP signals
with loss compensation of 23dB for USB and up to 27dB for DP.
config PLATFORM_EC_USBC_RETIMER_PS8811
bool "Support Parade PS8811 Single Port USB 3.1 Gen 2 10G Retimer"
help
The PS8811 is a one-port bidirectional USB 3.1 Gen 2 retimer that
integrates the UniEye equalizer and a retimer to re-condition USB 3.1
signals for long media link applications. It supports USB 3.1 Gen 2
with operation speed up to 10Gbps as well as Gen 1 operation at 5Gbps.
config PLATFORM_EC_USBC_RETIMER_PS8818
bool "Parade PS8818 USB Type-C Retimer for USB and DP Alternate Mode"
help
PS8818 is a 10Gbps retimer for Type-C applications with the
integrated USB3.1 and DisplayPort alternate mode port.
config PLATFORM_EC_USBC_RETIMER_KB800X
bool "Enable KB800X retimer"
help
The KB8001 is a Universal Serial Bus (USB) Type-C 40 Gb/s multiprotocol
switch and bidirectional Bit-Level Retimer (BLR) which supports:
- Display Port: four unidirectional DP lanes
- USB3.1 Gen1/2: one bi-directional USB lane
- USB4/Thunderbolt: two bi-directional CIO lanes
- Multifunction Display (MFD): two unidirectional lanes of DP and
one bidirectional lane of USB3.1 Gen1/2
config PLATFORM_EC_KB800X_CUSTOM_XBAR
bool "Use custom remapping of HSIO XBAR"
depends on PLATFORM_EC_USBC_RETIMER_KB800X
default n
help
Enable this to allow using a custom crossbar configuration for the HSIO
lanes.
menuconfig PLATFORM_EC_USB_POWER_DELIVERY
bool "USB Type-C Power Delivery (PD)"
default y
select HAS_TASK_PD_C0
help
USB has always provided basic power to an attached peripheral. USB-C
PD is part of the USB 3.0 standard and allows a lot more functionality
than the basic 500mA @ 5V. It allows negotiating power delivery over
the USB cable to select voltages up to 20V with current up to 5A.
This option also enables the Type-C Port Manager (TCPM) on the EC. The
TCPM deals with the various state changes in the system as devices are
plugged and unplugged, as well as changes in power requirements from
those devices.
if PLATFORM_EC_USB_POWER_DELIVERY
menuconfig PLATFORM_EC_USB_PD_INT_SHARED
bool "USB-C ports share PD interrupts"
select HAS_TASK_PD_INT_SHARED
help
This enables processing of shared interrupts where multiple ports
share a single IRQ on the EC. Only one shared IRQ is supported,
but any combination of ports can be serviced by that one IRQ.
if PLATFORM_EC_USB_PD_INT_SHARED
config PLATFORM_EC_USB_PD_PORT_0_SHARED
bool "Port 0 IRQ is shared"
help
Enable handling of port 0 PD interrupts signalled by an IRQ that is
shared by every other port enabled in this section.
config PLATFORM_EC_USB_PD_PORT_1_SHARED
bool "Port 1 IRQ is shared"
depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1
help
Enable handling of port 1 PD interrupts signalled by an IRQ that is
shared by every other port enabled in this section.
config PLATFORM_EC_USB_PD_PORT_2_SHARED
bool "Port 2 IRQ is shared"
depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 2
help
Enable handling of port 2 PD interrupts signalled by an IRQ that is
shared by every other port enabled in this section.
config PLATFORM_EC_USB_PD_PORT_3_SHARED
bool "Port 3 IRQ is shared"
depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 3
help
Enable handling of port 3 PD interrupts signalled by an IRQ that is
shared by every other port enabled in this section.
endif # PLATFORM_EC_USB_PD_INT_SHARED
config PLATFORM_EC_USB_PD_HOST_CMD
bool "Host commands related to USB Power Delivery"
default y
help
This enables host commands which allow finding out the capabilities
of USB PD, checking is status and controlling how it operates. For
devices which support firmware update, this is provided as well,
with the firmware being sent from the AP.
config PLATFORM_EC_USB_PD_PORT_MAX_COUNT
int "Maximum number of USB PD ports supported"
default 2
help
This sets the limit on the number of PD ports supported on the
device. This is used to set the size for tables used by devices.
TODO(b/176237074): Can we calculate this from the devicetree at some
point? Or update the sn5S330 driver to use an 8-bit flag byte for
source_enabled[] so that plenty of ports are supported without this
configuration option?
config PLATFORM_EC_CONSOLE_CMD_MFALLOW
bool "Console command: mfallow"
default y
help
Controls whether multi-function support is allowed for DP (Display
Port) connections. Default setting allows multi-function support when
the attached device also supports multi-function mode.
mfallow <port> [true | false]
config PLATFORM_EC_CONSOLE_CMD_PD
bool "Console command: pd"
default y
help
Provides information about the current USB Power Delivery state and
also allows various changes to be made for testing purposes.
It has a number of subcommands:
pd dump <n> - sets the debug level (0-3). This affects all layers
of the stack
pd trysrc [0/1/2] - prints or sets the Try.SRC override. Use 0 to
force Try.SRC off, 1 to force Try.SRC on, and 2 to
let USB PD stack control the Try.SRC behavior.
pd version - show PD version in use
pd <port> state - show start for a PD port
Ssee usb_pd_console.c for full details including various commands
for role swap, reset, enable/disable, requesting SNK or SRC, etc.
config PLATFORM_EC_USB_PD_DEBUG_FIXED_LEVEL
bool "USB Power Delivery debug level is fixed at build time"
help
Enable this to set the debug level to a fixed value in the build.
This saves space but means that the level cannot be changed using
commands like 'pd dump'. Typically this should be set when a platform
is shipped.
config PLATFORM_EC_USB_PD_DEBUG_LEVEL
int "Debug level to use"
depends on PLATFORM_EC_USB_PD_DEBUG_FIXED_LEVEL
help
Sets the value of the debug level to use. If this is 0 then no
debugging output is available from the USB Power Delivery stack.
The meaning of each level depends on the module in question, but
the maximum available level is 3.
config PLATFORM_EC_USB_PD_5V_EN_CUSTOM
bool "Custom method of detecting VBUS"
help
Enable this if your board needs a custom method to determine if VBUS
is enabled on a source port. You must provide an implementation of:
int board_is_sourcing_vbus(int port)
It should return 0 if not sourcing VBUS on that port and non-zero
if sourcing.
config PLATFORM_EC_USB_PD_5V_CHARGER_CTRL
bool "Ask charger if VBUS is enabled on a source port"
help
Enable this if the charger controls VBUS on a source port.
The function charger_is_sourcing_otg_power is called
to determine if VBUS is enabled on the source port.
choice "Measuring VBUS voltage"
prompt "Select how VBUS voltage is measured"
config PLATFORM_EC_USB_PD_VBUS_MEASURE_NOT_PRESENT
bool "VBUS voltage cannot be read"
help
Enable this if the board does not provide any mechanism for the EC to
read the analog VBUS voltage.
config PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER
bool "On-board charger supports VBUS measurement"
help
Enable this if the VBUS voltage can be read using a charger on the
board.
config PLATFORM_EC_USB_PD_VBUS_MEASURE_TCPC
bool "Type-C Port Controller supports VBUS measurement"
help
Enable this if the VBUS voltage can be read using the on-board
TCPC.
config PLATFORM_EC_USB_PD_VBUS_MEASURE_ADC_EACH_PORT
bool "VBUS on each port is measured using an ADC channel"
help
Enable this if there is a separate ADC channel for each USB-C VBUS
voltage.
config PLATFORM_EC_USB_PD_VBUS_MEASURE_BY_BOARD
bool "VBUS on each port is measured per board specific"
help
Enable this if there are different VBUS measurement approaches on
the board, and also `board_get_vbus_voltage()` has to be implemented.
endchoice # Measuring VBUS voltage
config PLATFORM_EC_USBC_VCONN
bool "Support USB Type-C VCONN"
default y
help
This enables support for USB Type-C connector voltage (VCONN). This
option must be enabled to communicate with electronically marked
(E-Mark) cables. This option is required for operation with USB4 and
Thunderbolt devices.
This is not needed for captive cables.
config PLATFORM_EC_USB_PD_DUAL_ROLE
bool "Board can act as a dual-role Power Delivery port"
default y
help
This enables support for switching between source and sink during
operation. This means that the port can accept power (e.g. to charge
up its battery), or send out power to an attached device on the same
port.
config PLATFORM_EC_USB_PD_FRS
bool "Support Fast Role Swap protocol"
help
Enables the protocol side of Fast Role Swap (FRS). This allows the
device to switch from a SNK to a SRC (or vice versa) based on
communication with the partner device.
For this to work the trigger must be implemented in either the
Type-C Port Controller (TCPC) or Power Path Controller (PPC).
FRS differs from the traditional power-role swap in that FRS
guarantees there is no interruption of power nor disruption of data
communication to any downstream devices (such as devices connected
to a USB-C hub or dock).
if PLATFORM_EC_USB_PD_FRS
choice "Trigger implementation"
prompt "Select where the trigger is implemented"
help
The Fast Role Swap (protocol requires that a trigger be implemented to
initiate the swap. Use this option to select which of the available
options should be used.
config PLATFORM_EC_USB_PD_FRS_PPC
bool "PPC"
depends on PLATFORM_EC_USBC_PPC
help
Enable this if the Fast Role Swap trigger is implemented in the
Power Path Controller (PPC).
config PLATFORM_EC_USB_PD_FRS_TCPC
bool "TCPC"
help
Enable this if the Fast Role Swap trigger is implemented in the
Type-C Port Controller (TCPC).
endchoice # Trigger implementation
endif # PLATFORM_EC_USB_PD_FRS
config PLATFORM_EC_USB_PD_DPS
bool "Board can support Dynamic PDO Selection"
depends on PLATFORM_EC_BATTERY
default n
help
Enable this if the board needs dynamic PDO selection.
DPS picks a power efficient PDO regarding to the underlying battery
configuration and the system loading.
Default configuration can be overrided by `dps_config` to adapt
to each board's need.
config PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE
bool "Board can use TCPC-controlled DRP toggle"
depends on PLATFORM_EC_USB_PD_DUAL_ROLE
default y
help
Enable this if the USB Type-C Port Controllers (TCPC) used on the
board supports toggling of the power role autonomously. When this is
disabled, the USB power delivery task is responsible for manually
toggling the power role.
config PLATFORM_EC_USB_PD_DISCHARGE
bool "Board can discharge VBUS"
default y
help
Enable this if the board can enable VBUS discharge (eg. through a
GPIO-controlled discharge circuit, or through port controller
registers) to discharge VBUS rapidly on disconnect
choice "Discharge method"
prompt "Select the discharge method"
depends on PLATFORM_EC_USB_PD_DISCHARGE
config PLATFORM_EC_USB_PD_DISCHARGE_GPIO
bool "GPIO control"
help
Enable this if the discharge circuit is controlled by a GPIO
TODO: How to specify the GPIO?
config PLATFORM_EC_USB_PD_DISCHARGE_TCPC
bool "Discharge circuit is provided by the TCPC"
help
Enable this if the discharge circuit is provided by Power-Delivery
resistors on the USB Type-C Port Controller (TCPC).
config PLATFORM_EC_USB_PD_DISCHARGE_PPC
bool "Discharge circuit is provided by the PPC"
help
Enable this if the discharge circuit is using Power Delivery
resistors on the Power Path Controller.
endchoice # Discharge method
config PLATFORM_EC_USB_PD_REV30
bool "USB PD Rev3.0 functionality"
default y
help
Enable this to allow Rev3.0 functionality, including features such as
Fast Role Swap, advertising the available power across all ports of a
multi-port charger, and USB4. If disabled, only USB Power Delivery
Rev2.0 functionality is supported.
This defaults to y because PD Rev3.0 is required for USB4
functionality.
config PLATFORM_EC_USB_PD_ALT_MODE
bool "USB Power Delivery alternate mode"
default y
help
Enable this to support USB PD alternate mode. This allows negotiation
of a different mode of operation to allow non-USB traffic to pass over
a USB Type-C link. This makes use of some or all of the USB 3.0 bus
differential pairs. If all are used for the alternate mode, then USB
transmission is not available at all while in this mode.
config PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY
bool "USB Power delivery requires AP to enter alternate modes"
depends on PLATFORM_EC_USB_PD_ALT_MODE
help
Do not enter USB PD alternate modes or USB4 automatically, Wait for
the AP to direct the EC to enter a mode. This requires AP software
support.
config PLATFORM_EC_USB_PD_ALT_MODE_DFP
bool "Downward Facing Port support"
default y
help
Enable support for USB Power Delivery alternate mode of Downward
Facing Port.
TODO: Add more help here
config PLATFORM_EC_USB_PD_ALT_MODE_UFP
bool "Upward Facing Port support"
help
Enable support for USB Power Delivery alternate mode of Upward
Facing Port (UFP).
By default, Chromium OS only enables alternate modes (Display Port,
USB4, Thuderbolt, etc) when the USB data role resolves to the
Downstream Facing Port (DFP) role. Enable this option to support
USB4 and ThunderBolt operation when the Chromium OS data role
resolves to the UFP role.
config PLATFORM_EC_USB_PD_USB32_DRD
bool "Port is cable of operating as an USB3.2 device"
default y
help
Enable this if the board's USB Power Delivery Downward Facing Port is
able to support the USB3.2 standard. This is advertised to the
other end so that it can potentially take advantage of the additional
features available.
config PLATFORM_EC_USB_PD_DP_HPD_GPIO
bool "Hotplug Detect (HPD) is controlled by an EC GPIO"
help
Enable this if the EC must send the Hotplug Detect (HPD) signal to
the DisplayPort Graphics Processing Unit (GPU) via a GPIO. Otherwise
this is sent by the display device.
config PLATFORM_EC_USB_PD_DP_HPD_GPIO_CUSTOM
bool "Custom handling of HPD GPIO"
depends on PLATFORM_EC_USB_PD_DP_HPD_GPIO
help
Enable this if the Hotplug Detect (HPD) GPIO level has to be handled
by custom functions. In this case your board must implement a
function to enable the feature for a port and another function to
check the current state:
void svdm_set_hpd_gpio(int port, int enable);
int svdm_get_hpd_gpio(int port);
config PLATFORM_EC_USB_PD_DATA_RESET_MSG
bool "Enable the PD Data Reset Message."
depends on PLATFORM_EC_USB_PD_REV30
help
Enable this to support the Data Reset PD message flows. This is
mandatory for products supporting USB4 but optional for other PD 3.0
products.
choice PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
prompt "Select the method to detect VBUS"
default PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
config PLATFORM_EC_USB_PD_VBUS_DETECT_NONE
bool "No way to detect VBUS"
help
Choose this option if it is not possible to detect VBUS. This causes
the `check_vbus_level` function pointer in the driver struct to be NULL.
config PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC
bool "TCPC detects VBUS"
help
Choose this option if the TCPC can detect the presence of VBUS
config PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER
bool "Charger detects VBUS"
help
Choose this option if the battery charger can detect the presence
of VBUS
config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
bool "PPC detects VBUS"
help
Choose this option if the Power-Path Controller (PPC) can detect the
presence of VBUS
endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
config PLATFORM_EC_USB_TYPEC_SM
bool "Type-C (TC) physical-layer state machine"
default y
help
This enables the bottom layer of the TCPMv2 state machine which
handles using CC lines to set the voltage-level of the power supplied.
You should normally define this unless you want to override it in your
board code, which is not recommended.
config PLATFORM_EC_USB_PRL_SM
bool "Protocol layer (PRL) state machine"
default y
help
This enables the middle layer of the power-delivery (PD) protocol,
which deals with the flow of power messages across the USB Type-C
interface. You should normally define this unless you want to override
it in your board code, which is not recommended.
config PLATFORM_EC_USB_PE_SM
bool "Policy engine (PE) state machine"
default y
help
This enables the top layer of the power-delivery (PD) protocol, which
deals with the actually PD messages that are exchanged with attached
USB devices. You should normally define this unless you want to
override it in your board code, which is not recommended.
config PLATFORM_EC_USB_PD_DECODE_SOP
def_bool y # Required for TCPMV2
help
This enables support for encoding of the message's Start Of Packet
(SOP, SOP' and SOP'', collectively called SOP*) in bits 31-28 of the
32-bit msg header type.
config PLATFORM_EC_HOSTCMD_PD_CONTROL
bool "Host command: EC_CMD_PD_CONTROL"
default y
help
Enable the EC_CMD_PD_CONTROL host command. This allows control
of the USB-PD chip from the AP, including reset, suspend/resume
and enabling power.
This host command can be manually executed using the
"ectool pdcontrol" command from the Chromium OS shell.
config PLATFORM_EC_USB_PD_LOGGING
bool "Host command: EC_CMD_PD_GET_LOG_ENTRY"
help
Enable logging of USB Power Delivery events. The AP can request the
log to see what has happened recently.
The log events are stored in a circular buffer, each one being a
struct event_log_entry.
menuconfig PLATFORM_EC_USB_PD_CONSOLE_CMD
bool "Enable USB PD console commands"
default y if PLATFORM_EC_USB_PD_ALT_MODE_DFP
help
Enables various USB-C PD related console commands.
if PLATFORM_EC_USB_PD_CONSOLE_CMD
config PLATFORM_EC_CONSOLE_CMD_USB_PD_PE
bool "Console command: pe"
default y
help
This command dumps information about the USB PD alternate mode options
discovered from the partner device. It can be useful for debugging.
Example: pe 1 dump
IDENT SOP:
[ID Header] 2c000bda :: AMA, VID:0bda
[Cert Stat] 00000000
[2] 00000209 [3] 11000f09
IDENT SOP':
[ID Header] 1c000489 :: PCable, VID:0489
[Cert Stat] 000001c6
[2] f6810000 [3] 11082051
SVID[0]: ff01 MODES: [1] 000c0045
MODE[1]: svid:ff01 caps:000c0045
config PLATFORM_EC_CONSOLE_CMD_USB_PD_CABLE
bool "Console command: pdcable"
default y
help
This commands shows the USB cable charactistics as detected from the
device. It can be useful for debugging problems with cables and the
device's response to them.
Example: pdcable 1
Cable Type: Passive
Cable Rev: 1.0
Connector Type: 2
Cable Current: 5A
USB Superspeed Signaling support: 1
Rounded support: No
Optical cable: No
Retimer support: No
Link training: Bi-directional
Thunderbolt cable type: Passive
endif # PLATFORM_EC_USB_PD_CONSOLE_CMD
choice "USB-C device type"
prompt "Select the USB-C device type"
default PLATFORM_EC_USB_DRP_ACC_TRYSRC
config PLATFORM_EC_USB_VPD
bool "VCONN-Powered Device"
help
This enables support for supplying power to devices that accept power
over the USB VCONN line.
See here for details:
https://www.usb.org/sites/default/files/D1T2-3a%20-%20CTVPDs%20and%20Making%20Your%20Own%20USB-C%20Thingamajig.pdf
config PLATFORM_EC_USB_CTVPD
bool "Charge-Through VCONN-Powered Device"
help
This enables support for supplying power to devices, with a circuit
that deals with this without needing the involvement of the main
device.
config PLATFORM_EC_USB_DRP_ACC_TRYSRC
bool "Dual-Role Port, Audio Accessory, and Try.SRC Device"
help
This is the most flexible option, allowing the port to operate in
a dual-role capacity, so that power can be accepted or supplied on
a port.
endchoice # USB-C device type
config PLATFORM_EC_USB_PD_TRY_SRC
bool "Enable Try.SRC mode"
depends on PLATFORM_EC_USB_DRP_ACC_TRYSRC
default y
help
This enables Try.SRC mode so that the board will try to be a source
for power if the other end offers both options. This can be useful
for laptops, for example, since when attaching to a cellphone we want
the laptop to charge the phone, not vice versa.
config PLATFORM_EC_USB_PD_USB4
bool "USB4 support"
depends on PLATFORM_EC_USB_PD_REV30
default y
help
This enables support for entering into USB4 mode between two port
partners. The provides new features such as higher speeds and more
flexible multiplexing of data on the cable for different purposes,
e.g. attaching multiple displays and storage devices on the same bus.
config PLATFORM_EC_USB_PD_TBT_COMPAT_MODE
bool "Thunderbolt-compatible mode support"
depends on PLATFORM_EC_USB_PD_REV30
default y
help
Enable this to allow entering into Thunderbolt-compatible mode between
two port partners. This does not require that USB4 mode be enabled.
endif # PLATFORM_EC_USB_POWER_DELIVERY
menuconfig PLATFORM_EC_USBC_PPC
bool "USB Type-C Power Path Controller"
default y
help
Enable this to support the USB Type-C PPC on your board. This enables
common routines for things like figuring out whether power is being
supplied to the Chromebook over USB-C, whether the Chromebook is
supplying power to another device, etc.
if PLATFORM_EC_USBC_PPC
config PLATFORM_EC_USBC_PPC_POLARITY
bool
help
Enable this if a Power Path Controller needs to be informed of
the polarity of the Configuration Channel (CC) pins. This can change
depending on which way up the USB-C cable is inserted into the
device.
This should be enabled by drivers which can detect this. It cannot be
set otherwise, even in prj.conf
config PLATFORM_EC_USBC_PPC_SBU
bool
help
Enable this if a Power Path Controller is capable of gating the
Sideband Use (SBU) lines. If so, the USB mux will use this feature
to isolate the lines before entering into alternate mode.
This should be enabled by drivers which can detect this. It cannot be
set otherwise, even in prj.conf
config PLATFORM_EC_USBC_PPC_VCONN
bool
depends on PLATFORM_EC_USBC_VCONN
help
Enable this if a Power Path Controller is capable of providing
VCONN. If so, the USB stack will enable / disable VCONN as needed.
This should be enabled by drivers which can detect this. It cannot be
set otherwise, even in prj.conf
Note: This may not be true, as there may be scenarios where the board
might need to disable this feature (for instance when both the PPC and
TCPC can supply VCONN). We can cross that bridge when we come to it.
config PLATFORM_EC_USBC_PPC_AOZ1380
bool "Alpha & Omega USB Type-C PD Sink and Source Protection Switch"
select PLATFORM_EC_USBC_OCP
help
AOZ1380DI integrates two power switches and control circuitry to
provide all the functionality and protection needed for sourcing
and sinking current through a USB Type-C port with PD capability.
config PLATFORM_EC_USBC_PPC_RT1718S
bool "Richtek RT1718S TCPC/PPC"
select PLATFORM_EC_USB_PD_TCPM_RT1718S
select PLATFORM_EC_USBC_OCP
select PLATFORM_EC_USBC_PPC_POLARITY
select PLATFORM_EC_USBC_PPC_SBU
select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN
help
RT1718S integrates several high voltage protection switch of
SBU1/SBU2/DP/DM from high voltage VBUS touching the adjacent pins. The
AMR of SBU OVP switch is 24V. High Voltage USB 2.0 Switches also
support HV DCP & fast charging protocols. The GPIOs in RT1718S can
be also configured to control system block such as USB3.0 to DP Mux
for alternated mode usage. VCONN Switch with OVP/OCP/RVP/RCP/UVP
protection is also integrated.
config PLATFORM_EC_USBC_PPC_KTU1125
bool "Kinetic KTU1125 Power Path Controller"
select PLATFORM_EC_USBC_OCP
help
KTU1125 integrates power switches to provide a compact protection
solution to USB Type-C applications by eliminating the dependence
on external components.
config PLATFORM_EC_USBC_PPC_NX20P3483
bool "NX20P3483 High Voltage Sink/Source Combo Switch"
select PLATFORM_EC_USBC_OCP
help
The NX20P3483 is a product with combined multiple power switches
and a LDO for USB PD application.
config PLATFORM_EC_USBC_PPC_SN5S330
bool "TI SN5S330 PD 3.0 power mux"
select PLATFORM_EC_USBC_OCP
select PLATFORM_EC_USBC_PPC_POLARITY
select PLATFORM_EC_USBC_PPC_SBU
select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN
help
This is a USB Type-C Power Delivery 3.0 Bidirectional Power Mux with
CC and SBU short-to-VBUS Protection and Integrated Dead Battery
LDO. This chips provides protection against pins shorting to Vbus as
well as ESD (Electostatic discharge) protection. It provides a simple
I2C interface for for Mode Selection, Fast Role Swap, and Fault
Reporting.
config PLATFORM_EC_USBC_PPC_SYV682X
bool "SYV682X which is a Power Mux for USB PD"
select PLATFORM_EC_USBC_OCP
select PLATFORM_EC_USBC_PPC_POLARITY
select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN
help
The SYV682A is a 2 to 1 power mux switch for USB PD applications. The
SYV682A supports dead battery wake up function and Fast Role Swap
features. It provides protection against overcurrent, overvoltage,
thermal shutdown, and undervoltage conditions.
config PLATFORM_EC_USBC_PPC_SYV682C
bool "SYV682C Power Mux for USB PD (subset of SYV682X)"
depends on PLATFORM_EC_USBC_PPC_SYV682X
help
The C version of this chip won't block I2C accessing to the CONTROL4
rer (to on/off Vconn) when smart discahrge is enabled. This allows us
to re-enable the smart discharge on boards using SYV682C.
config PLATFORM_EC_USBC_PPC_SYV682X_HV_ILIM
int "SYV682X high-voltage current limit"
depends on PLATFORM_EC_USBC_PPC_SYV682X
default 2
help
SYV682x PPC high voltage power path current limit. Valid values are
0 (1.25A), 1 (1.75A), 2 (3.3A), or 3 (5.5A). See syv682x.h.
config PLATFORM_EC_USBC_PPC_SYV682X_NO_CC
bool "SYV682X does not pass through CC"
help
Enable this if a SYV682X does not pass through CC.
There is a 3.6V limit on the HOST_CC signals, so the TCPC
should not source 5V VCONN. This config determines if
sourcing VCONN should be enabled by default.
config PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE
bool "Enable smart discharge on the SYV682X PPC"
help
Enable the smart discharge feature on VBUS provided by the SYV682x
PPC. This should be enabled for revision C and above of the SYV682X.
Earlier revisions of the chip block I2C transactions during smart
discharge, causing USB PD compliance issues.
config PLATFORM_EC_USBC_PPC_DEDICATED_INT
bool "Power Power Controller has a dedicated interrupt pin"
help
Enable this if the Power Power Controller (PPC) has level interrupts
(as opposed to edge) and a dedicated interrupt pin to check the
current state.
If this is enabled the USB Power Delivery (PD) stack will call
ppc_get_alert_status() to find out he interrupt status for a port.
This function should be provided by the board code.
endif # PLATFORM_EC_USBC_PPC
config PLATFORM_EC_USB_PD_TCPC_LOW_POWER
bool "Allow Type-C Port Controller to enter low-power mode"
default y
help
Allows entry to a low power mode when the USB port is idle.
When enabled, an enter_low_power_mode member is present in tcpm_drv
and should be set to a function that selects that mode, such as
tcpci_enter_low_power_mode() for TCPCI-compatible TCPCs.
config PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US
int "Debounce delay when exiting low-power mode (uS)"
depends on PLATFORM_EC_USB_PD_TCPC_LOW_POWER
default 25000
help
Some TCPCs need additional time following a VBUS change to internally
debounce the CC line status and update the CC_STATUS register. This
is the delay in microseconds to allow before checking the CC line
status in the EC.
config PLATFORM_EC_USB_PD_TCPC_VCONN
bool "If VCONN is enabled, the TCPC will provide VCONN"
default y if !PLATFORM_EC_USBC_PPC_SYV682X
default y if PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
default y if PLATFORM_EC_USBC_PPC_SYV682X_NO_CC
help
Source USB Type-C connector voltage (VCONN) from the Type-C Port
Controller (TCPC), and also the Power Path Controller (PPC) if
present. Some TCPC/PPC can't handle 5V on its host-side CC pins, so
disable this config in those cases.
choice "Type-C Port Manager (TCPM)"
prompt "Choose a Type-C Port Manager (TCPM) to manage TCPC"
config PLATFORM_EC_USB_PD_TCPM_TCPCI
bool "Use TCPCI"
select PLATFORM_EC_USBC_OCP
help
Enable a TCPC compatible with the Type-C Port Controller Interface
(TCPCI) Specification. This driver supports both Rev1 v1.2 and Rev2
v1.0 of the TCPCI specification. Select this driver directly only
if your specific TCPC chip is not listed as a separate config option.
Note: most of the TCPC will depend on PLATFORM_EC_USB_PD_TCPM_TCPCI.
# TODO: Add other choices:
# CONFIG_USB_PD_TCPM_STUB
# CONFIG_USB_PD_TCPM_FUSB302
# CONFIG_USB_PD_TCPM_ANX3429
# CONFIG_USB_PD_TCPM_ANX740X
# CONFIG_USB_PD_TCPM_ANX741X
# CONFIG_USB_PD_TCPM_ANX7688
# CONFIG_USB_PD_TCPM_MT6370
# CONFIG_USB_PD_TCPM_FUSB307
# CONFIG_USB_PD_TCPM_STM32GX
# CONFIG_USB_PD_TCPM_CCGXXF
endchoice # Type-C Port Manager (TCPM)
menuconfig PLATFORM_EC_USB_MUX
bool "USB muxes"
default y
help
Enables support for USB muxes. These allow multiplexing
if PLATFORM_EC_USB_MUX
config PLATFORM_EC_USB_MUX_AMD_FP6
bool "AMD FP6 integrated mux"
help
Integrated AMD FP6 mux for USB and DP. Mux control happens over
an i2c channel.
config PLATFORM_EC_USB_MUX_IT5205
bool "ITE IT5205 USB Type-C 3:2 Alternative mode passive mux"
help
This is a USB Type-C 3:2 Alternative mode mux, supporting USB 3.1
Gen 2 10Gbps as well as DisplayPort (DP1.4) at 8Gbps. It provides a
cross-point mux for low-speed Side-Band-Use (SBU) pins. The mux can
be controlled via I2C.
config PLATFORM_EC_USB_MUX_PS8743
bool "Parade PS8743 USB-C Host Switch with redriver"
help
This is a Parade USB 3.1 Gen 1 / DisplayPort (DP) Alt Mode
High-Bit-Rate 2 (HBR2) redriver. It provides control of switching
modes through either GPIO or I2C.
config PLATFORM_EC_USB_MUX_TUSB1044
bool "TI TUSB1044 USB-C 10 Gbps Linear Redriver"
help
This is a USB Type-C Alt Mode redriver. This supports USB 3.1
Gen 2 and DisplayPort 1.4 as Alternate Mode. It Provides GPIO and
I2C Control for Channel Direction and Equalization.
endif
config PLATFORM_EC_USBC_SS_MUX
bool "SuperSpeed mux"
default y
help
Enable this to support the USB Type-C SuperSpeed Mux. If enabled,
the USB stack will call usb_mux_set() to change the mux settings.
The board must provide a driver in usb_muxes[] for each port so
that this can work.
if PLATFORM_EC_USBC_SS_MUX
config PLATFORM_EC_USB_MUX_RUNTIME_CONFIG
bool "USB mux runtime config"
default y
help
Allows the configuration of the USB mux to be set up at runtime. This
makes the usb_muxes[] array writable, i.e. not const. It should be
declared as such in the board config.
This is useful when the board has runtime information that changes
the configuration, such as Chromium OS Board Info (CBI set in the
factory. Without this, multiple EC images would need to be installed
depending on the board.
config PLATFORM_EC_USBC_SS_MUX_DFP_ONLY
bool "Use SuperSpeed mux only when DFP"
help
Only configure the USB Type-C SuperSpeed Mux when a port is a
Downstream Facing Port (DFP). This is needed for chipsets which
don't support being an Upstream Facing Port UFP).
config PLATFORM_EC_USB_MUX_VIRTUAL
bool "USB Mux is virtual"
depends on PLATFORM_EC_USBC_SS_MUX
help
Enable this if a virtual USB mux is supported on the EC, which is
actually handled by the AP. In this case the AP gets an interrupt
and is is informed when status changes, via the
EC_CMD_USB_PD_MUX_INFO host command.
config PLATFORM_EC_USBC_RETIMER_FW_UPDATE
bool "Support firmware update of USB Type-C retimers"
default y
depends on PLATFORM_EC_USBC_SS_MUX
help
Enable this to support USB Type-C retimer firmware update. Each
Type-C retimer indicates its capability of supporting firmware update
independently in its usb_mux_driver.
During AP boot-up, the AP scans each PD port for retimers but only
if there are no Type-C devices attached to the port. The firmware
update can only be performed on retimers which show up in the AP
thunderbolt device entries.
endif # PLATFORM_EC_USBC_SS_MUX
config PLATFORM_EC_CONSOLE_CMD_PPC_DUMP
bool "Console command: ppc_dump"
depends on PLATFORM_EC_USBC_PPC
default y
help
Allows dumping of the Power Path Controller (PPC) state, which is
basically a list of registers and their values. The actual dump
function is driver-specific (the reg_dump member of ppc_drv). By
reference to the datasheet for the part this can help you figure out
what is going on.
if PLATFORM_EC_USB_PD_TCPM_TCPCI
config PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
bool "Use on-chip ITE"
help
Use the ITE-series TCPM driver built into the EC chip.
This is selected by the ITE USB Type-C drivers. It cannot be set
otherwise, even in prj.conf
config PLATFORM_EC_USB_PD_ITE_ACTIVE_PORT_COUNT
int "Number of ITE USB PD active ports"
depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
default 1
help
This sets the number of active USB Power Delivery (USB PD) ports
in use on the ITE microcontroller. The active port usage should
follow the order of ITE TCPC port index.
config PLATFORM_EC_USB_PD_PPC
bool "Enable Power Path Control from PD"
default n
help
Some PD chips have integrated SRC FET and control the SRC/SINK FET
from internal GPIOs. Enable this if the Power Path Control is
controlled by the PD chip without EC GPIOs.
config PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG
bool "Type-C Port Controller runtime config"
default y
help
Allows the configuration of the TCPC to be set up at runtime. This
makes the tcpc_config[] array writable, i.e. not const. It should be
declared as such in the board config.
This is useful when the board has runtime information that sets
the configuration, such as Chromium OS Board Info (CBI set in the
factory. Without this, multiple EC images would need to be installed
depending on the board.
config PLATFORM_EC_USB_PD_TCPM_MULTI_PS8XXX
bool "Support multiple PS8xxx devices"
help
PS8XXX-series chips are all supported by a single driver. Enable
this If a board with the same EC firmware is expected to support
multiple products here. Then enable the required PS8xxx options
below.
In this case the board must provide a function to return the correct
product ID actually used by a particular board:
uint16_t board_get_ps8xxx_product_id(int port)
Supported return values are:
PS8705_PRODUCT_ID
PS8751_PRODUCT_ID
PS8755_PRODUCT_ID
PS8805_PRODUCT_ID
PS8815_PRODUCT_ID
config PLATFORM_EC_USB_PD_TCPM_ANX7447
bool "Analogix ANX7447 USB-C Gen 2 Type-C Port Controller"
select PLATFORM_EC_USB_PD_TCPM_MUX
help
The Analogix ANX7447 is a USB Type-C Port Controller (TCPC)
for USB Type-C v1.2 Host, USB3.1 Gen2 and DisplayPort applications.
It has an on-chip microcontroller (OCM) to manage the signal
switching. It supports Power Delivery Rev. 3.0 and the DisplayPort
Alt Mode version 1.4a HBR3.
Supported chips are:
ANX3447
ANX7447
if PLATFORM_EC_USB_PD_TCPM_ANX7447
config PLATFORM_EC_USB_PD_TCPM_ANX7447_AUX_PU_PD
bool "Enable ANX77447 AUX_N internal PU, and AUX_P internal PD."
depends on PLATFORM_EC_USB_PD_TCPM_ANX7447
help
Use this config option to enable and internal pullup resistor on the
AUX_N and internal pulldown resistor on the AUX_P line. Only use this
config option if there are no external pu/pd resistors on these
signals. This configuration should be used to avoid noise issues on
the DDI1_AUX_N & DDI1_AUX_P signals (b/122873171)
config PLATFORM_EC_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND
bool "Enable console command to erase ANX7447 OCM flash"
depends on PLATFORM_EC_USB_PD_TCPM_ANX7447
help
Adds an EC console command to erase the ANX7447 OCM flash.
Note: this is intended to be a temporary option and won't be needed
when ANX7447 are put on boards with OCM already erased
endif # PLATFORM_EC_USB_PD_TCPM_ANX7447
config PLATFORM_EC_USB_PD_TCPM_NCT38XX
bool "Nuvoton 3807/8 Single/Dual Port Controller with Power Delivery"
help
The NCT38n7/8 is a single/dual-port, USB Type-C Port Controller
(TCPC). It incorporates a Power Delivery (PD) PHY with BMC encoding,
Protocol logic and USB Type-C Configuration Channel (CC) logic.
config PLATFORM_EC_USB_PD_TCPM_PS8751
bool "Parade PS8751 USB-C Gen 2 Type-C Port Controller"
select PLATFORM_EC_USB_PD_TCPM_MUX
imply PLATFORM_EC_HOSTCMD_I2C_CONTROL
help
The Parade Technologies PS8751 is a USB Type-C Port Controller (TCPC)
for USB Type-C Host and DisplayPort applications. It supports
Power Delivery Rev. 2.0 and the DisplayPort Alt Mode version 1.0a.
config PLATFORM_EC_USB_PD_TCPM_PS8805
bool "Parade PS8805 USB-C Gen 2 Type-C Port Controller"
select PLATFORM_EC_USB_PD_TCPM_MUX
imply PLATFORM_EC_HOSTCMD_I2C_CONTROL
help
The Parade Technologies PS8805 is an active retiming/redriving
(respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated
with a USB Type-C Port Controller (TCPC) for USB Type-C Host and
DisplayPort applications. It supports Power Delivery and the
DisplayPort Alt Mode.
if PLATFORM_EC_USB_PD_TCPM_PS8805
config PLATFORM_EC_USB_PD_TCPM_PS8805_FORCE_DID
bool "Parade PS8805 Force Device ID"
default y
help
Early firmware versions of the PS8805 report an incorrect device ID
value for A3 silicon. Enable this option to check the vendor specific
chip version register and force the correct device ID.
endif # PLATFORM_EC_USB_PD_TCPM_PS8805
config PLATFORM_EC_USB_PD_TCPM_PS8815
bool "Parade PS8815 USB-C Gen 2 Type-C Port Controller"
select PLATFORM_EC_USB_PD_TCPM_MUX
imply PLATFORM_EC_HOSTCMD_I2C_CONTROL
help
The Parade Technologies PS8815 is an active retiming/redriving
(respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated
with a USB Type-C Port Controller (TCPC) for USB Type-C Host and
DisplayPort applications. It supports Power Delivery and the
DisplayPort Alt Mode.
if PLATFORM_EC_USB_PD_TCPM_PS8815
config PLATFORM_EC_USB_PD_TCPM_PS8815_FORCE_DID
bool "Parade PS8815 Force Device ID"
default y
help
Early firmware versions of the PS8815 report an incorrect device ID
value for A1 silicon. Enable this option to check the vendor specific
chip version register and force the correct device ID.
endif # PLATFORM_EC_USB_PD_TCPM_PS8815
config PLATFORM_EC_USB_PD_TCPM_RAA489000
bool "Renesas RAA489000 Type-C port controller and battery charger"
select PLATFORM_EC_USB_PD_PPC
help
Build drivers for the RAA489000, a combined battery charger and USB-C
TCPCI.
config PLATFORM_EC_USB_PD_TCPM_RT1715
bool "Richtek RT1715 Type-C Port Controller"
help
The RT1715 is a USB Type-C controller, integrating a complete Type-C
Transceiver including the Rp and Rd resistors. It does the USB Type-C
detection including attach and orientation. The RT1715 integrates the
physical layer of the USB BMC power delivery protocol to allow up to
100W of power and role swap. The BMC PD block enables full support
for alternative interfaces of the Type-C specification.
config PLATFORM_EC_USB_PD_TCPM_RT1718S
bool "Richtek RT1718S Type-C Port Controller"
select PLATFORM_EC_USBC_PPC_RT17182S
help
The RT1718S is an integrated USB Type-C TCPC controller which
includes IEC-61000-4-2 ESD protection cell for CC/SBU/DP/DM.
High voltage USB 2.0 switches also support HV DCP & fast charging
protocols. RT1718S supports TCPC Version 1.2, and Battery Charging
version 1.2 (BC1.2).
config PLATFORM_EC_USB_PD_TCPM_TUSB422
bool "TI TUSB422 Port Control with USB PD"
help
This is a a USB PD PHY that enables a USB Type-C port with the
Configuration Channel (CC) logic needed for USB Type-C ecosystems. It
integrates the physical layer of the USB BMC power delivery (PD)
protocol to allow up to 100-W of power and support for alternate mode
interfaces. An external microprocessor, containing USB Type-C Port
Manager (TCPM), communicates with the TUSB422 through an I2C
interface.
config PLATFORM_EC_USB_PD_TCPM_MUX
bool "Support optional register 18h steer the high-speed muxes"
help
Enable this option if the TCPC port controller supports the optional
register 18h CONFIG_STANDARD_OUTPUT to steer the high-speed muxes.
See section 4.4.4 (CONFIGURE STANDARD OUTPUT) of the USB Type-C Port
Controller Interface Specification, Revision 2.0, Version 1.2 for more
information.
config PLATFORM_EC_CONSOLE_CMD_TCPC_DUMP
bool "Console command: tcpc_dump"
# anx7447 also supports this command, but is not yet enabled
default y
help
Allows dumping of the Type-C Port Controller (TCPC) state, which is
basically a list of registers and their values. By reference to the
Universal Serial Bus Type-C Port Controller Interface Specification
this can help you figure out what is going on.
endif # PLATFORM_EC_USB_PD_TCPM_TCPCI
config PLATFORM_EC_USB_PD_TCPM_DRIVER_IT83XX
bool "Enable IT83XX driver"
depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
help
Enable a driver for the ITE IT83XX on-chip UBB Type-C Port Manager.
This supports up to two USB Type-C ports with Dual Role function
(provider and consumer) and Fast Role Swap detection.
config PLATFORM_EC_USB_PD_TCPM_DRIVER_IT8XXX2
bool "Enable IT8XXX2 driver"
depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
help
Enable a driver for the ITE IT8XXX2 on-chip UBB Type-C Port Manager.
This supports up to two USB Type-C ports with Dual Role function
(provider and consumer) and Fast Role Swap detection.
config PLATFORM_EC_USB_PD_PULLUP
int "Default source Rp value"
default 1
help
Default pull-up value on the USB-C ports when they are used as source.
Valid values are 0 (USB default current), 1 (1.5A), and 2 (3.0A). See
enum tcpc_rp_value.
config PLATFORM_EC_USB_PD_ONLY_FIXED_PDOS
bool "Only support FIXED type PDOs"
help
Ignore all non-fixed PDOs received from a src_caps message. Enable
this for boards (like servo_v4) which only support FIXED PDO types.
config PLATFORM_EC_USB_CHARGER
bool "Support charging from a USB-C port"
default y
select HAS_TASK_USB_CHG_P0
help
This enables common BC1.2 (Battery-Charging Specification Rev1.2)
charger-detection routines. With this is possible to negotiate a
power contract with an attached battery charger and use this to
charge the device's battery.
if PLATFORM_EC_USB_CHARGER
config PLATFORM_EC_BC12_DETECT_PI3USB9201
bool "Enable support for Pericom PI3USB9201"
help
This is a Dual-Role USB Charging-Type Detector. It can operate in
host or client mode. It supports Battery Charging Specification, rev
1.2 (BC1.2) with Standard/Charging/Dedicated downstream port
(SDP/CDP/DCP) advertisement when in host mode. In client mode it
starts BC1.2 detection to detect the attached host type. It provides
an I2C interface to report detection results.
config PLATFORM_EC_BC12_DETECT_MT6360
bool "MediaTek MT6360P PMIC"
help
This PMIC includes a battery charger with an On-The-Go (OTG) output
range of 4.85 to 5.825V. It provides integrated ADCs for system
monitoring. The MT6360 also supports USB Power Delivery 3.0 with
Dual-Role, with host or client mode. It supports alternate mode as
well as VCONN with programmable over-current protection (OCP).
config PLATFORM_EC_MT6360_BC12_GPIO
bool "USB-PHY connection is controlled by a GPIO"
depends on PLATFORM_EC_BC12_DETECT_MT6360
help
If enabled, the MT6360 USB-PHY connection is controlled by
a GPIO: GPIO_BC12_DET_EN. Assert GPIO_BC12_DET_EN to detect a BC1.2
device, and deassert GPIO_BC12_DET_EN to mux the USB-PHY back.
config PLATFORM_EC_BC12_SINGLE_DRIVER
bool "Only support a single BC12 driver"
default y
help
Enable this if the board only needs one BC12 driver. This includes
the case that has multiple chips that use the same driver.
If undefined, the board should define a bc12_ports[] array which
associates each port to its bc12 driver:
struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{ .drv = &xxx_drv },
{ .drv = &yyy_drv },
};
endif # PLATFORM_EC_USB_CHARGER
endif # PLATFORM_EC_USBC
|