[coreboot-gerrit] Patch set updated for coreboot: c2faec0 mainboard/lenovo: [2/2] implement initial T530 support

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Wed Apr 9 08:19:51 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5391

-gerrit

commit c2faec04173fa3f3b215fbf0771fa7f51ab4d821
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Sun Mar 16 17:24:18 2014 +1100

    mainboard/lenovo: [2/2] implement initial T530 support
    
    Step 2: change the Lenovo X230 code to adapt it to the new board's
    hardware with the great guidance from Vladimir (phcoder) to find the
    correct GPIO's.
    
    The machine has:
     - Chipset: Intel QM77
     - GPU's: Intel Integrated HD Graphics
            : Discrete NVIDIA NVS 5400M (1 GB VRAM) with Optimus Technology
    and pci configuration of:
     -[0000:00]-+-00.0  8086:0154
                +-02.0  8086:0166
                +-16.0  8086:1e3a
                +-19.0  8086:1502
                +-1a.0  8086:1e2d
                +-1b.0  8086:1e20
                +-1c.0-[02]----00.0  1180:e823
                +-1c.1-[03]----00.0  8086:4238
                +-1c.2-[04-0b]--
                +-1d.0  8086:1e26
                +-1f.0  8086:1e55
                +-1f.2  8086:1e03
                \-1f.3  8086:1e22
    
    Change-Id: Iee12c3edc22df4a7935b7fb7ff4a320c21c4239b
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/mainboard/lenovo/t530/board_info.txt |  2 +-
 src/mainboard/lenovo/t530/devicetree.cb  |  4 ++--
 src/mainboard/lenovo/t530/gpio.h         |  8 ++++----
 src/mainboard/lenovo/t530/mainboard.c    |  2 +-
 src/mainboard/lenovo/t530/romstage.c     | 12 +++++++++++-
 src/mainboard/lenovo/t530/thermal.h      |  6 +++---
 6 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/mainboard/lenovo/t530/board_info.txt b/src/mainboard/lenovo/t530/board_info.txt
index da3ef07..94829c1 100644
--- a/src/mainboard/lenovo/t530/board_info.txt
+++ b/src/mainboard/lenovo/t530/board_info.txt
@@ -1,5 +1,5 @@
 Category: laptop
-Board name: X230
+Board name: T530
 ROM package: SOIC-8
 ROM protocol: SPI
 ROM socketed: n
diff --git a/src/mainboard/lenovo/t530/devicetree.cb b/src/mainboard/lenovo/t530/devicetree.cb
index a76de5f..6a09004 100644
--- a/src/mainboard/lenovo/t530/devicetree.cb
+++ b/src/mainboard/lenovo/t530/devicetree.cb
@@ -101,10 +101,10 @@ chip northbridge/intel/sandybridge
 						io 0x66 = 0x1604
 					end
 
-					register "config0" = "0xa6"
+					register "config0" = "0xa7"
 					register "config1" = "0x09"
 					register "config2" = "0xa0"
-					register "config3" = "0xe0"
+					register "config3" = "0xc2"
 
 					register "has_keyboard_backlight" = "1"
 
diff --git a/src/mainboard/lenovo/t530/gpio.h b/src/mainboard/lenovo/t530/gpio.h
index f0a32a8..70e4c09 100644
--- a/src/mainboard/lenovo/t530/gpio.h
+++ b/src/mainboard/lenovo/t530/gpio.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef X230_GPIO_H
-#define X230_GPIO_H
+#ifndef T530_GPIO_H
+#define T530_GPIO_H
 
 #include "southbridge/intel/bd82x6x/gpio.h"
 
@@ -284,7 +284,7 @@ const struct pch_gpio_set3 pch_gpio_set3_level = {
 	.gpio75 = GPIO_LEVEL_HIGH,
 };
 
-const struct pch_gpio_map x230_gpio_map = {
+const struct pch_gpio_map t530_gpio_map = {
 	.set1 = {
 		.mode		= &pch_gpio_set1_mode,
 		.direction	= &pch_gpio_set1_direction,
@@ -303,4 +303,4 @@ const struct pch_gpio_map x230_gpio_map = {
 		.level		= &pch_gpio_set3_level,
 	},
 };
-#endif
+#endif /* T530_GPIO_H */
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index 2e4bc4a..5931d00 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -133,7 +133,7 @@ static int int15_handler(void)
 
 const char *smbios_mainboard_version(void)
 {
-	return "ThinkPad X230";
+	return "ThinkPad T530";
 }
 
 /* Audio Setup */
diff --git a/src/mainboard/lenovo/t530/romstage.c b/src/mainboard/lenovo/t530/romstage.c
index 6e4e685..96b5205 100644
--- a/src/mainboard/lenovo/t530/romstage.c
+++ b/src/mainboard/lenovo/t530/romstage.c
@@ -180,7 +180,17 @@ void main(unsigned long bist)
 	pci_write_config32(PCH_LPC_DEV, GPIO_BASE, DEFAULT_GPIOBASE|1);
 	pci_write_config8(PCH_LPC_DEV, GPIO_CNTL, 0x10);
 
-	setup_pch_gpios(&x230_gpio_map);
+//	setup_pch_gpios(&t530_gpio_map);
+	outl(0x3962a5ff, DEFAULT_GPIOBASE);
+	outl(0x8ebf6aff, DEFAULT_GPIOBASE + 4);
+	outl(0x66917ebb, DEFAULT_GPIOBASE + 0xc);
+	outl(0x00002002, DEFAULT_GPIOBASE + 0x2c);
+	outl(0x02ff08fe, DEFAULT_GPIOBASE + 0x30);
+	outl(0x1f47f7fd, DEFAULT_GPIOBASE + 0x34);
+	outl(0xffbeff43, DEFAULT_GPIOBASE + 0x38);
+	outl(0x000000ff, DEFAULT_GPIOBASE + 0x40);
+	outl(0x00000fff, DEFAULT_GPIOBASE + 0x44);
+	outl(0x00000f4f, DEFAULT_GPIOBASE + 0x48);
 
 	/* Initialize console device(s) */
 	console_init();
diff --git a/src/mainboard/lenovo/t530/thermal.h b/src/mainboard/lenovo/t530/thermal.h
index ab24bb1..2fafcde 100644
--- a/src/mainboard/lenovo/t530/thermal.h
+++ b/src/mainboard/lenovo/t530/thermal.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef X230_THERMAL_H
-#define X230_THERMAL_H
+#ifndef T530_THERMAL_H
+#define T530_THERMAL_H
 
 	/* Temperature which OS will shutdown at */
 	#define CRITICAL_TEMPERATURE	100
@@ -27,4 +27,4 @@
 	/* Temperature which OS will throttle CPU */
 	#define PASSIVE_TEMPERATURE	90
 
-#endif
+#endif /* T530_THERMAL_H */



More information about the coreboot-gerrit mailing list