Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5391
-gerrit
commit 90e6df5c23e6590fee94affa28fd284c25fc3568 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sun Mar 16 17:24:18 2014 +1100
Lenovo T530 [2/2]: actually implement mainboard 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@alterapraxis.com --- src/mainboard/lenovo/Kconfig | 5 +++++ src/mainboard/lenovo/t530/Kconfig | 8 ++++---- 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/romstage.c | 12 +++++++++++- src/mainboard/lenovo/t530/thermal.h | 6 +++--- 7 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/src/mainboard/lenovo/Kconfig b/src/mainboard/lenovo/Kconfig index a29fdbf..b383d11 100644 --- a/src/mainboard/lenovo/Kconfig +++ b/src/mainboard/lenovo/Kconfig @@ -22,6 +22,11 @@ config BOARD_LENOVO_X230 help Lenovo X230 laptop. Consult wiki for details.
+config BOARD_LENOVO_T530 + bool "ThinkPad T530" + help + Lenovo T530 laptop. Consult wiki for details. + config BOARD_LENOVO_T60 bool "ThinkPad T60 / T60p" help diff --git a/src/mainboard/lenovo/t530/Kconfig b/src/mainboard/lenovo/t530/Kconfig index cd1f761..97ea62c 100644 --- a/src/mainboard/lenovo/t530/Kconfig +++ b/src/mainboard/lenovo/t530/Kconfig @@ -1,4 +1,4 @@ -if BOARD_LENOVO_X230 +if BOARD_LENOVO_T530
config BOARD_SPECIFIC_OPTIONS # dummy def_bool y @@ -34,11 +34,11 @@ config HAVE_ME_BIN
config MAINBOARD_DIR string - default lenovo/x230 + default lenovo/T530
config MAINBOARD_PART_NUMBER string - default "2325TLU" + default "2359CTO"
config MMCONF_BASE_ADDRESS hex @@ -80,4 +80,4 @@ config MAINBOARD_VENDOR string default "LENOVO"
-endif # BOARD_LENOVO_X230 +endif # BOARD_LENOVO_T530 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/romstage.c b/src/mainboard/lenovo/t530/romstage.c index 377c34a..4559ecd 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 */