Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12346
-gerrit
commit 9813b23ef2169136b8e9fc1b5e31cc4ee8e6dd87
Author: Yakir Yang <ykk(a)rock-chips.com>
Date: Tue Oct 27 16:40:08 2015 +0800
rockchip/rk3288: hdmi: configure display output mode with EDID information
'edid->hdmi_monitor_detected' would indicate whether the monitor
interface is HDMI or DVI.
BRANCH=none
BUG=chrome-os-partner:43789
TEST=Previously, my LG monitor couldn't show dev screen. But now I can see
dev screen have been posted normally.
Change-Id: Id71f051b2cd792712e52bee7a763db383c1962a8
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 88101589a22d06f0bc25e0750b2862cf66b55391
Original-Change-Id: I157861d327926b834e1e8606b0b676f413491c70
Original-Signed-off-by: Yakir Yang <ykk(a)rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/309056
Original-Tested-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
---
src/soc/rockchip/rk3288/hdmi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/soc/rockchip/rk3288/hdmi.c b/src/soc/rockchip/rk3288/hdmi.c
index 104d80f..805b98a 100644
--- a/src/soc/rockchip/rk3288/hdmi.c
+++ b/src/soc/rockchip/rk3288/hdmi.c
@@ -488,7 +488,6 @@ static int hdmi_phy_init(u32 mpixelclock)
static void hdmi_av_composer(const struct edid *edid)
{
u8 mdataenablepolarity = 1;
- u8 mdvi = 0;
u8 inv_val;
/* set up hdmi_fc_invidconf */
@@ -506,9 +505,9 @@ static void hdmi_av_composer(const struct edid *edid)
HDMI_FC_INVIDCONF_DE_IN_POLARITY_ACTIVE_HIGH :
HDMI_FC_INVIDCONF_DE_IN_POLARITY_ACTIVE_LOW);
- inv_val |= (mdvi ?
- HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE :
- HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE);
+ inv_val |= (edid->hdmi_monitor_detected ?
+ HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE :
+ HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE);
inv_val |= HDMI_FC_INVIDCONF_R_V_BLANK_IN_OSC_ACTIVE_LOW;
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12345
-gerrit
commit e327e3802cde5e00a70f1ca550e69e32b5a0ae51
Author: Yakir Yang <ykk(a)rock-chips.com>
Date: Tue Oct 27 16:17:13 2015 +0800
edid: add hdmi_monitor_detected in data struct edid
HDMI driver need to know whether the monitor is DVI
or HDMI interface, so this commit just introduce a
new number 'hdmi_monitor_detected' to struct edid.
There were four bits to indicate the monitor interfaces,
it's better to take use of that. But those bits only
existed in EDID 1.4 version, but didn't persented in
the previous EDID version, so I decided to detect the
hdmi cea block.
BRANCH=none
BUG=chrome-os-partner:43789
TEST=When mickey connect with HDMI monitor, see 'hdmi_monitor_detected' is 'true'.
When mickey connect with DVI monitor, see 'hdmi_monitor_detected' is 'false'.
Change-Id: I1a4f1410e1cce1474ffae858db161a18578cac3a
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 409f041805d9fdff2d49faa1a3a262cf4dc609c2
Original-Change-Id: Ife770898b0f2b4f58b8259711101a0cab4a5e4ac
Original-Signed-off-by: Yakir Yang <ykk(a)rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/309055
Original-Tested-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
---
src/include/edid.h | 2 ++
src/lib/edid.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/include/edid.h b/src/include/edid.h
index 43e6883..d3cab17 100644
--- a/src/include/edid.h
+++ b/src/include/edid.h
@@ -87,6 +87,8 @@ struct edid {
u32 x_resolution;
u32 y_resolution;
u32 bytes_per_line;
+
+ int hdmi_monitor_detected;
};
/* Defined in src/lib/edid.c */
diff --git a/src/lib/edid.c b/src/lib/edid.c
index d005678..0f5643d 100644
--- a/src/lib/edid.c
+++ b/src/lib/edid.c
@@ -657,6 +657,8 @@ cea_hdmi_block(struct edid *out, unsigned char *x)
{
int length = x[0] & 0x1f;
+ out->hdmi_monitor_detected = 1;
+
printk(BIOS_SPEW, " (HDMI)\n");
printk(BIOS_SPEW,
" Source physical address %d.%d.%d.%d\n",
Zheng Bao (zheng.bao(a)amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11747
-gerrit
commit ad51c2f198929ed246130d02843494b38d16da52
Author: WANG Siyuan <wangsiyuanbuaa(a)gmail.com>
Date: Tue Aug 18 06:28:02 2015 +0800
AMD Bettong DSDT table: Declare memory between TOM1 and 0xFED40000 for PCI MMIO
In current code, \_SB.PCI0 declare MMIO between TOM1 and 4GB.
This is not correct because higher MMIO space is reserved by \_SB rather than
\_SB.PCI0. For example:
[0xFEDC2000 - 0xFEDC5FFF] reserved for FCH I2C
[0xFEDC6000 - 0xFEDC8FFF] reserved for FCH UART
Change-Id: I922d8c6a8ff1433582c70f86d5636171394af283
Signed-off-by: WANG Siyuan <wangsiyuanbuaa(a)gmail.com>
Signed-off-by: WANG Siyuan <SiYuan.Wang(a)amd.com>
---
src/southbridge/amd/pi/hudson/acpi/fch.asl | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/southbridge/amd/pi/hudson/acpi/fch.asl b/src/southbridge/amd/pi/hudson/acpi/fch.asl
index 02a272d..7551cc5 100644
--- a/src/southbridge/amd/pi/hudson/acpi/fch.asl
+++ b/src/southbridge/amd/pi/hudson/acpi/fch.asl
@@ -116,16 +116,12 @@ Method(_CRS, 0) {
CreateDWordField(CRES, ^MMIO._LEN, MM1L)
/*
- * Declare memory between TOM1 and 4GB as available
+ * Declare memory between TOM1 and 0xFED40000 as available
* for PCI MMIO.
- * Use ShiftLeft to avoid 64bit constant (for XP).
- * This will work even if the OS does 32bit arithmetic, as
- * 32bit (0x00000000 - TOM1) will wrap and give the same
- * result as 64bit (0x100000000 - TOM1).
+ * TODO: change the hardcoded value.
*/
Store(TOM1, MM1B)
- ShiftLeft(0x10000000, 4, Local0)
- Subtract(Local0, TOM1, Local0)
+ Subtract(0xFED40000, TOM1, Local0)
Store(Local0, MM1L)
Return(CRES) /* note to change the Name buffer */
Zheng Bao (zheng.bao(a)amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11750
-gerrit
commit 5f3be6e354168956ca1d43cc5cf8e98ffc1c7eb6
Author: zbao <fishbaozi(a)gmail.com>
Date: Fri Nov 6 22:02:36 2015 +0800
AMD/Bettong: add FCH's GPIO, UART & I2C support
Merlin Falcon's FCH has GPIO, UART and I2C. All of them are controlled
by registers mapped at MMIO space.
This ASL code is used for Windows drivers.
TEST:
1. Boot Windows 8 or Windows 10.
2. Install AMD Catalyst driver.
3. AMD FPIO, UART and I2C can be found in device manager.
4. I2C passed Multi Interface Test Tool (MITT) test.
Change-Id: I7ffe3fe0046d9a078cc38176c29a8e334646a5a3
Signed-off-by: WANG Siyuan <wangsiyuanbuaa(a)gmail.com>
Signed-off-by: WANG Siyuan <SiYuan.Wang(a)amd.com>
Signed-off-by: Zheng Bao <fishbaozi(a)gmail.com>
---
src/mainboard/amd/bettong/dsdt.asl | 1 +
src/southbridge/amd/pi/hudson/acpi/carrizo_fch.asl | 101 +++++++++++++++++++++
2 files changed, 102 insertions(+)
diff --git a/src/mainboard/amd/bettong/dsdt.asl b/src/mainboard/amd/bettong/dsdt.asl
index 888d5cd..d5390bd 100644
--- a/src/mainboard/amd/bettong/dsdt.asl
+++ b/src/mainboard/amd/bettong/dsdt.asl
@@ -68,6 +68,7 @@ DefinitionBlock (
/* Describe PCI INT[A-H] for the Southbridge */
#include <southbridge/amd/pi/hudson/acpi/pci_int.asl>
+ #include <southbridge/amd/pi/hudson/acpi/carrizo_fch.asl>
} /* End \_SB scope */
diff --git a/src/southbridge/amd/pi/hudson/acpi/carrizo_fch.asl b/src/southbridge/amd/pi/hudson/acpi/carrizo_fch.asl
new file mode 100644
index 0000000..5bfb366
--- /dev/null
+++ b/src/southbridge/amd/pi/hudson/acpi/carrizo_fch.asl
@@ -0,0 +1,101 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+Device(GPIO) {
+ Name (_HID, "AMD0030")
+ Name (_CID, "AMD0030")
+ Name(_UID, 0)
+
+ Method (_CRS, 0x0, NotSerialized) {
+ Name (RBUF, ResourceTemplate () {
+ //
+ // Interrupt resource. In this example, banks 0 & 1 share the same
+ // interrupt to the parent controller and similarly banks 2 & 3.
+ //
+ // N.B. The definition below is chosen for an arbitrary
+ // test platform. It needs to be changed to reflect the hardware
+ // configuration of the actual platform
+ //
+ Interrupt(ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+
+ //
+ // Memory resource. The definition below is chosen for an arbitrary
+ // test platform. It needs to be changed to reflect the hardware
+ // configuration of the actual platform.
+ //
+ Memory32Fixed(ReadWrite, 0xFED81500, 0x300)
+ })
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0x0, NotSerialized) {
+ Return (0x0F)
+ }
+}
+
+Device(FUR0) {
+ Name(_HID,"AMD0020")
+ Name(_UID,0x0)
+ Name(_CRS, ResourceTemplate() {
+ IRQ(Edge, ActiveHigh, Exclusive) {10}
+ Memory32Fixed(ReadWrite, 0xFEDC6000, 0x2000)
+ })
+ Method (_STA, 0x0, NotSerialized) {
+ Return (0x0F)
+ }
+}
+
+Device(FUR1) {
+ Name(_HID,"AMD0020")
+ Name(_UID,0x1)
+ Name(_CRS, ResourceTemplate() {
+ IRQ(Edge, ActiveHigh, Exclusive) {11}
+ Memory32Fixed(ReadWrite, 0xFEDC8000, 0x2000)
+ })
+ Method (_STA, 0x0, NotSerialized) {
+ Return (0x0F)
+ }
+}
+
+Device(I2CA) {
+ Name(_HID,"AMD0010")
+ Name(_UID,0x0)
+ Name(_CRS, ResourceTemplate() {
+ IRQ(Edge, ActiveHigh, Exclusive) {3}
+ Memory32Fixed(ReadWrite, 0xFEDC2000, 0x1000)
+ })
+
+ Method (_STA, 0x0, NotSerialized) {
+ Return (0x0F)
+ }
+}
+
+Device(I2CB)
+{
+ Name(_HID,"AMD0010")
+ Name(_UID,0x1)
+ Name(_CRS, ResourceTemplate() {
+ IRQ(Edge, ActiveHigh, Exclusive) {15}
+ Memory32Fixed(ReadWrite, 0xFEDC3000, 0x1000)
+ })
+ Method (_STA, 0x0, NotSerialized) {
+ Return (0x0F)
+ }
+}