diff options
author | Iru Cai <mytbk920423@gmail.com> | 2020-08-16 21:39:59 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2020-09-16 01:06:28 +0800 |
commit | 3aa43abce638786561e7cdeff57384b7e9cdf04f (patch) | |
tree | d06a1f8c27a2e6edd99a329b11d9ccb0755c7a09 /src | |
parent | ee49ff520218b6560dea85b671fb7d1e02f307a7 (diff) | |
download | coreboot-3aa43abce638786561e7cdeff57384b7e9cdf04f.tar.xz |
ec: add hp/mec1322
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/hp/mec1322/Kconfig | 33 | ||||
-rw-r--r-- | src/ec/hp/mec1322/Makefile.inc | 35 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/ec/hp/mec1322/Kconfig b/src/ec/hp/mec1322/Kconfig new file mode 100644 index 0000000000..00cb551f6b --- /dev/null +++ b/src/ec/hp/mec1322/Kconfig @@ -0,0 +1,33 @@ +## SPDX-License-Identifier: GPL-2.0-only + +config EC_HP_MEC1322 + bool + help + Interface to SMSC MEC1322 embedded controller in HP laptops. + +if EC_HP_MEC1322 + +comment "Please select the following otherwise your laptop cannot be powered on." + +config MEC1322_FIRMWARE + bool "Add firmware images for MEC1322 EC" + depends on EC_HP_MEC1322 + default n + help + Select this option to add the two firmware blobs for MEC1322. + You need these two blobs to power on your machine. + +config MEC1322_FW + string "MEC1322 firmware path and filename" + depends on MEC1322_FIRMWARE + default "mec1322-fw.bin" + help + The path and filename of the file to use as MEC1322 firmware #1. + You can use util/mec1322/mec1322 to dump it from the vendor firmware. + +config MEC1322_FW_OFFSET + string "Offset of MEC1322 firmware in the flash" + depends on MEC1322_FIRMWARE + default "0xf1f000" + +endif diff --git a/src/ec/hp/mec1322/Makefile.inc b/src/ec/hp/mec1322/Makefile.inc new file mode 100644 index 0000000000..5aec41882c --- /dev/null +++ b/src/ec/hp/mec1322/Makefile.inc @@ -0,0 +1,35 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ifeq ($(CONFIG_EC_HP_MEC1322),y) +MEC1322:=$(top)/util/mec1322/mec1322 +INTERMEDIATE+=mec1322_ec_insert + +ifeq ($(CONFIG_MEC1322_FIRMWARE),y) +cbfs-files-y += ecfw.bin + +ecfw.bin-file := $(call strip_quotes,$(CONFIG_MEC1322_FW)) +ecfw.bin-position := $(CONFIG_MEC1322_FW_OFFSET) +ecfw.bin-type := raw + +endif + +mec1322_ec_insert: $(obj)/coreboot.pre +ifeq ($(CONFIG_MEC1322_FIRMWARE),y) + $(MAKE) -C util/mec1322 + printf " MEC1322 Inserting MEC1322 firmware blobs.\n" + $(MEC1322) insert $(obj)/coreboot.pre $(CONFIG_MEC1322_FW_OFFSET) +endif + +PHONY+=mec1322_ec_insert + +build_complete:: +ifeq ($(CONFIG_MEC1322_FIRMWARE),) + printf "\n** WARNING **\n" + printf "You haven't added the firmware blobs for MEC1322 EC.\n" + printf "You may be unable to power on your laptop without these blobs.\n" + printf "Please select the following option to add them:\n\n" + printf " Chipset --->\n" + printf " [*] Add firmware images for MEC1322 EC\n\n" +endif + +endif |