Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63749 )
Change subject: mb/purism/librem_mini: Rework front status LED to show all disk activity
......................................................................
mb/purism/librem_mini: Rework front status LED to show all disk activity
The front status LED on the Librem Mini is driven by the SATALED# GPIO
line configured for native function, so only shows disk activity for
SATA drives, but not NVMe. To allow it to show disk activity for NVMe
drives as well, reconfigure the GPIO as GPIO-OUT (rather than native
function), and configure it via ACPI so that the linux gpio-leds
driver will attach and use it accordingly.
This has the added benefit of allowing the user to reconfigure the
LED as they see fit via sysfs.
Test: boot Linux (PureOS) on Librem Mini v2 with NVMe drive, observe status
LED blinks during periods of disk activity (tested via 'stress').
Change-Id: I34c2a5f3fd1038266f4514544abfc1020da6f85b
Signed-off-by: Matt DeVillier <matt.devillier(a)puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63749
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
---
M src/mainboard/purism/librem_cnl/variants/librem_mini/gpio.c
M src/mainboard/purism/librem_cnl/variants/librem_mini/include/variant/acpi/variant.asl
2 files changed, 53 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/mainboard/purism/librem_cnl/variants/librem_mini/gpio.c b/src/mainboard/purism/librem_cnl/variants/librem_mini/gpio.c
index 08134e0..24ed2be 100644
--- a/src/mainboard/purism/librem_cnl/variants/librem_mini/gpio.c
+++ b/src/mainboard/purism/librem_cnl/variants/librem_mini/gpio.c
@@ -539,8 +539,8 @@
/* GPP_E7 - NC */
PAD_NC(GPP_E7, NONE),
- /* GPP_E8 - SATALED# */
- PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1),
+ /* GPP_E8 - STATUSLED# */
+ PAD_CFG_GPO(GPP_E8, 1, PLTRST),
/* GPP_E9 - USB2_OC0# */
PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1),
diff --git a/src/mainboard/purism/librem_cnl/variants/librem_mini/include/variant/acpi/variant.asl b/src/mainboard/purism/librem_cnl/variants/librem_mini/include/variant/acpi/variant.asl
index 0c9a76b..727a9d4 100644
--- a/src/mainboard/purism/librem_cnl/variants/librem_mini/include/variant/acpi/variant.asl
+++ b/src/mainboard/purism/librem_cnl/variants/librem_mini/include/variant/acpi/variant.asl
@@ -14,3 +14,54 @@
}
}
}
+
+Scope (\_SB)
+{
+ Device (LEDS)
+ {
+ Name (_HID, "PRP0001")
+ Name (_DDN, "GPIO LEDs device")
+
+ Name (_CRS, ResourceTemplate () {
+ GpioIo (
+ Exclusive, // Not shared
+ PullNone, // No need for pulls
+ 0, // Debounce timeout
+ 0, // Drive strength
+ IoRestrictionOutputOnly, // Only used as output
+ "\\_SB.PCI0.GPIO", // GPIO controller
+ 0) // Must be 0
+ {
+ 296, // GPP_E8 - STATUSLED#
+ }
+ })
+
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "compatible", Package() { "gpio-leds" } },
+ },
+ ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+ Package () {
+ Package () {"led-0", "LED0"},
+ }
+ })
+
+ /*
+ * For more information about these bindings see:
+ * Documentation/devicetree/bindings/leds/common.yaml,
+ * Documentation/devicetree/bindings/leds/leds-gpio.yaml and
+ * Documentation/firmware-guide/acpi/gpio-properties.rst.
+ */
+ Name (LED0, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () {"label", "blue:status"},
+ Package () {"default-state", "keep"},
+ Package () {"linux,default-trigger", "disk-activity"},
+ Package () {"gpios", Package () {^LEDS, 0, 0, 1}},
+ Package () {"retain-state-suspended", 1},
+ }
+ })
+ }
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/63749
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I34c2a5f3fd1038266f4514544abfc1020da6f85b
Gerrit-Change-Number: 63749
Gerrit-PatchSet: 3
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63752 )
Change subject: nb/intel/i945/memmap.c: Fix TOLUD bit field mask
......................................................................
nb/intel/i945/memmap.c: Fix TOLUD bit field mask
Register TOLUD is defined as bit field 7:3 (section 5.1.26, page 103,
i945GM datasheet), fix the mask accordingly.
Change-Id: Ia27661084e11ea93d5f0dc20bafb488ae2995b49
Signed-off-by: Petr Cvek <petrcvekcz(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63752
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas(a)noos.fr>
---
M src/northbridge/intel/i945/memmap.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Elyes Haouas: Looks good to me, approved
diff --git a/src/northbridge/intel/i945/memmap.c b/src/northbridge/intel/i945/memmap.c
index 1dea21c..58e29c8 100644
--- a/src/northbridge/intel/i945/memmap.c
+++ b/src/northbridge/intel/i945/memmap.c
@@ -40,7 +40,7 @@
/* IGD enabled, get top of Memory from BSM register */
tom = pci_read_config32(IGD_DEV, BSM);
else
- tom = (pci_read_config8(HOST_BRIDGE, TOLUD) & 0xf7) << 24;
+ tom = (pci_read_config8(HOST_BRIDGE, TOLUD) & 0xf8) << 24;
/* subtract TSEG size */
tom -= decode_tseg_size(pci_read_config8(HOST_BRIDGE, ESMRAMC));
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/coreboot/+/63752
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia27661084e11ea93d5f0dc20bafb488ae2995b49
Gerrit-Change-Number: 63752
Gerrit-PatchSet: 4
Gerrit-Owner: Petr Cvek <petrcvekcz(a)gmail.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63741 )
Change subject: soc/amd/sabrina: enable warm reset functionality
......................................................................
soc/amd/sabrina: enable warm reset functionality
Commit 3e1943ec46d04aff01c7fc755ac371e33e7a2dcb (soc/amd/cezanne: Force
resets to be cold) forced all resets on Cezanne to be cold resets to
work around a bug. Since the bug is fixed on Sabrina, this workaround
copied over from the Cezanne code isn't needed here, so sort-of revert
what the patch referenced above changed for Cezanne in the Sabrina code.
BUG=b:229105416
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: I785e43124a9a969eeb129454e6e15dc245625250
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63741
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Reviewed-by: Karthik Ramasubramanian <kramasub(a)google.com>
---
M src/soc/amd/sabrina/fch.c
M src/soc/amd/sabrina/reset.c
2 files changed, 1 insertion(+), 9 deletions(-)
Approvals:
build bot (Jenkins): Verified
Marshall Dawson: Looks good to me, but someone else must approve
Karthik Ramasubramanian: Looks good to me, approved
diff --git a/src/soc/amd/sabrina/fch.c b/src/soc/amd/sabrina/fch.c
index 9be7dd8..a768989 100644
--- a/src/soc/amd/sabrina/fch.c
+++ b/src/soc/amd/sabrina/fch.c
@@ -127,11 +127,6 @@
PM_ACPI_TIMER_EN_EN);
}
-static void fch_init_resets(void)
-{
- pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) | TOGGLE_ALL_PWR_GOOD);
-}
-
/* configure the general purpose PCIe clock outputs according to the devicetree settings */
static void gpp_clk_setup(void)
{
@@ -198,7 +193,6 @@
void fch_init(void *chip_info)
{
- fch_init_resets();
i2c_soc_init();
fch_init_acpi_ports();
diff --git a/src/soc/amd/sabrina/reset.c b/src/soc/amd/sabrina/reset.c
index 90fedda..28e60b6 100644
--- a/src/soc/amd/sabrina/reset.c
+++ b/src/soc/amd/sabrina/reset.c
@@ -19,9 +19,7 @@
void do_warm_reset(void)
{
- /* Warm resets are not supported and must be executed as cold */
- pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) |
- TOGGLE_ALL_PWR_GOOD);
+ /* Assert reset signals only. */
outb(RST_CPU | SYS_RST, RST_CNT);
}
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/coreboot/+/63741
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I785e43124a9a969eeb129454e6e15dc245625250
Gerrit-Change-Number: 63741
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Jason Glenesk, Raul Rangel, Fred Reitberger.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63741 )
Change subject: soc/amd/sabrina: enable warm reset functionality
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> Reboot works. So does `echo c > /proc/sysrq-trigger`. […]
thanks for testing
--
To view, visit https://review.coreboot.org/c/coreboot/+/63741
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I785e43124a9a969eeb129454e6e15dc245625250
Gerrit-Change-Number: 63741
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Comment-Date: Fri, 22 Apr 2022 21:11:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-MessageType: comment