Feature #106 ยป support_t410.patch
src/mainboard/lenovo/t410/Kconfig | ||
---|---|---|
if BOARD_LENOVO_T410
|
||
config BOARD_SPECIFIC_OPTIONS # dummy
|
||
def_bool y
|
||
select SYSTEM_TYPE_LAPTOP
|
||
select NORTHBRIDGE_INTEL_NEHALEM
|
||
select SOUTHBRIDGE_INTEL_IBEXPEAK
|
||
select EC_LENOVO_PMH7
|
||
select EC_LENOVO_H8
|
||
select NO_UART_ON_SUPERIO
|
||
select HAVE_OPTION_TABLE
|
||
select HAVE_CMOS_DEFAULT
|
||
select BOARD_ROMSIZE_KB_8192
|
||
select HAVE_ACPI_TABLES
|
||
select INTEL_INT15
|
||
select HAVE_ACPI_RESUME
|
||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||
select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
|
||
select SUPERIO_NSC_PC87382
|
||
select DRIVERS_LENOVO_WACOM
|
||
select MAINBOARD_HAS_LPC_TPM
|
||
config MAINBOARD_DIR
|
||
string
|
||
default lenovo/t410
|
||
config MAINBOARD_PART_NUMBER
|
||
string
|
||
default "ThinkPad T410"
|
||
config MMCONF_BASE_ADDRESS
|
||
hex
|
||
default 0xe0000000
|
||
config USBDEBUG_HCD_INDEX
|
||
int
|
||
default 2
|
||
config DRAM_RESET_GATE_GPIO
|
||
int
|
||
default 10
|
||
config MAX_CPUS
|
||
int
|
||
default 4
|
||
config CPU_ADDR_BITS
|
||
int
|
||
default 36
|
||
endif
|
src/mainboard/lenovo/t410/Kconfig.name | ||
---|---|---|
config BOARD_LENOVO_T410
|
||
bool "ThinkPad T410 (cloned X201 / X201s / X201t)"
|
src/mainboard/lenovo/t410/Makefile.inc | ||
---|---|---|
##
|
||
## This file is part of the coreboot project.
|
||
##
|
||
## Copyright (C) 2007-2008 coresystems GmbH
|
||
##
|
||
## 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.
|
||
##
|
||
smm-$(CONFIG_HAVE_SMI_HANDLER) += dock.c
|
||
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
|
||
romstage-y += dock.c
|
||
ramstage-y += dock.c
|
src/mainboard/lenovo/t410/acpi/dock.asl | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
|
||
*
|
||
* 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 "smi.h"
|
||
Scope (\_SB)
|
||
{
|
||
Device(DOCK)
|
||
{
|
||
Name(_HID, "ACPI0003")
|
||
Name(_UID, 0x00)
|
||
Name(_PCL, Package() { \_SB } )
|
||
Method(_DCK, 1, NotSerialized)
|
||
{
|
||
if (Arg0) {
|
||
/* connect dock */
|
||
Store (1, \GP28)
|
||
Store (1, \_SB.PCI0.LPCB.EC.DKR1)
|
||
Store (1, \_SB.PCI0.LPCB.EC.DKR2)
|
||
Store (1, \_SB.PCI0.LPCB.EC.DKR3)
|
||
} else {
|
||
/* disconnect dock */
|
||
Store (0, \GP28)
|
||
Store (0, \_SB.PCI0.LPCB.EC.DKR1)
|
||
Store (0, \_SB.PCI0.LPCB.EC.DKR2)
|
||
Store (0, \_SB.PCI0.LPCB.EC.DKR3)
|
||
}
|
||
Xor(Arg0, \_SB.PCI0.LPCB.EC.DKR1, Local0)
|
||
Return (Local0)
|
||
}
|
||
Method(_STA, 0, NotSerialized)
|
||
{
|
||
Return (\_SB.PCI0.LPCB.EC.DKR1)
|
||
}
|
||
}
|
||
}
|
||
Scope(\_SB.PCI0.LPCB.EC)
|
||
{
|
||
Method(_Q18, 0, NotSerialized)
|
||
{
|
||
Notify(\_SB.DOCK, 3)
|
||
}
|
||
Method(_Q45, 0, NotSerialized)
|
||
{
|
||
Notify(\_SB.DOCK, 3)
|
||
}
|
||
Method(_Q58, 0, NotSerialized)
|
||
{
|
||
Notify(\_SB.DOCK, 0)
|
||
}
|
||
Method(_Q37, 0, NotSerialized)
|
||
{
|
||
Notify(\_SB.DOCK, 0)
|
||
}
|
||
}
|
src/mainboard/lenovo/t410/acpi/ec.asl | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
|
||
*
|
||
* 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/acpi/ec.asl>
|
||
Scope(\_SB.PCI0.LPCB.EC)
|
||
{
|
||
}
|
src/mainboard/lenovo/t410/acpi/gpe.asl | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
|
||
*
|
||
* 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 "smi.h"
|
||
Scope (\_GPE)
|
||
{
|
||
Method(_L18, 0, NotSerialized)
|
||
{
|
||
/* Read EC register to clear wake status */
|
||
Store(\_SB.PCI0.LPCB.EC.WAKE, Local0)
|
||
/* So that we don't get a warning that Local0 is unused. */
|
||
Increment (Local0)
|
||
}
|
||
}
|
src/mainboard/lenovo/t410/acpi/platform.asl | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2007-2009 coresystems GmbH
|
||
*
|
||
* 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.
|
||
*/
|
||
/* These come from the dynamically created CPU SSDT */
|
||
External(PDC0)
|
||
External(PDC1)
|
||
/* The APM port can be used for generating software SMIs */
|
||
OperationRegion (APMP, SystemIO, 0xb2, 2)
|
||
Field (APMP, ByteAcc, NoLock, Preserve)
|
||
{
|
||
APMC, 8, /* APM command */
|
||
APMS, 8 /* APM status */
|
||
}
|
||
/* SMI I/O Trap */
|
||
Method(TRAP, 1, Serialized)
|
||
{
|
||
Store (Arg0, SMIF) /* SMI Function */
|
||
Store (0, TRP0) /* Generate trap */
|
||
Return (SMIF) /* Return value of SMI handler */
|
||
}
|
||
/* The _PIC method is called by the OS to choose between interrupt
|
||
* routing via the i8259 interrupt controller or the APIC.
|
||
*
|
||
* _PIC is called with a parameter of 0 for i8259 configuration and
|
||
* with a parameter of 1 for Local Apic/IOAPIC configuration.
|
||
*/
|
||
Method(_PIC, 1)
|
||
{
|
||
/* Remember the OS' IRQ routing choice. */
|
||
Store(Arg0, PICM)
|
||
}
|
||
/* The _PTS method (Prepare To Sleep) is called before the OS is
|
||
* entering a sleep state. The sleep state number is passed in Arg0
|
||
*/
|
||
Method(_PTS,1)
|
||
{
|
||
\_SB.PCI0.LPCB.EC.MUTE(1)
|
||
\_SB.PCI0.LPCB.EC.USBP(0)
|
||
\_SB.PCI0.LPCB.EC.RADI(0)
|
||
}
|
||
/* The _WAK method is called on system wakeup */
|
||
Method(_WAK,1)
|
||
{
|
||
/* Not implemented. */
|
||
Return(Package(){0,0})
|
||
}
|
||
/* System Bus */
|
||
Scope(\_SB)
|
||
{
|
||
/* This method is placed on the top level, so we can make sure it's the
|
||
* first executed _INI method.
|
||
*/
|
||
Method(_INI, 0)
|
||
{
|
||
/* The DTS data in NVS is probably not up to date.
|
||
* Update temperature values and make sure AP thermal
|
||
* interrupts can happen
|
||
*/
|
||
/* TRAP(71) */ /* TODO */
|
||
/* Determine the Operating System and save the value in OSYS.
|
||
* We have to do this in order to be able to work around
|
||
* certain windows bugs.
|
||
*
|
||
* OSYS value | Operating System
|
||
* -----------+------------------
|
||
* 2000 | Windows 2000
|
||
* 2001 | Windows XP(+SP1)
|
||
* 2002 | Windows XP SP2
|
||
* 2006 | Windows Vista
|
||
* ???? | Windows 7
|
||
*/
|
||
/* Let's assume we're running at least Windows 2000 */
|
||
Store (2000, OSYS)
|
||
If (CondRefOf(_OSI)) {
|
||
If (_OSI("Windows 2001")) {
|
||
Store (2001, OSYS)
|
||
}
|
||
If (_OSI("Windows 2001 SP1")) {
|
||
Store (2001, OSYS)
|
||
}
|
||
If (_OSI("Windows 2001 SP2")) {
|
||
Store (2002, OSYS)
|
||
}
|
||
If (_OSI("Windows 2001.1")) {
|
||
Store (2001, OSYS)
|
||
}
|
||
If (_OSI("Windows 2001.1 SP1")) {
|
||
Store (2001, OSYS)
|
||
}
|
||
If (_OSI("Windows 2006")) {
|
||
Store (2006, OSYS)
|
||
}
|
||
If (_OSI("Windows 2006.1")) {
|
||
Store (2006, OSYS)
|
||
}
|
||
If (_OSI("Windows 2006 SP1")) {
|
||
Store (2006, OSYS)
|
||
}
|
||
If (_OSI("Windows 2009")) {
|
||
Store (2009, OSYS)
|
||
}
|
||
If (_OSI("Windows 2012")) {
|
||
Store (2012, OSYS)
|
||
}
|
||
}
|
||
}
|
||
}
|
src/mainboard/lenovo/t410/acpi/superio.asl | ||
---|---|---|
#include <drivers/pc80/pc/ps2_controller.asl>
|
src/mainboard/lenovo/t410/acpi_tables.c | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2007-2009 coresystems GmbH
|
||
* 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 <string.h>
|
||
#include <console/console.h>
|
||
#include <arch/io.h>
|
||
#include <arch/ioapic.h>
|
||
#include <arch/acpi.h>
|
||
#include <arch/acpigen.h>
|
||
#include <arch/smp/mpspec.h>
|
||
#include <device/device.h>
|
||
#include <device/pci.h>
|
||
#include <device/pci_ids.h>
|
||
#include "southbridge/intel/ibexpeak/nvs.h"
|
||
void acpi_create_gnvs(global_nvs_t * gnvs)
|
||
{
|
||
}
|
src/mainboard/lenovo/t410/board_info.txt | ||
---|---|---|
Category: laptop
|
||
ROM package: SOIC-8
|
||
ROM protocol: SPI
|
||
ROM socketed: n
|
||
Flashrom support: n
|
||
Release year: 2010
|
src/mainboard/lenovo/t410/cmos.default | ||
---|---|---|
boot_option=Fallback
|
||
baud_rate=115200
|
||
debug_level=Spew
|
||
power_on_after_fail=Disable
|
||
nmi=Enable
|
||
volume=0x3
|
||
first_battery=Primary
|
||
bluetooth=Enable
|
||
wwan=Enable
|
||
wlan=Enable
|
||
touchpad=Enable
|
||
trackpoint=Enable
|
||
fn_ctrl_swap=Disable
|
||
sticky_fn=Disable
|
||
power_management_beeps=Enable
|
||
low_battery_beep=Enable
|
||
sata_mode=AHCI
|
||
usb_always_on=Disable
|
src/mainboard/lenovo/t410/cmos.layout | ||
---|---|---|
##
|
||
## This file is part of the coreboot project.
|
||
##
|
||
## Copyright (C) 2007-2008 coresystems GmbH
|
||
## Copyright (C) 2013 Vladimir Serbinenko
|
||
##
|
||
## 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.
|
||
##
|
||
# -----------------------------------------------------------------
|
||
entries
|
||
# -----------------------------------------------------------------
|
||
# Status Register A
|
||
# -----------------------------------------------------------------
|
||
# Status Register B
|
||
# -----------------------------------------------------------------
|
||
# Status Register C
|
||
#96 4 r 0 status_c_rsvd
|
||
#100 1 r 0 uf_flag
|
||
#101 1 r 0 af_flag
|
||
#102 1 r 0 pf_flag
|
||
#103 1 r 0 irqf_flag
|
||
# -----------------------------------------------------------------
|
||
# Status Register D
|
||
#104 7 r 0 status_d_rsvd
|
||
#111 1 r 0 valid_cmos_ram
|
||
# -----------------------------------------------------------------
|
||
# Diagnostic Status Register
|
||
#112 8 r 0 diag_rsvd1
|
||
# -----------------------------------------------------------------
|
||
0 120 r 0 reserved_memory
|
||
#120 264 r 0 unused
|
||
# -----------------------------------------------------------------
|
||
# RTC_BOOT_BYTE (coreboot hardcoded)
|
||
384 1 e 4 boot_option
|
||
388 4 h 0 reboot_counter
|
||
#390 2 r 0 unused?
|
||
# -----------------------------------------------------------------
|
||
# coreboot config options: console
|
||
392 3 e 5 baud_rate
|
||
395 4 e 6 debug_level
|
||
#399 1 r 0 unused
|
||
#400 8 r 0 reserved for century byte
|
||
# coreboot config options: southbridge
|
||
408 1 e 1 nmi
|
||
409 2 e 7 power_on_after_fail
|
||
# coreboot config options: EC
|
||
411 1 e 8 first_battery
|
||
412 1 e 1 bluetooth
|
||
413 1 e 1 wwan
|
||
414 1 e 1 touchpad
|
||
415 1 e 1 wlan
|
||
416 1 e 1 trackpoint
|
||
417 1 e 1 fn_ctrl_swap
|
||
418 1 e 1 sticky_fn
|
||
419 1 e 1 power_management_beeps
|
||
420 1 e 1 low_battery_beep
|
||
421 1 e 9 sata_mode
|
||
422 1 e 11 usb_always_on
|
||
#423 1 r 1 unused
|
||
# coreboot config options: northbridge
|
||
424 3 e 10 gfx_uma_size
|
||
#427 5 r 0 unused
|
||
432 8 h 0 volume
|
||
# coreboot config options: check sums
|
||
984 16 h 0 check_sum
|
||
#1000 24 r 0 amd_reserved
|
||
# -----------------------------------------------------------------
|
||
enumerations
|
||
#ID value text
|
||
1 0 Disable
|
||
1 1 Enable
|
||
2 0 Enable
|
||
2 1 Disable
|
||
4 0 Fallback
|
||
4 1 Normal
|
||
5 0 115200
|
||
5 1 57600
|
||
5 2 38400
|
||
5 3 19200
|
||
5 4 9600
|
||
5 5 4800
|
||
5 6 2400
|
||
5 7 1200
|
||
6 1 Emergency
|
||
6 2 Alert
|
||
6 3 Critical
|
||
6 4 Error
|
||
6 5 Warning
|
||
6 6 Notice
|
||
6 7 Info
|
||
6 8 Debug
|
||
6 9 Spew
|
||
7 0 Disable
|
||
7 1 Enable
|
||
7 2 Keep
|
||
8 0 Secondary
|
||
8 1 Primary
|
||
9 0 AHCI
|
||
9 1 Compatible
|
||
10 0 32M
|
||
10 1 48M
|
||
10 2 64M
|
||
10 3 128M
|
||
10 5 96M
|
||
10 6 160M
|
||
11 0 Disable
|
||
11 1 AC and battery
|
||
# -----------------------------------------------------------------
|
||
checksums
|
||
checksum 392 415 984
|
src/mainboard/lenovo/t410/devicetree.cb | ||
---|---|---|
##
|
||
## This file is part of the coreboot project.
|
||
##
|
||
## Copyright (C) 2007-2009 coresystems GmbH
|
||
## Copyright (C) 2011 Sven Schnelle <svens@stackframe.org>
|
||
##
|
||
## 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.
|
||
##
|
||
chip northbridge/intel/nehalem
|
||
# IGD Displays
|
||
register "gfx.ndid" = "3"
|
||
register "gfx.did" = "{ 0x80000100, 0x80000240, 0x80000410, 0x80000410, 0x00000005 }"
|
||
# Enable DisplayPort Hotplug with 6ms pulse
|
||
register "gpu_dp_d_hotplug" = "0x06"
|
||
# Enable Panel as LVDS and configure power delays
|
||
register "gpu_panel_port_select" = "0" # LVDS
|
||
register "gpu_panel_power_cycle_delay" = "3"
|
||
register "gpu_panel_power_up_delay" = "250"
|
||
register "gpu_panel_power_down_delay" = "250"
|
||
register "gpu_panel_power_backlight_on_delay" = "2500"
|
||
register "gpu_panel_power_backlight_off_delay" = "2500"
|
||
register "gpu_cpu_backlight" = "0x58d"
|
||
register "gpu_pch_backlight" = "0x061a061a"
|
||
register "gfx.use_spread_spectrum_clock" = "1"
|
||
register "gfx.link_frequency_270_mhz" = "1"
|
||
chip ec/lenovo/pmh7
|
||
device pnp ff.1 on # dummy
|
||
end
|
||
register "backlight_enable" = "0x01"
|
||
register "dock_event_enable" = "0x01"
|
||
end
|
||
chip ec/lenovo/h8
|
||
device pnp ff.2 on # dummy
|
||
io 0x60 = 0x62
|
||
io 0x62 = 0x66
|
||
io 0x64 = 0x1600
|
||
io 0x66 = 0x1604
|
||
end
|
||
register "config0" = "0xa6"
|
||
register "config1" = "0x05"
|
||
register "config2" = "0xa0"
|
||
register "config3" = "0x01"
|
||
register "beepmask0" = "0xfe"
|
||
register "beepmask1" = "0x96"
|
||
register "has_power_management_beeps" = "1"
|
||
register "event2_enable" = "0xff"
|
||
register "event3_enable" = "0xff"
|
||
register "event4_enable" = "0xf4"
|
||
register "event5_enable" = "0x3c"
|
||
register "event6_enable" = "0x80"
|
||
register "event7_enable" = "0x01"
|
||
register "event8_enable" = "0x01"
|
||
register "event9_enable" = "0xff"
|
||
register "eventa_enable" = "0xff"
|
||
register "eventb_enable" = "0xff"
|
||
register "eventc_enable" = "0xff"
|
||
register "eventd_enable" = "0xff"
|
||
end
|
||
device cpu_cluster 0 on
|
||
chip cpu/intel/model_2065x
|
||
device lapic 0 on end
|
||
end
|
||
end
|
||
register "pci_mmio_size" = "1024"
|
||
device domain 0 on
|
||
device pci 00.0 on # Host bridge
|
||
subsystemid 0x17aa 0x2193
|
||
end
|
||
device pci 02.0 on # VGA controller
|
||
subsystemid 0x17aa 0x215a
|
||
end
|
||
chip southbridge/intel/ibexpeak
|
||
# GPI routing
|
||
# 0 No effect (default)
|
||
# 1 SMI# (if corresponding ALT_GPI_SMI_EN bit is also set)
|
||
# 2 SCI (if corresponding GPIO_EN bit is also set)
|
||
register "gpi1_routing" = "2"
|
||
register "gpi13_routing" = "2"
|
||
register "sata_port_map" = "0x03"
|
||
register "gpe0_en" = "0x20022046"
|
||
register "alt_gp_smi_en" = "0x0000"
|
||
register "gen1_dec" = "0x7c1601"
|
||
register "gen2_dec" = "0x0c15e1"
|
||
register "gen3_dec" = "0x1c1681"
|
||
register "gen4_dec" = "0x040069"
|
||
register "p_cnt_throttling_supported" = "1"
|
||
register "c2_latency" = "1"
|
||
register "docking_supported" = "1"
|
||
register "pcie_hotplug_map" = "{ 0, 0, 0, 1, 0, 0, 0, 0 }"
|
||
device pci 16.2 on # IDE/SATA
|
||
subsystemid 0x17aa 0x2161
|
||
end
|
||
device pci 19.0 on # Ethernet
|
||
subsystemid 0x17aa 0x2153
|
||
end
|
||
device pci 1a.0 on # USB2 EHCI
|
||
subsystemid 0x17aa 0x2163
|
||
end
|
||
device pci 1b.0 on # Audio Controller
|
||
subsystemid 0x17aa 0x215e
|
||
end
|
||
device pci 1c.0 on end # PCIe Port #1
|
||
device pci 1c.1 on end # PCIe Port #2 (wwan)
|
||
device pci 1c.3 on end # PCIe Port #4 (Expresscard)
|
||
device pci 1c.4 on end # PCIe Port #5 (wlan)
|
||
device pci 1d.0 on # USB2 EHCI
|
||
subsystemid 0x17aa 0x2163
|
||
end
|
||
device pci 1f.0 on # PCI-LPC bridge
|
||
subsystemid 0x17aa 0x2166
|
||
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
|
||
chip drivers/pc80/tpm
|
||
device pnp 0c31.0 on end
|
||
end
|
||
end
|
||
device pci 1f.2 on # IDE/SATA
|
||
subsystemid 0x17aa 0x2168
|
||
end
|
||
device pci 1f.3 on # SMBUS
|
||
subsystemid 0x17aa 0x2167
|
||
# eeprom, 8 virtual devices, same chip
|
||
chip drivers/i2c/at24rf08c
|
||
device i2c 54 on end
|
||
device i2c 55 on end
|
||
device i2c 56 on end
|
||
device i2c 57 on end
|
||
device i2c 5c on end
|
||
device i2c 5d on end
|
||
device i2c 5e on end
|
||
device i2c 5f on end
|
||
end
|
||
end
|
||
end
|
||
end
|
||
end
|
src/mainboard/lenovo/t410/dock.c | ||
---|---|---|
/*
|
||
* 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 <console/console.h>
|
||
#include <arch/io.h>
|
||
#include <device/device.h>
|
||
#include <device/pci.h>
|
||
#include <delay.h>
|
||
#include "dock.h"
|
||
#include "southbridge/intel/ibexpeak/pch.h"
|
||
#include "ec/lenovo/h8/h8.h"
|
||
#include <ec/acpi/ec.h>
|
||
void h8_mainboard_init_dock (void)
|
||
{
|
||
if (dock_present()) {
|
||
printk(BIOS_DEBUG, "dock is connected\n");
|
||
dock_connect();
|
||
} else
|
||
printk(BIOS_DEBUG, "dock is not connected\n");
|
||
}
|
||
void dock_connect(void)
|
||
{
|
||
u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
|
||
ec_set_bit(0x02, 0);
|
||
ec_set_bit(0x1a, 0);
|
||
ec_set_bit(0xfe, 4);
|
||
outl(inl(gpiobase + 0x0c) | (1 << 28), gpiobase + 0x0c);
|
||
}
|
||
void dock_disconnect(void)
|
||
{
|
||
u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
|
||
ec_clr_bit(0x02, 0);
|
||
ec_clr_bit(0x1a, 0);
|
||
ec_clr_bit(0xfe, 4);
|
||
outl(inl(gpiobase + 0x0c) & ~(1 << 28), gpiobase + 0x0c);
|
||
}
|
||
int dock_present(void)
|
||
{
|
||
u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
|
||
u8 st = inb(gpiobase + 0x0c);
|
||
return ((st >> 3) & 7) != 7;
|
||
}
|
src/mainboard/lenovo/t410/dock.h | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2011 Sven Schnelle <svens@stackframe.org>
|
||
*
|
||
* 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.
|
||
*/
|
||
#ifndef THINKPAD_T410_DOCK_H
|
||
#define THINKPAD_T410_DOCK_H
|
||
void dock_connect(void);
|
||
void dock_disconnect(void);
|
||
int dock_present(void);
|
||
#endif
|
src/mainboard/lenovo/t410/dsdt.asl | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2007-2009 coresystems GmbH
|
||
*
|
||
* 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 THINKPAD_EC_GPE 17
|
||
#define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB
|
||
#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB
|
||
#define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
|
||
#define EC_LENOVO_H8_ME_WORKAROUND 1
|
||
DefinitionBlock(
|
||
"dsdt.aml",
|
||
"DSDT",
|
||
0x03, /* DSDT revision: ACPI v3.0 */
|
||
"COREv4", /* OEM id */
|
||
"COREBOOT", /* OEM table id */
|
||
0x20130325 /* OEM revision */
|
||
)
|
||
{
|
||
/* Some generic macros */
|
||
#include "acpi/platform.asl"
|
||
/* global NVS and variables */
|
||
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
|
||
/* General Purpose Events */
|
||
#include "acpi/gpe.asl"
|
||
#include <cpu/intel/model_206ax/acpi/cpu.asl>
|
||
Scope (\_SB) {
|
||
Device (PCI0)
|
||
{
|
||
#include <northbridge/intel/nehalem/acpi/nehalem.asl>
|
||
#include <southbridge/intel/bd82x6x/acpi/pch.asl>
|
||
#include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl>
|
||
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
|
||
}
|
||
Device (UNCR)
|
||
{
|
||
Name (_BBN, 0xFF)
|
||
Name (_ADR, 0x00)
|
||
Name (RID, 0x00)
|
||
Name (_HID, EisaId ("PNP0A03"))
|
||
Name (_CRS, ResourceTemplate ()
|
||
{
|
||
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
|
||
0x0000, /* Granularity */
|
||
0x00FF, /* Range Minimum */
|
||
0x00FF, /* Range Maximum */
|
||
0x0000, /* Translation Offset */
|
||
0x0001, /* Length */
|
||
,, )
|
||
})
|
||
Device (SAD)
|
||
{
|
||
Name (_ADR, 0x01)
|
||
Name (RID, 0x00)
|
||
OperationRegion (SADC, PCI_Config, 0x00, 0x0100)
|
||
Field (SADC, DWordAcc, NoLock, Preserve)
|
||
{
|
||
Offset (0x40),
|
||
PAM0, 8,
|
||
PAM1, 8,
|
||
PAM2, 8,
|
||
PAM3, 8,
|
||
PAM4, 8,
|
||
PAM5, 8,
|
||
PAM6, 8
|
||
}
|
||
}
|
||
}
|
||
}
|
||
/*
|
||
* LPC Trusted Platform Module
|
||
*/
|
||
Scope (\_SB.PCI0.LPCB)
|
||
{
|
||
#include <drivers/pc80/tpm/acpi/tpm.asl>
|
||
}
|
||
/* Chipset specific sleep states */
|
||
#include <southbridge/intel/i82801gx/acpi/sleepstates.asl>
|
||
/* Dock support code */
|
||
#include "acpi/dock.asl"
|
||
}
|
src/mainboard/lenovo/t410/gpio.h | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2013 Vladimir Serbinenko
|
||
*
|
||
* 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.
|
||
*/
|
||
#ifndef LENOVO_T410_GPIO_H
|
||
#define LENOVO_T410_GPIO_H
|
||
#include <southbridge/intel/common/gpio.h>
|
||
const struct pch_gpio_set1 pch_gpio_set1_mode = {
|
||
.gpio0 = GPIO_MODE_GPIO,
|
||
.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_NATIVE,
|
||
.gpio10 = GPIO_MODE_GPIO,
|
||
.gpio11 = GPIO_MODE_NATIVE,
|
||
.gpio12 = GPIO_MODE_NATIVE,
|
||
.gpio13 = GPIO_MODE_GPIO,
|
||
.gpio14 = GPIO_MODE_NATIVE,
|
||
.gpio15 = GPIO_MODE_GPIO,
|
||
.gpio16 = GPIO_MODE_GPIO,
|
||
.gpio17 = GPIO_MODE_GPIO,
|
||
.gpio18 = GPIO_MODE_NATIVE,
|
||
.gpio19 = GPIO_MODE_NATIVE,
|
||
.gpio20 = GPIO_MODE_NATIVE,
|
||
.gpio21 = GPIO_MODE_GPIO,
|
||
.gpio22 = GPIO_MODE_GPIO,
|
||
.gpio23 = GPIO_MODE_NATIVE,
|
||
.gpio24 = GPIO_MODE_GPIO,
|
||
.gpio25 = GPIO_MODE_NATIVE,
|
||
.gpio26 = GPIO_MODE_NATIVE,
|
||
.gpio27 = GPIO_MODE_GPIO,
|
||
.gpio28 = GPIO_MODE_GPIO,
|
||
.gpio29 = GPIO_MODE_NATIVE,
|
||
.gpio30 = GPIO_MODE_NATIVE,
|
||
.gpio31 = GPIO_MODE_NATIVE,
|
||
};
|
||
const struct pch_gpio_set1 pch_gpio_set1_reset = {
|
||
.gpio0 = GPIO_RESET_PWROK,
|
||
.gpio1 = GPIO_RESET_PWROK,
|
||
.gpio2 = GPIO_RESET_PWROK,
|
||
.gpio3 = GPIO_RESET_PWROK,
|
||
.gpio4 = GPIO_RESET_PWROK,
|
||
.gpio5 = GPIO_RESET_PWROK,
|
||
.gpio6 = GPIO_RESET_PWROK,
|
||
.gpio7 = GPIO_RESET_PWROK,
|
||
.gpio8 = GPIO_RESET_PWROK,
|
||
.gpio9 = GPIO_RESET_PWROK,
|
||
.gpio10 = GPIO_RESET_PWROK,
|
||
.gpio11 = GPIO_RESET_PWROK,
|
||
.gpio12 = GPIO_RESET_PWROK,
|
||
.gpio13 = GPIO_RESET_PWROK,
|
||
.gpio14 = GPIO_RESET_PWROK,
|
||
.gpio15 = GPIO_RESET_PWROK,
|
||
.gpio16 = GPIO_RESET_PWROK,
|
||
.gpio17 = GPIO_RESET_PWROK,
|
||
.gpio18 = GPIO_RESET_PWROK,
|
||
.gpio19 = GPIO_RESET_PWROK,
|
||
.gpio20 = GPIO_RESET_PWROK,
|
||
.gpio21 = GPIO_RESET_PWROK,
|
||
.gpio22 = GPIO_RESET_PWROK,
|
||
.gpio23 = GPIO_RESET_PWROK,
|
||
.gpio24 = GPIO_RESET_RSMRST,
|
||
.gpio25 = GPIO_RESET_PWROK,
|
||
.gpio26 = GPIO_RESET_PWROK,
|
||
.gpio27 = GPIO_RESET_PWROK,
|
||
.gpio28 = GPIO_RESET_PWROK,
|
||
.gpio29 = GPIO_RESET_PWROK,
|
||
.gpio30 = GPIO_RESET_RSMRST,
|
||
.gpio31 = GPIO_RESET_PWROK,
|
||
};
|
||
const struct pch_gpio_set1 pch_gpio_set1_direction = {
|
||
.gpio0 = GPIO_DIR_INPUT,
|
||
.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_OUTPUT,
|
||
.gpio9 = GPIO_DIR_INPUT,
|
||
.gpio10 = GPIO_DIR_OUTPUT,
|
||
.gpio11 = GPIO_DIR_INPUT,
|
||
.gpio12 = GPIO_DIR_OUTPUT,
|
||
.gpio13 = GPIO_DIR_INPUT,
|
||
.gpio14 = GPIO_DIR_INPUT,
|
||
.gpio15 = GPIO_DIR_OUTPUT,
|
||
.gpio16 = GPIO_DIR_INPUT,
|
||
.gpio17 = GPIO_DIR_INPUT,
|
||
.gpio18 = GPIO_DIR_INPUT,
|
||
.gpio19 = GPIO_DIR_INPUT,
|
||
.gpio20 = GPIO_DIR_INPUT,
|
||
.gpio21 = GPIO_DIR_INPUT,
|
||
.gpio22 = GPIO_DIR_OUTPUT,
|
||
.gpio23 = GPIO_DIR_INPUT,
|
||
.gpio24 = GPIO_DIR_INPUT,
|
||
.gpio25 = GPIO_DIR_INPUT,
|
||
.gpio26 = GPIO_DIR_INPUT,
|
||
.gpio27 = GPIO_DIR_OUTPUT,
|
||
.gpio28 = GPIO_DIR_OUTPUT,
|
||
.gpio29 = GPIO_DIR_OUTPUT,
|
||
.gpio30 = GPIO_DIR_OUTPUT,
|
||
.gpio31 = GPIO_DIR_INPUT,
|
||
};
|
||
const struct pch_gpio_set1 pch_gpio_set1_level = {
|
||
.gpio0 = GPIO_LEVEL_HIGH,
|
||
.gpio1 = GPIO_LEVEL_HIGH,
|
||
.gpio2 = GPIO_LEVEL_HIGH,
|
||
.gpio3 = GPIO_LEVEL_HIGH,
|
||
.gpio4 = GPIO_LEVEL_HIGH,
|
||
.gpio5 = GPIO_LEVEL_HIGH,
|
||
.gpio6 = GPIO_LEVEL_HIGH,
|
||
.gpio7 = GPIO_LEVEL_HIGH,
|
||
.gpio8 = GPIO_LEVEL_HIGH,
|
||
.gpio9 = GPIO_LEVEL_HIGH,
|
||
.gpio10 = GPIO_LEVEL_HIGH,
|
||
.gpio11 = GPIO_LEVEL_HIGH,
|
||
.gpio12 = GPIO_LEVEL_HIGH,
|
||
.gpio13 = GPIO_LEVEL_HIGH,
|
||
.gpio14 = GPIO_LEVEL_HIGH,
|
||
.gpio15 = GPIO_LEVEL_HIGH,
|
||
.gpio16 = GPIO_LEVEL_HIGH,
|
||
.gpio17 = GPIO_LEVEL_HIGH,
|
||
.gpio18 = GPIO_LEVEL_HIGH,
|
||
.gpio19 = GPIO_LEVEL_HIGH,
|
||
.gpio20 = GPIO_LEVEL_HIGH,
|
||
.gpio21 = GPIO_LEVEL_HIGH,
|
||
.gpio22 = GPIO_LEVEL_HIGH,
|
||
.gpio23 = GPIO_LEVEL_HIGH,
|
||
.gpio24 = GPIO_LEVEL_HIGH,
|
||
.gpio25 = GPIO_LEVEL_HIGH,
|
||
.gpio26 = GPIO_LEVEL_HIGH,
|
||
.gpio27 = GPIO_LEVEL_HIGH,
|
||
.gpio28 = GPIO_LEVEL_LOW,
|
||
.gpio29 = GPIO_LEVEL_HIGH,
|
||
.gpio30 = GPIO_LEVEL_HIGH,
|
||
.gpio31 = GPIO_LEVEL_HIGH,
|
||
};
|
||
const struct pch_gpio_set1 pch_gpio_set1_blink = {
|
||
.gpio0 = GPIO_NO_BLINK,
|
||
.gpio1 = GPIO_NO_BLINK,
|
||
.gpio2 = GPIO_NO_BLINK,
|
||
.gpio3 = GPIO_NO_BLINK,
|
||
.gpio4 = GPIO_NO_BLINK,
|
||
.gpio5 = GPIO_NO_BLINK,
|
||
.gpio6 = GPIO_NO_BLINK,
|
||
.gpio7 = GPIO_NO_BLINK,
|
||
.gpio8 = GPIO_NO_BLINK,
|
||
.gpio9 = GPIO_NO_BLINK,
|
||
.gpio10 = GPIO_NO_BLINK,
|
||
.gpio11 = GPIO_NO_BLINK,
|
||
.gpio12 = GPIO_NO_BLINK,
|
||
.gpio13 = GPIO_NO_BLINK,
|
||
.gpio14 = GPIO_NO_BLINK,
|
||
.gpio15 = GPIO_NO_BLINK,
|
||
.gpio16 = GPIO_NO_BLINK,
|
||
.gpio17 = GPIO_NO_BLINK,
|
||
.gpio18 = GPIO_NO_BLINK,
|
||
.gpio19 = GPIO_NO_BLINK,
|
||
.gpio20 = GPIO_NO_BLINK,
|
||
.gpio21 = GPIO_NO_BLINK,
|
||
.gpio22 = GPIO_NO_BLINK,
|
||
.gpio23 = GPIO_NO_BLINK,
|
||
.gpio24 = GPIO_NO_BLINK,
|
||
.gpio25 = GPIO_NO_BLINK,
|
||
.gpio26 = GPIO_NO_BLINK,
|
||
.gpio27 = GPIO_NO_BLINK,
|
||
.gpio28 = GPIO_NO_BLINK,
|
||
.gpio29 = GPIO_NO_BLINK,
|
||
.gpio30 = GPIO_NO_BLINK,
|
||
.gpio31 = GPIO_NO_BLINK,
|
||
};
|
||
const struct pch_gpio_set1 pch_gpio_set1_invert = {
|
||
.gpio0 = GPIO_NO_INVERT,
|
||
.gpio1 = GPIO_INVERT,
|
||
.gpio2 = GPIO_INVERT,
|
||
.gpio3 = GPIO_NO_INVERT,
|
||
.gpio4 = GPIO_NO_INVERT,
|
||
.gpio5 = GPIO_NO_INVERT,
|
||
.gpio6 = GPIO_INVERT,
|
||
.gpio7 = GPIO_INVERT,
|
||
.gpio8 = GPIO_NO_INVERT,
|
||
.gpio9 = GPIO_NO_INVERT,
|
||
.gpio10 = GPIO_NO_INVERT,
|
||
.gpio11 = GPIO_NO_INVERT,
|
||
.gpio12 = GPIO_NO_INVERT,
|
||
.gpio13 = GPIO_INVERT,
|
||
.gpio14 = GPIO_NO_INVERT,
|
||
.gpio15 = GPIO_NO_INVERT,
|
||
.gpio16 = GPIO_INVERT,
|
||
.gpio17 = GPIO_NO_INVERT,
|
||
.gpio18 = GPIO_NO_INVERT,
|
||
.gpio19 = GPIO_NO_INVERT,
|
||
.gpio20 = GPIO_NO_INVERT,
|
||
.gpio21 = GPIO_NO_INVERT,
|
||
.gpio22 = GPIO_NO_INVERT,
|
||
.gpio23 = GPIO_NO_INVERT,
|
||
.gpio24 = GPIO_NO_INVERT,
|
||
.gpio25 = GPIO_NO_INVERT,
|
||
.gpio26 = GPIO_NO_INVERT,
|
||
.gpio27 = GPIO_NO_INVERT,
|
||
.gpio28 = GPIO_NO_INVERT,
|
||
.gpio29 = GPIO_NO_INVERT,
|
||
.gpio30 = GPIO_NO_INVERT,
|
||
.gpio31 = GPIO_NO_INVERT,
|
||
};
|
||
const struct pch_gpio_set2 pch_gpio_set2_mode = {
|
||
.gpio32 = GPIO_MODE_NATIVE,
|
||
.gpio33 = GPIO_MODE_GPIO,
|
||
.gpio34 = GPIO_MODE_GPIO,
|
||
.gpio35 = GPIO_MODE_GPIO,
|
||
.gpio36 = GPIO_MODE_GPIO,
|
||
.gpio37 = GPIO_MODE_GPIO,
|
||
.gpio38 = GPIO_MODE_GPIO,
|
||
.gpio39 = GPIO_MODE_GPIO,
|
||
.gpio40 = GPIO_MODE_NATIVE,
|
||
.gpio41 = GPIO_MODE_GPIO,
|
||
.gpio42 = GPIO_MODE_GPIO,
|
||
.gpio43 = GPIO_MODE_NATIVE,
|
||
.gpio44 = GPIO_MODE_NATIVE,
|
||
.gpio45 = GPIO_MODE_NATIVE,
|
||
.gpio46 = GPIO_MODE_NATIVE,
|
||
.gpio47 = GPIO_MODE_NATIVE,
|
||
.gpio48 = GPIO_MODE_GPIO,
|
||
.gpio49 = GPIO_MODE_GPIO,
|
||
.gpio50 = GPIO_MODE_GPIO,
|
||
.gpio51 = GPIO_MODE_NATIVE,
|
||
.gpio52 = GPIO_MODE_GPIO,
|
||
.gpio53 = GPIO_MODE_GPIO,
|
||
.gpio54 = GPIO_MODE_GPIO,
|
||
.gpio55 = GPIO_MODE_NATIVE,
|
||
.gpio56 = GPIO_MODE_NATIVE,
|
||
.gpio57 = GPIO_MODE_GPIO,
|
||
.gpio58 = GPIO_MODE_NATIVE,
|
||
.gpio59 = GPIO_MODE_NATIVE,
|
||
.gpio60 = GPIO_MODE_NATIVE,
|
||
.gpio61 = GPIO_MODE_NATIVE,
|
||
.gpio62 = GPIO_MODE_NATIVE,
|
||
.gpio63 = GPIO_MODE_NATIVE,
|
||
};
|
||
const struct pch_gpio_set2 pch_gpio_set2_direction = {
|
||
.gpio32 = GPIO_DIR_OUTPUT,
|
||
.gpio33 = GPIO_DIR_OUTPUT,
|
||
.gpio34 = GPIO_DIR_INPUT,
|
||
.gpio35 = GPIO_DIR_OUTPUT,
|
||
.gpio36 = GPIO_DIR_INPUT,
|
||
.gpio37 = GPIO_DIR_INPUT,
|
||
.gpio38 = GPIO_DIR_INPUT,
|
||
.gpio39 = GPIO_DIR_INPUT,
|
||
.gpio40 = GPIO_DIR_INPUT,
|
||
.gpio41 = GPIO_DIR_OUTPUT,
|
||
.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_OUTPUT,
|
||
.gpio51 = GPIO_DIR_OUTPUT,
|
||
.gpio52 = GPIO_DIR_OUTPUT,
|
||
.gpio53 = GPIO_DIR_OUTPUT,
|
||
.gpio54 = GPIO_DIR_OUTPUT,
|
||
.gpio55 = GPIO_DIR_OUTPUT,
|
||
.gpio56 = GPIO_DIR_INPUT,
|
||
.gpio57 = GPIO_DIR_INPUT,
|
||
.gpio58 = GPIO_DIR_OUTPUT,
|
||
.gpio59 = GPIO_DIR_INPUT,
|
||
.gpio60 = GPIO_DIR_INPUT,
|
||
.gpio61 = GPIO_DIR_OUTPUT,
|
||
.gpio62 = GPIO_DIR_OUTPUT,
|
||
.gpio63 = GPIO_DIR_OUTPUT,
|
||
};
|
||
const struct pch_gpio_set2 pch_gpio_set2_level = {
|
||
.gpio32 = GPIO_LEVEL_HIGH,
|
||
.gpio33 = GPIO_LEVEL_HIGH,
|
||
.gpio34 = GPIO_LEVEL_HIGH,
|
||
.gpio35 = GPIO_LEVEL_HIGH,
|
||
.gpio36 = GPIO_LEVEL_HIGH,
|
||
.gpio37 = GPIO_LEVEL_HIGH,
|
||
.gpio38 = GPIO_LEVEL_HIGH,
|
||
.gpio39 = GPIO_LEVEL_HIGH,
|
||
.gpio40 = GPIO_LEVEL_HIGH,
|
||
.gpio41 = GPIO_LEVEL_HIGH,
|
||
.gpio42 = GPIO_LEVEL_HIGH,
|
||
.gpio43 = GPIO_LEVEL_HIGH,
|
||
.gpio44 = GPIO_LEVEL_HIGH,
|
||
.gpio45 = GPIO_LEVEL_HIGH,
|
||
.gpio46 = GPIO_LEVEL_HIGH,
|
||
.gpio47 = GPIO_LEVEL_HIGH,
|
||
.gpio48 = GPIO_LEVEL_HIGH,
|
||
.gpio49 = GPIO_LEVEL_HIGH,
|
||
.gpio50 = GPIO_LEVEL_HIGH,
|
||
.gpio51 = GPIO_LEVEL_HIGH,
|
||
.gpio52 = GPIO_LEVEL_HIGH,
|
||
.gpio53 = GPIO_LEVEL_LOW,
|
||
.gpio54 = GPIO_LEVEL_LOW,
|
||
.gpio55 = GPIO_LEVEL_HIGH,
|
||
.gpio56 = GPIO_LEVEL_LOW,
|
||
.gpio57 = GPIO_LEVEL_HIGH,
|
||
.gpio58 = GPIO_LEVEL_LOW,
|
||
.gpio59 = GPIO_LEVEL_LOW,
|
||
.gpio60 = GPIO_LEVEL_LOW,
|
||
.gpio61 = GPIO_LEVEL_LOW,
|
||
.gpio62 = GPIO_LEVEL_LOW,
|
||
.gpio63 = GPIO_LEVEL_LOW,
|
||
};
|
||
const struct pch_gpio_set3 pch_gpio_set3_mode = {
|
||
.gpio64 = GPIO_MODE_NATIVE,
|
||
.gpio65 = GPIO_MODE_NATIVE,
|
||
.gpio66 = GPIO_MODE_NATIVE,
|
||
.gpio67 = GPIO_MODE_NATIVE,
|
||
.gpio68 = GPIO_MODE_NATIVE,
|
||
.gpio69 = GPIO_MODE_NATIVE,
|
||
.gpio70 = GPIO_MODE_NATIVE,
|
||
.gpio71 = GPIO_MODE_NATIVE,
|
||
.gpio72 = GPIO_MODE_NATIVE,
|
||
.gpio73 = GPIO_MODE_NATIVE,
|
||
.gpio74 = GPIO_MODE_NATIVE,
|
||
.gpio75 = GPIO_MODE_NATIVE,
|
||
};
|
||
const struct pch_gpio_set3 pch_gpio_set3_direction = {
|
||
.gpio64 = GPIO_DIR_OUTPUT,
|
||
.gpio65 = GPIO_DIR_OUTPUT,
|
||
.gpio66 = GPIO_DIR_OUTPUT,
|
||
.gpio67 = GPIO_DIR_OUTPUT,
|
||
.gpio68 = GPIO_DIR_OUTPUT,
|
||
.gpio69 = GPIO_DIR_OUTPUT,
|
||
.gpio70 = GPIO_DIR_OUTPUT,
|
||
.gpio71 = GPIO_DIR_OUTPUT,
|
||
.gpio72 = GPIO_DIR_INPUT,
|
||
.gpio73 = GPIO_DIR_INPUT,
|
||
.gpio74 = GPIO_DIR_INPUT,
|
||
.gpio75 = GPIO_DIR_INPUT,
|
||
};
|
||
const struct pch_gpio_set3 pch_gpio_set3_level = {
|
||
.gpio64 = GPIO_LEVEL_LOW,
|
||
.gpio65 = GPIO_LEVEL_LOW,
|
||
.gpio66 = GPIO_LEVEL_LOW,
|
||
.gpio67 = GPIO_LEVEL_LOW,
|
||
.gpio68 = GPIO_LEVEL_LOW,
|
||
.gpio69 = GPIO_LEVEL_LOW,
|
||
.gpio70 = GPIO_LEVEL_LOW,
|
||
.gpio71 = GPIO_LEVEL_LOW,
|
||
.gpio72 = GPIO_LEVEL_LOW,
|
||
.gpio73 = GPIO_LEVEL_LOW,
|
||
.gpio74 = GPIO_LEVEL_LOW,
|
||
.gpio75 = GPIO_LEVEL_LOW,
|
||
};
|
||
const struct pch_gpio_map t410_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,
|
||
},
|
||
.set3 = {
|
||
.mode = &pch_gpio_set3_mode,
|
||
.direction = &pch_gpio_set3_direction,
|
||
.level = &pch_gpio_set3_level,
|
||
},
|
||
};
|
||
#endif
|
src/mainboard/lenovo/t410/hda_verb.c | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2014 Vladimir Serbinenko.
|
||
*
|
||
* 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,
|
||
* or (at your option) any later version.
|
||
*
|
||
* 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 <device/azalia_device.h>
|
||
const u32 cim_verb_data[] = {
|
||
/* coreboot specific header */
|
||
0x14F15069, /* Codec Vendor / Device ID: Conexant CX20585 */
|
||
0x17AA2155, /* Subsystem ID */
|
||
0x0000000B, /* Number of 4 dword sets */
|
||
/* NID 0x01: Subsystem ID. */
|
||
AZALIA_SUBVENDOR(0x0, 0x17AA2155),
|
||
/* NID 0x19: Headphone jack. */
|
||
AZALIA_PIN_CFG(0x0, 0x19, 0x042140F0),
|
||
/* NID 0x1A: Dock mic jack. */
|
||
AZALIA_PIN_CFG(0x0, 0x1A, 0x61A190F0),
|
||
/* NID 0x1B: Mic jack. */
|
||
AZALIA_PIN_CFG(0x0, 0x1B, 0x04A190F0),
|
||
/* NID 0x1C: Dock headphone jack. */
|
||
AZALIA_PIN_CFG(0x0, 0x1C, 0x612140F0),
|
||
/* NID 0x1D: EAPD detect. */
|
||
AZALIA_PIN_CFG(0x0, 0x1D, 0x601700F0),
|
||
/* NID 0x1E */
|
||
AZALIA_PIN_CFG(0x0, 0x1E, 0x40F001F0),
|
||
/* NID 0x1F */
|
||
AZALIA_PIN_CFG(0x0, 0x1F, 0x901701F0),
|
||
/* NID 0x20 */
|
||
AZALIA_PIN_CFG(0x0, 0x20, 0x40F001F0),
|
||
/* NID 0x22 */
|
||
AZALIA_PIN_CFG(0x0, 0x22, 0x40F001F0),
|
||
/* NID 0x23: Internal mic boost volume. */
|
||
AZALIA_PIN_CFG(0x0, 0x23, 0x90A601F0),
|
||
0x80862804, /* Codec Vendor / Device ID: Intel Ibexpeak HDMI. */
|
||
0x17aa21b5, /* Subsystem ID */
|
||
0x00000004, /* Number of 4 dword sets */
|
||
/* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x17aa21b5 */
|
||
AZALIA_SUBVENDOR(0x3, 0x17AA21B5),
|
||
/* NID 0x04. */
|
||
AZALIA_PIN_CFG(0x3, 0x04, 0x58560010),
|
||
/* NID 0x05. */
|
||
AZALIA_PIN_CFG(0x3, 0x05, 0x18560020),
|
||
/* NID 0x06. */
|
||
AZALIA_PIN_CFG(0x3, 0x06, 0x58560030),
|
||
};
|
||
const u32 pc_beep_verbs[0] = {};
|
||
AZALIA_ARRAY_SIZES;
|
src/mainboard/lenovo/t410/mainboard.c | ||
---|---|---|
/*
|
||
* This file is part of the coreboot project.
|
||
*
|
||
* Copyright (C) 2007-2009 coresystems GmbH
|
||
* 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
|