Skip to content

Commit

Permalink
Set USB-PD values for all boards
Browse files Browse the repository at this point in the history
- Use `I2C_1` interface for all boards
- Enable USB charging on bonw15, oryp11

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Jul 19, 2024
1 parent 05ca434 commit 79e1389
Show file tree
Hide file tree
Showing 32 changed files with 162 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/board/system76/addw1/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=12600 \
-DCHARGER_INPUT_CURRENT=11800

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/addw2/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=12600 \
-DCHARGER_INPUT_CURRENT=11800

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/addw3/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=14000

# Set USB-PD parameters
# XXX: Actually TPS65993
USBPD = tps65987
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=280 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/addw4/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ CFLAGS += \
-DCHARGER_CHARGE_VOLTAGE=17400 \
-DCHARGER_INPUT_CURRENT=11500

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS += \
-DPOWER_LIMIT_AC=230 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/bonw14/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=16800 \
-DCHARGER_INPUT_CURRENT=14000

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/bonw15/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CFLAGS+=-DI2C_SMBUS=I2C_4
# Set touchpad PS2 bus
CFLAGS+=-DPS2_TOUCHPAD=PS2_3


# Set smart charger parameters
# XXX: PRS1 and PRS2 are in parallel for adapter Rsense?
CHARGER=oz26786
Expand All @@ -38,9 +37,11 @@ CFLAGS+=\
-DCHARGER_INPUT_CURRENT=16920

# Set USB-PD parameters
# XXX: Actually TPS65994
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1
CFLAGS += -DHAVE_USBPD_CHARGING=1

# Set CPU power limits in watts
CFLAGS+=\
Expand Down
7 changes: 6 additions & 1 deletion src/board/system76/darp10-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CONFIG_HAVE_KBLED = y
KBLED = white_dac
CFLAGS += -DKBLED_DAC=2


# Set battery I2C bus
CFLAGS += -DI2C_SMBUS=I2C_4

Expand All @@ -36,6 +35,12 @@ CFLAGS += \
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65994BH
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS += \
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/darp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CFLAGS += \
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65994BH
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS += \
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/darp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/darp6/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/darp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=8800 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/darp8/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=8800 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/darp9/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=8800 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/galp3-c/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13056 \
-DCHARGER_INPUT_CURRENT=2100

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=40 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/galp4/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13056 \
-DCHARGER_INPUT_CURRENT=2100

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=40 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/galp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17400 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/galp6/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17400 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/galp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17400 \
-DCHARGER_INPUT_CURRENT=4740

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/gaze17-3060-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=7500

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/gaze17-3060/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=7500

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/lemp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=8800 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/lemp11/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=8800 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
6 changes: 6 additions & 0 deletions src/board/system76/lemp12/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ CFLAGS+=\
-DCHARGER_INPUT_CURRENT=3420 \
-DCHARGER_PSYS_GAIN=500

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/lemp13-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/lemp13/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=17600 \
-DCHARGER_INPUT_CURRENT=3420

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/oryp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13050 \
-DCHARGER_INPUT_CURRENT=11500

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/oryp11/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ CFLAGS+=-DI2C_SMBUS=I2C_4
# Set touchpad PS2 bus
CFLAGS+=-DPS2_TOUCHPAD=PS2_3


# Set smart charger parameters
# TODO: actually bq24800
CHARGER=bq24780s
Expand All @@ -40,9 +39,11 @@ CFLAGS+=\
-DCHARGER_INPUT_CURRENT=11500

# Set USB-PD parameters
# XXX: Actually TPS65993
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1
CFLAGS += -DHAVE_USBPD_CHARGING=1

# Set CPU power limits in watts
CFLAGS+=\
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/oryp6/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13050 \
-DCHARGER_INPUT_CURRENT=9230

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/oryp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13050 \
-DCHARGER_INPUT_CURRENT=9230

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
5 changes: 5 additions & 0 deletions src/board/system76/oryp8/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ CFLAGS+=\
-DCHARGER_CHARGE_VOLTAGE=13050 \
-DCHARGER_INPUT_CURRENT=9230

# Set USB-PD parameters
CONFIG_HAVE_USBPD = y
CONFIG_USBPD_TPS65987 = y
CFLAGS += -DI2C_USBPD=I2C_1

# Set CPU power limits in watts
CFLAGS+=\
-DPOWER_LIMIT_AC=180 \
Expand Down
Loading

0 comments on commit 79e1389

Please sign in to comment.