summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-03-16 17:24:18 +1100
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-09 16:41:14 +0200
commitfe365ac7e8c01cff46c593e80ca20ae3cb3362e7 (patch)
tree6ec308e0f4864606e65dd099beb5f65c37c33d06 /src/mainboard/lenovo
parent956c29823328b37506fce7bfefe7e53e58706dd2 (diff)
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>
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r--src/mainboard/lenovo/t530/board_info.txt2
-rw-r--r--src/mainboard/lenovo/t530/devicetree.cb4
-rw-r--r--src/mainboard/lenovo/t530/gpio.h8
-rw-r--r--src/mainboard/lenovo/t530/mainboard.c2
-rw-r--r--src/mainboard/lenovo/t530/romstage.c12
-rw-r--r--src/mainboard/lenovo/t530/thermal.h6
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 da3ef07dd3..94829c1151 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 a76de5fcd1..6a09004466 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 f0a32a8955..70e4c09764 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 2e4bc4a6b7..5931d00ba5 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 6e4e685e65..96b52054ec 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 ab24bb1ab2..2fafcde592 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 */