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

Change-Id: Iee12c3edc22df4a7935b7fb7ff4a320c21c4239b
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/5391
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Edward O'Callaghan 2014-03-16 17:24:18 +11:00 committed by Alexandru Gagniuc
parent 956c298233
commit fe365ac7e8
6 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,5 @@
Category: laptop Category: laptop
Board name: X230 Board name: T530
ROM package: SOIC-8 ROM package: SOIC-8
ROM protocol: SPI ROM protocol: SPI
ROM socketed: n ROM socketed: n

View File

@ -101,10 +101,10 @@ chip northbridge/intel/sandybridge
io 0x66 = 0x1604 io 0x66 = 0x1604
end end
register "config0" = "0xa6" register "config0" = "0xa7"
register "config1" = "0x09" register "config1" = "0x09"
register "config2" = "0xa0" register "config2" = "0xa0"
register "config3" = "0xe0" register "config3" = "0xc2"
register "has_keyboard_backlight" = "1" register "has_keyboard_backlight" = "1"

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef X230_GPIO_H #ifndef T530_GPIO_H
#define X230_GPIO_H #define T530_GPIO_H
#include "southbridge/intel/bd82x6x/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, .gpio75 = GPIO_LEVEL_HIGH,
}; };
const struct pch_gpio_map x230_gpio_map = { const struct pch_gpio_map t530_gpio_map = {
.set1 = { .set1 = {
.mode = &pch_gpio_set1_mode, .mode = &pch_gpio_set1_mode,
.direction = &pch_gpio_set1_direction, .direction = &pch_gpio_set1_direction,
@ -303,4 +303,4 @@ const struct pch_gpio_map x230_gpio_map = {
.level = &pch_gpio_set3_level, .level = &pch_gpio_set3_level,
}, },
}; };
#endif #endif /* T530_GPIO_H */

View File

@ -133,7 +133,7 @@ static int int15_handler(void)
const char *smbios_mainboard_version(void) const char *smbios_mainboard_version(void)
{ {
return "ThinkPad X230"; return "ThinkPad T530";
} }
/* Audio Setup */ /* Audio Setup */

View File

@ -180,7 +180,17 @@ void main(unsigned long bist)
pci_write_config32(PCH_LPC_DEV, GPIO_BASE, DEFAULT_GPIOBASE|1); pci_write_config32(PCH_LPC_DEV, GPIO_BASE, DEFAULT_GPIOBASE|1);
pci_write_config8(PCH_LPC_DEV, GPIO_CNTL, 0x10); 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) */ /* Initialize console device(s) */
console_init(); console_init();

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#ifndef X230_THERMAL_H #ifndef T530_THERMAL_H
#define X230_THERMAL_H #define T530_THERMAL_H
/* Temperature which OS will shutdown at */ /* Temperature which OS will shutdown at */
#define CRITICAL_TEMPERATURE 100 #define CRITICAL_TEMPERATURE 100
@ -27,4 +27,4 @@
/* Temperature which OS will throttle CPU */ /* Temperature which OS will throttle CPU */
#define PASSIVE_TEMPERATURE 90 #define PASSIVE_TEMPERATURE 90
#endif #endif /* T530_THERMAL_H */