ite: Add support for 256K flash

The upcoming addw4 will use the IT5570E-256, which requires removing the
assumption that every ITE chip is 128K. Introduce new configs so boards
may select which flash size they use.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2024-01-25 08:05:50 -07:00
committed by Tim Crawford
parent 4b86176659
commit ef4eeae2df
36 changed files with 42 additions and 1 deletions

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102_nkey

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../darp5/include
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=14in_86

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../galp3-c/include
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=14in_86

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../galp6/include
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../gaze16-3060/include
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../gaze17-3060/include
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=14in_83

View File

@ -8,6 +8,7 @@ CFLAGS += -I$(BOARD_DIR)/../oryp9/include
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT8587E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Include keyboard
KEYBOARD=15in_102

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -5,6 +5,7 @@ board-y += gpio.c
EC=ite
CONFIG_EC_ITE_IT5570E=y
CONFIG_EC_FLASH_SIZE_128K = y
# Enable eSPI
CONFIG_BUS_ESPI=y

View File

@ -34,5 +34,11 @@ ARCH=8051
# 64 KB is the max without banking
CODE_SIZE=65536
# Total flash size: 128 KiB
# Chip flash size
ifeq ($(CONFIG_EC_FLASH_SIZE_128K),y)
CONFIG_EC_FLASH_SIZE = 131072
else ifeq ($(CONFIG_EC_FLASH_SIZE_256K),y)
CONFIG_EC_FLASH_SIZE = 262144
else
$(error flash size not specified)
endif