Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/19072
to look at the new patch set (#2).
Change subject: [WIP] ec: add support for KBC1126 in HP laptops
......................................................................
[WIP] ec: add support for KBC1126 in HP laptops
- let the coreboot build system insert the two blobs to the coreboot image
- fan control support (only works on hp/2760p)
Change-Id: I6b16eb7e26303eda740f52d667dedb7cc04b4ef0
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
---
A src/ec/hp/kbc1126/Kconfig
A src/ec/hp/kbc1126/Makefile.inc
A src/ec/hp/kbc1126/ec.c
A src/ec/hp/kbc1126/ec.h
4 files changed, 253 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/19072/2
--
To view, visit https://review.coreboot.org/19072
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6b16eb7e26303eda740f52d667dedb7cc04b4ef0
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins)
Iru Cai has posted comments on this change. ( https://review.coreboot.org/18985 )
Change subject: [WIP] mainboards/hp: Add HP Elitebook 8470p
......................................................................
Patch Set 2:
Patch set 1 is broken.
It seems that autoport should be run when kernel is started up with `iomem=relaxed`.
--
To view, visit https://review.coreboot.org/18985
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icbc051e2272b8ea73627940db15a56901d737472
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-Reviewer: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: No
Iru Cai has uploaded a new change for review. ( https://review.coreboot.org/19072 )
Change subject: [WIP] ec: add support for KBC1126 in HP laptops
......................................................................
[WIP] ec: add support for KBC1126 in HP laptops
- let the coreboot build system insert the two blobs to the coreboot image
- fan control support (only works on hp/2760p)
Change-Id: I6b16eb7e26303eda740f52d667dedb7cc04b4ef0
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
---
A src/ec/hp/kbc1126/Kconfig
A src/ec/hp/kbc1126/Makefile.inc
A src/ec/hp/kbc1126/ec.c
A src/ec/hp/kbc1126/ec.h
4 files changed, 253 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/19072/1
diff --git a/src/ec/hp/kbc1126/Kconfig b/src/ec/hp/kbc1126/Kconfig
new file mode 100644
index 0000000..823d4e1
--- /dev/null
+++ b/src/ec/hp/kbc1126/Kconfig
@@ -0,0 +1,69 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2017 Iru Cai
+##
+## 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.
+##
+
+config EC_HP_KBC1126
+ bool
+ help
+ Interface to SMSC KBC1126 embedded controller in HP laptops.
+
+if EC_HP_KBC1126
+
+config RESERVED_SPACE_BEFORE_RESET_VECTOR
+ hex
+ default 0x8f0
+
+config KBC1126_FIRMWARE
+ bool "Add firmware images for KBC1126 firmware"
+ depends on EC_HP_KBC1126
+ help
+ Select this option to add the two firmware blobs for KBC1126.
+ You need these two blobs to power on your machine.
+
+config KBC1126_FW1
+ string "KBC1126 firmware #1 path and filename"
+ depends on KBC1126_FIRMWARE
+ default "fw1.bin"
+ help
+ The path and filename of the file to use as KBC1126 firmware #1.
+
+config KBC1126_FW1_OFFSET
+ string "KBC1126 firmware #1 offset"
+ depends on KBC1126_FIRMWARE
+ default "-0x900"
+ help
+ The offset of KBC1126 firmware #1.
+ If this value is negative, the absolute value of it means
+ the distance to the end of file.
+ If unsure, keep the default value -0x900 because the space
+ starting at this position is reserved by default to place this blob.
+
+config KBC1126_FW2
+ string "KBC1126 filename #2 path and filename"
+ depends on KBC1126_FIRMWARE
+ default "fw2.bin"
+ help
+ The path and filename of the file to use as KBC1126 firmware #2.
+
+config KBC1126_FW2_OFFSET
+ string "KBC1126 firmware #2 offset"
+ depends on KBC1126_FIRMWARE
+ default "-0x300000"
+ help
+ The offset of KBC1126 firmware #2.
+ If this value is negative, the absolute value of it means
+ the distance to the end of file.
+ You should place KBC1126 firmware #2 (about 64K) outside of CBFS.
+
+endif
diff --git a/src/ec/hp/kbc1126/Makefile.inc b/src/ec/hp/kbc1126/Makefile.inc
new file mode 100644
index 0000000..5ae38c1
--- /dev/null
+++ b/src/ec/hp/kbc1126/Makefile.inc
@@ -0,0 +1,36 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2017 Iru Cai
+##
+## 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.
+##
+
+ifeq ($(CONFIG_EC_HP_KBC1126),y)
+
+KBC1126_EC_INSERT:=$(top)/util/kbc1126/kbc1126_ec_insert
+
+ifeq ($(CONFIG_KBC1126_FIRMWARE),y)
+INTERMEDIATE+=kbc1126_ec_insert
+endif
+
+kbc1126_ec_insert: $(obj)/coreboot.pre
+ printf " Building kbc1126_ec_insert.\n"
+ $(MAKE) -C util/kbc1126
+ printf " KBC1126 Inserting KBC1126 firmware blobs.\n"
+ $(KBC1126_EC_INSERT) $(obj)/coreboot.pre \
+ $(CONFIG_KBC1126_FW1) $(CONFIG_KBC1126_FW2) \
+ $(CONFIG_KBC1126_FW1_OFFSET) $(CONFIG_KBC1126_FW2_OFFSET)
+
+PHONY+=kbc1126_ec_insert
+
+ramstage-y += ec.c
+
+endif
diff --git a/src/ec/hp/kbc1126/ec.c b/src/ec/hp/kbc1126/ec.c
new file mode 100644
index 0000000..8627e67
--- /dev/null
+++ b/src/ec/hp/kbc1126/ec.c
@@ -0,0 +1,124 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 coresystems GmbH
+ * Copyright (C) 2017 Iru Cai
+ *
+ * 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.
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <delay.h>
+
+#include "ec.h"
+
+#define KBD_DATA 0x60
+#define KBD_SC 0x64
+
+#define KBD_IBF (1 << 1) /* 1: input buffer full (data ready for ec) */
+#define KBD_OBF (1 << 0) /* 1: output buffer full (data ready for host) */
+
+static int send_kbd_command(u8 command)
+{
+ int timeout;
+
+ timeout = 0x7ff;
+ while ((inb(KBD_SC) & KBD_IBF) && --timeout) {
+ udelay(10);
+ if ((timeout & 0xff) == 0)
+ printk(BIOS_SPEW, ".");
+ }
+ if (!timeout) {
+ printk(BIOS_DEBUG, "Timeout while sending command 0x%02x to EC!\n",
+ command);
+ return -1;
+ }
+
+ outb(command, KBD_SC);
+ return 0;
+}
+
+static int send_kbd_data(u8 data)
+{
+ int timeout;
+
+ timeout = 0x7ff;
+ while ((inb(KBD_SC) & KBD_IBF) && --timeout) { /* wait for IBF = 0 */
+ udelay(10);
+ if ((timeout & 0xff) == 0)
+ printk(BIOS_SPEW, ".");
+ }
+ if (!timeout) {
+ printk(BIOS_DEBUG, "Timeout while sending data 0x%02x to EC!\n",
+ data);
+ return -1;
+ }
+
+ outb(data, KBD_DATA);
+ return 0;
+}
+
+#if 0
+static u8 recv_kbd_data(void)
+{
+ int timeout;
+ u8 data;
+
+ timeout = 0x7fff;
+ while (--timeout) { /* Wait for OBF = 1 */
+ if (inb(KBD_SC) & KBD_OBF) {
+ break;
+ }
+ udelay(10);
+ if ((timeout & 0xff) == 0)
+ printk(BIOS_SPEW, ".");
+ }
+ if (!timeout) {
+ printk(BIOS_DEBUG, "\nTimeout while receiving data from EC!\n");
+ }
+
+ data = inb(KBD_DATA);
+ return data;
+}
+#endif
+
+void kbc1126_thermalinit(u8 cmd)
+{
+ if (send_kbd_command(cmd)<0)
+ goto fail;
+
+ if (send_kbd_data(0x27)<0)
+ goto fail;
+
+ if (send_kbd_data(0x01)<0)
+ goto fail;
+
+ /*
+ * TODO: The following is not needed for fan control,
+ * but it's found in OEM firmware
+ */
+
+ if (send_kbd_command(cmd)<0)
+ goto fail;
+
+ if (send_kbd_data(0xd5)<0)
+ goto fail;
+
+ if (send_kbd_data(0xff)<0)
+ goto fail;
+
+ return;
+fail:
+ printk(BIOS_DEBUG, "Fail to init EC\n");
+ return;
+}
diff --git a/src/ec/hp/kbc1126/ec.h b/src/ec/hp/kbc1126/ec.h
new file mode 100644
index 0000000..55003ca
--- /dev/null
+++ b/src/ec/hp/kbc1126/ec.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Iru Cai
+ *
+ * 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.
+ *
+ */
+
+#ifndef _EC_HP_KBC1126_EC_H
+
+void kbc1126_thermalinit(u8 cmd);
+
+#define _EC_HP_KBC1126_EC_H
+
+
+#endif /* _EC_HP_KBC1126_EC_H */
--
To view, visit https://review.coreboot.org/19072
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b16eb7e26303eda740f52d667dedb7cc04b4ef0
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Iru Cai <mytbk920423(a)gmail.com>
Hello Paul Menzel, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/18241
to look at the new patch set (#15).
Change subject: [WIP] mainboards/hp: Add HP Elitebook 2760p
......................................................................
[WIP] mainboards/hp: Add HP Elitebook 2760p
The code is generated by autoport.
The flash chip is socketed beside the WLAN slot. The EHCI debug port
is on right side of the laptop beside the RJ11 connector.
Things that work:
- memory: 0+8G, 4G+8G
- Linux (Linux Mint 18.1 with Linux 4.4)
- native graphics init + SeaBIOS payload with SeaVGABIOS
- all 3 USB ports
- WLAN
- WWAN
- expresscard
- S3 suspend and resume
- internal flashing after IFD is unlocked and coreboot is flashed
- keyboard, trackpoint and touchpad
- fan control
Things that don't work:
- AC and battery status
- wacom digitizer
Things that are not tested:
- WWAN
- SD card reader
- smart card reader
- cable modem
(EC) blobs:
This laptop uses SMSC KBC1126-NU as EC. It needs two blobs in the
flash chip. You can use the tools in util/kbc1126 to extract them
from OEM firmware, and use the following configuration to insert
them to coreboot image:
-> Chipset
-> Add firmware images for KBC1126 firmware
Change-Id: I3ffdb9f9c71f6c9a84e896abc3c424c8dd4bed0e
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
---
A src/mainboard/hp/2760p/Kconfig
A src/mainboard/hp/2760p/Kconfig.name
A src/mainboard/hp/2760p/Makefile.inc
A src/mainboard/hp/2760p/acpi/ec.asl
A src/mainboard/hp/2760p/acpi/platform.asl
A src/mainboard/hp/2760p/acpi/superio.asl
A src/mainboard/hp/2760p/acpi_tables.c
A src/mainboard/hp/2760p/board_info.txt
A src/mainboard/hp/2760p/devicetree.cb
A src/mainboard/hp/2760p/dsdt.asl
A src/mainboard/hp/2760p/gpio.c
A src/mainboard/hp/2760p/hda_verb.c
A src/mainboard/hp/2760p/mainboard.c
A src/mainboard/hp/2760p/romstage.c
14 files changed, 738 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/18241/15
--
To view, visit https://review.coreboot.org/18241
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3ffdb9f9c71f6c9a84e896abc3c424c8dd4bed0e
Gerrit-PatchSet: 15
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Swift Geek <swiftgeek(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins)