Simon Glass has uploaded this change for review. ( https://review.coreboot.org/27467
Change subject: Kconfig: Make the EM100 config option common
......................................................................
Kconfig: Make the EM100 config option common
This applied to AMD devices as well as Intel, although the mechanism is
different. Move the option to a common place.
BUG=b:111363976
TEST=USE=em100-mode emerge-reef coreboot
See that a message appears:
* Enabling em100 mode (slow SPI flash)
Change-Id: Iea437bdf42e7bc49b1d28c812bfc6128e3eb68bd
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
M src/Kconfig
M src/southbridge/intel/common/firmware/Kconfig
2 files changed, 14 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/27467/1
diff --git a/src/Kconfig b/src/Kconfig
index 24b2106..c8ce14f 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -1024,6 +1024,20 @@
Add the compiler switch `-gnata` to compile code guarded by
`pragma Debug`.
+config EM100
+ bool "Configure image for EM100 usage"
+ depends on (HAVE_INTEL_FIRMWARE && HAVE_IFD_BIN && !BUILD_WITH_FAKE_IFD) || \
+ SOC_AMD_COMMON
+ help
+ The Dediprog EM100 SPI emulator allows fast loading of new SPI images
+ over USB. However it only supports a maximum SPI clock of 20MHz and
+ single data output. Enable this option to use a 20MHz SPI clock and
+ disable "Dual Output Fast Read" Support.
+
+ On AMD platforms this changes the SPI speed at run-time if the
+ mainboard code supports this. On supported Intel platforms this works
+ by changing the settings in the descriptor.bin file.
+
endmenu
diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig
index 30c9aaf..b65e7af 100644
--- a/src/southbridge/intel/common/firmware/Kconfig
+++ b/src/southbridge/intel/common/firmware/Kconfig
@@ -34,12 +34,6 @@
default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/descriptor.bin"
depends on HAVE_IFD_BIN && !BUILD_WITH_FAKE_IFD
-config EM100
- bool "Configure IFD for EM100 usage"
- depends on HAVE_IFD_BIN && !BUILD_WITH_FAKE_IFD
- help
- Set SPI frequency to 20MHz and disable Dual Output Fast Read Support
-
config HAVE_ME_BIN
bool "Add Intel ME/TXE firmware"
depends on HAVE_IFD_BIN
--
To view, visit https://review.coreboot.org/27467
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea437bdf42e7bc49b1d28c812bfc6128e3eb68bd
Gerrit-Change-Number: 27467
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Glass <sjg(a)chromium.org>
Simon Glass has uploaded this change for review. ( https://review.coreboot.org/27466
Change subject: stoneyridge: Add support for Dediprog em100
......................................................................
stoneyridge: Add support for Dediprog em100
This device claims to run at 75MHz with dual read, but it is not always
reliable. Add an option to change the SPI flash speed to 16MHz, to avoid
any problems.
BUG=b:111363976
TEST=manually try to get my em100 running (it doesn't yet)
Change-Id: I78d3d32c467aac82c72d31c773bfb0f69808aed4
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
M src/mainboard/google/kahlee/bootblock/bootblock.c
M src/soc/amd/stoneyridge/Kconfig
2 files changed, 37 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/27466/1
diff --git a/src/mainboard/google/kahlee/bootblock/bootblock.c b/src/mainboard/google/kahlee/bootblock/bootblock.c
index 7e6524d..9d767d0 100644
--- a/src/mainboard/google/kahlee/bootblock/bootblock.c
+++ b/src/mainboard/google/kahlee/bootblock/bootblock.c
@@ -34,19 +34,36 @@
void bootblock_mainboard_init(void)
{
- /*
- * W25Q128FW Setup
- * Normal Read 40MHz
- * Fast Read 104MHz
- * Dual Read IO (1-2-2)
- */
- sb_read_mode(SPI_READ_MODE_DUAL122);
+ if (IS_ENABLED(CONFIG_EM100)) {
+ /*
+ * We should be able to rely on defaults, but it seems safer
+ * to explicitly set up these registers.
+ *
+ * Usage:
+ * sudo emerge em100
+ * sudo em100 -s -c W25Q128FW -d \
+ * /build/grunt/firmware/image-grunt.serial.bin -r
+ */
+ sb_read_mode(SPI_READ_MODE_NOM);
+ sb_set_spi100(SPI_SPEED_16M, /* Normal */
+ SPI_SPEED_16M, /* Fast */
+ SPI_SPEED_16M, /* AltIO */
+ SPI_SPEED_66M); /* TPM */
+ } else {
+ /*
+ * W25Q128FW Setup
+ * Normal Read 40MHz
+ * Fast Read 104MHz
+ * Dual Read IO (1-2-2)
+ */
+ sb_read_mode(SPI_READ_MODE_DUAL122);
- /* Set SPI speeds before verstage. Needed for TPM */
- sb_set_spi100(SPI_SPEED_33M, /* Normal */
- SPI_SPEED_66M, /* Fast */
- SPI_SPEED_66M, /* AltIO */
- SPI_SPEED_66M); /* TPM */
+ /* Set SPI speeds before verstage. Needed for TPM */
+ sb_set_spi100(SPI_SPEED_33M, /* Normal */
+ SPI_SPEED_66M, /* Fast */
+ SPI_SPEED_66M, /* AltIO */
+ SPI_SPEED_66M); /* TPM */
+ }
/* Setup TPM decode before verstage */
sb_tpm_decode_spi();
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index 05c3043..08e51cd 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -394,4 +394,12 @@
vendorcode/amd/pi/00670F00/ will be compiled or only
selected procedures of source files (minimum required).
+config EM100
+ bool "Configure image for EM100 usage"
+ help
+ The Dediprog EM100 SPI emulator allows fast loading of new SPI images
+ over USB. However it only supports a maximum SPI clock of 20MHz and
+ single data output. Enable this option to use a 20MHz SPI clock and
+ disable "Dual Output Fast Read" Support
+
endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4
--
To view, visit https://review.coreboot.org/27466
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78d3d32c467aac82c72d31c773bfb0f69808aed4
Gerrit-Change-Number: 27466
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Glass <sjg(a)chromium.org>
Simon Glass has removed Martin Roth from this change. ( https://review.coreboot.org/27465 )
Change subject: mb/google/kahlee/variants/grunt: Select low-power mode for WiFi
......................................................................
Removed reviewer Martin Roth.
--
To view, visit https://review.coreboot.org/27465
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: I389815bc36b8610a30b0cbb9d73262ad392e0181
Gerrit-Change-Number: 27465
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Glass <sjg(a)chromium.org>
Simon Glass has uploaded this change for review. ( https://review.coreboot.org/27465
Change subject: mb/google/kahlee/variants/grunt: Select low-power mode for WiFi
......................................................................
mb/google/kahlee/variants/grunt: Select low-power mode for WiFi
Put the PCIe clock pins in power-saving mode for the WiFi module to save
power.
Note: This currently does not appear to have any effect on grunt.
BUG=b:110041917
BRANCH=none
TEST=boot without this patch:
$ iotools mem_read32 0xfed80e00
0x0046f3ff
With this patch:
$ iotools mem_read32 0xfed80e00
0x0046f3f1
Change-Id: I389815bc36b8610a30b0cbb9d73262ad392e0181
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
M src/mainboard/google/kahlee/mainboard.c
M src/soc/amd/stoneyridge/include/soc/southbridge.h
2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/27465/1
diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c
index cf600d2..a5a8dd1 100644
--- a/src/mainboard/google/kahlee/mainboard.c
+++ b/src/mainboard/google/kahlee/mainboard.c
@@ -150,6 +150,12 @@
GPP_CLK2_CLOCK_REQ_MAP_MASK,
GPP_CLK2_CLOCK_REQ_MAP_CLK_REQ2 <<
GPP_CLK2_CLOCK_REQ_MAP_SHIFT);
+
+ /* Same for the WiFi */
+ clrsetbits_le32((uint32_t *)(MISC_MMIO_BASE + GPP_CLK_CNTRL),
+ GPP_CLK0_CLOCK_REQ_MAP_MASK,
+ GPP_CLK0_CLOCK_REQ_MAP_CLK_REQ0 <<
+ GPP_CLK0_CLOCK_REQ_MAP_SHIFT);
}
/*************************************************
diff --git a/src/soc/amd/stoneyridge/include/soc/southbridge.h b/src/soc/amd/stoneyridge/include/soc/southbridge.h
index 3127f5c..2e95309 100644
--- a/src/soc/amd/stoneyridge/include/soc/southbridge.h
+++ b/src/soc/amd/stoneyridge/include/soc/southbridge.h
@@ -366,6 +366,10 @@
#define GPP_CLK2_CLOCK_REQ_MAP_MASK (0xf << GPP_CLK2_CLOCK_REQ_MAP_SHIFT)
#define GPP_CLK2_CLOCK_REQ_MAP_CLK_REQ2 3
+#define GPP_CLK0_CLOCK_REQ_MAP_SHIFT 0
+#define GPP_CLK0_CLOCK_REQ_MAP_MASK (0xf << GPP_CLK0_CLOCK_REQ_MAP_SHIFT)
+#define GPP_CLK0_CLOCK_REQ_MAP_CLK_REQ0 1
+
struct stoneyridge_aoac {
int enable;
int status;
--
To view, visit https://review.coreboot.org/27465
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I389815bc36b8610a30b0cbb9d73262ad392e0181
Gerrit-Change-Number: 27465
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Glass <sjg(a)chromium.org>
Simon Glass has uploaded this change for review. ( https://review.coreboot.org/27464
Change subject: stoneyridge: Enable APSM on PCI express
......................................................................
stoneyridge: Enable APSM on PCI express
We should use active-state power management where possible to reduced
power consumption during normal operation. Enable these options.
Note that PCIEXP_COMMON_CLOCK is left disabled, since at least on Grunt
the WLAN module seems to generate its own clock. Perhaps I misunderstand
the meaning of that setting.
BUG=b:110041917
TEST=boot on grunt, see that WiFi and eMMC still run OK
Change-Id: Ia7c711304ffe460a9fb0d4f654a51485958239ea
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
M src/soc/amd/stoneyridge/Kconfig
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/27464/1
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index 05c3043..e883929 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -66,6 +66,9 @@
select SSE
select SSE2
select RTC
+ select PCIEXP_ASPM
+ select PCIEXP_CLK_PM
+ select PCIEXP_L1_SUB_STATE
config VBOOT
select VBOOT_SEPARATE_VERSTAGE
--
To view, visit https://review.coreboot.org/27464
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7c711304ffe460a9fb0d4f654a51485958239ea
Gerrit-Change-Number: 27464
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Glass <sjg(a)chromium.org>