[coreboot-gerrit] Patch set updated for coreboot: lenovo/x60: Enable Infrared port.
Denis Carikli (GNUtoo@no-log.org)
gerrit at coreboot.org
Sun Jan 24 18:55:29 CET 2016
Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/5242
-gerrit
commit bb206ee39f9ef37de6a4ac51a6b962589b63c75d
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Sat Feb 15 19:13:00 2014 +0100
lenovo/x60: Enable Infrared port.
Change-Id: I8ce0195bc85a983627826b31eb9879c3dbc80dd9
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
src/drivers/lenovo/lenovo.h | 3 ++-
src/drivers/lenovo/wacom.c | 40 +++++++++++++++++++++++++++++++++-
src/mainboard/lenovo/x200/mainboard.c | 2 +-
src/mainboard/lenovo/x201/mainboard.c | 2 +-
src/mainboard/lenovo/x60/devicetree.cb | 4 ++++
src/mainboard/lenovo/x60/mainboard.c | 2 +-
src/mainboard/lenovo/x60/romstage.c | 2 +-
7 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/src/drivers/lenovo/lenovo.h b/src/drivers/lenovo/lenovo.h
index 4c44119..06b52e5 100644
--- a/src/drivers/lenovo/lenovo.h
+++ b/src/drivers/lenovo/lenovo.h
@@ -1,3 +1,4 @@
int drivers_lenovo_is_wacom_present(void);
void drivers_lenovo_serial_ports_ssdt_generate(const char *scope,
- int have_dock_serial);
+ int have_dock_serial,
+ int have_infrared);
diff --git a/src/drivers/lenovo/wacom.c b/src/drivers/lenovo/wacom.c
index d1464d7..1bc6ec2 100644
--- a/src/drivers/lenovo/wacom.c
+++ b/src/drivers/lenovo/wacom.c
@@ -87,7 +87,8 @@ drivers_lenovo_is_wacom_present(void)
void
drivers_lenovo_serial_ports_ssdt_generate(const char *scope,
- int have_dock_serial)
+ int have_dock_serial,
+ int have_infrared)
{
acpigen_write_scope(scope);
@@ -114,6 +115,43 @@ drivers_lenovo_serial_ports_ssdt_generate(const char *scope,
acpigen_pop_len();
}
+ if (have_infrared) {
+ /* Device op. */
+ acpigen_emit_byte(0x5b);
+ acpigen_emit_byte(0x82);
+ acpigen_write_len_f();
+ acpigen_emit_namestring("FIR");
+
+ acpigen_write_name("_HID");
+ acpigen_emit_eisaid("IBM0071");
+ acpigen_write_name("_CID");
+ acpigen_emit_eisaid("PNP0511");
+ acpigen_write_name("_UID");
+
+ /* One */
+ acpigen_write_byte(0x1);
+ acpigen_write_name("_CRS");
+
+ acpigen_write_resourcetemplate_header();
+ acpigen_write_io16(0x2f8, 0x2f8, 1, 8, 1);
+ acpigen_write_irq(0x08);
+
+ acpigen_write_resourcetemplate_footer();
+
+ /* method op */
+ acpigen_emit_byte(0x14);
+ acpigen_write_len_f();
+ acpigen_emit_namestring("_STA");
+ /* no fnarg */
+ acpigen_emit_byte(0x00);
+ /* return */
+ acpigen_emit_byte(0xa4);
+ acpigen_write_byte(0xf);
+ acpigen_pop_len();
+
+ acpigen_pop_len();
+ }
+
if (have_dock_serial) {
acpigen_write_device("COMA");
diff --git a/src/mainboard/lenovo/x200/mainboard.c b/src/mainboard/lenovo/x200/mainboard.c
index bcf5f3e..e14b2b3 100644
--- a/src/mainboard/lenovo/x200/mainboard.c
+++ b/src/mainboard/lenovo/x200/mainboard.c
@@ -30,7 +30,7 @@
static void fill_ssdt(device_t device)
{
- drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
+ drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0, 0);
}
static void mainboard_enable(device_t dev)
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index 2f35c81..0f24f0e 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -85,7 +85,7 @@ static void mainboard_init(device_t dev)
static void fill_ssdt(device_t device)
{
- drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
+ drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0, 0);
}
static void mainboard_enable(device_t dev)
diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb
index 2f81d15..7261be1 100644
--- a/src/mainboard/lenovo/x60/devicetree.cb
+++ b/src/mainboard/lenovo/x60/devicetree.cb
@@ -131,6 +131,10 @@ chip northbridge/intel/i945
chip superio/nsc/pc87382
device pnp 164e.2 on # IR
io 0x60 = 0x2f8
+ irq 0x29 = 0xb0
+ irq 0x70 = 0x3
+ drq 0x74 = 0x1
+ irq 0xf0 = 0x82
end
device pnp 164e.3 on # Digitizer
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index 5ea4221..8f007a1 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -97,7 +97,7 @@ static void mainboard_init(device_t dev)
static void fill_ssdt(device_t device)
{
- drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1);
+ drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1, 1);
}
static void mainboard_enable(device_t dev)
diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c
index a60e056..ad1c5e3 100644
--- a/src/mainboard/lenovo/x60/romstage.c
+++ b/src/mainboard/lenovo/x60/romstage.c
@@ -83,7 +83,7 @@ static void ich7_enable_lpc(void)
// decode range
pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0210);
// decode range
- pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x1f0d);
+ pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x1f0f);
/* range 0x1600 - 0x167f */
pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x84, 0x1601);
More information about the coreboot-gerrit
mailing list