Skip to content

Commit 0afd1ac

Browse files
committed
Default HAVE_USBPD_CHARGING to 0
Most boards do not support USB-PD charging, so disable it by default. Signed-off-by: Tim Crawford <[email protected]>
1 parent f2f8bf0 commit 0afd1ac

File tree

27 files changed

+55
-132
lines changed

27 files changed

+55
-132
lines changed

src/board/system76/addw1/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ KEYBOARD=15in_102
1212
# Set keyboard LED mechanism
1313
KBLED=rgb_pwm
1414

15-
# Set USB-PD I2C bus
16-
CFLAGS+=-DI2C_USBPD=I2C_1
17-
1815
# Set discrete GPU I2C bus
1916
CFLAGS+=-DI2C_DGPU=I2C_1
2017

@@ -33,8 +30,8 @@ CFLAGS+=\
3330
-DCHARGER_INPUT_CURRENT=11800
3431

3532
# Set USB-PD parameters
36-
USBPD=tps65987
37-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
33+
USBPD = tps65987
34+
CFLAGS += -DI2C_USBPD=I2C_1
3835

3936
# Set CPU power limits in watts
4037
CFLAGS+=\

src/board/system76/addw2/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ KEYBOARD=15in_102
1212
# Set keyboard LED mechanism
1313
KBLED=rgb_pwm
1414

15-
# Set USB-PD I2C bus
16-
CFLAGS+=-DI2C_USBPD=I2C_1
17-
1815
# Set discrete GPU I2C bus
1916
CFLAGS+=-DI2C_DGPU=I2C_1
2017

@@ -33,8 +30,8 @@ CFLAGS+=\
3330
-DCHARGER_INPUT_CURRENT=11800
3431

3532
# Set USB-PD parameters
36-
USBPD=tps65987
37-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
33+
USBPD = tps65987
34+
CFLAGS += -DI2C_USBPD=I2C_1
3835

3936
# Set CPU power limits in watts
4037
CFLAGS+=\

src/board/system76/addw3/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ KEYBOARD=15in_102
1818
# Set keyboard LED mechanism
1919
KBLED=rgb_pwm
2020

21-
# Set USB-PD I2C bus
22-
CFLAGS+=-DI2C_USBPD=I2C_1
23-
2421
# Set discrete GPU I2C bus
2522
CFLAGS+=-DI2C_DGPU=I2C_1
2623

@@ -43,8 +40,8 @@ CFLAGS+=\
4340

4441
# Set USB-PD parameters
4542
# XXX: Actually TPS65993
46-
USBPD=tps65987
47-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
43+
USBPD = tps65987
44+
CFLAGS += -DI2C_USBPD=I2C_1
4845

4946
# Set CPU power limits in watts
5047
CFLAGS+=\

src/board/system76/bonw14/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ KEYBOARD=15in_102_nkey
1212
# Set keyboard LED mechanism
1313
KBLED=bonw14
1414

15-
# Set USB-PD I2C bus
16-
CFLAGS+=-DI2C_USBPD=I2C_1
17-
1815
# Set discrete GPU I2C bus
1916
CFLAGS+=-DI2C_DGPU=I2C_1
2017

@@ -33,8 +30,8 @@ CFLAGS+=\
3330
-DCHARGER_INPUT_CURRENT=14000
3431

3532
# Set USB-PD parameters
36-
USBPD=tps65987
37-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
33+
USBPD = tps65987
34+
CFLAGS += -DI2C_USBPD=I2C_1
3835

3936
# Set CPU power limits in watts
4037
CFLAGS+=\

src/board/system76/bonw15/board.mk

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ KEYBOARD=15in_102
1818
# Set keyboard LED mechanism
1919
KBLED=bonw14
2020

21-
# Set USB-PD I2C bus
22-
CFLAGS+=-DI2C_USBPD=I2C_1
23-
2421
# Set discrete GPU I2C bus
2522
CFLAGS+=-DI2C_DGPU=I2C_1
2623

@@ -30,9 +27,6 @@ CFLAGS+=-DI2C_SMBUS=I2C_4
3027
# Set touchpad PS2 bus
3128
CFLAGS+=-DPS2_TOUCHPAD=PS2_3
3229

33-
# Set USB-PD I2C bus
34-
CFLAGS+=-DI2C_USBPD=I2C_1
35-
3630
# Set smart charger parameters
3731
# XXX: PRS1 and PRS2 are in parallel for adapter Rsense?
3832
CHARGER=oz26786
@@ -45,7 +39,9 @@ CFLAGS+=\
4539

4640
# Set USB-PD parameters
4741
# XXX: Actually TPS65994
48-
USBPD=tps65987
42+
USBPD = tps65987
43+
CFLAGS += -DI2C_USBPD=I2C_1
44+
CFLAGS += -DHAVE_USBPD_CHARGING=1
4945

5046
# Set CPU power limits in watts
5147
CFLAGS+=\

src/board/system76/common/usbpd/tps65987.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// clang-format on
3434

3535
#ifndef HAVE_USBPD_CHARGING
36-
#define HAVE_USBPD_CHARGING 1
36+
#define HAVE_USBPD_CHARGING 0
3737
#endif // HAVE_USBPD_CHARGING
3838

3939
void usbpd_init(void) {

src/board/system76/darp5/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ KEYBOARD=15in_102
1313
KBLED=darp5
1414
CFLAGS+=-DI2C_KBLED=I2C_1
1515

16-
# Set USB-PD I2C bus
17-
CFLAGS+=-DI2C_USBPD=I2C_1
18-
1916
# Set battery I2C bus
2017
CFLAGS+=-DI2C_SMBUS=I2C_0
2118

@@ -31,8 +28,8 @@ CFLAGS+=\
3128
-DCHARGER_INPUT_CURRENT=3420
3229

3330
# Set USB-PD parameters
34-
USBPD=tps65987
35-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
31+
USBPD = tps65987
32+
CFLAGS += -DI2C_USBPD=I2C_1
3633

3734
# Set CPU power limits in watts
3835
CFLAGS+=\

src/board/system76/darp6/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ KEYBOARD=15in_102
1616
KBLED=darp5
1717
CFLAGS+=-DI2C_KBLED=I2C_1
1818

19-
# Set USB-PD I2C bus
20-
CFLAGS+=-DI2C_USBPD=I2C_1
21-
2219
# Set battery I2C bus
2320
CFLAGS+=-DI2C_SMBUS=I2C_0
2421

@@ -34,8 +31,8 @@ CFLAGS+=\
3431
-DCHARGER_INPUT_CURRENT=3420
3532

3633
# Set USB-PD parameters
37-
USBPD=tps65987
38-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
34+
USBPD = tps65987
35+
CFLAGS += -DI2C_USBPD=I2C_1
3936

4037
# Set CPU power limits in watts
4138
CFLAGS+=\

src/board/system76/darp7/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ KEYBOARD=15in_102
1515
# Set keyboard LED mechanism
1616
KBLED=rgb_pwm
1717

18-
# Set USB-PD I2C bus
19-
CFLAGS+=-DI2C_USBPD=I2C_1
20-
2118
# Set battery I2C bus
2219
CFLAGS+=-DI2C_SMBUS=I2C_4
2320

@@ -34,8 +31,8 @@ CFLAGS+=\
3431

3532
# Set USB-PD parameters
3633
# XXX: Actually TPS65993
37-
USBPD=tps65987
38-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
34+
USBPD = tps65987
35+
CFLAGS += -DI2C_USBPD=I2C_1
3936

4037
# Set CPU power limits in watts
4138
CFLAGS+=\

src/board/system76/darp8/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ KEYBOARD=15in_102
1515
# Set keyboard LED mechanism
1616
KBLED=rgb_pwm
1717

18-
# Set USB-PD I2C bus
19-
CFLAGS+=-DI2C_USBPD=I2C_1
20-
2118
# Set battery I2C bus
2219
CFLAGS+=-DI2C_SMBUS=I2C_4
2320

@@ -35,8 +32,8 @@ CFLAGS+=\
3532

3633
# Set USB-PD parameters
3734
# XXX: Actually TPS65993
38-
USBPD=tps65987
39-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
35+
USBPD = tps65987
36+
CFLAGS += -DI2C_USBPD=I2C_1
4037

4138
# Set CPU power limits in watts
4239
CFLAGS+=\

0 commit comments

Comments
 (0)