Skip to content

Commit 394f05e

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 72b9238 commit 394f05e

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
@@ -14,9 +14,6 @@ KEYBOARD=15in_102
1414
CONFIG_HAVE_KBLED = y
1515
KBLED=rgb_pwm
1616

17-
# Set USB-PD I2C bus
18-
CFLAGS+=-DI2C_USBPD=I2C_1
19-
2017
# Set discrete GPU I2C bus
2118
CFLAGS+=-DI2C_DGPU=I2C_1
2219

@@ -35,8 +32,8 @@ CFLAGS+=\
3532
-DCHARGER_INPUT_CURRENT=11800
3633

3734
# Set USB-PD parameters
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+=\

src/board/system76/addw2/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ KEYBOARD=15in_102
1414
CONFIG_HAVE_KBLED = y
1515
KBLED=rgb_pwm
1616

17-
# Set USB-PD I2C bus
18-
CFLAGS+=-DI2C_USBPD=I2C_1
19-
2017
# Set discrete GPU I2C bus
2118
CFLAGS+=-DI2C_DGPU=I2C_1
2219

@@ -35,8 +32,8 @@ CFLAGS+=\
3532
-DCHARGER_INPUT_CURRENT=11800
3633

3734
# Set USB-PD parameters
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+=\

src/board/system76/addw3/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ KEYBOARD=15in_102
2020
CONFIG_HAVE_KBLED = y
2121
KBLED=rgb_pwm
2222

23-
# Set USB-PD I2C bus
24-
CFLAGS+=-DI2C_USBPD=I2C_1
25-
2623
# Set discrete GPU I2C bus
2724
CFLAGS+=-DI2C_DGPU=I2C_1
2825

@@ -45,8 +42,8 @@ CFLAGS+=\
4542

4643
# Set USB-PD parameters
4744
# XXX: Actually TPS65993
48-
USBPD=tps65987
49-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
45+
USBPD = tps65987
46+
CFLAGS += -DI2C_USBPD=I2C_1
5047

5148
# Set CPU power limits in watts
5249
CFLAGS+=\

src/board/system76/bonw14/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ KEYBOARD=15in_102_nkey
1414
CONFIG_HAVE_KBLED = y
1515
KBLED=bonw14
1616

17-
# Set USB-PD I2C bus
18-
CFLAGS+=-DI2C_USBPD=I2C_1
19-
2017
# Set discrete GPU I2C bus
2118
CFLAGS+=-DI2C_DGPU=I2C_1
2219

@@ -35,8 +32,8 @@ CFLAGS+=\
3532
-DCHARGER_INPUT_CURRENT=14000
3633

3734
# Set USB-PD parameters
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+=\

src/board/system76/bonw15/board.mk

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ KEYBOARD=15in_102
2020
CONFIG_HAVE_KBLED = y
2121
KBLED=bonw14
2222

23-
# Set USB-PD I2C bus
24-
CFLAGS+=-DI2C_USBPD=I2C_1
25-
2623
# Set discrete GPU I2C bus
2724
CFLAGS+=-DI2C_DGPU=I2C_1
2825

@@ -32,9 +29,6 @@ CFLAGS+=-DI2C_SMBUS=I2C_4
3229
# Set touchpad PS2 bus
3330
CFLAGS+=-DPS2_TOUCHPAD=PS2_3
3431

35-
# Set USB-PD I2C bus
36-
CFLAGS+=-DI2C_USBPD=I2C_1
37-
3832
# Set smart charger parameters
3933
# XXX: PRS1 and PRS2 are in parallel for adapter Rsense?
4034
CHARGER=oz26786
@@ -47,7 +41,9 @@ CFLAGS+=\
4741

4842
# Set USB-PD parameters
4943
# XXX: Actually TPS65994
50-
USBPD=tps65987
44+
USBPD = tps65987
45+
CFLAGS += -DI2C_USBPD=I2C_1
46+
CFLAGS += -DHAVE_USBPD_CHARGING=1
5147

5248
# Set CPU power limits in watts
5349
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
@@ -15,9 +15,6 @@ CONFIG_HAVE_KBLED = y
1515
KBLED=darp5
1616
CFLAGS+=-DI2C_KBLED=I2C_1
1717

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

@@ -33,8 +30,8 @@ CFLAGS+=\
3330
-DCHARGER_INPUT_CURRENT=3420
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/darp6/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ CONFIG_HAVE_KBLED = y
1818
KBLED=darp5
1919
CFLAGS+=-DI2C_KBLED=I2C_1
2020

21-
# Set USB-PD I2C bus
22-
CFLAGS+=-DI2C_USBPD=I2C_1
23-
2421
# Set battery I2C bus
2522
CFLAGS+=-DI2C_SMBUS=I2C_0
2623

@@ -36,8 +33,8 @@ CFLAGS+=\
3633
-DCHARGER_INPUT_CURRENT=3420
3734

3835
# Set USB-PD parameters
39-
USBPD=tps65987
40-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
36+
USBPD = tps65987
37+
CFLAGS += -DI2C_USBPD=I2C_1
4138

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

src/board/system76/darp7/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ KEYBOARD=15in_102
1717
CONFIG_HAVE_KBLED = y
1818
KBLED=rgb_pwm
1919

20-
# Set USB-PD I2C bus
21-
CFLAGS+=-DI2C_USBPD=I2C_1
22-
2320
# Set battery I2C bus
2421
CFLAGS+=-DI2C_SMBUS=I2C_4
2522

@@ -36,8 +33,8 @@ CFLAGS+=\
3633

3734
# Set USB-PD parameters
3835
# XXX: Actually TPS65993
39-
USBPD=tps65987
40-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
36+
USBPD = tps65987
37+
CFLAGS += -DI2C_USBPD=I2C_1
4138

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

src/board/system76/darp8/board.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ KEYBOARD=15in_102
1717
CONFIG_HAVE_KBLED = y
1818
KBLED=rgb_pwm
1919

20-
# Set USB-PD I2C bus
21-
CFLAGS+=-DI2C_USBPD=I2C_1
22-
2320
# Set battery I2C bus
2421
CFLAGS+=-DI2C_SMBUS=I2C_4
2522

@@ -37,8 +34,8 @@ CFLAGS+=\
3734

3835
# Set USB-PD parameters
3936
# XXX: Actually TPS65993
40-
USBPD=tps65987
41-
CFLAGS+=-DHAVE_USBPD_CHARGING=0
37+
USBPD = tps65987
38+
CFLAGS += -DI2C_USBPD=I2C_1
4239

4340
# Set CPU power limits in watts
4441
CFLAGS+=\

0 commit comments

Comments
 (0)