Skip to content

Commit a4e8990

Browse files
committed
Set USB-PD values for all boards
- Use `I2C_1` interface for all boards - Disable charging Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 83a5bad commit a4e8990

25 files changed

Lines changed: 178 additions & 0 deletions

File tree

src/board/system76/addw1/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ 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+
1720
# Set discrete GPU I2C bus
1821
CFLAGS+=-DI2C_DGPU=I2C_1
1922

@@ -31,6 +34,10 @@ CFLAGS+=\
3134
-DCHARGER_CHARGE_VOLTAGE=12600 \
3235
-DCHARGER_INPUT_CURRENT=11800
3336

37+
# Set USB-PD parameters
38+
USBPD=tps65987
39+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
40+
3441
# Set CPU power limits in watts
3542
CFLAGS+=\
3643
-DPOWER_LIMIT_AC=180 \

src/board/system76/addw2/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ 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+
1720
# Set discrete GPU I2C bus
1821
CFLAGS+=-DI2C_DGPU=I2C_1
1922

@@ -31,6 +34,10 @@ CFLAGS+=\
3134
-DCHARGER_CHARGE_VOLTAGE=12600 \
3235
-DCHARGER_INPUT_CURRENT=11800
3336

37+
# Set USB-PD parameters
38+
USBPD=tps65987
39+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
40+
3441
# Set CPU power limits in watts
3542
CFLAGS+=\
3643
-DPOWER_LIMIT_AC=180 \

src/board/system76/addw3/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ 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+
2326
# Set discrete GPU I2C bus
2427
CFLAGS+=-DI2C_DGPU=I2C_1
2528

@@ -40,6 +43,11 @@ CFLAGS+=\
4043
-DCHARGER_CHARGE_VOLTAGE=17600 \
4144
-DCHARGER_INPUT_CURRENT=14000
4245

46+
# Set USB-PD parameters
47+
# XXX: Actually TPS65993
48+
USBPD=tps65987
49+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
50+
4351
# Set CPU power limits in watts
4452
CFLAGS+=\
4553
-DPOWER_LIMIT_AC=280 \

src/board/system76/bonw14/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ 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+
1720
# Set discrete GPU I2C bus
1821
CFLAGS+=-DI2C_DGPU=I2C_1
1922

@@ -31,6 +34,10 @@ CFLAGS+=\
3134
-DCHARGER_CHARGE_VOLTAGE=16800 \
3235
-DCHARGER_INPUT_CURRENT=14000
3336

37+
# Set USB-PD parameters
38+
USBPD=tps65987
39+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
40+
3441
# Set CPU power limits in watts
3542
CFLAGS+=\
3643
-DPOWER_LIMIT_AC=180 \

src/board/system76/bonw15/board.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ 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+
2326
# Set discrete GPU I2C bus
2427
CFLAGS+=-DI2C_DGPU=I2C_1
2528

@@ -43,6 +46,7 @@ CFLAGS+=\
4346
-DCHARGER_INPUT_CURRENT=16920
4447

4548
# Set USB-PD parameters
49+
# XXX: Actually TPS65994
4650
USBPD=tps65987
4751

4852
# Set CPU power limits in watts

src/board/system76/darp5/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ 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+
1821
# Set battery I2C bus
1922
CFLAGS+=-DI2C_SMBUS=I2C_0
2023

@@ -29,6 +32,10 @@ CFLAGS+=\
2932
-DCHARGER_CHARGE_VOLTAGE=17600 \
3033
-DCHARGER_INPUT_CURRENT=3420
3134

35+
# Set USB-PD parameters
36+
USBPD=tps65987
37+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
38+
3239
# Set CPU power limits in watts
3340
CFLAGS+=\
3441
-DPOWER_LIMIT_AC=65 \

src/board/system76/darp6/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ 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+
2124
# Set battery I2C bus
2225
CFLAGS+=-DI2C_SMBUS=I2C_0
2326

@@ -32,6 +35,10 @@ CFLAGS+=\
3235
-DCHARGER_CHARGE_VOLTAGE=17600 \
3336
-DCHARGER_INPUT_CURRENT=3420
3437

38+
# Set USB-PD parameters
39+
USBPD=tps65987
40+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
41+
3542
# Set CPU power limits in watts
3643
CFLAGS+=\
3744
-DPOWER_LIMIT_AC=65 \

src/board/system76/darp7/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ 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+
2023
# Set battery I2C bus
2124
CFLAGS+=-DI2C_SMBUS=I2C_4
2225

@@ -31,6 +34,11 @@ CFLAGS+=\
3134
-DCHARGER_CHARGE_VOLTAGE=8800 \
3235
-DCHARGER_INPUT_CURRENT=3420
3336

37+
# Set USB-PD parameters
38+
# XXX: Actually TPS65993
39+
USBPD=tps65987
40+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
41+
3442
# Set CPU power limits in watts
3543
CFLAGS+=\
3644
-DPOWER_LIMIT_AC=65 \

src/board/system76/darp8/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ 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+
2023
# Set battery I2C bus
2124
CFLAGS+=-DI2C_SMBUS=I2C_4
2225

@@ -32,6 +35,11 @@ CFLAGS+=\
3235
-DCHARGER_CHARGE_VOLTAGE=8800 \
3336
-DCHARGER_INPUT_CURRENT=4740
3437

38+
# Set USB-PD parameters
39+
# XXX: Actually TPS65993
40+
USBPD=tps65987
41+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
42+
3543
# Set CPU power limits in watts
3644
CFLAGS+=\
3745
-DPOWER_LIMIT_AC=65 \

src/board/system76/darp9/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ KEYBOARD=18H9LHA05
2020
CONFIG_HAVE_KBLED = y
2121
KBLED=rgb_pwm
2222

23+
# Set USB-PD I2C bus
24+
CFLAGS+=-DI2C_USBPD=I2C_1
25+
2326
# Set battery I2C bus
2427
CFLAGS+=-DI2C_SMBUS=I2C_4
2528

@@ -34,6 +37,11 @@ CFLAGS+=\
3437
-DCHARGER_CHARGE_VOLTAGE=8800 \
3538
-DCHARGER_INPUT_CURRENT=4740
3639

40+
# Set USB-PD parameters
41+
# XXX: Actually TPS65993
42+
USBPD=tps65987
43+
CFLAGS+=-DHAVE_USBPD_CHARGING=0
44+
3745
# Set CPU power limits in watts
3846
CFLAGS+=\
3947
-DPOWER_LIMIT_AC=65 \

0 commit comments

Comments
 (0)