Bill XIE has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, and no docking support, thus no superio chip in dock.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 17 files changed, 294 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/1
diff --git a/Documentation/mainboard/index.md b/Documentation/mainboard/index.md index c9204f6..2aa2763 100644 --- a/Documentation/mainboard/index.md +++ b/Documentation/mainboard/index.md @@ -72,6 +72,10 @@
- [T410](lenovo/t410.md)
+### GM45 series + +- [X301](lenovo/x301.md) + ### Sandy Bridge series
- [T420](lenovo/t420.md) diff --git a/Documentation/mainboard/lenovo/x301.md b/Documentation/mainboard/lenovo/x301.md new file mode 100644 index 0000000..5c6f771 --- /dev/null +++ b/Documentation/mainboard/lenovo/x301.md @@ -0,0 +1,27 @@ +# Lenovo X301 + +## Disassembly Instructions + +You must remove the following parts to access the SPI flash: + + + +* Battery pack +* Keyboard + +Its [Hardware Maintenance Manual](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/43y9441.pdf) could be used as a guidance of disassembly. + +The WSON-8 flash chip (surrounded with red circle in the photo above, +already replaced with a SOIC-8 one) sits under a piece of insulating +tape. If solders between the chip and soldering pads fortunately +overflows beside the chip as tiny tin balls attached to soldering pads, +it will be possible to use a pomona 5250 clip to hold the chip, with +its metal tips just attached to tin balls, thus connecting the chip to +the programmer. Otherwise, it may be recommended to replace it with a +SOIC-8 one. (as what is done in the photo) + +```eval_rst +:doc:`../../flash_tutorial/ext_power` +``` + +[T420 / T520 / X220 / T420s / W520 common]: xx20_series.md diff --git a/Documentation/mainboard/lenovo/x301_kb_removed.jpg b/Documentation/mainboard/lenovo/x301_kb_removed.jpg new file mode 100644 index 0000000..b9f8090 --- /dev/null +++ b/Documentation/mainboard/lenovo/x301_kb_removed.jpg Binary files differ diff --git a/src/mainboard/lenovo/x200/Kconfig b/src/mainboard/lenovo/x200/Kconfig index 7b905bc..fab8a88 100644 --- a/src/mainboard/lenovo/x200/Kconfig +++ b/src/mainboard/lenovo/x200/Kconfig @@ -1,4 +1,4 @@ -if BOARD_LENOVO_X200 +if BOARD_LENOVO_X200 || BOARD_LENOVO_X301
config BOARD_SPECIFIC_OPTIONS def_bool y @@ -28,9 +28,19 @@ string default lenovo/x200
+config VARIANT_DIR + string + default "x200" if BOARD_LENOVO_X200 + default "x301" if BOARD_LENOVO_X301 + config MAINBOARD_PART_NUMBER string - default "ThinkPad X200" + default "ThinkPad X200" if BOARD_LENOVO_X200 + default "ThinkPad X301" if BOARD_LENOVO_X301 + +config OVERRIDE_DEVICETREE + string + default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb"
config USBDEBUG_HCD_INDEX int @@ -44,4 +54,4 @@ hex default 0x200000
-endif # BOARD_LENOVO_X200 +endif # BOARD_LENOVO_X200 || BOARD_LENOVO_X301 diff --git a/src/mainboard/lenovo/x200/Kconfig.name b/src/mainboard/lenovo/x200/Kconfig.name index 8e1dd43..54c7961 100644 --- a/src/mainboard/lenovo/x200/Kconfig.name +++ b/src/mainboard/lenovo/x200/Kconfig.name @@ -1,2 +1,5 @@ config BOARD_LENOVO_X200 - bool "ThinkPad X200 / X200t" + bool "ThinkPad X200 / X200s / X200t" + +config BOARD_LENOVO_X301 + bool "ThinkPad X301" diff --git a/src/mainboard/lenovo/x200/Makefile.inc b/src/mainboard/lenovo/x200/Makefile.inc index ffd7cf2..f6c2c0c 100644 --- a/src/mainboard/lenovo/x200/Makefile.inc +++ b/src/mainboard/lenovo/x200/Makefile.inc @@ -13,10 +13,10 @@ ## GNU General Public License for more details. ##
-ramstage-y += dock.c +ramstage-y += variants/$(VARIANT_DIR)/dock.c ramstage-y += cstates.c ramstage-y += blc.c -romstage-y += gpio.c +romstage-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
diff --git a/src/mainboard/lenovo/x200/board_info.txt b/src/mainboard/lenovo/x200/board_info.txt index c9cc003..6f27955 100644 --- a/src/mainboard/lenovo/x200/board_info.txt +++ b/src/mainboard/lenovo/x200/board_info.txt @@ -1,5 +1,6 @@ Category: laptop -ROM package: SOIC-16 or SOIC-8 +Board name: ThinkPad X200 baseboard +ROM package: SOIC-16 or SOIC-8 or WSON8 ROM protocol: SPI ROM socketed: n Flashrom support: n diff --git a/src/mainboard/lenovo/x200/devicetree.cb b/src/mainboard/lenovo/x200/devicetree.cb index 4efcc25..fdd69ec 100644 --- a/src/mainboard/lenovo/x200/devicetree.cb +++ b/src/mainboard/lenovo/x200/devicetree.cb @@ -73,12 +73,6 @@ # Set thermal throttling to 75%. register "throttle_duty" = "THTL_75_0"
- # Enable PCIe ports 1,2,4 as slots (Mini * PCIe). - register "pcie_slot_implemented" = "0xb" - # Set power limits to 10 * 10^0 watts. - # Maybe we should set less for Mini PCIe. - register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 0, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 } }" - register "pcie_hotplug_map" = "{ 0, 0, 0, 1, 0, 0, 0, 0 }" register "gen1_dec" = "0x007c1601" register "gen2_dec" = "0x000c15e1" register "gen3_dec" = "0x001c1681" @@ -114,10 +108,7 @@ device pci 1c.2 on subsystemid 0x17aa 0x20f3 # UWB end # PCIe Port #3 - device pci 1c.3 on - subsystemid 0x17aa 0x20f3 # Expresscard - smbios_slot_desc "7" "3" "ExpressCard Slot" "8" - end # PCIe Port #4 + # PCIe Port #4 is configured in override tree. device pci 1c.4 off end # PCIe Port #5 device pci 1c.5 off end # PCIe Port #6 device pci 1d.0 on # UHCI @@ -154,7 +145,6 @@ device pnp ff.1 on # dummy end register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" end
chip ec/lenovo/h8 @@ -192,22 +182,6 @@ register "bdc_gpio_num" = "7" register "bdc_gpio_lvl" = "0" end - - chip superio/nsc/pc87382 - device pnp 164e.3 on # Digitizer - io 0x60 = 0x200 - irq 0x29 = 0xb0 - irq 0x70 = 0x5 - irq 0xf0 = 0x82 - end - # IR, not connected - device pnp 164e.2 off end - # GPIO, not connected - device pnp 164e.7 off end - # DLPC, not connected - device pnp 164e.19 off end - end - end device pci 1f.2 on # SATA/IDE 1 subsystemid 0x17aa 0x20f8 diff --git a/src/mainboard/lenovo/x200/variants/x200/board_info.txt b/src/mainboard/lenovo/x200/variants/x200/board_info.txt new file mode 100644 index 0000000..c9cc003 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x200/board_info.txt @@ -0,0 +1,6 @@ +Category: laptop +ROM package: SOIC-16 or SOIC-8 +ROM protocol: SPI +ROM socketed: n +Flashrom support: n +Release year: 2008 diff --git a/src/mainboard/lenovo/x200/dock.c b/src/mainboard/lenovo/x200/variants/x200/dock.c similarity index 96% rename from src/mainboard/lenovo/x200/dock.c rename to src/mainboard/lenovo/x200/variants/x200/dock.c index d5f774b..019d079 100644 --- a/src/mainboard/lenovo/x200/dock.c +++ b/src/mainboard/lenovo/x200/variants/x200/dock.c @@ -26,11 +26,11 @@ #include <ec/lenovo/h8/h8.h> #include <ec/acpi/ec.h>
-#include "dock.h" +#include "../../dock.h"
#define LPC_DEV PCI_DEV(0, 0x1f, 0)
-void h8_mainboard_init_dock (void) +void h8_mainboard_init_dock(void) { if (dock_present()) { printk(BIOS_DEBUG, "dock is connected\n"); diff --git a/src/mainboard/lenovo/x200/gpio.c b/src/mainboard/lenovo/x200/variants/x200/gpio.c similarity index 100% rename from src/mainboard/lenovo/x200/gpio.c rename to src/mainboard/lenovo/x200/variants/x200/gpio.c diff --git a/src/mainboard/lenovo/x200/variants/x200/overridetree.cb b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb new file mode 100644 index 0000000..dd08f1f --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb @@ -0,0 +1,38 @@ +chip northbridge/intel/gm45 + device domain 0 on + chip southbridge/intel/i82801ix + # Enable PCIe ports 1,2,3,4 as slots (Mini * PCIe). + register "pcie_slot_implemented" = "0xf" + # Set power limits to 10 * 10^0 watts. + # Maybe we should set less for Mini PCIe. + register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 10, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 } }" + # Enable hotplug on PCIe port 4 (Express Card) + register "pcie_hotplug_map" = "{ 0, 0, 0, 1, 0, 0, 0, 0 }" + + device pci 1c.3 on + subsystemid 0x17aa 0x20f3 # Expresscard + smbios_slot_desc "7" "3" "ExpressCard Slot" "8" + end # PCIe Port #4 + + device pci 1f.0 on # LPC bridge + chip ec/lenovo/pmh7 + register "dock_event_enable" = "0x01" + end + chip superio/nsc/pc87382 + device pnp 164e.3 on # Digitizer + io 0x60 = 0x200 + irq 0x29 = 0xb0 + irq 0x70 = 0x5 + irq 0xf0 = 0x82 + end + # IR, not connected + device pnp 164e.2 off end + # GPIO, not connected + device pnp 164e.7 off end + # DLPC, not connected + device pnp 164e.19 off end + end + end + end + end +end diff --git a/src/mainboard/lenovo/x200/variants/x301/board_info.txt b/src/mainboard/lenovo/x200/variants/x301/board_info.txt new file mode 100644 index 0000000..6ee5df0 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/board_info.txt @@ -0,0 +1,6 @@ +Category: laptop +ROM package: WSON-8 +ROM protocol: SPI +ROM socketed: n +Flashrom support: n +Release year: 2008 diff --git a/src/mainboard/lenovo/x200/variants/x301/dock.c b/src/mainboard/lenovo/x200/variants/x301/dock.c new file mode 100644 index 0000000..a180d64 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/dock.c @@ -0,0 +1,38 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011 Sven Schnelle svens@stackframe.org + * Copyright (C) 2013 Vladimir Serbinenko phcoder@gmail.com + * + * 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. + */ + +#define __SIMPLE_DEVICE__ + +#include <ec/lenovo/h8/h8.h> +#include "../../dock.h" + +void h8_mainboard_init_dock(void) +{ +} + +void dock_connect(void) +{ +} + +void dock_disconnect(void) +{ +} + +int dock_present(void) +{ + return 0; +} diff --git a/src/mainboard/lenovo/x200/variants/x301/gpio.c b/src/mainboard/lenovo/x200/variants/x301/gpio.c new file mode 100644 index 0000000..01421a9 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/gpio.c @@ -0,0 +1,131 @@ +/* + * This file is part of the coreboot project. + * + * 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 <southbridge/intel/common/gpio.h> + +static const struct pch_gpio_set1 pch_gpio_set1_mode = { + .gpio1 = GPIO_MODE_GPIO, + .gpio2 = GPIO_MODE_GPIO, + .gpio3 = GPIO_MODE_GPIO, + .gpio4 = GPIO_MODE_GPIO, + .gpio5 = GPIO_MODE_GPIO, + .gpio6 = GPIO_MODE_GPIO, + .gpio7 = GPIO_MODE_GPIO, + .gpio8 = GPIO_MODE_GPIO, + .gpio9 = GPIO_MODE_GPIO, + .gpio13 = GPIO_MODE_GPIO, + .gpio17 = GPIO_MODE_GPIO, + .gpio18 = GPIO_MODE_GPIO, + .gpio19 = GPIO_MODE_GPIO, + .gpio20 = GPIO_MODE_GPIO, + .gpio21 = GPIO_MODE_GPIO, + .gpio22 = GPIO_MODE_GPIO, + .gpio24 = GPIO_MODE_GPIO, + .gpio27 = GPIO_MODE_GPIO, + .gpio28 = GPIO_MODE_GPIO, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_direction = { + .gpio1 = GPIO_DIR_INPUT, + .gpio2 = GPIO_DIR_INPUT, + .gpio3 = GPIO_DIR_INPUT, + .gpio4 = GPIO_DIR_INPUT, + .gpio5 = GPIO_DIR_INPUT, + .gpio6 = GPIO_DIR_INPUT, + .gpio7 = GPIO_DIR_INPUT, + .gpio8 = GPIO_DIR_INPUT, + .gpio9 = GPIO_DIR_OUTPUT, + .gpio13 = GPIO_DIR_INPUT, + .gpio17 = GPIO_DIR_INPUT, + .gpio18 = GPIO_DIR_OUTPUT, + .gpio19 = GPIO_DIR_OUTPUT, + .gpio20 = GPIO_DIR_OUTPUT, + .gpio21 = GPIO_DIR_INPUT, + .gpio22 = GPIO_DIR_OUTPUT, + .gpio24 = GPIO_DIR_OUTPUT, + .gpio27 = GPIO_DIR_OUTPUT, + .gpio28 = GPIO_DIR_OUTPUT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_level = { + .gpio9 = GPIO_LEVEL_HIGH, + .gpio18 = GPIO_LEVEL_HIGH, + .gpio19 = GPIO_LEVEL_HIGH, + .gpio20 = GPIO_LEVEL_HIGH, + .gpio22 = GPIO_LEVEL_HIGH, + .gpio24 = GPIO_LEVEL_HIGH, + .gpio27 = GPIO_LEVEL_LOW, + .gpio28 = GPIO_LEVEL_LOW, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_invert = { + .gpio1 = GPIO_INVERT, + .gpio8 = GPIO_INVERT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_blink = { +}; + +static const struct pch_gpio_set2 pch_gpio_set2_mode = { + .gpio33 = GPIO_MODE_GPIO, + .gpio34 = GPIO_MODE_GPIO, + .gpio36 = GPIO_MODE_GPIO, + .gpio37 = GPIO_MODE_GPIO, + .gpio38 = GPIO_MODE_GPIO, + .gpio39 = GPIO_MODE_GPIO, + .gpio41 = GPIO_MODE_GPIO, + .gpio42 = GPIO_MODE_GPIO, + .gpio48 = GPIO_MODE_GPIO, + .gpio49 = GPIO_MODE_GPIO, + .gpio56 = GPIO_MODE_GPIO, + .gpio57 = GPIO_MODE_GPIO, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_direction = { + .gpio32 = GPIO_DIR_INPUT, + .gpio33 = GPIO_DIR_OUTPUT, + .gpio34 = GPIO_DIR_OUTPUT, + .gpio36 = GPIO_DIR_INPUT, + .gpio37 = GPIO_DIR_INPUT, + .gpio38 = GPIO_DIR_INPUT, + .gpio39 = GPIO_DIR_INPUT, + .gpio41 = GPIO_DIR_OUTPUT, + .gpio42 = GPIO_DIR_OUTPUT, + .gpio48 = GPIO_DIR_INPUT, + .gpio49 = GPIO_DIR_OUTPUT, + .gpio56 = GPIO_DIR_INPUT, + .gpio57 = GPIO_DIR_INPUT, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_level = { + .gpio33 = GPIO_LEVEL_HIGH, + .gpio34 = GPIO_LEVEL_LOW, + .gpio41 = GPIO_LEVEL_HIGH, + .gpio42 = GPIO_LEVEL_HIGH, + .gpio49 = GPIO_LEVEL_HIGH, +}; + +const struct pch_gpio_map mainboard_gpio_map = { + .set1 = { + .mode = &pch_gpio_set1_mode, + .direction = &pch_gpio_set1_direction, + .level = &pch_gpio_set1_level, + .blink = &pch_gpio_set1_blink, + .invert = &pch_gpio_set1_invert, + }, + .set2 = { + .mode = &pch_gpio_set2_mode, + .direction = &pch_gpio_set2_direction, + .level = &pch_gpio_set2_level, + }, +}; diff --git a/src/mainboard/lenovo/x200/variants/x301/overridetree.cb b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb new file mode 100644 index 0000000..fafe5e9 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb @@ -0,0 +1,14 @@ +chip northbridge/intel/gm45 + device domain 0 on + chip southbridge/intel/i82801ix + # Enable PCIe ports 1,2,3 as slots (Mini * PCIe). + register "pcie_slot_implemented" = "0x7" + # Set power limits to 10 * 10^0 watts. + # Maybe we should set less for Mini PCIe. + register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }" + # x301 has no Express Card slot. + register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }" + device pci 1c.3 off end # PCIe Port #4 + end + end +end diff --git a/src/southbridge/intel/i82801ix/nvs.h b/src/southbridge/intel/i82801ix/nvs.h index 04e62db..607c225 100644 --- a/src/southbridge/intel/i82801ix/nvs.h +++ b/src/southbridge/intel/i82801ix/nvs.h @@ -13,6 +13,10 @@ * GNU General Public License for more details. */
+#ifndef SOUTHBRIDGE_INTEL_I82801IX_NVS_H +#define SOUTHBRIDGE_INTEL_I82801IX_NVS_H +#include <stdint.h> + typedef struct { /* Miscellaneous */ u16 osys; /* 0x00 - Operating System */ @@ -133,3 +137,5 @@ } __packed global_nvs_t;
void acpi_create_gnvs(global_nvs_t *gnvs); + +#endif /* SOUTHBRIDGE_INTEL_I82801GX_I82801IX_H */
Hello Alexander Couzens, Patrick Rudolph, Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#2).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, and no docking support, thus no superio chip in dock.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 17 files changed, 294 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 2:
(2 comments)
Nice.
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... PS2, Line 12: could can
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... PS2, Line 26: Add a test section here?
Hello Alexander Couzens, Patrick Rudolph, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#3).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, and no docking support, thus no superio chip in dock.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 17 files changed, 307 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/3
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... PS2, Line 12: could
can
Corrected.
https://review.coreboot.org/c/coreboot/+/36093/2/Documentation/mainboard/len... PS2, Line 26:
Add a test section here?
Added.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 3:
(8 comments)
Looks good!
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 7: x301_kb_removed Add something more complete: "X301 with WSON8 chip replaces with SOIC8 chip"
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 20: Otherwise, it may be recommended to replace it with a : SOIC-8 one. You should mention that you might need to add the chip to the IFD VSCC list, https://review.coreboot.org/c/coreboot/+/27860
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 39: : [T420 / T520 / X220 / T420s / W520 common]: xx20_series.md Stale comment?
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301_kb_removed.jpg:
PS3: Reduce image size to about 100KiB
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... File src/mainboard/lenovo/x200/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... PS3, Line 16: variants/$(VARIANT_DIR)/dock.c I think defining a Kconfig in the mainboard Kconfig file "HAS_DOCK_CONNECTOR" and conditionally including it makes more sense.
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... PS3, Line 18: blc.c You might want to add your EDID string to this list to have a properly 'tuned' backlight pwm frequency. Typically 100-200Hz is fine for CCFL backlit panels, while with LED backlit you want it as high as possible without it flickering or producing noise. With LED backlight you can expect 300-1000Hz to work nicely.
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/b... File src/mainboard/lenovo/x200/board_info.txt:
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/b... PS3, Line 2: ThinkPad X200 baseboard Thinkpad X200/X200T/X200S/X301
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... File src/southbridge/intel/i82801ix/nvs.h:
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... PS3, Line 137: global_nvs_t This reminds me that this has to go to the sb dir.
Swift Geek (Sebastian Grzywna) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 3:
For x301 gpio.c: gpio19,22,60 should be GPI (general purpose input), it's pulled high on the board gpio32 is set as GPI, should be native - CLKRUN# (if this one fails I blame EC FW, TPM chipie and intel strongly encourages its use)
Unused native functions (all pulled high, so GPI): gpio19,22,23 Unused USB OC# (all pulled high, so GPI): gpio29,31,41,43,44,45,46,47 Unused legacy PCI: gpio50,52,54 should be GPI, and gpio51,53,55 GPO High
Hello Alexander Couzens, Patrick Rudolph, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#4).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, and no docking support, thus no superio chip in dock.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in CB:4294 ) for h8-using devices without a dock.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/blc.c M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb M src/mainboard/lenovo/x200/dock.c A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 17 files changed, 299 insertions(+), 35 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/4
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 4:
(9 comments)
Patch Set 3:
For x301 gpio.c: gpio19,22,60 should be GPI (general purpose input), it's pulled high on the board gpio32 is set as GPI, should be native - CLKRUN# (if this one fails I blame EC FW, TPM chipie and intel strongly encourages its use)
Unused native functions (all pulled high, so GPI): gpio19,22,23 Unused USB OC# (all pulled high, so GPI): gpio29,31,41,43,44,45,46,47 Unused legacy PCI: gpio50,52,54 should be GPI, and gpio51,53,55 GPO High
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 7: x301_kb_removed
Add something more complete: "X301 with WSON8 chip replaces with SOIC8 chip"
done.
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 20: Otherwise, it may be recommended to replace it with a : SOIC-8 one.
You should mention that you might need to add the chip to the IFD VSCC list, https://review. […]
done.
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... PS3, Line 39: : [T420 / T520 / X220 / T420s / W520 common]: xx20_series.md
Stale comment?
done.
https://review.coreboot.org/c/coreboot/+/36093/3/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301_kb_removed.jpg:
PS3:
Reduce image size to about 100KiB
Does it need to shrink more?
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... File src/mainboard/lenovo/x200/Kconfig:
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... PS4, Line 26: select H8_DOCK_EARLY_INIT if BOARD_LENOVO_X301 This is the "dirty hack" I use to fight an old dirty hack -- H8_DOCK_EARLY_INIT, which may need repurposing for devices using h8 but without a dock, like x301.
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... File src/mainboard/lenovo/x200/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... PS3, Line 16: variants/$(VARIANT_DIR)/dock.c
I think defining a Kconfig in the mainboard Kconfig file "HAS_DOCK_CONNECTOR" and conditionally incl […]
I agree with you, but now I may have to use dirty hack to fight another widely used dirty hack.
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... PS3, Line 18: blc.c
You might want to add your EDID string to this list to have a properly 'tuned' backlight pwm frequen […]
Done
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/b... File src/mainboard/lenovo/x200/board_info.txt:
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/b... PS3, Line 2: ThinkPad X200 baseboard
Thinkpad X200/X200T/X200S/X301
Done
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... File src/southbridge/intel/i82801ix/nvs.h:
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... PS3, Line 137: global_nvs_t
This reminds me that this has to go to the sb dir.
What should I do here?
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... File src/mainboard/lenovo/x200/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/36093/3/src/mainboard/lenovo/x200/M... PS3, Line 16: variants/$(VARIANT_DIR)/dock.c
I agree with you, but now I may have to use dirty hack to fight another widely used dirty hack.
Simply add a flag like "HAS_DOCK_CONNECTOR" may affect all target related to H8_DOCK_EARLY_INIT.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 4:
(5 comments)
https://review.coreboot.org/c/coreboot/+/36093/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36093/4//COMMIT_MSG@25 PS4, Line 25: : TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in : CB:4294 ) for h8-using devices without a dock. For the moment just adding an empty function in ramstage is fine, but it could be done in a followup commit
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... PS4, Line 7: replaces replaced
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... PS4, Line 21: (you might need to add the chip to the IFD VSCC list) If you can match the ID's found the the VSCC table to the chip names in flashrom and create a list here that would be great.
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... File src/mainboard/lenovo/x200/Kconfig:
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... PS4, Line 26: select H8_DOCK_EARLY_INIT if BOARD_LENOVO_X301
This is the "dirty hack" I use to fight an old dirty hack -- H8_DOCK_EARLY_INIT, which may need repu […]
No please don't use this and link an empty implementation of the function. The best thing to do (can be follow up commit) is to add a new Kconfig option like 'H8_NO_DOCK_INIT'.
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... File src/southbridge/intel/i82801ix/nvs.h:
https://review.coreboot.org/c/coreboot/+/36093/3/src/southbridge/intel/i8280... PS3, Line 137: global_nvs_t
This reminds me that this has to go to the sb dir.
Nothing. It's more like a note to self that this should be moved.
Hello Alexander Couzens, Patrick Rudolph, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#5).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, and no docking support, thus no superio chip in dock.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in CB:4294 ) for h8-using devices without a dock.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/blc.c M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 18 files changed, 326 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/5
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... PS4, Line 7: replaces
replaced
Done
https://review.coreboot.org/c/coreboot/+/36093/4/Documentation/mainboard/len... PS4, Line 21: (you might need to add the chip to the IFD VSCC list)
If you can match the ID's found the the VSCC table to the chip names in flashrom and create a list h […]
Add what is found in vendor IFD VSCC list.
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... File src/mainboard/lenovo/x200/Kconfig:
https://review.coreboot.org/c/coreboot/+/36093/4/src/mainboard/lenovo/x200/K... PS4, Line 26: select H8_DOCK_EARLY_INIT if BOARD_LENOVO_X301
No please don't use this and link an empty implementation of the function. […]
Reverted to the scheme of the previous patchset.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36093/5/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/5/Documentation/mainboard/len... PS5, Line 45: Remove trailing newlines.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 5: Code-Review+2
Swift Geek (Sebastian Grzywna) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 5:
(1 comment)
Commit message mentions superio in dock when x200 doesn't have any there (LPC is not exposed over dock connector either)
https://review.coreboot.org/c/coreboot/+/36093/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36093/3//COMMIT_MSG@10 PS3, Line 10: setup, and no docking support, thus no superio chip in dock. X200* doesn't have SuperIO in dock(ultrabase)
Hello Alexander Couzens, Patrick Rudolph, Arthur Heymans, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#6).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, no docking support, and no superio chip.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in CB:4294 ) for h8-using devices without a dock.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/blc.c M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 18 files changed, 325 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/6
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 6:
(2 comments)
Patch Set 5:
(1 comment)
Commit message mentions superio in dock when x200 doesn't have any there (LPC is not exposed over dock connector either)
Do you mean that x200 has its superio chip on the mainboard?
https://review.coreboot.org/c/coreboot/+/36093/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36093/3//COMMIT_MSG@10 PS3, Line 10: setup, and no docking support, thus no superio chip in dock.
X200* doesn't have SuperIO in dock(ultrabase)
Changed.
https://review.coreboot.org/c/coreboot/+/36093/5/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301.md:
https://review.coreboot.org/c/coreboot/+/36093/5/Documentation/mainboard/len... PS5, Line 45:
Remove trailing newlines.
Done
Swift Geek (Sebastian Grzywna) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 6:
In some cases on mainboard, or none at all: Mocha-1 (X200): SuperIO BOM option for development (serial console), consumer ones don't have it populated Pecan-1 (X200s): No option available Caramel-1 (X200t): SuperIO to handle wacom UART
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 6: Code-Review+2
Hello Alexander Couzens, Patrick Rudolph, Arthur Heymans, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36093
to look at the new patch set (#7).
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, no docking support, and no superio chip.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in CB:4294 ) for h8-using devices without a dock.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/blc.c M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 18 files changed, 325 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/36093/7
Bill XIE has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 7:
Patch Set 6: Code-Review+2
Manually rebased as patch set 7 to resolve conflict.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 7: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/36093/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36093/4//COMMIT_MSG@25 PS4, Line 25: : TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in : CB:4294 ) for h8-using devices without a dock.
For the moment just adding an empty function in ramstage is fine, but it could be done in a followup […]
Done
Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
mb/lenovo/x200: Add ThinkPad X301 as a variant
It is similar to X200s, with U-series CPU, slightly different gpio setup, no docking support, and no superio chip.
Tested: - CPU Core 2 Duo U9400 - Slotted DIMM 4GiB*2 from samsung - Camera - pci-e slots - sata and usb2 - libgfxinit-based graphic init - NVRAM options for North and South bridges - Sound - Thinkpad EC - S3 - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from Linux payload (Heads) and Seabios.
TODO: repurpose and/or rename flag H8_DOCK_EARLY_INIT (introduced in CB:4294 ) for h8-using devices without a dock.
Change-Id: Ic6a6059ccf15dd2e43ed4fc490c1d3c36aa1e817 Signed-off-by: Bill XIE persmule@hardenedlinux.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/36093 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M Documentation/mainboard/index.md A Documentation/mainboard/lenovo/x301.md A Documentation/mainboard/lenovo/x301_kb_removed.jpg M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/Kconfig.name M src/mainboard/lenovo/x200/Makefile.inc M src/mainboard/lenovo/x200/blc.c M src/mainboard/lenovo/x200/board_info.txt M src/mainboard/lenovo/x200/devicetree.cb A src/mainboard/lenovo/x200/variants/x200/board_info.txt R src/mainboard/lenovo/x200/variants/x200/dock.c R src/mainboard/lenovo/x200/variants/x200/gpio.c A src/mainboard/lenovo/x200/variants/x200/overridetree.cb A src/mainboard/lenovo/x200/variants/x301/board_info.txt A src/mainboard/lenovo/x200/variants/x301/dock.c A src/mainboard/lenovo/x200/variants/x301/gpio.c A src/mainboard/lenovo/x200/variants/x301/overridetree.cb M src/southbridge/intel/i82801ix/nvs.h 18 files changed, 325 insertions(+), 36 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/Documentation/mainboard/index.md b/Documentation/mainboard/index.md index c9204f6..2aa2763 100644 --- a/Documentation/mainboard/index.md +++ b/Documentation/mainboard/index.md @@ -72,6 +72,10 @@
- [T410](lenovo/t410.md)
+### GM45 series + +- [X301](lenovo/x301.md) + ### Sandy Bridge series
- [T420](lenovo/t420.md) diff --git a/Documentation/mainboard/lenovo/x301.md b/Documentation/mainboard/lenovo/x301.md new file mode 100644 index 0000000..28b512d --- /dev/null +++ b/Documentation/mainboard/lenovo/x301.md @@ -0,0 +1,44 @@ +# Lenovo X301 + +## Disassembly Instructions + +You must remove the following parts to access the SPI flash: + + + +* Battery pack +* Keyboard + +Its [Hardware Maintenance Manual](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/43y9441.pdf) can be used as a guidance of disassembly. + +The WSON-8 flash chip (surrounded with red circle in the photo above, +already replaced with a SOIC-8 one) sits under a piece of insulating +tape. If solders between the chip and soldering pads fortunately +overflows beside the chip as tiny tin balls attached to soldering pads, +it will be possible to use a pomona 5250 clip to hold the chip, with +its metal tips just attached to tin balls, thus connecting the chip to +the programmer. Otherwise, it may be recommended to replace it with a +SOIC-8 one (you might need to add the chip to the IFD VSCC list), as +what is done in the photo. + +The vendor IFD VSCC list contains: + -MACRONIX_MX25L6405 (0xc2, 0x2017) + -WINBOND_NEX_W25X64 (0xef, 0x3017) + -ATMEL_AT25DF641 (0x1f, 0x4800) + +```eval_rst +:doc:`../../flash_tutorial/ext_power` +``` +Tested: + - CPU Core 2 Duo U9400 + - Slotted DIMM 4GiB*2 from samsung + - Camera + - pci-e slots + - sata and usb2 + - libgfxinit-based graphic init + - NVRAM options for North and South bridges + - Sound + - Thinkpad EC + - S3 + - Linux 4.19.67-2 within Debian GNU/Linux stable, loaded from + Linux payload (Heads) and Seabios. diff --git a/Documentation/mainboard/lenovo/x301_kb_removed.jpg b/Documentation/mainboard/lenovo/x301_kb_removed.jpg new file mode 100644 index 0000000..1225dd7 --- /dev/null +++ b/Documentation/mainboard/lenovo/x301_kb_removed.jpg Binary files differ diff --git a/src/mainboard/lenovo/x200/Kconfig b/src/mainboard/lenovo/x200/Kconfig index 7b905bc..fab8a88 100644 --- a/src/mainboard/lenovo/x200/Kconfig +++ b/src/mainboard/lenovo/x200/Kconfig @@ -1,4 +1,4 @@ -if BOARD_LENOVO_X200 +if BOARD_LENOVO_X200 || BOARD_LENOVO_X301
config BOARD_SPECIFIC_OPTIONS def_bool y @@ -28,9 +28,19 @@ string default lenovo/x200
+config VARIANT_DIR + string + default "x200" if BOARD_LENOVO_X200 + default "x301" if BOARD_LENOVO_X301 + config MAINBOARD_PART_NUMBER string - default "ThinkPad X200" + default "ThinkPad X200" if BOARD_LENOVO_X200 + default "ThinkPad X301" if BOARD_LENOVO_X301 + +config OVERRIDE_DEVICETREE + string + default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb"
config USBDEBUG_HCD_INDEX int @@ -44,4 +54,4 @@ hex default 0x200000
-endif # BOARD_LENOVO_X200 +endif # BOARD_LENOVO_X200 || BOARD_LENOVO_X301 diff --git a/src/mainboard/lenovo/x200/Kconfig.name b/src/mainboard/lenovo/x200/Kconfig.name index 8e1dd43..54c7961 100644 --- a/src/mainboard/lenovo/x200/Kconfig.name +++ b/src/mainboard/lenovo/x200/Kconfig.name @@ -1,2 +1,5 @@ config BOARD_LENOVO_X200 - bool "ThinkPad X200 / X200t" + bool "ThinkPad X200 / X200s / X200t" + +config BOARD_LENOVO_X301 + bool "ThinkPad X301" diff --git a/src/mainboard/lenovo/x200/Makefile.inc b/src/mainboard/lenovo/x200/Makefile.inc index ffd7cf2..f6c2c0c 100644 --- a/src/mainboard/lenovo/x200/Makefile.inc +++ b/src/mainboard/lenovo/x200/Makefile.inc @@ -13,10 +13,10 @@ ## GNU General Public License for more details. ##
-ramstage-y += dock.c +ramstage-y += variants/$(VARIANT_DIR)/dock.c ramstage-y += cstates.c ramstage-y += blc.c -romstage-y += gpio.c +romstage-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
diff --git a/src/mainboard/lenovo/x200/blc.c b/src/mainboard/lenovo/x200/blc.c index 6c5779a..0856060 100644 --- a/src/mainboard/lenovo/x200/blc.c +++ b/src/mainboard/lenovo/x200/blc.c @@ -23,6 +23,7 @@ /* corrected to 320MHz CDClk, vendor set 753; works fine at both: */ {"LTD121EQ3B", 447}, {"LTD121EWVB", 165}, + {"LTD133EQ1B", 264}, /* Found on an X301 */ {"B121EW03 V6 ", 165}, /* datasheets: between 100 and 20k, typical 200 */ /* TESTED: works best at 400 */ diff --git a/src/mainboard/lenovo/x200/board_info.txt b/src/mainboard/lenovo/x200/board_info.txt index c9cc003..91d5bd8 100644 --- a/src/mainboard/lenovo/x200/board_info.txt +++ b/src/mainboard/lenovo/x200/board_info.txt @@ -1,5 +1,6 @@ Category: laptop -ROM package: SOIC-16 or SOIC-8 +Board name: Thinkpad X200/X200T/X200S/X301 +ROM package: SOIC-16 or SOIC-8 or WSON8 ROM protocol: SPI ROM socketed: n Flashrom support: n diff --git a/src/mainboard/lenovo/x200/devicetree.cb b/src/mainboard/lenovo/x200/devicetree.cb index 4efcc25..fdd69ec 100644 --- a/src/mainboard/lenovo/x200/devicetree.cb +++ b/src/mainboard/lenovo/x200/devicetree.cb @@ -73,12 +73,6 @@ # Set thermal throttling to 75%. register "throttle_duty" = "THTL_75_0"
- # Enable PCIe ports 1,2,4 as slots (Mini * PCIe). - register "pcie_slot_implemented" = "0xb" - # Set power limits to 10 * 10^0 watts. - # Maybe we should set less for Mini PCIe. - register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 0, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 } }" - register "pcie_hotplug_map" = "{ 0, 0, 0, 1, 0, 0, 0, 0 }" register "gen1_dec" = "0x007c1601" register "gen2_dec" = "0x000c15e1" register "gen3_dec" = "0x001c1681" @@ -114,10 +108,7 @@ device pci 1c.2 on subsystemid 0x17aa 0x20f3 # UWB end # PCIe Port #3 - device pci 1c.3 on - subsystemid 0x17aa 0x20f3 # Expresscard - smbios_slot_desc "7" "3" "ExpressCard Slot" "8" - end # PCIe Port #4 + # PCIe Port #4 is configured in override tree. device pci 1c.4 off end # PCIe Port #5 device pci 1c.5 off end # PCIe Port #6 device pci 1d.0 on # UHCI @@ -154,7 +145,6 @@ device pnp ff.1 on # dummy end register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" end
chip ec/lenovo/h8 @@ -192,22 +182,6 @@ register "bdc_gpio_num" = "7" register "bdc_gpio_lvl" = "0" end - - chip superio/nsc/pc87382 - device pnp 164e.3 on # Digitizer - io 0x60 = 0x200 - irq 0x29 = 0xb0 - irq 0x70 = 0x5 - irq 0xf0 = 0x82 - end - # IR, not connected - device pnp 164e.2 off end - # GPIO, not connected - device pnp 164e.7 off end - # DLPC, not connected - device pnp 164e.19 off end - end - end device pci 1f.2 on # SATA/IDE 1 subsystemid 0x17aa 0x20f8 diff --git a/src/mainboard/lenovo/x200/variants/x200/board_info.txt b/src/mainboard/lenovo/x200/variants/x200/board_info.txt new file mode 100644 index 0000000..c9cc003 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x200/board_info.txt @@ -0,0 +1,6 @@ +Category: laptop +ROM package: SOIC-16 or SOIC-8 +ROM protocol: SPI +ROM socketed: n +Flashrom support: n +Release year: 2008 diff --git a/src/mainboard/lenovo/x200/dock.c b/src/mainboard/lenovo/x200/variants/x200/dock.c similarity index 95% rename from src/mainboard/lenovo/x200/dock.c rename to src/mainboard/lenovo/x200/variants/x200/dock.c index 233b134..bdd65a5 100644 --- a/src/mainboard/lenovo/x200/dock.c +++ b/src/mainboard/lenovo/x200/variants/x200/dock.c @@ -21,9 +21,9 @@ #include <ec/lenovo/h8/h8.h> #include <ec/acpi/ec.h>
-#include "dock.h" +#include "../../dock.h"
-void h8_mainboard_init_dock (void) +void h8_mainboard_init_dock(void) { if (dock_present()) { printk(BIOS_DEBUG, "dock is connected\n"); diff --git a/src/mainboard/lenovo/x200/gpio.c b/src/mainboard/lenovo/x200/variants/x200/gpio.c similarity index 100% rename from src/mainboard/lenovo/x200/gpio.c rename to src/mainboard/lenovo/x200/variants/x200/gpio.c diff --git a/src/mainboard/lenovo/x200/variants/x200/overridetree.cb b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb new file mode 100644 index 0000000..dd08f1f --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb @@ -0,0 +1,38 @@ +chip northbridge/intel/gm45 + device domain 0 on + chip southbridge/intel/i82801ix + # Enable PCIe ports 1,2,3,4 as slots (Mini * PCIe). + register "pcie_slot_implemented" = "0xf" + # Set power limits to 10 * 10^0 watts. + # Maybe we should set less for Mini PCIe. + register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 10, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 } }" + # Enable hotplug on PCIe port 4 (Express Card) + register "pcie_hotplug_map" = "{ 0, 0, 0, 1, 0, 0, 0, 0 }" + + device pci 1c.3 on + subsystemid 0x17aa 0x20f3 # Expresscard + smbios_slot_desc "7" "3" "ExpressCard Slot" "8" + end # PCIe Port #4 + + device pci 1f.0 on # LPC bridge + chip ec/lenovo/pmh7 + register "dock_event_enable" = "0x01" + end + chip superio/nsc/pc87382 + device pnp 164e.3 on # Digitizer + io 0x60 = 0x200 + irq 0x29 = 0xb0 + irq 0x70 = 0x5 + irq 0xf0 = 0x82 + end + # IR, not connected + device pnp 164e.2 off end + # GPIO, not connected + device pnp 164e.7 off end + # DLPC, not connected + device pnp 164e.19 off end + end + end + end + end +end diff --git a/src/mainboard/lenovo/x200/variants/x301/board_info.txt b/src/mainboard/lenovo/x200/variants/x301/board_info.txt new file mode 100644 index 0000000..6ee5df0 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/board_info.txt @@ -0,0 +1,6 @@ +Category: laptop +ROM package: WSON-8 +ROM protocol: SPI +ROM socketed: n +Flashrom support: n +Release year: 2008 diff --git a/src/mainboard/lenovo/x200/variants/x301/dock.c b/src/mainboard/lenovo/x200/variants/x301/dock.c new file mode 100644 index 0000000..f8a2dc4 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/dock.c @@ -0,0 +1,22 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011 Sven Schnelle svens@stackframe.org + * Copyright (C) 2013 Vladimir Serbinenko phcoder@gmail.com + * + * 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 <ec/lenovo/h8/h8.h> + +void h8_mainboard_init_dock(void) +{ +} diff --git a/src/mainboard/lenovo/x200/variants/x301/gpio.c b/src/mainboard/lenovo/x200/variants/x301/gpio.c new file mode 100644 index 0000000..10ad18a --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/gpio.c @@ -0,0 +1,160 @@ +/* + * This file is part of the coreboot project. + * + * 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 <southbridge/intel/common/gpio.h> + +static const struct pch_gpio_set1 pch_gpio_set1_mode = { + .gpio1 = GPIO_MODE_GPIO, + .gpio2 = GPIO_MODE_GPIO, + .gpio3 = GPIO_MODE_GPIO, + .gpio4 = GPIO_MODE_GPIO, + .gpio5 = GPIO_MODE_GPIO, + .gpio6 = GPIO_MODE_GPIO, + .gpio7 = GPIO_MODE_GPIO, + .gpio8 = GPIO_MODE_GPIO, + .gpio9 = GPIO_MODE_GPIO, + .gpio13 = GPIO_MODE_GPIO, + .gpio17 = GPIO_MODE_GPIO, + .gpio18 = GPIO_MODE_GPIO, + .gpio19 = GPIO_MODE_GPIO, + .gpio20 = GPIO_MODE_GPIO, + .gpio21 = GPIO_MODE_GPIO, + .gpio22 = GPIO_MODE_GPIO, + .gpio23 = GPIO_MODE_GPIO, + .gpio24 = GPIO_MODE_GPIO, + .gpio27 = GPIO_MODE_GPIO, + .gpio28 = GPIO_MODE_GPIO, + .gpio29 = GPIO_MODE_GPIO, + .gpio31 = GPIO_MODE_GPIO, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_direction = { + .gpio1 = GPIO_DIR_INPUT, + .gpio2 = GPIO_DIR_INPUT, + .gpio3 = GPIO_DIR_INPUT, + .gpio4 = GPIO_DIR_INPUT, + .gpio5 = GPIO_DIR_INPUT, + .gpio6 = GPIO_DIR_INPUT, + .gpio7 = GPIO_DIR_INPUT, + .gpio8 = GPIO_DIR_INPUT, + .gpio9 = GPIO_DIR_OUTPUT, + .gpio13 = GPIO_DIR_INPUT, + .gpio17 = GPIO_DIR_INPUT, + .gpio18 = GPIO_DIR_OUTPUT, + .gpio19 = GPIO_DIR_INPUT, + .gpio20 = GPIO_DIR_OUTPUT, + .gpio21 = GPIO_DIR_INPUT, + .gpio22 = GPIO_DIR_INPUT, + .gpio23 = GPIO_DIR_INPUT, + .gpio24 = GPIO_DIR_OUTPUT, + .gpio27 = GPIO_DIR_OUTPUT, + .gpio28 = GPIO_DIR_OUTPUT, + .gpio29 = GPIO_DIR_INPUT, + .gpio31 = GPIO_DIR_INPUT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_level = { + .gpio9 = GPIO_LEVEL_HIGH, + .gpio18 = GPIO_LEVEL_HIGH, + .gpio20 = GPIO_LEVEL_HIGH, + .gpio24 = GPIO_LEVEL_HIGH, + .gpio27 = GPIO_LEVEL_LOW, + .gpio28 = GPIO_LEVEL_LOW, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_invert = { + .gpio1 = GPIO_INVERT, + .gpio8 = GPIO_INVERT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_blink = { +}; + +static const struct pch_gpio_set2 pch_gpio_set2_mode = { + .gpio33 = GPIO_MODE_GPIO, + .gpio34 = GPIO_MODE_GPIO, + .gpio36 = GPIO_MODE_GPIO, + .gpio37 = GPIO_MODE_GPIO, + .gpio38 = GPIO_MODE_GPIO, + .gpio39 = GPIO_MODE_GPIO, + .gpio41 = GPIO_MODE_GPIO, + .gpio42 = GPIO_MODE_GPIO, + .gpio43 = GPIO_MODE_GPIO, + .gpio44 = GPIO_MODE_GPIO, + .gpio45 = GPIO_MODE_GPIO, + .gpio46 = GPIO_MODE_GPIO, + .gpio47 = GPIO_MODE_GPIO, + .gpio48 = GPIO_MODE_GPIO, + .gpio49 = GPIO_MODE_GPIO, + .gpio50 = GPIO_MODE_GPIO, + .gpio51 = GPIO_MODE_GPIO, + .gpio52 = GPIO_MODE_GPIO, + .gpio53 = GPIO_MODE_GPIO, + .gpio54 = GPIO_MODE_GPIO, + .gpio55 = GPIO_MODE_GPIO, + .gpio56 = GPIO_MODE_GPIO, + .gpio57 = GPIO_MODE_GPIO, + .gpio60 = GPIO_MODE_GPIO, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_direction = { + .gpio33 = GPIO_DIR_OUTPUT, + .gpio34 = GPIO_DIR_OUTPUT, + .gpio36 = GPIO_DIR_INPUT, + .gpio37 = GPIO_DIR_INPUT, + .gpio38 = GPIO_DIR_INPUT, + .gpio39 = GPIO_DIR_INPUT, + .gpio41 = GPIO_DIR_INPUT, + .gpio42 = GPIO_DIR_OUTPUT, + .gpio43 = GPIO_DIR_INPUT, + .gpio44 = GPIO_DIR_INPUT, + .gpio45 = GPIO_DIR_INPUT, + .gpio46 = GPIO_DIR_INPUT, + .gpio47 = GPIO_DIR_INPUT, + .gpio48 = GPIO_DIR_INPUT, + .gpio49 = GPIO_DIR_OUTPUT, + .gpio50 = GPIO_DIR_INPUT, + .gpio51 = GPIO_DIR_OUTPUT, + .gpio52 = GPIO_DIR_INPUT, + .gpio53 = GPIO_DIR_OUTPUT, + .gpio54 = GPIO_DIR_INPUT, + .gpio55 = GPIO_DIR_OUTPUT, + .gpio56 = GPIO_DIR_INPUT, + .gpio57 = GPIO_DIR_INPUT, + .gpio60 = GPIO_DIR_INPUT, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_level = { + .gpio33 = GPIO_LEVEL_HIGH, + .gpio34 = GPIO_LEVEL_LOW, + .gpio42 = GPIO_LEVEL_HIGH, + .gpio49 = GPIO_LEVEL_HIGH, + .gpio51 = GPIO_LEVEL_HIGH, + .gpio53 = GPIO_LEVEL_HIGH, + .gpio55 = GPIO_LEVEL_HIGH, +}; + +const struct pch_gpio_map mainboard_gpio_map = { + .set1 = { + .mode = &pch_gpio_set1_mode, + .direction = &pch_gpio_set1_direction, + .level = &pch_gpio_set1_level, + .blink = &pch_gpio_set1_blink, + .invert = &pch_gpio_set1_invert, + }, + .set2 = { + .mode = &pch_gpio_set2_mode, + .direction = &pch_gpio_set2_direction, + .level = &pch_gpio_set2_level, + }, +}; diff --git a/src/mainboard/lenovo/x200/variants/x301/overridetree.cb b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb new file mode 100644 index 0000000..fafe5e9 --- /dev/null +++ b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb @@ -0,0 +1,14 @@ +chip northbridge/intel/gm45 + device domain 0 on + chip southbridge/intel/i82801ix + # Enable PCIe ports 1,2,3 as slots (Mini * PCIe). + register "pcie_slot_implemented" = "0x7" + # Set power limits to 10 * 10^0 watts. + # Maybe we should set less for Mini PCIe. + register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }" + # x301 has no Express Card slot. + register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }" + device pci 1c.3 off end # PCIe Port #4 + end + end +end diff --git a/src/southbridge/intel/i82801ix/nvs.h b/src/southbridge/intel/i82801ix/nvs.h index 04e62db..fab74ddc 100644 --- a/src/southbridge/intel/i82801ix/nvs.h +++ b/src/southbridge/intel/i82801ix/nvs.h @@ -13,6 +13,10 @@ * GNU General Public License for more details. */
+#ifndef SOUTHBRIDGE_INTEL_I82801IX_NVS_H +#define SOUTHBRIDGE_INTEL_I82801IX_NVS_H +#include <stdint.h> + typedef struct { /* Miscellaneous */ u16 osys; /* 0x00 - Operating System */ @@ -133,3 +137,5 @@ } __packed global_nvs_t;
void acpi_create_gnvs(global_nvs_t *gnvs); + +#endif /* SOUTHBRIDGE_INTEL_I82801IX_NVS_H */
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36093 )
Change subject: mb/lenovo/x200: Add ThinkPad X301 as a variant ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36093/8/Documentation/mainboard/len... File Documentation/mainboard/lenovo/x301_kb_removed.jpg:
PS8: Ouch, 312 KiB.