Skip to content

Commit

Permalink
Add config for host platform
Browse files Browse the repository at this point in the history
Introduce a new config to determine the host platform and use it to
conditionally include power sequence logic.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Aug 27, 2024
1 parent 710b479 commit fd56eff
Show file tree
Hide file tree
Showing 44 changed files with 128 additions and 57 deletions.
3 changes: 3 additions & 0 deletions src/board/system76/addw1/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/addw2/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102

Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/addw3/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI=y

# Enable firmware security
Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/addw4/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ EC = ite
CONFIG_EC_ITE_IT5570E = y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y
CONFIG_PECI_OVER_ESPI = y

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/bonw14/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102_nkey

Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/bonw15-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ EC = ite
CONFIG_EC_ITE_IT5570E = y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/bonw15/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
8 changes: 7 additions & 1 deletion src/board/system76/common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ board-common-y += parallel.c
board-common-y += peci.c
board-common-y += pmc.c
board-common-y += pnp.c
board-common-y += power.c
board-common-y += ps2.c
board-common-y += pwm.c
board-common-y += scratch.c
Expand All @@ -42,6 +41,13 @@ CFLAGS+=-DLEVEL=4
# Uncomment to enable I2C debug on 0x76
#CFLAGS+=-DI2C_DEBUGGER=0x76

ifeq ($(CONFIG_PLATFORM_INTEL),y)
board-common-y += power/intel.c
CFLAGS += -DCONFIG_PLATFORM_INTEL=1
else
$(error PLATFORM not specified)
endif

ifeq ($(CONFIG_SECURITY),y)
CFLAGS+=-DCONFIG_SECURITY=1
endif
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/board/system76/darp10-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ EC = ite
CONFIG_EC_ITE_IT5570E = y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
Expand Down
3 changes: 2 additions & 1 deletion src/board/system76/darp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ EC = ite
CONFIG_EC_ITE_IT5570E = y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/darp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/darp6/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102

Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/darp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/darp8/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/darp9/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/galp3-c/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=14in_86

Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/galp4/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=14in_86

Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/galp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=14in_83
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/galp6/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/galp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/gaze15/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=15in_102

Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze16-3050/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze16-3060-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze16-3060/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze17-3050/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze17-3060-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze17-3060/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=15in_102
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/gaze18/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/lemp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=14in_83
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/lemp11/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Include keyboard
KEYBOARD=14in_83
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/lemp12/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y

# Enable firmware security
CONFIG_SECURITY=y
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/lemp13-b/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y
CONFIG_PECI_OVER_ESPI = y

# Enable firmware security
Expand Down
5 changes: 3 additions & 2 deletions src/board/system76/lemp13/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_256K = y

# Enable eSPI
CONFIG_BUS_ESPI=y
# Intel-based host
CONFIG_PLATFORM_INTEL = y
CONFIG_BUS_ESPI = y
CONFIG_PECI_OVER_ESPI = y

# Enable firmware security
Expand Down
3 changes: 3 additions & 0 deletions src/board/system76/lemp9/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y

# Intel-based host
CONFIG_PLATFORM_INTEL = y

# Include keyboard
KEYBOARD=14in_83

Expand Down
Loading

0 comments on commit fd56eff

Please sign in to comment.