Keith Hui has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81884?usp=email )
Change subject: superio/nuvoton/nct6779d: Allow swapping PS/2 keyboard/mouse ports
......................................................................
superio/nuvoton/nct6779d: Allow swapping PS/2 keyboard/mouse ports
Add nvram option to allow user to manually swap PS/2 keyboard and mouse
ports (i.e. keyboard port serves the mouse instead).
This is intended for mainboards with only one PS/2 port for either
keyboard or mouse. Until coreboot gets improved keyboard and mouse
detection and initialization and can decide on its own when to swap,
this option allows PS/2 mouse connected to this one port a chance
to work in the OS.
Without this support, the one PS/2 port works with keyboards only.
TEST=With nvram option added to asus/p8x7x-series/v/p8z77-m and turned
on, PS/2 mouse works.
Change-Id: I2d58719c207da973ad049cb9151d92f31ff6cd92
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/superio/nuvoton/nct6779d/superio.c
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/81884/1
diff --git a/src/superio/nuvoton/nct6779d/superio.c b/src/superio/nuvoton/nct6779d/superio.c
index e908c9c..09942d6 100644
--- a/src/superio/nuvoton/nct6779d/superio.c
+++ b/src/superio/nuvoton/nct6779d/superio.c
@@ -12,6 +12,7 @@
{
uint8_t byte;
uint8_t power_status;
+ uint8_t swap_kbd_mouse;
if (!dev->enabled)
return;
@@ -38,12 +39,20 @@
power_status = get_uint_option("power_on_after_fail",
CONFIG_MAINBOARD_POWER_FAILURE_STATE) & 0x03;
+ swap_kbd_mouse = get_uint_option("swap_keyboard_and_mouse", 0) & 0x1;
pnp_enter_conf_mode(dev);
pnp_set_logical_device(dev);
byte = pnp_read_config(dev, 0xe4);
byte &= ~0x60;
byte |= (power_status << 5);
pnp_write_config(dev, 0xe4, byte);
+ /* Swap keyboard and mouse port if requested */
+ byte = pnp_read_config(dev, 0xe0);
+ if (swap_kbd_mouse)
+ byte |= (1 << 2);
+ else
+ byte &= ~(1 << 2);
+ pnp_write_config(dev, 0xe0, byte);
pnp_exit_conf_mode(dev);
break;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/81884?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I2d58719c207da973ad049cb9151d92f31ff6cd92
Gerrit-Change-Number: 81884
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-MessageType: newchange
Keith Hui has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81883?usp=email )
Change subject: superio/nuvoton/nct6779d: Add power_on_after_fail support
......................................................................
superio/nuvoton/nct6779d: Add power_on_after_fail support
Using code from superio/nuvoton/nct5572d (which has the same registers
as '6779), add support for configuring power state after power failure
using power_on_after_fail nvram option.
TEST=Set nvram option to "enable" on mainboard/asus/p8z77-m, pulled
power plug, board powers on after restoring power. Board remains off
after power restore with nvram option set to "keep". Super I/O
configured correctly per datasheet and superiotool -d.
Change-Id: Ia08cf8daac971397e832996ed364d41e9e7b1c5d
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/superio/nuvoton/nct6779d/Kconfig
M src/superio/nuvoton/nct6779d/superio.c
2 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/81883/1
diff --git a/src/superio/nuvoton/nct6779d/Kconfig b/src/superio/nuvoton/nct6779d/Kconfig
index ce2af16..f60cf1c 100644
--- a/src/superio/nuvoton/nct6779d/Kconfig
+++ b/src/superio/nuvoton/nct6779d/Kconfig
@@ -3,3 +3,5 @@
config SUPERIO_NUVOTON_NCT6779D
bool
select SUPERIO_NUVOTON_COMMON_PRE_RAM
+ select HAVE_POWER_STATE_AFTER_FAILURE
+ select HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
diff --git a/src/superio/nuvoton/nct6779d/superio.c b/src/superio/nuvoton/nct6779d/superio.c
index 1360476..e908c9c 100644
--- a/src/superio/nuvoton/nct6779d/superio.c
+++ b/src/superio/nuvoton/nct6779d/superio.c
@@ -3,12 +3,16 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
+#include <option.h>
#include <superio/conf_mode.h>
#include "nct6779d.h"
static void nct6779d_init(struct device *dev)
{
+ uint8_t byte;
+ uint8_t power_status;
+
if (!dev->enabled)
return;
@@ -17,6 +21,31 @@
case NCT6779D_KBC:
pc_keyboard_init(NO_AUX_DEVICE);
break;
+ case NCT6779D_ACPI:
+ /* Set power state after power fail.
+ * NOTE: This depends on CONFIG_MAINBOARD_POWER_FAILURE_STATE to be defined as:
+ *
+ * config MAINBOARD_POWER_FAILURE_STATE
+ * int
+ * default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE
+ * default 1 if POWER_STATE_ON_AFTER_FAILURE
+ * default 0
+ *
+ * ... matching this hardware.
+ * If this definition changes, this code has to be adapted similar to
+ * NCT5572D.
+ */
+
+ power_status = get_uint_option("power_on_after_fail",
+ CONFIG_MAINBOARD_POWER_FAILURE_STATE) & 0x03;
+ pnp_enter_conf_mode(dev);
+ pnp_set_logical_device(dev);
+ byte = pnp_read_config(dev, 0xe4);
+ byte &= ~0x60;
+ byte |= (power_status << 5);
+ pnp_write_config(dev, 0xe4, byte);
+ pnp_exit_conf_mode(dev);
+ break;
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/81883?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ia08cf8daac971397e832996ed364d41e9e7b1c5d
Gerrit-Change-Number: 81883
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-MessageType: newchange
Keith Hui has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81878?usp=email )
Change subject: sb/intel/bd82x6x: Make space for USB port config in devicetree
......................................................................
sb/intel/bd82x6x: Make space for USB port config in devicetree
This is the first step to:
- Move USB port configs, which are static, from C code to devicetree;
- Unify USB port configs between MRC and native code path.
For USB current strength/trace length settings, define one set of
constants that match the selected RAM init code path, so compiler
can produce the correct values for runtime.
This structure will otherwise match the one in C code used by native
code path.
Change-Id: I59af466d41790e2163342cac8676457ac19371ea
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/southbridge/intel/bd82x6x/chip.h
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/81878/1
diff --git a/src/southbridge/intel/bd82x6x/chip.h b/src/southbridge/intel/bd82x6x/chip.h
index 66d5cb1..95ca08b 100644
--- a/src/southbridge/intel/bd82x6x/chip.h
+++ b/src/southbridge/intel/bd82x6x/chip.h
@@ -5,6 +5,20 @@
#include <southbridge/intel/common/spi.h>
#include <types.h>
+#include <southbridge/intel/bd82x6x/pch.h>
+
+/* Shorthands for boards using MRC */
+#if CONFIG(USE_NATIVE_RAMINIT)
+#define USB_GAIN_1 1
+#define USB_GAIN_2 2
+#define USB_GAIN_L 0
+#define USB_GAIN_H 1
+#else
+#define USB_GAIN_1 0x40
+#define USB_GAIN_2 0x80
+#define USB_GAIN_L 0x40
+#define USB_GAIN_H 0x80
+#endif
struct southbridge_intel_bd82x6x_config {
/**
@@ -77,6 +91,7 @@
uint32_t spi_uvscc;
uint32_t spi_lvscc;
struct intel_swseq_spi_config spi;
+ struct southbridge_usb_port usb_port_config[14];
};
#endif /* SOUTHBRIDGE_INTEL_BD82X6X_CHIP_H */
--
To view, visit https://review.coreboot.org/c/coreboot/+/81878?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I59af466d41790e2163342cac8676457ac19371ea
Gerrit-Change-Number: 81878
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-MessageType: newchange
Attention is currently required from: Angel Pons.
Hello Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/78206?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: nb/intel/sandybridge: Pre-render constants in MRC pei_data
......................................................................
nb/intel/sandybridge: Pre-render constants in MRC pei_data
Portions of MRC raminit code only serves to enter fixed constants
into pei_data structure for MRC consumption.
Since the constants are all to the front of the structure, set up a
truncated copy for compiler to render at build time. Chipset code then
uses it as a base to initialize the (in-CAR) structure and fill out the
rest at runtime.
TEST=No regression observed when booting on asus/p8z77-m.
Change-Id: Ic0f429a7be11ea497ce31cde007966ea988a256f
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/northbridge/intel/sandybridge/raminit_mrc.c
1 file changed, 39 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/78206/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/78206?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic0f429a7be11ea497ce31cde007966ea988a256f
Gerrit-Change-Number: 78206
Gerrit-PatchSet: 4
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Dinesh Gehlot, Eric Lai, Kapil Porwal, Matt DeVillier, Nick Vaccaro.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81871?usp=email )
Change subject: mb/google/brya: Enable UFS driver for edk2 payload
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81871?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3dc018582e974bf73c7668f78da9b81eeb038c01
Gerrit-Change-Number: 81871
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Dinesh Gehlot <digehlot(a)google.com>
Gerrit-Reviewer: Eric Lai <ericllai(a)google.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Eric Lai <ericllai(a)google.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Dinesh Gehlot <digehlot(a)google.com>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Comment-Date: Sat, 13 Apr 2024 03:46:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment