Bluemax has uploaded this change for review.

View Change

Mainboard: Add MSI MS-7707

MSI MS-7707 V1.1 (Medion OEM Akoya P4385D MSN10014555)
SandyBridge Intel P67 (BD82x6x)
Winbond 25Q32BV (4MB)
Fintek F71808A
Intel 82579V Gigabit
NEC uPD720200 USB 3.0 Host Controller
IME 7.0.4.1197

Working:
* Tested on Arch Linux 5.0.5
* PCIe gfx adapter
* PS/2 Keyboard
* USB3.0
* coreboot 4.9 (TianoCore)
* S0/S5 states
* H/W FAN control (proper HWM function not checked)

Known issues:
* S0/S5 states work properly as long as the board gets powered.
After power cut the system is dead. Needs battery removal and
CMOSCLR to revive. SuperIO is supposed to be in an unknown
state as current coreboot SuperIO initialization isn't able
to set all registers.
(see cbmem.log - skipping PNP: 004e.a@e0 fixed resource, size=0!)

* Logs in ${doc} folder

Change-Id: I999149bb95d553ed217b2288cc34bce4fe88abb3
Signed-off-by: Bluemax <1403092+BlueMax@users.noreply.github.com>
---
A src/mainboard/medion/Kconfig
A src/mainboard/medion/Kconfig.name
A src/mainboard/medion/ms_7707/Kconfig
A src/mainboard/medion/ms_7707/Kconfig.name
A src/mainboard/medion/ms_7707/Makefile.inc
A src/mainboard/medion/ms_7707/acpi/ec.asl
A src/mainboard/medion/ms_7707/acpi/platform.asl
A src/mainboard/medion/ms_7707/acpi/superio.asl
A src/mainboard/medion/ms_7707/acpi_tables.c
A src/mainboard/medion/ms_7707/board_info.txt
A src/mainboard/medion/ms_7707/devicetree.cb
A src/mainboard/medion/ms_7707/dsdt.asl
A src/mainboard/medion/ms_7707/gpio.c
A src/mainboard/medion/ms_7707/hda_verb.c
A src/mainboard/medion/ms_7707/mainboard.c
A src/mainboard/medion/ms_7707/romstage.c
16 files changed, 717 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/32235/1
diff --git a/src/mainboard/medion/Kconfig b/src/mainboard/medion/Kconfig
new file mode 100644
index 0000000..16f8bad
--- /dev/null
+++ b/src/mainboard/medion/Kconfig
@@ -0,0 +1,16 @@
+if VENDOR_MEDION
+
+choice
+ prompt "Mainboard model"
+
+source "src/mainboard/medion/*/Kconfig.name"
+
+endchoice
+
+source "src/mainboard/medion/*/Kconfig"
+
+config MAINBOARD_VENDOR
+ string
+ default "MEDION"
+
+endif # VENDOR_MEDION
diff --git a/src/mainboard/medion/Kconfig.name b/src/mainboard/medion/Kconfig.name
new file mode 100644
index 0000000..4c4ae07
--- /dev/null
+++ b/src/mainboard/medion/Kconfig.name
@@ -0,0 +1,2 @@
+config VENDOR_MEDION
+ bool "MEDION"
diff --git a/src/mainboard/medion/ms_7707/Kconfig b/src/mainboard/medion/ms_7707/Kconfig
new file mode 100644
index 0000000..f66c55e
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/Kconfig
@@ -0,0 +1,44 @@
+if BOARD_MEDION_MS_7707
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select ARCH_X86
+ select NORTHBRIDGE_INTEL_SANDYBRIDGE
+ select USE_NATIVE_RAMINIT
+ select SOUTHBRIDGE_INTEL_BD82X6X
+ select SUPERIO_FINTEK_F71808A
+ select BOARD_ROMSIZE_KB_4096
+ select HAVE_ACPI_TABLES
+ select HAVE_ACPI_RESUME
+ select MAINBOARD_USES_IFD_GBE_REGION
+ select NO_UART_ON_SUPERIO
+ select SERIRQ_CONTINUOUS_MODE
+
+config MAINBOARD_DIR
+ string
+ default medion/ms_7707
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "MS-7707"
+
+config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
+ hex
+ default 0x7707
+
+config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
+ hex
+ default 0x1462
+
+config DRAM_RESET_GATE_GPIO
+ int
+ default 60
+
+config MAX_CPUS
+ int
+ default 8
+
+config USBDEBUG_HCD_INDEX # FIXME: check this
+ int
+ default 2
+endif
diff --git a/src/mainboard/medion/ms_7707/Kconfig.name b/src/mainboard/medion/ms_7707/Kconfig.name
new file mode 100644
index 0000000..5dd9011
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_MEDION_MS_7707
+ bool "MS-7707"
diff --git a/src/mainboard/medion/ms_7707/Makefile.inc b/src/mainboard/medion/ms_7707/Makefile.inc
new file mode 100644
index 0000000..3dae61e
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/Makefile.inc
@@ -0,0 +1 @@
+romstage-y += gpio.c
diff --git a/src/mainboard/medion/ms_7707/acpi/ec.asl b/src/mainboard/medion/ms_7707/acpi/ec.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/acpi/ec.asl
diff --git a/src/mainboard/medion/ms_7707/acpi/platform.asl b/src/mainboard/medion/ms_7707/acpi/platform.asl
new file mode 100644
index 0000000..7c3b3c6
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/acpi/platform.asl
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Tristan Corrick <tristan@corrick.kiwi>
+ *
+ * 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, either 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.
+ */
+
+Method(_WAK,1)
+{
+ Return(Package(){0,0})
+}
+
+Method(_PTS,1)
+{
+}
diff --git a/src/mainboard/medion/ms_7707/acpi/superio.asl b/src/mainboard/medion/ms_7707/acpi/superio.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/acpi/superio.asl
diff --git a/src/mainboard/medion/ms_7707/acpi_tables.c b/src/mainboard/medion/ms_7707/acpi_tables.c
new file mode 100644
index 0000000..7d634a0
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/acpi_tables.c
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * 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.
+ *
+ * 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/bd82x6x/nvs.h>
+
+void acpi_create_gnvs(global_nvs_t *gnvs)
+{
+ /* Disable USB ports in S3 by default */
+ gnvs->s3u0 = 0;
+ gnvs->s3u1 = 0;
+
+ /* Disable USB ports in S5 by default */
+ gnvs->s5u0 = 0;
+ gnvs->s5u1 = 0;
+
+ // the lid is open by default.
+ gnvs->lids = 1;
+
+ gnvs->tcrt = 100;
+ gnvs->tpsv = 90;
+}
diff --git a/src/mainboard/medion/ms_7707/board_info.txt b/src/mainboard/medion/ms_7707/board_info.txt
new file mode 100644
index 0000000..eebec48
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/board_info.txt
@@ -0,0 +1,6 @@
+Category: desktop
+ROM package: SOIC-8
+ROM protocol: SPI
+ROM socketed: n
+Flashrom support: y
+Release year: 2011
diff --git a/src/mainboard/medion/ms_7707/devicetree.cb b/src/mainboard/medion/ms_7707/devicetree.cb
new file mode 100644
index 0000000..b8df731
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/devicetree.cb
@@ -0,0 +1,185 @@
+chip northbridge/intel/sandybridge
+ register "gfx.did" = "{ 0x80000100, 0x80000240, 0x80000410 }"
+ register "gfx.link_frequency_270_mhz" = "0"
+ register "gfx.ndid" = "3"
+ register "gfx.use_spread_spectrum_clock" = "0"
+ register "gpu_cpu_backlight" = "0x00000000"
+ register "gpu_dp_b_hotplug" = "0"
+ register "gpu_dp_c_hotplug" = "0"
+ register "gpu_dp_d_hotplug" = "0"
+ register "gpu_panel_port_select" = "0"
+ register "gpu_panel_power_backlight_off_delay" = "0"
+ register "gpu_panel_power_backlight_on_delay" = "0"
+ register "gpu_panel_power_cycle_delay" = "0"
+ register "gpu_panel_power_down_delay" = "0"
+ register "gpu_panel_power_up_delay" = "0"
+ register "gpu_pch_backlight" = "0x00000000"
+ device cpu_cluster 0x0 on
+ chip cpu/intel/model_206ax
+ register "c1_acpower" = "1"
+ register "c1_battery" = "1"
+ register "c2_acpower" = "3"
+ register "c2_battery" = "3"
+ register "c3_acpower" = "5"
+ register "c3_battery" = "5"
+ device lapic 0x0 on end
+ device lapic 0xacac off end
+ end
+ end
+ device domain 0x0 on
+ chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
+ register "c2_latency" = "0x0065"
+ register "docking_supported" = "0"
+ register "gen1_dec" = "0x00fc0295"
+ register "gen2_dec" = "0x00000000"
+ register "gen3_dec" = "0x00000000"
+ register "gen4_dec" = "0x00000000"
+ register "p_cnt_throttling_supported" = "1"
+ register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"
+ register "pcie_port_coalesce" = "1"
+ register "sata_interface_speed_support" = "0x3"
+ register "sata_port_map" = "0xc"
+ register "spi_lvscc" = "0x0"
+ register "spi_uvscc" = "0x0"
+ device pci 16.0 on # Management Engine Interface 1
+ subsystemid 0x1462 0x7707
+ end
+ device pci 16.1 off # Management Engine Interface 2
+ end
+ device pci 16.2 off # Management Engine IDE-R
+ end
+ device pci 16.3 off # Management Engine KT
+ end
+ device pci 19.0 on # Intel Gigabit Ethernet
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1a.0 on # USB2 EHCI #2
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1b.0 on # High Definition Audio Audio controller
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1c.0 on # PCIe Port #1
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1c.1 off # PCIe Port #2
+ end
+ device pci 1c.2 off # PCIe Port #3
+ end
+ device pci 1c.3 off # PCIe Port #4
+ end
+ device pci 1c.4 off # PCIe Port #5
+ end
+ device pci 1c.5 off # PCIe Port #6
+ end
+ device pci 1c.6 on # PCIe Port #7
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1c.7 off # PCIe Port #8
+ end
+ device pci 1d.0 on # USB2 EHCI #1
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1e.0 off # PCI bridge
+ end
+ device pci 1f.0 on # LPC bridge PCI-LPC bridge
+ subsystemid 0x1462 0x7707
+ chip superio/fintek/f71808a
+ register "multi_function_register_0" = "0x00"
+ register "multi_function_register_1" = "0xc4"
+ register "multi_function_register_2" = "0x21"
+ register "multi_function_register_3" = "0x2f"
+ register "multi_function_register_4" = "0x5c"
+ register "hwm_peci_tsi_ctrl" = "0x02" # PECI enabled, 1.23 V
+ register "hwm_tcc_temp" = "0x66" # TCC temperature = 102 °C
+ register "hwm_fan1_seg1_speed" = "0xff" # Fan 1 segment 1 = 100%
+ register "hwm_fan1_seg2_speed" = "0xdb" # Fan 1 segment 2 = 86%
+ register "hwm_fan1_seg3_speed" = "0xbc" # Fan 1 segment 3 = 74%
+ register "hwm_fan1_seg4_speed" = "0x9e" # Fan 1 segment 4 = 62%
+ register "hwm_fan1_seg5_speed" = "0x7f" # Fan 1 segment 5 = 50%
+ register "hwm_fan1_temp_src" = "0x18" # Fan 1 source = PECI
+ register "hwm_fan2_seg1_speed" = "0xff" # Fan 2 segment 1 = 100%
+ register "hwm_fan2_seg2_speed" = "0xdb" # Fan 2 segment 2 = 86%
+ register "hwm_fan2_seg3_speed" = "0xbc" # Fan 2 segment 3 = 74%
+ register "hwm_fan2_seg4_speed" = "0x9e" # Fan 2 segment 4 = 62%
+ register "hwm_fan2_seg5_speed" = "0x7f" # Fan 2 segment 5 = 50%
+ register "hwm_fan2_temp_src" = "0x1e" # Fan 2 source = temperature 2
+ device pnp 4e.1 off end # Serial Port
+ device pnp 4e.4 on # Hardware monitor
+ io 0x60 = 0x295
+ irq 0x70 = 0
+ end
+ device pnp 4e.5 on # Keyboard
+ io 0x60 = 0x060
+ irq 0x70 = 1
+ irq 0x72 = 12
+ end
+ device pnp 4e.6 on # GPIO
+ irq 0x70 = 0
+ # don't get accepted (see ${docs}/cbmem.log)
+ irq 0xc1 = 0x3f
+ irq 0xc5 = 0x1f
+ irq 0xce = 0xe0
+ irq 0xcf = 0x40
+ irq 0xd0 = 0x20
+ irq 0xd1 = 0x20
+ irq 0xd3 = 0x20
+ irq 0xe1 = 0x1f
+ irq 0xf1 = 0xff
+ end
+ device pnp 4e.7 on # WDT
+ io 0x60 = 0xa00
+ io 0xf6 = 0xa00
+ irq 0x30 = 0x00
+ irq 0xf0 = 0x03 # (superiotool.log)
+ end
+ device pnp 4e.8 off end # CIR
+ device pnp 4e.a on # PME, ACPI, Power Saving Registers
+ # don't get accepted (see ${docs}/cbmem.log)
+ irq 0x30 = 0x01 # PME Enabled
+ irq 0xe0 = 0x10 # EuP Enabled
+ # irq 0xe1 = 0xcc # EuP control register
+ # irq 0xe2 = 0x0c # EuP control register
+ # irq 0xe3 = 0x13 # EuP PSIN deb-register
+ # irq 0xe4 = 0x09 # EuP RSMRST deb-register
+ # irq 0xe5 = 0xc7 # EuP PSOUT deb-register
+ # irq 0xe6 = 0x09 # EuP PSON deb-register
+ # irq 0xe7 = 0x63 # EuP S5 deb-register
+ # irq 0xe8 = 0x00 # EuP Wakeup Event Enable Register
+ # irq 0xe9 = 0x0f # EuP S3 Delay register
+ # irq 0xec = 0x00 # EuP Wakeup Event Enable Register 2
+ # irq 0xed = 0xc0 # EuP Watchdog Control Register
+ # irq 0xee = 0x00 # EuP Watchdog Time Register
+ # irq 0xf0 = 0x00 # PME Event Enable Register 1
+ # irq 0xf2 = 0x00 # PME Event Status Register
+ irq 0xf4 = 0x04 # Keep Last State Select (06=always.off, 04=always.on, 00=last)
+ # irq 0xf5 = 0x3c # VDDOK Delay Register
+ # irq 0xf6 = 0x1f # PCIRST Control Register
+ # irq 0xf7 = 0x00 # Power Sequence Control Register
+ irq 0xf8 = 0x00 # LED VCC Mode Select
+ irq 0xf9 = 0x09 # LED VSB Mode Select
+ irq 0xfa = 0x00 # LED Mode Select Add
+ end
+ end
+ end
+ device pci 1f.2 on # SATA Controller 1
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1f.3 on # SMBus
+ subsystemid 0x1462 0x7707
+ end
+ device pci 1f.5 off # SATA Controller 2
+ end
+ device pci 1f.6 off # Thermal
+ end
+ end
+ device pci 00.0 on # Host bridge Host bridge
+ subsystemid 0x1462 0x7707
+ end
+ device pci 01.0 on # PCIe Bridge for discrete graphics
+ subsystemid 0x1462 0x7707
+ end
+ device pci 02.0 off # Internal graphics
+ end
+ end
+end
diff --git a/src/mainboard/medion/ms_7707/dsdt.asl b/src/mainboard/medion/ms_7707/dsdt.asl
new file mode 100644
index 0000000..8808539
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/dsdt.asl
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Tristan Corrick <tristan@corrick.kiwi>
+ *
+ * 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, either 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 <arch/acpi.h>
+DefinitionBlock(
+ "dsdt.aml",
+ "DSDT",
+ 0x02, // DSDT revision: ACPI 2.0 and up
+ OEM_ID,
+ ACPI_TABLE_CREATOR,
+ 0x20141018 // OEM revision
+)
+{
+ /* Some generic macros */
+ #include "acpi/platform.asl"
+ #include <cpu/intel/common/acpi/cpu.asl>
+ #include <southbridge/intel/bd82x6x/acpi/platform.asl>
+ /* global NVS and variables. */
+ #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
+ #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl>
+
+ Device (\_SB.PCI0)
+ {
+ #include <northbridge/intel/sandybridge/acpi/sandybridge.asl>
+ #include <drivers/intel/gma/acpi/default_brightness_levels.asl>
+ #include <southbridge/intel/bd82x6x/acpi/pch.asl>
+ }
+}
diff --git a/src/mainboard/medion/ms_7707/gpio.c b/src/mainboard/medion/ms_7707/gpio.c
new file mode 100644
index 0000000..8fd8e44
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/gpio.c
@@ -0,0 +1,189 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * 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.
+ *
+ * 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 = {
+ .gpio0 = GPIO_MODE_GPIO,
+ .gpio1 = GPIO_MODE_GPIO,
+ .gpio2 = GPIO_MODE_NATIVE,
+ .gpio3 = GPIO_MODE_NATIVE,
+ .gpio4 = GPIO_MODE_NATIVE,
+ .gpio5 = GPIO_MODE_NATIVE,
+ .gpio6 = GPIO_MODE_GPIO,
+ .gpio7 = GPIO_MODE_GPIO,
+ .gpio8 = GPIO_MODE_GPIO,
+ .gpio9 = GPIO_MODE_NATIVE,
+ .gpio10 = GPIO_MODE_NATIVE,
+ .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_GPIO,
+ .gpio21 = GPIO_MODE_NATIVE,
+ .gpio22 = GPIO_MODE_NATIVE,
+ .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_GPIO,
+ .gpio30 = GPIO_MODE_NATIVE,
+ .gpio31 = GPIO_MODE_GPIO,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_direction = {
+ .gpio0 = GPIO_DIR_INPUT,
+ .gpio1 = GPIO_DIR_INPUT,
+ .gpio6 = GPIO_DIR_INPUT,
+ .gpio7 = GPIO_DIR_INPUT,
+ .gpio8 = GPIO_DIR_OUTPUT,
+ .gpio13 = GPIO_DIR_INPUT,
+ .gpio15 = GPIO_DIR_OUTPUT,
+ .gpio16 = GPIO_DIR_INPUT,
+ .gpio17 = GPIO_DIR_INPUT,
+ .gpio20 = GPIO_DIR_OUTPUT,
+ .gpio24 = GPIO_DIR_OUTPUT,
+ .gpio27 = GPIO_DIR_INPUT,
+ .gpio28 = GPIO_DIR_OUTPUT,
+ .gpio29 = GPIO_DIR_OUTPUT,
+ .gpio31 = GPIO_DIR_INPUT,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_level = {
+ .gpio8 = GPIO_LEVEL_HIGH,
+ .gpio15 = GPIO_LEVEL_LOW,
+ .gpio20 = GPIO_LEVEL_HIGH,
+ .gpio24 = GPIO_LEVEL_LOW,
+ .gpio28 = GPIO_LEVEL_HIGH,
+ .gpio29 = GPIO_LEVEL_HIGH,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_reset = {};
+
+static const struct pch_gpio_set1 pch_gpio_set1_invert = {
+ .gpio13 = GPIO_INVERT,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_blink = {};
+
+static const struct pch_gpio_set2 pch_gpio_set2_mode = {
+ .gpio32 = GPIO_MODE_GPIO,
+ .gpio33 = GPIO_MODE_GPIO,
+ .gpio34 = GPIO_MODE_GPIO,
+ .gpio35 = GPIO_MODE_NATIVE,
+ .gpio36 = GPIO_MODE_NATIVE,
+ .gpio37 = GPIO_MODE_NATIVE,
+ .gpio38 = GPIO_MODE_NATIVE,
+ .gpio39 = GPIO_MODE_NATIVE,
+ .gpio40 = GPIO_MODE_NATIVE,
+ .gpio41 = GPIO_MODE_NATIVE,
+ .gpio42 = GPIO_MODE_NATIVE,
+ .gpio43 = GPIO_MODE_NATIVE,
+ .gpio44 = GPIO_MODE_NATIVE,
+ .gpio45 = GPIO_MODE_GPIO,
+ .gpio46 = GPIO_MODE_NATIVE,
+ .gpio47 = GPIO_MODE_NATIVE,
+ .gpio48 = GPIO_MODE_NATIVE,
+ .gpio49 = GPIO_MODE_GPIO,
+ .gpio50 = GPIO_MODE_NATIVE,
+ .gpio51 = GPIO_MODE_NATIVE,
+ .gpio52 = GPIO_MODE_NATIVE,
+ .gpio53 = GPIO_MODE_NATIVE,
+ .gpio54 = GPIO_MODE_NATIVE,
+ .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,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_direction = {
+ .gpio32 = GPIO_DIR_OUTPUT,
+ .gpio33 = GPIO_DIR_OUTPUT,
+ .gpio34 = GPIO_DIR_INPUT,
+ .gpio45 = GPIO_DIR_OUTPUT,
+ .gpio49 = GPIO_DIR_INPUT,
+ .gpio57 = GPIO_DIR_OUTPUT,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_level = {
+ .gpio32 = GPIO_LEVEL_HIGH,
+ .gpio33 = GPIO_LEVEL_HIGH,
+ .gpio45 = GPIO_LEVEL_HIGH,
+ .gpio57 = GPIO_LEVEL_HIGH,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_reset = {};
+
+static 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_GPIO,
+ .gpio69 = GPIO_MODE_GPIO,
+ .gpio70 = GPIO_MODE_NATIVE,
+ .gpio71 = GPIO_MODE_NATIVE,
+ .gpio72 = GPIO_MODE_GPIO,
+ .gpio73 = GPIO_MODE_NATIVE,
+ .gpio74 = GPIO_MODE_NATIVE,
+ .gpio75 = GPIO_MODE_NATIVE,
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_direction = {
+ .gpio68 = GPIO_DIR_INPUT,
+ .gpio69 = GPIO_DIR_INPUT,
+ .gpio72 = GPIO_DIR_INPUT,
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_level = {};
+
+static const struct pch_gpio_set3 pch_gpio_set3_reset = {};
+
+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,
+ .reset = &pch_gpio_set1_reset,
+ },
+ .set2 = {
+ .mode = &pch_gpio_set2_mode,
+ .direction = &pch_gpio_set2_direction,
+ .level = &pch_gpio_set2_level,
+ .reset = &pch_gpio_set2_reset,
+ },
+ .set3 = {
+ .mode = &pch_gpio_set3_mode,
+ .direction = &pch_gpio_set3_direction,
+ .level = &pch_gpio_set3_level,
+ .reset = &pch_gpio_set3_reset,
+ },
+};
diff --git a/src/mainboard/medion/ms_7707/hda_verb.c b/src/mainboard/medion/ms_7707/hda_verb.c
new file mode 100644
index 0000000..6a6cf41
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/hda_verb.c
@@ -0,0 +1,73 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * 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.
+ *
+ * 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[] = {
+ 0x10ec0887, /* Codec Vendor / Device ID: Realtek */
+ 0x14627707, /* Subsystem ID */
+
+ 0x0000000f, /* Number of 4 dword sets */
+ /* NID 0x01: Subsystem ID. */
+ AZALIA_SUBVENDOR(0x0, 0x14627707),
+
+ /* NID 0x11. */
+ AZALIA_PIN_CFG(0x0, 0x11, 0x411111f0),
+
+ /* NID 0x12. */
+ AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
+
+ /* NID 0x14. */
+ AZALIA_PIN_CFG(0x0, 0x14, 0x01014410),
+
+ /* NID 0x15. */
+ AZALIA_PIN_CFG(0x0, 0x15, 0x01011412),
+
+ /* NID 0x16. */
+ AZALIA_PIN_CFG(0x0, 0x16, 0x01016411),
+
+ /* NID 0x17. */
+ AZALIA_PIN_CFG(0x0, 0x17, 0x01012414),
+
+ /* NID 0x18. */
+ AZALIA_PIN_CFG(0x0, 0x18, 0x01813c40),
+
+ /* NID 0x19. */
+ AZALIA_PIN_CFG(0x0, 0x19, 0x02a19c50),
+
+ /* NID 0x1a. */
+ AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
+
+ /* NID 0x1b. */
+ AZALIA_PIN_CFG(0x0, 0x1b, 0x02214c20),
+
+ /* NID 0x1c. */
+ AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0),
+
+ /* NID 0x1d. */
+ AZALIA_PIN_CFG(0x0, 0x1d, 0x411111f0),
+
+ /* NID 0x1e. */
+ AZALIA_PIN_CFG(0x0, 0x1e, 0x01454130),
+
+ /* NID 0x1f. */
+ AZALIA_PIN_CFG(0x0, 0x1f, 0x411111f0),
+};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/medion/ms_7707/mainboard.c b/src/mainboard/medion/ms_7707/mainboard.c
new file mode 100644
index 0000000..4e03879
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/mainboard.c
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Tristan Corrick <tristan@corrick.kiwi>
+ *
+ * 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, either 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/device.h>
+#include <drivers/intel/gma/int15.h>
+#include <southbridge/intel/bd82x6x/pch.h>
+
+static void mainboard_enable(struct device *dev)
+{
+ /* install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
+ GMA_INT15_PANEL_FIT_DEFAULT,
+ GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); */
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/medion/ms_7707/romstage.c b/src/mainboard/medion/ms_7707/romstage.c
new file mode 100644
index 0000000..5426db4
--- /dev/null
+++ b/src/mainboard/medion/ms_7707/romstage.c
@@ -0,0 +1,69 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * 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.
+ *
+ * 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 <stdint.h>
+#include <arch/byteorder.h>
+#include <device/pci_ops.h>
+#include <device/pci_def.h>
+#include <northbridge/intel/sandybridge/sandybridge.h>
+#include <northbridge/intel/sandybridge/raminit_native.h>
+#include <southbridge/intel/bd82x6x/pch.h>
+
+void pch_enable_lpc(void)
+{
+ pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x3f07);
+ pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x00fc0295);
+ pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x88, 0x00000000);
+ pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x8c, 0x00000000);
+ pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x90, 0x00000000);
+ pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0010);
+}
+
+void mainboard_rcba_config(void)
+{
+}
+
+const struct southbridge_usb_port mainboard_usb_ports[] = {
+ {1, 0, 0},
+ {1, 0, 0},
+ {1, 0, 1},
+ {1, 0, 1},
+ {1, 0, 2},
+ {1, 0, 2},
+ {1, 0, 3},
+ {1, 0, 3},
+ {1, 0, 4},
+ {1, 0, 4},
+ {1, 0, 6},
+ {1, 0, 5},
+ {1, 0, 5},
+ {1, 0, 6},
+};
+
+void mainboard_early_init(int s3resume)
+{
+}
+
+void mainboard_config_superio(void)
+{
+}
+
+void mainboard_get_spd(spd_raw_data *spd, bool id_only)
+{
+ read_spd(&spd[0], 0x50, id_only);
+ read_spd(&spd[2], 0x52, id_only);
+}

To view, visit change 32235. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I999149bb95d553ed217b2288cc34bce4fe88abb3
Gerrit-Change-Number: 32235
Gerrit-PatchSet: 1
Gerrit-Owner: Bluemax
Gerrit-MessageType: newchange