Andrey Petrov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35968 )
Change subject: mainboard/ocp/monolake: Hide NIC IIO root ports earlier
......................................................................
mainboard/ocp/monolake: Hide NIC IIO root ports earlier
It turned on some SKUs FSP hangs in Notify stage if IIO root ports are
disabled after MemoryInit. Because of that explicitly hide in romstage.
TEST=the patch was ran on affected HW and success was reported
Change-Id: I6a2a405f729df14f46bcf34a24e66e8ba9415f9d
Signed-off-by: Andrey Petrov <anpetrov(a)fb.com>
---
M src/mainboard/ocp/monolake/devicetree.cb
M src/mainboard/ocp/monolake/romstage.c
2 files changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/35968/1
diff --git a/src/mainboard/ocp/monolake/devicetree.cb b/src/mainboard/ocp/monolake/devicetree.cb
index 26c95d5..6a8bef1 100644
--- a/src/mainboard/ocp/monolake/devicetree.cb
+++ b/src/mainboard/ocp/monolake/devicetree.cb
@@ -4,8 +4,6 @@
end
device domain 0 on
device pci 00.0 on end # SoC router
- device pci 02.2 off end # IOU0 port C, 10GbE
- device pci 02.3 off end # IOU0 port D, 10GbE
device pci 14.0 on end # xHCI Controller
device pci 19.0 on end # Gigabit LAN Controller
device pci 1d.0 on end # EHCI Controller
diff --git a/src/mainboard/ocp/monolake/romstage.c b/src/mainboard/ocp/monolake/romstage.c
index ef41b77..4a1a235 100644
--- a/src/mainboard/ocp/monolake/romstage.c
+++ b/src/mainboard/ocp/monolake/romstage.c
@@ -26,7 +26,7 @@
#include <soc/pci_devs.h>
#include <soc/lpc.h>
#include <soc/gpio.h>
-
+#include <soc/ubox.h>
/* Define the strings for UPD variables that could be customized */
#define FSP_VAR_HYPERTHREADING "HyperThreading"
@@ -207,6 +207,14 @@
printk(BIOS_EMERG, "Detected broken platform state. Issuing full reset\n");
full_reset();
}
+
+ /*
+ * Explicitly hide internal root port IIO devices that GbE device is connected to.
+ * We can't use devicetree for this since FSP seemingly gets confused if we hide
+ * after MemoryInit API was called.
+ */
+ iio_hide(PCIE_IIO_PORT_2_DEV, PCIE_IIO_PORT_2C_FUNC);
+ iio_hide(PCIE_IIO_PORT_2_DEV, PCIE_IIO_PORT_2D_FUNC);
}
/**
--
To view, visit https://review.coreboot.org/c/coreboot/+/35968
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6a2a405f729df14f46bcf34a24e66e8ba9415f9d
Gerrit-Change-Number: 35968
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35955 )
Change subject: Documentation/mainboard/facebook: Add rev 1.3
......................................................................
Documentation/mainboard/facebook: Add rev 1.3
Add rev 1.3 of the fbg1701 board.
This adds Kingston memory.
BUG=none
TEST=none
Change-Id: Iaba6f28368e2e4ca412122b5fa28ed93c705f4df
Signed-off-by: Wim Vervoorn <wvervoorn(a)eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35955
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks(a)eltan.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
M Documentation/mainboard/facebook/fbg1701.md
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Paul Menzel: Looks good to me, but someone else must approve
Frans Hendriks: Looks good to me, approved
diff --git a/Documentation/mainboard/facebook/fbg1701.md b/Documentation/mainboard/facebook/fbg1701.md
old mode 100644
new mode 100755
index 89e8a6a..e596277
--- a/Documentation/mainboard/facebook/fbg1701.md
+++ b/Documentation/mainboard/facebook/fbg1701.md
@@ -5,16 +5,17 @@
FBG1701 are assembled with different onboard memory modules:
Rev 1.0 Onboard Samsung K4B8G1646D-MYKO memory
Rev 1.1 and 1.2 Onboard Micron MT41K512M16HA-125A memory
+ Rev 1.3 Onboard Kingston B5116ECMDXGGB memory
-Use make menuconfig to configure `onboard memory manufacturer` in Mainboard
-menu.
+Use make menuconfig to configure `onboard memory manufacturer Samsung` in
+Mainboard menu.
## Required blobs
This board currently requires:
fsp blob 3rdparty/fsp/BraswellFspBinPkg/FspBin/BSWFSP.fd
Microcode Intel Braswell cpuid 1046C4 version 410
- (Used pre-build binary retrieved from Intel site)
+ (Used pre-built binary retrieved from Intel site)
## Flashing coreboot
@@ -25,7 +26,7 @@
### External programming
The system has an internal flash chip which is a 8 MiB soldered SOIC-8 chip.
-This chip is located to the top middle side of the board. It's located
+This chip is located on the top middle side of the board. It's located
between SoC and Q7 connector. Use clip (or solder wires) to program
the chip.
Specifically, it's a Winbond W25Q64FW (1.8V), whose datasheet can be found
--
To view, visit https://review.coreboot.org/c/coreboot/+/35955
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaba6f28368e2e4ca412122b5fa28ed93c705f4df
Gerrit-Change-Number: 35955
Gerrit-PatchSet: 3
Gerrit-Owner: Wim Vervoorn
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Wim Vervoorn
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33549
Change subject: [RFC]sb/intel/bd82x6x/lpc: Setup default LPC decode ranges
......................................................................
[RFC]sb/intel/bd82x6x/lpc: Setup default LPC decode ranges
Most mainboards do nothing but setting up a similar decode range so
move it to a common place. All IO ports below 0x1000 are allocated to
the LPC device by default so this should not be an issue.
Lynxpoint does this too.
TODO remove most mainboard specific setups.
Change-Id: Ifeb5a862e56f415aa847d0118a33a31537ab8037
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/southbridge/intel/bd82x6x/early_pch.c
1 file changed, 12 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/33549/1
diff --git a/src/southbridge/intel/bd82x6x/early_pch.c b/src/southbridge/intel/bd82x6x/early_pch.c
index 0082c91..ef3ee77 100644
--- a/src/southbridge/intel/bd82x6x/early_pch.c
+++ b/src/southbridge/intel/bd82x6x/early_pch.c
@@ -258,8 +258,16 @@
write_pmbase16(TCO1_CNT, 1 << 11); /* halt timer */
}
-static void pch_enable_lpc_gen_decode(void)
+static void pch_enable_lpc_decode(void)
{
+ /* Set COM1/COM2 decode range */
+ pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0010);
+
+ /* Enable SuperIO + MC + COM1 + PS/2 Keyboard/Mouse */
+ u16 lpc_config = CNF1_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN
+ | KBC_LPC_EN | MC_LPC_EN;
+ pci_write_config16(PCH_LPC_DEV, LPC_EN, lpc_config);
+
const struct device *dev = pcidev_on_root(0x1f, 0);
const struct southbridge_intel_bd82x6x_config *config = NULL;
@@ -279,9 +287,10 @@
void early_pch_init(void)
{
- pch_enable_lpc();
- pch_enable_lpc_gen_decode();
+ pch_enable_lpc_decode();
+
+ pch_enable_lpc();
pch_enable_bars();
--
To view, visit https://review.coreboot.org/c/coreboot/+/33549
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifeb5a862e56f415aa847d0118a33a31537ab8037
Gerrit-Change-Number: 33549
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/20100 )
Change subject: intel/broadwell: Hook libgfxinit up
......................................................................
intel/broadwell: Hook libgfxinit up
As VGA_ROM_RUN and libgfxinit are mutually exclusive in Kconfig,
we don't have to guard all the VGA BIOS if's and can assume
gfx_get_init_done() returns 0 until all the quirks are handled.
Then, we can run libgfxinit.
Change-Id: Id5d0c2c12b1ff8f95ba4e0223a3e9aff27547acd
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/20100
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
---
M src/soc/intel/broadwell/igd.c
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Georgi: Looks good to me, approved
Arthur Heymans: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index f4322bf..3147680 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -27,6 +27,7 @@
#include <reg_script.h>
#include <cbmem.h>
#include <drivers/intel/gma/i915_reg.h>
+#include <drivers/intel/gma/libgfxinit.h>
#include <drivers/intel/gma/opregion.h>
#include <soc/cpu.h>
#include <soc/nvs.h>
@@ -594,6 +595,12 @@
DDI_INIT_DISPLAY_DETECTED);
}
+ if (CONFIG(MAINBOARD_USE_LIBGFXINIT)) {
+ int lightup_ok;
+ gma_gfxinit(&lightup_ok);
+ gfx_set_init_done(lightup_ok);
+ }
+
intel_gma_restore_opregion();
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/20100
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id5d0c2c12b1ff8f95ba4e0223a3e9aff27547acd
Gerrit-Change-Number: 20100
Gerrit-PatchSet: 7
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
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-MessageType: merged
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/20100 )
Change subject: intel/broadwell: Hook libgfxinit up
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/20100
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id5d0c2c12b1ff8f95ba4e0223a3e9aff27547acd
Gerrit-Change-Number: 20100
Gerrit-PatchSet: 6
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
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-Comment-Date: Wed, 16 Oct 2019 14:07:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Hello Matt DeVillier,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/35897
to review the following change.
Change subject: [TEST] intel/broadwell: Implement proper backlight PWM config
......................................................................
[TEST] intel/broadwell: Implement proper backlight PWM config
Port the backlight-PWM handling from Skylake instead of the previously
used Haswell version.
Lynx Point, the PCH for Haswell and Broadwell, is a transition point
for the backlight-PWM config. On platforms with a PCH, we have:
o Before Lynx Point:
The CPU has no PWM pin and sends the PWM duty-cycle setting
to the PCH. The PCH can choose to ignore that and use its own
setting (BLM_PCH_OVERRIDE_ENABLE).
We use the CPU setting on these platforms.
o Lynx Point + Haswell:
The CPU has an additional PWM pin but can be set up to send
its setting to the PCH as before. The PCH can still choose
to ignore that.
We use the CPU setting with Haswell.
o Lynx Point + Broadwell:
The CPU can't send its setting to the PCH anymore. BLM_PCH_
OVERRIDE_ENABLE must always be set! if the PCH PWM pin is
used (it virtually always is).
We have to use the PCH setting in this case.
o After Lynx Point:
Same as with Broadwell, only BLM_PCH_OVERRIDE_ENABLE is
implied and the bit not implemented anymore.
TOTEST: Boot Linux with `drm.debug=0xe` with and without this patch,
check if it reports the same PWM frequency.
Change-Id: I1d61d9b3f1802ebe18799fc4d06f1f1d3b54c924
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/mainboard/google/auron/variants/auron_paine/devicetree.cb
M src/mainboard/google/auron/variants/auron_yuna/devicetree.cb
M src/mainboard/google/auron/variants/buddy/devicetree.cb
M src/mainboard/google/auron/variants/gandof/devicetree.cb
M src/mainboard/google/auron/variants/lulu/devicetree.cb
M src/mainboard/google/auron/variants/samus/devicetree.cb
M src/mainboard/purism/librem_bdw/variants/librem13v1/devicetree.cb
M src/mainboard/purism/librem_bdw/variants/librem15v2/devicetree.cb
M src/soc/intel/broadwell/chip.h
M src/soc/intel/broadwell/igd.c
10 files changed, 49 insertions(+), 34 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/35897/1
diff --git a/src/mainboard/google/auron/variants/auron_paine/devicetree.cb b/src/mainboard/google/auron/variants/auron_paine/devicetree.cb
index b31d829..5a4fbe1 100644
--- a/src/mainboard/google/auron/variants/auron_paine/devicetree.cb
+++ b/src/mainboard/google/auron/variants/auron_paine/devicetree.cb
@@ -9,9 +9,8 @@
# Enable HDMI Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000000"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/google/auron/variants/auron_yuna/devicetree.cb b/src/mainboard/google/auron/variants/auron_yuna/devicetree.cb
index 3c00ec9..8aeb6d5 100644
--- a/src/mainboard/google/auron/variants/auron_yuna/devicetree.cb
+++ b/src/mainboard/google/auron/variants/auron_yuna/devicetree.cb
@@ -9,9 +9,8 @@
# Enable HDMI Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000000"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/google/auron/variants/buddy/devicetree.cb b/src/mainboard/google/auron/variants/buddy/devicetree.cb
index f75da84..b322c0c 100644
--- a/src/mainboard/google/auron/variants/buddy/devicetree.cb
+++ b/src/mainboard/google/auron/variants/buddy/devicetree.cb
@@ -9,9 +9,8 @@
# Enable HDMI Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000000"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/google/auron/variants/gandof/devicetree.cb b/src/mainboard/google/auron/variants/gandof/devicetree.cb
index 118e646..15e9c24 100644
--- a/src/mainboard/google/auron/variants/gandof/devicetree.cb
+++ b/src/mainboard/google/auron/variants/gandof/devicetree.cb
@@ -9,9 +9,8 @@
# Enable HDMI Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000000"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/google/auron/variants/lulu/devicetree.cb b/src/mainboard/google/auron/variants/lulu/devicetree.cb
index 622ea34..2ac9d50 100644
--- a/src/mainboard/google/auron/variants/lulu/devicetree.cb
+++ b/src/mainboard/google/auron/variants/lulu/devicetree.cb
@@ -9,9 +9,8 @@
# Enable HDMI Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000000"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/google/auron/variants/samus/devicetree.cb b/src/mainboard/google/auron/variants/samus/devicetree.cb
index a6c2fea..9e0919b 100644
--- a/src/mainboard/google/auron/variants/samus/devicetree.cb
+++ b/src/mainboard/google/auron/variants/samus/devicetree.cb
@@ -9,9 +9,8 @@
# Enable DDI2 Hotplug with 6ms pulse
register "gpu_dp_c_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000200"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/purism/librem_bdw/variants/librem13v1/devicetree.cb b/src/mainboard/purism/librem_bdw/variants/librem13v1/devicetree.cb
index e713cd2..176b165 100644
--- a/src/mainboard/purism/librem_bdw/variants/librem13v1/devicetree.cb
+++ b/src/mainboard/purism/librem_bdw/variants/librem13v1/devicetree.cb
@@ -6,9 +6,8 @@
# Enable DDI1 Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000200"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/mainboard/purism/librem_bdw/variants/librem15v2/devicetree.cb b/src/mainboard/purism/librem_bdw/variants/librem15v2/devicetree.cb
index 3e83d3f..358eca0 100644
--- a/src/mainboard/purism/librem_bdw/variants/librem15v2/devicetree.cb
+++ b/src/mainboard/purism/librem_bdw/variants/librem15v2/devicetree.cb
@@ -6,9 +6,8 @@
# Enable DDI1 Hotplug with 6ms pulse
register "gpu_dp_b_hotplug" = "0x06"
- # Set backlight PWM values for eDP
- register "gpu_cpu_backlight" = "0x00000200"
- register "gpu_pch_backlight" = "0x04000200"
+ # Set backlight PWM value for eDP
+ register "gpu_pch_backlight_pwm_hz" = "183"
# Enable Panel and configure power delays
register "gpu_panel_port_select" = "1" # eDP
diff --git a/src/soc/intel/broadwell/chip.h b/src/soc/intel/broadwell/chip.h
index 456a435..18a6585 100644
--- a/src/soc/intel/broadwell/chip.h
+++ b/src/soc/intel/broadwell/chip.h
@@ -117,8 +117,11 @@
u16 gpu_panel_power_backlight_off_delay;
/* Panel backlight settings */
- u32 gpu_cpu_backlight;
- u32 gpu_pch_backlight;
+ unsigned int gpu_pch_backlight_pwm_hz;
+ enum {
+ GPU_BACKLIGHT_POLARITY_HIGH = 0,
+ GPU_BACKLIGHT_POLARITY_LOW,
+ } gpu_pch_backlight_polarity;
/*
* Graphics CD Clock Frequency
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index dab2d15..f4322bf 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -335,14 +335,34 @@
gtt_write(PCH_PP_DIVISOR, reg32);
}
- /* Enable Backlight if needed */
- if (conf->gpu_cpu_backlight) {
- gtt_write(BLC_PWM_CPU_CTL2, BLC_PWM2_ENABLE);
- gtt_write(BLC_PWM_CPU_CTL, conf->gpu_cpu_backlight);
- }
- if (conf->gpu_pch_backlight) {
- gtt_write(BLC_PWM_PCH_CTL1, BLM_PCH_PWM_ENABLE);
- gtt_write(BLC_PWM_PCH_CTL2, conf->gpu_pch_backlight);
+ /* So far all devices seem to use the PCH PWM function.
+ The CPU PWM registers are all zero after reset. */
+ if (conf->gpu_pch_backlight_pwm_hz) {
+ /* For Lynx Point-LP:
+ Reference clock is 24MHz. We can choose either a 16
+ or a 128 step increment. Use 16 if we would have less
+ than 100 steps otherwise. */
+ const unsigned int hz_limit = 24 * 1000 * 1000 / 128 / 100;
+ unsigned int pwm_increment, pwm_period;
+ u32 south_chicken2;
+
+ south_chicken2 = gtt_read(SOUTH_CHICKEN2);
+ if (conf->gpu_pch_backlight_pwm_hz > hz_limit) {
+ pwm_increment = 16;
+ south_chicken2 &= ~(1 << 5);
+ } else {
+ pwm_increment = 128;
+ south_chicken2 |= 1 << 5;
+ }
+ gtt_write(SOUTH_CHICKEN2, south_chicken2);
+
+ pwm_period = 24 * 1000 * 1000 / pwm_increment / conf->gpu_pch_backlight_pwm_hz;
+ /* Start with a 50% duty cycle. */
+ gtt_write(BLC_PWM_PCH_CTL2, pwm_period << 16 | pwm_period / 2);
+
+ gtt_write(BLC_PWM_PCH_CTL1,
+ (conf->gpu_pch_backlight_polarity == GPU_BACKLIGHT_POLARITY_LOW) << 29 |
+ BLM_PCH_OVERRIDE_ENABLE | BLM_PCH_PWM_ENABLE);
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/35897
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1d61d9b3f1802ebe18799fc4d06f1f1d3b54c924
Gerrit-Change-Number: 35897
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36059 )
Change subject: mb/lenovo/x201: Fix Linux shutting down on s3 resume
......................................................................
mb/lenovo/x201: Fix Linux shutting down on s3 resume
On some configuration coreboot boots too fast and the EC reports the
max temperature, resulting in Linux shutting down immediately.
Change-Id: I610c7c9fbf2130566d3c2c758f1796314d3a0973
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/mainboard/lenovo/x201/acpi/platform.asl
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/36059/1
diff --git a/src/mainboard/lenovo/x201/acpi/platform.asl b/src/mainboard/lenovo/x201/acpi/platform.asl
index 167fe03..685c6ab 100644
--- a/src/mainboard/lenovo/x201/acpi/platform.asl
+++ b/src/mainboard/lenovo/x201/acpi/platform.asl
@@ -59,6 +59,10 @@
Method(_WAK,1)
{
+ /* ME may not be up yet. */
+ Store (0, \_TZ.MEB1)
+ Store (0, \_TZ.MEB2)
+
/* Wake the HKEY to init BT/WWAN */
\_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0)
--
To view, visit https://review.coreboot.org/c/coreboot/+/36059
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I610c7c9fbf2130566d3c2c758f1796314d3a0973
Gerrit-Change-Number: 36059
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange