Frans Hendriks has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31710
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h
......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Wnbond M25PXX command values to spi_winbond.h
Now the commands value can be used for programming SPI
contoller of Intel Braswell, by using including file.
Update winbond.c file with coreboot header.
BUG=N/A
TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495
Signed-off-by: Frans Hendriks <fhendriks(a)eltan.com>
---
A src/drivers/spi/spi_winbond.h
M src/drivers/spi/winbond.c
2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/1
diff --git a/src/drivers/spi/spi_winbond.h b/src/drivers/spi/spi_winbond.h
new file mode 100644
index 0000000..e21571c
--- /dev/null
+++ b/src/drivers/spi/spi_winbond.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2008, Network Appliance Inc.
+ * Author: Jason McMullan <mcmullan <at> netapp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* Winbond specific function */
+/* M25Pxx-specific commands */
+#define CMD_W25_WREN 0x06 /* Write Enable */
+#define CMD_W25_WRDI 0x04 /* Write Disable */
+#define CMD_W25_RDSR 0x05 /* Read Status Register */
+#define CMD_W25_WRSR 0x01 /* Write Status Register */
+#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */
+#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */
+#define CMD_W25_READ 0x03 /* Read Data Bytes */
+#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */
+#define CMD_W25_PP 0x02 /* Page Program */
+#define CMD_W25_SE 0x20 /* Sector (4K) Erase */
+#define CMD_W25_RDID 0x9f /* Read ID */
+#define CMD_W25_BE 0xd8 /* Block (64K) Erase */
+#define CMD_W25_CE 0xc7 /* Chip Erase */
+#define CMD_W25_DP 0xb9 /* Deep Power-down */
+#define CMD_W25_RES 0xab /* Release from DP and Read Signature */
+#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */
+
+/* tw: Maximum time to write a flash cell in milliseconds */
+#define WINBOND_FLASH_TIMEOUT 30
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index 8bf8fcd..7276ec1 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -1,7 +1,16 @@
/*
* Copyright 2008, Network Appliance Inc.
- * Author: Jason McMullan <mcmullan <at> netapp.com>
- * Licensed under the GPL-2 or later.
+ * Jason McMullan <mcmullan(a)netapp.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
#include <console/console.h>
@@ -14,26 +23,7 @@
#include <lib.h>
#include "spi_flash_internal.h"
-
-/* M25Pxx-specific commands */
-#define CMD_W25_WREN 0x06 /* Write Enable */
-#define CMD_W25_WRDI 0x04 /* Write Disable */
-#define CMD_W25_RDSR 0x05 /* Read Status Register */
-#define CMD_W25_WRSR 0x01 /* Write Status Register */
-#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */
-#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */
-#define CMD_W25_READ 0x03 /* Read Data Bytes */
-#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */
-#define CMD_W25_PP 0x02 /* Page Program */
-#define CMD_W25_SE 0x20 /* Sector (4K) Erase */
-#define CMD_W25_BE 0xd8 /* Block (64K) Erase */
-#define CMD_W25_CE 0xc7 /* Chip Erase */
-#define CMD_W25_DP 0xb9 /* Deep Power-down */
-#define CMD_W25_RES 0xab /* Release from DP, and Read Signature */
-#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */
-
-/* tw: Maximum time to write a flash cell in milliseconds */
-#define WINBOND_FLASH_TIMEOUT 30
+#include "spi_winbond.h"
struct winbond_spi_flash_params {
uint16_t id;
--
To view, visit https://review.coreboot.org/c/coreboot/+/31710
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495
Gerrit-Change-Number: 31710
Gerrit-PatchSet: 1
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-MessageType: newchange
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28464 )
Change subject: drivers/intel/fsp1_1: Configure UART after memory init
......................................................................
Patch Set 4:
makes sense, yes
--
To view, visit https://review.coreboot.org/c/coreboot/+/28464
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6c9e4153b3de58791b211c7f4241be3bceae9d
Gerrit-Change-Number: 28464
Gerrit-PatchSet: 4
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Lee Leahy <leroy.p.leahy(a)intel.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Thu, 11 Apr 2019 11:58:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/28464 )
Change subject: drivers/intel/fsp1_1: Configure UART after memory init
......................................................................
drivers/intel/fsp1_1: Configure UART after memory init
FSP code will default enable the onboard serial port.
When external serial port is used, this onboard port needs to be
disabled.
Add function mainboard_after_memory_init() function to perform
required actions to re-enabled output to external serial port.
BUG=N/A
TEST=LPC Post card on Intel Cherry Hill
Change-Id: Ibb6c9e4153b3de58791b211c7f4241be3bceae9d
Signed-off-by: Frans Hendriks <fhendriks(a)eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/28464
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Patrick Rudolph <siro(a)das-labor.org>
---
M src/drivers/intel/fsp1_1/include/fsp/romstage.h
M src/drivers/intel/fsp1_1/raminit.c
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Rudolph: Looks good to me, approved
diff --git a/src/drivers/intel/fsp1_1/include/fsp/romstage.h b/src/drivers/intel/fsp1_1/include/fsp/romstage.h
index e266bee..d608484 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/romstage.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/romstage.h
@@ -3,6 +3,7 @@
*
* Copyright (C) 2014 Google Inc.
* Copyright (C) 2015-2016 Intel Corporation
+ * Copyright (C) 2018 Eltan B.V.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -91,5 +92,6 @@
/* Update the SOC specific memory config param for mma. */
void soc_update_memory_params_for_mma(MEMORY_INIT_UPD *memory_cfg,
struct mma_config_param *mma_cfg);
+void mainboard_after_memory_init(void);
#endif /* _COMMON_ROMSTAGE_H_ */
diff --git a/src/drivers/intel/fsp1_1/raminit.c b/src/drivers/intel/fsp1_1/raminit.c
index 2dd5c77..8405c94 100644
--- a/src/drivers/intel/fsp1_1/raminit.c
+++ b/src/drivers/intel/fsp1_1/raminit.c
@@ -125,6 +125,7 @@
timestamp_add_now(TS_FSP_MEMORY_INIT_START);
post_code(POST_FSP_MEMORY_INIT);
status = fsp_memory_init(&fsp_memory_init_params);
+ mainboard_after_memory_init();
post_code(0x37);
timestamp_add_now(TS_FSP_MEMORY_INIT_END);
@@ -322,3 +323,9 @@
{
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
}
+
+/* Initialize the SoC after MemoryInit */
+__weak void mainboard_after_memory_init(void)
+{
+ printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/28464
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6c9e4153b3de58791b211c7f4241be3bceae9d
Gerrit-Change-Number: 28464
Gerrit-PatchSet: 4
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Lee Leahy <leroy.p.leahy(a)intel.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: merged
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28464 )
Change subject: drivers/intel/fsp1_1: Configure UART after memory init
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/28464/3/src/drivers/intel/fsp1_1/raminit.c
File src/drivers/intel/fsp1_1/raminit.c:
https://review.coreboot.org/#/c/28464/3/src/drivers/intel/fsp1_1/raminit.c@…
PS3, Line 128: mainboard_after_memory_init
> so you call the function and add a weak stub below. […]
This function is used with update of Facebook FBG-1701 ( https://review.coreboot.org/c/coreboot/+/30414)
Note: At the moment I created this patch, I was not aware that you can rebase a patch. The 30414 patch requires the function prototype of this patch. To have the 30414 patch build, I removed the call of mainboard_after_memory_init().
My plan is to wait till this patch in merged before updating the other patch.
Does this make sense?
--
To view, visit https://review.coreboot.org/c/coreboot/+/28464
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6c9e4153b3de58791b211c7f4241be3bceae9d
Gerrit-Change-Number: 28464
Gerrit-PatchSet: 3
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Lee Leahy <leroy.p.leahy(a)intel.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Thu, 11 Apr 2019 11:54:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: comment
Maxim Polyakov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32267
Change subject: mb/asrock/h110m: Add virtual LDN for SurerIO to DT
......................................................................
mb/asrock/h110m: Add virtual LDN for SurerIO to DT
Adds virtual logical devices numbers for the Nuvoton (NCT6791D)
SuperIO to the devicetree.
Change-Id: I7df1633951c30fef14c62c89aaedebd3044b312f
Signed-off-by: Maxim Polyakov <max.senia.poliak(a)gmail.com>
---
M src/mainboard/asrock/h110m/devicetree.cb
1 file changed, 19 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/32267/1
diff --git a/src/mainboard/asrock/h110m/devicetree.cb b/src/mainboard/asrock/h110m/devicetree.cb
index e13076e..158801f 100644
--- a/src/mainboard/asrock/h110m/devicetree.cb
+++ b/src/mainboard/asrock/h110m/devicetree.cb
@@ -344,11 +344,18 @@
irq 0x72 = 12 # Mouse
end
device pnp 2e.6 off end # CIR
- device pnp 2e.7 off end # GPIO6..8
- # WDT1, WDT_MEM, GPIO 0, GPIO 1
- device pnp 2e.8 off end
- # GPIO 2, GPIO 3, GPIO 4, GPIO 5
- device pnp 2e.9 off end
+ device pnp 2e.7 off end # GPIO6
+ device pnp 2e.107 off end # GPIO7
+ device pnp 2e.207 off end # GPIO8
+ device pnp 2e.8 off end # WDT
+ device pnp 2e.108 off end # GPIO0
+ device pnp 2e.308 off end # GPIO base
+ device pnp 2e.408 off end # WDTMEM
+ device pnp 2e.708 off end # GPIO1
+ device pnp 2e.9 off end # GPIO2
+ device pnp 2e.109 off end # GPIO3
+ device pnp 2e.209 off end # GPIO4
+ device pnp 2e.309 off end # GPIO5
device pnp 2e.a off end # ACPI
device pnp 2e.b on # HWM, LED
io 0x60 = 0x0290
@@ -359,7 +366,13 @@
device pnp 2e.e off end # CIR wake-up
device pnp 2e.f off end # GPIO PP/OD
device pnp 2e.14 off end # SVID, Port 80 UART
- device pnp 2e.16 off end # Deep sleep
+ device pnp 2e.16 off end # DS5
+ device pnp 2e.116 off end # DS3
+ device pnp 2e.316 off end # PCHDSW
+ device pnp 2e.416 off end # DSWWOPT
+ device pnp 2e.516 off end # DS3OPT
+ device pnp 2e.616 off end # DSDSS
+ device pnp 2e.716 off end # DSPU
end # superio/nuvoton/nct6791d
chip drivers/pc80/tpm
device pnp 4e.0 on end # TPM module
--
To view, visit https://review.coreboot.org/c/coreboot/+/32267
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7df1633951c30fef14c62c89aaedebd3044b312f
Gerrit-Change-Number: 32267
Gerrit-PatchSet: 1
Gerrit-Owner: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Gerrit-MessageType: newchange
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/28464 )
Change subject: drivers/intel/fsp1_1: Configure UART after memory init
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/28464/3/src/drivers/intel/fsp1_1/raminit.c
File src/drivers/intel/fsp1_1/raminit.c:
https://review.coreboot.org/#/c/28464/3/src/drivers/intel/fsp1_1/raminit.c@…
PS3, Line 128: mainboard_after_memory_init
so you call the function and add a weak stub below. but where's the override that actually does something with this?
--
To view, visit https://review.coreboot.org/c/coreboot/+/28464
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6c9e4153b3de58791b211c7f4241be3bceae9d
Gerrit-Change-Number: 28464
Gerrit-PatchSet: 3
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams(a)intel.com>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Lee Leahy <leroy.p.leahy(a)intel.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Thu, 11 Apr 2019 11:30:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment