<p>Martin Roth <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/20227">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  build bot (Jenkins): Verified
  Paul Menzel: Looks good to me, but someone else must approve
  Arthur Heymans: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mainboard/asrock: add ASRock B75 Pro3-M<br><br>Tested:<br><br>- i5-3550 and DIMM configurations: 2+0+2+2, 0+2+2+2, 2+2+2+2, 4+2+4+2<br>- debug output from serial port, EHCI debug port not found<br>- Arch Linux (Linux 4.11.5) loaded from SeaBIOS, GRUB2, and Linux payload<br>- all PCI and PCI Express slots<br><br>Issues:<br><br>- sometimes the machine fails to boot, with serial debug output it can<br>  be seen it stucks after SMM initialization, and more likely to fail<br>  to boot when serial cable is attached<br>- no S3 resume (not tested in vendor firmware)<br><br>Change-Id: I94fbfcee06921538b32aa3c23efa642e7e405ef6<br>Signed-off-by: Iru Cai <mytbk920423@gmail.com><br>Reviewed-on: https://review.coreboot.org/20227<br>Tested-by: build bot (Jenkins) <no-reply@coreboot.org><br>Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net><br>Reviewed-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>A src/mainboard/asrock/b75pro3-m/Kconfig<br>A src/mainboard/asrock/b75pro3-m/Kconfig.name<br>A src/mainboard/asrock/b75pro3-m/Makefile.inc<br>A src/mainboard/asrock/b75pro3-m/acpi/ec.asl<br>A src/mainboard/asrock/b75pro3-m/acpi/pci.asl<br>A src/mainboard/asrock/b75pro3-m/acpi/platform.asl<br>A src/mainboard/asrock/b75pro3-m/acpi/superio.asl<br>A src/mainboard/asrock/b75pro3-m/acpi_tables.c<br>A src/mainboard/asrock/b75pro3-m/board_info.txt<br>A src/mainboard/asrock/b75pro3-m/devicetree.cb<br>A src/mainboard/asrock/b75pro3-m/dsdt.asl<br>A src/mainboard/asrock/b75pro3-m/gma-mainboard.ads<br>A src/mainboard/asrock/b75pro3-m/gpio.c<br>A src/mainboard/asrock/b75pro3-m/hda_verb.c<br>A src/mainboard/asrock/b75pro3-m/mainboard.c<br>A src/mainboard/asrock/b75pro3-m/romstage.c<br>16 files changed, 834 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/asrock/b75pro3-m/Kconfig b/src/mainboard/asrock/b75pro3-m/Kconfig<br>new file mode 100644<br>index 0000000..010de97<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/Kconfig<br>@@ -0,0 +1,60 @@<br>+#<br>+# This file is part of the coreboot project.<br>+#<br>+# Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+#<br>+# This program is free software; you can redistribute it and/or modify<br>+# it under the terms of the GNU General Public License as published by<br>+# the Free Software Foundation; version 2 of the License.<br>+#<br>+# This program is distributed in the hope that it will be useful,<br>+# but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+# GNU General Public License for more details.<br>+#<br>+<br>+if BOARD_ASROCK_B75PRO3_M<br>+<br>+config BOARD_SPECIFIC_OPTIONS # dummy<br>+  def_bool y<br>+   select BOARD_ROMSIZE_KB_8192<br>+ select CPU_INTEL_SOCKET_RPGA989<br>+      select SUPERIO_NUVOTON_NCT6776<br>+       select HAVE_ACPI_RESUME<br>+      select HAVE_ACPI_TABLES<br>+      select INTEL_INT15<br>+   select NORTHBRIDGE_INTEL_IVYBRIDGE<br>+   select SERIRQ_CONTINUOUS_MODE<br>+        select SOUTHBRIDGE_INTEL_C216<br>+        select USE_NATIVE_RAMINIT<br>+    select MAINBOARD_HAS_LIBGFXINIT<br>+<br>+config HAVE_IFD_BIN<br>+     bool<br>+ default n<br>+<br>+config HAVE_ME_BIN<br>+    bool<br>+ default n<br>+<br>+config MAINBOARD_DIR<br>+  string<br>+       default asrock/b75pro3-m<br>+<br>+config MAINBOARD_PART_NUMBER<br>+   string<br>+       default "B75 Pro3-M"<br>+<br>+config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID<br>+ hex<br>+  default 0x1e49<br>+<br>+config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID<br>+ hex<br>+  default 0x1849<br>+<br>+config MAX_CPUS<br>+  int<br>+  default 8<br>+<br>+endif<br>diff --git a/src/mainboard/asrock/b75pro3-m/Kconfig.name b/src/mainboard/asrock/b75pro3-m/Kconfig.name<br>new file mode 100644<br>index 0000000..82ecff2<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/Kconfig.name<br>@@ -0,0 +1,2 @@<br>+config BOARD_ASROCK_B75PRO3_M<br>+        bool "B75 Pro3-M"<br>diff --git a/src/mainboard/asrock/b75pro3-m/Makefile.inc b/src/mainboard/asrock/b75pro3-m/Makefile.inc<br>new file mode 100644<br>index 0000000..017967b<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/Makefile.inc<br>@@ -0,0 +1,18 @@<br>+##<br>+## This file is part of the coreboot project.<br>+##<br>+## Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+##<br>+## This program is free software; you can redistribute it and/or modify<br>+## it under the terms of the GNU General Public License as published by<br>+## the Free Software Foundation; version 2 of the License.<br>+##<br>+## This program is distributed in the hope that it will be useful,<br>+## but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+## GNU General Public License for more details.<br>+##<br>+<br>+romstage-y += gpio.c<br>+<br>+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads<br>diff --git a/src/mainboard/asrock/b75pro3-m/acpi/ec.asl b/src/mainboard/asrock/b75pro3-m/acpi/ec.asl<br>new file mode 100644<br>index 0000000..e69de29<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/acpi/ec.asl<br>diff --git a/src/mainboard/asrock/b75pro3-m/acpi/pci.asl b/src/mainboard/asrock/b75pro3-m/acpi/pci.asl<br>new file mode 100644<br>index 0000000..b40a573<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/acpi/pci.asl<br>@@ -0,0 +1,48 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+Device (P0P1)<br>+{<br>+     Name (_ADR, 0x001E0000)<br>+<br>+   Method (_PRT, 0)<br>+     {<br>+            If (PICM) {<br>+                  Return (Package () {<br>+                         Package () {0x0001FFFF, 0, 0, 0x14},<br>+                         Package () {0x0001FFFF, 1, 0, 0x15},<br>+                         Package () {0x0001FFFF, 2, 0, 0x16},<br>+                         Package () {0x0001FFFF, 3, 0, 0x17},<br>+<br>+                              Package () {0x0002FFFF, 0, 0, 0x17},<br>+                         Package () {0x0002FFFF, 1, 0, 0x14},<br>+                         Package () {0x0002FFFF, 2, 0, 0x15},<br>+                         Package () {0x0002FFFF, 3, 0, 0x16}<br>+                  })<br>+           } Else {<br>+                     Return (Package () {<br>+                         Package () {0x0001FFFF, 0, \_SB.PCI0.LPCB.LNKE, 0},<br>+                          Package () {0x0001FFFF, 1, \_SB.PCI0.LPCB.LNKF, 0},<br>+                          Package () {0x0001FFFF, 2, \_SB.PCI0.LPCB.LNKG, 0},<br>+                          Package () {0x0001FFFF, 3, \_SB.PCI0.LPCB.LNKH, 0},<br>+<br>+                               Package () {0x0002FFFF, 0, \_SB.PCI0.LPCB.LNKH, 0},<br>+                          Package () {0x0002FFFF, 1, \_SB.PCI0.LPCB.LNKE, 0},<br>+                          Package () {0x0002FFFF, 2, \_SB.PCI0.LPCB.LNKF, 0},<br>+                          Package () {0x0002FFFF, 3, \_SB.PCI0.LPCB.LNKG, 0}<br>+                   })<br>+           }<br>+    }<br>+}<br>diff --git a/src/mainboard/asrock/b75pro3-m/acpi/platform.asl b/src/mainboard/asrock/b75pro3-m/acpi/platform.asl<br>new file mode 100644<br>index 0000000..f7e56ea<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/acpi/platform.asl<br>@@ -0,0 +1,23 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+Method(_WAK,1)<br>+{<br>+        Return(Package(){0,0})<br>+}<br>+<br>+Method(_PTS,1)<br>+{<br>+}<br>diff --git a/src/mainboard/asrock/b75pro3-m/acpi/superio.asl b/src/mainboard/asrock/b75pro3-m/acpi/superio.asl<br>new file mode 100644<br>index 0000000..e69de29<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/acpi/superio.asl<br>diff --git a/src/mainboard/asrock/b75pro3-m/acpi_tables.c b/src/mainboard/asrock/b75pro3-m/acpi_tables.c<br>new file mode 100644<br>index 0000000..7d634a0<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/acpi_tables.c<br>@@ -0,0 +1,35 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2008-2009 coresystems GmbH<br>+ * Copyright (C) 2014 Vladimir Serbinenko<br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of<br>+ * the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <southbridge/intel/bd82x6x/nvs.h><br>+<br>+void acpi_create_gnvs(global_nvs_t *gnvs)<br>+{<br>+     /* Disable USB ports in S3 by default */<br>+     gnvs->s3u0 = 0;<br>+   gnvs->s3u1 = 0;<br>+<br>+        /* Disable USB ports in S5 by default */<br>+     gnvs->s5u0 = 0;<br>+   gnvs->s5u1 = 0;<br>+<br>+        // the lid is open by default.<br>+       gnvs->lids = 1;<br>+<br>+        gnvs->tcrt = 100;<br>+ gnvs->tpsv = 90;<br>+}<br>diff --git a/src/mainboard/asrock/b75pro3-m/board_info.txt b/src/mainboard/asrock/b75pro3-m/board_info.txt<br>new file mode 100644<br>index 0000000..8b5546c<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/board_info.txt<br>@@ -0,0 +1,7 @@<br>+Category: desktop<br>+Board URL: http://www.asrock.com/mb/Intel/B75%20Pro3-M/<br>+ROM protocol: SPI<br>+Flashrom support: n<br>+ROM package: DIP-8<br>+ROM socketed: y<br>+Release year: 2012<br>diff --git a/src/mainboard/asrock/b75pro3-m/devicetree.cb b/src/mainboard/asrock/b75pro3-m/devicetree.cb<br>new file mode 100644<br>index 0000000..70b65aa<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/devicetree.cb<br>@@ -0,0 +1,180 @@<br>+#<br>+# This file is part of the coreboot project.<br>+#<br>+# Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+#<br>+# This program is free software; you can redistribute it and/or modify<br>+# it under the terms of the GNU General Public License as published by<br>+# the Free Software Foundation; either version 2 of the License, or<br>+# (at your option) any later version.<br>+#<br>+# This program is distributed in the hope that it will be useful,<br>+# but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+# GNU General Public License for more details.<br>+#<br>+<br>+chip northbridge/intel/sandybridge<br>+   register "gfx.did" = "{ 0x80000100, 0x80000240, 0x80000410 }"<br>+    register "gfx.link_frequency_270_mhz" = "0"<br>+      register "gfx.ndid" = "3"<br>+        register "gfx.use_spread_spectrum_clock" = "0"<br>+   register "gpu_cpu_backlight" = "0x00000000"<br>+      register "gpu_dp_b_hotplug" = "4"<br>+        register "gpu_dp_c_hotplug" = "4"<br>+        register "gpu_dp_d_hotplug" = "4"<br>+        register "gpu_panel_port_select" = "0"<br>+   register "gpu_panel_power_backlight_off_delay" = "0"<br>+     register "gpu_panel_power_backlight_on_delay" = "0"<br>+      register "gpu_panel_power_cycle_delay" = "4"<br>+     register "gpu_panel_power_down_delay" = "0"<br>+      register "gpu_panel_power_up_delay" = "0"<br>+        register "gpu_pch_backlight" = "0x00000000"<br>+      device cpu_cluster 0x0 on<br>+            chip cpu/intel/socket_rPGA989<br>+                        device lapic 0x0 on<br>+                  end<br>+          end<br>+          chip cpu/intel/model_206ax<br>+                   register "c1_acpower" = "1"<br>+                      register "c1_battery" = "1"<br>+                      register "c2_acpower" = "3"<br>+                      register "c2_battery" = "3"<br>+                      register "c3_acpower" = "5"<br>+                      register "c3_battery" = "5"<br>+                      device lapic 0xacac off<br>+                      end<br>+          end<br>+  end<br>+  device domain 0x0 on<br>+         device pci 00.0 on<br>+                   subsystemid 0x1849 0x0150<br>+            end<br>+          device pci 01.0 on<br>+                   subsystemid 0x1849 0x0151<br>+            end<br>+          device pci 02.0 on<br>+                   subsystemid 0x1849 0x0152<br>+            end<br>+          chip southbridge/intel/bd82x6x<br>+                       register "c2_latency" = "0x0065"<br>+                 register "docking_supported" = "0"<br>+                       register "gen1_dec" = "0x000c0291"<br>+                       register "gen2_dec" = "0x000c0241"<br>+                       register "gen3_dec" = "0x000c0251"<br>+                       register "p_cnt_throttling_supported" = "0"<br>+                      register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"<br>+                       register "pcie_port_coalesce" = "0"<br>+                      register "sata_interface_speed_support" = "0x3"<br>+                  register "sata_port_map" = "0x3f"<br>+                        register "superspeed_capable_ports" = "0x0000000f"<br>+                       register "xhci_overcurrent_mapping" = "0x00000c03"<br>+                       register "xhci_switchable_ports" = "0x0000000f"<br>+                  register "spi_uvscc" = "0x2005"<br>+                  register "spi_lvscc" = "0x2005"<br>+<br>+                       device pci 14.0 on # USB 3.0 Controller<br>+                              subsystemid 0x1849 0x1e31<br>+                    end<br>+                  device pci 16.0 on # Management Engine Interface 1<br>+                           subsystemid 0x1849 0x1e3a<br>+                    end<br>+                  device pci 16.1 off # Management Engine Interface 2<br>+                  end<br>+                  device pci 16.2 off # Management Engine IDE-R<br>+                        end<br>+                  device pci 16.3 on # Management Engine KT<br>+                            subsystemid 0x1849 0x1e3d<br>+                    end<br>+                  device pci 19.0 off # Intel Gigabit Ethernet<br>+                 end<br>+                  device pci 1a.0 on # USB2 EHCI #2<br>+                            subsystemid 0x1849 0x1e2d<br>+                    end<br>+                  device pci 1b.0 on # High Definition Audio Audio controller<br>+                          subsystemid 0x1849 0x8892<br>+                    end<br>+                  device pci 1c.0 on # PCIe Port #1<br>+                            subsystemid 0x1849 0x1e10<br>+                    end<br>+                  device pci 1c.1 off # PCIe Port #2<br>+                   end<br>+                  device pci 1c.2 off # PCIe Port #3<br>+                   end<br>+                  device pci 1c.3 off # PCIe Port #4<br>+                   end<br>+                  device pci 1c.4 on # PCIe Port #5, ASMedia ASM1062 SATA Controller<br>+                           subsystemid 0x1849 0x1e18<br>+                    end<br>+                  register "pcie_aspm_f4" = "0x80" # Disable ASPM for ASMedia SATA controller<br>+                      device pci 1c.5 on # PCIe Port #6, Realtek PCIe GbE Controller<br>+                               subsystemid 0x1849 0x1e1a<br>+                    end<br>+                  device pci 1c.6 off # PCIe Port #7<br>+                   end<br>+                  device pci 1c.7 off # PCIe Port #8<br>+                   end<br>+                  device pci 1d.0 on # USB2 EHCI #1<br>+                            subsystemid 0x1849 0x1e26<br>+                    end<br>+                  device pci 1e.0 on # PCI bridge<br>+                              subsystemid 0x1849 0x244e<br>+                    end<br>+                  device pci 1f.0 on # LPC bridge<br>+                              subsystemid 0x1849 0x1e49<br>+                            chip superio/nuvoton/nct6776<br>+                                 device pnp 2e.0 off end         # Floppy<br>+                                     device pnp 2e.1 on              # Parallel port<br>+                                              # global<br>+                                             irq 0x1c = 0x80<br>+                                              irq 0x27 = 0xc0<br>+                                              irq 0x2a = 0x62<br>+                                              # parallel port<br>+                                              io 0x60 = 0x378<br>+                                              irq 0x70 = 5<br>+                                         drq 0x74 = 3<br>+                                 end<br>+                                  device pnp 2e.2 on              # COM1<br>+                                               io 0x60 = 0x3f8<br>+                                              irq 0x70 = 4<br>+                                 end<br>+                                  device pnp 2e.3 off end         # COM2, IR<br>+                                   device pnp 2e.5 on              # Keyboard<br>+                                           io 0x60 = 0x60<br>+                                               io 0x62 = 0x64<br>+                                               irq 0x70 = 1<br>+                                         irq 0x72 = 12<br>+                                        end<br>+                                  device pnp 2e.6 off end         # CIR<br>+                                        device pnp 2e.7 off end         # GPIO6-9<br>+                                    device pnp 2e.8 off end         # WDT1, GPIO0, GPIO1, GPIOA<br>+                                  device pnp 2e.9 off end         # GPIO2-5<br>+                                    device pnp 2e.a on              # ACPI<br>+                                               irq 0xe0 = 0x01<br>+                                              irq 0xe3 = 0x14<br>+                                              irq 0xe6 = 0x4c<br>+                                              irq 0xe9 = 0x02<br>+                                              irq 0xf0 = 0x20<br>+                                      end<br>+                                  device pnp 2e.b off     end             # HWM, front pannel LED<br>+                                      device pnp 2e.d on end          # VID<br>+                                        device pnp 2e.e off end         # CIR WAKE-UP<br>+                                        device pnp 2e.f on end          # GPIO Push-Pull or Open-drain<br>+                                       device pnp 2e.14 on end         # SVID<br>+                                       device pnp 2e.16 on end         # Deep Sleep<br>+                                 device pnp 2e.17 on end         # GPIOA<br>+                              end<br>+                  end<br>+                  device pci 1f.2 on # SATA Controller 1<br>+                               subsystemid 0x1849 0x1e02<br>+                    end<br>+                  device pci 1f.3 on # SMBus<br>+                           subsystemid 0x1849 0x1e22<br>+                    end<br>+                  device pci 1f.5 off # SATA Controller 2<br>+                      end<br>+                  device pci 1f.6 off # Thermal<br>+                        end<br>+          end<br>+  end<br>+end<br>diff --git a/src/mainboard/asrock/b75pro3-m/dsdt.asl b/src/mainboard/asrock/b75pro3-m/dsdt.asl<br>new file mode 100644<br>index 0000000..454ee3d<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/dsdt.asl<br>@@ -0,0 +1,47 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2007-2009 coresystems GmbH<br>+ * Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB<br>+#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB<br>+#define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0<br>+DefinitionBlock(<br>+      "dsdt.aml",<br>+        "DSDT",<br>+    0x03,           // DSDT revision: ACPI v3.0<br>+  "COREv4",     // OEM id<br>+    "COREBOOT",   // OEM table id<br>+      0x20141018      // OEM revision<br>+)<br>+{<br>+      // Some generic macros<br>+       #include "acpi/platform.asl"<br>+       #include <cpu/intel/model_206ax/acpi/cpu.asl><br>+  #include <southbridge/intel/bd82x6x/acpi/platform.asl><br>+ /* global NVS and variables.  */<br>+     #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl><br>+        #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl><br>+<br>+   Scope (\_SB) {<br>+               Device (PCI0)<br>+                {<br>+            #include <northbridge/intel/sandybridge/acpi/sandybridge.asl><br>+          #include <drivers/intel/gma/acpi/default_brightness_levels.asl><br>+                #include <southbridge/intel/bd82x6x/acpi/pch.asl><br>+              #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl><br>+                #include "acpi/pci.asl"<br>+            }<br>+    }<br>+}<br>diff --git a/src/mainboard/asrock/b75pro3-m/gma-mainboard.ads b/src/mainboard/asrock/b75pro3-m/gma-mainboard.ads<br>new file mode 100644<br>index 0000000..504d3b4<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/gma-mainboard.ads<br>@@ -0,0 +1,29 @@<br>+--<br>+-- Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+--<br>+-- This program is free software; you can redistribute it and/or modify<br>+-- it under the terms of the GNU General Public License as published by<br>+-- the Free Software Foundation; either version 2 of the License, or<br>+-- (at your option) any later version.<br>+--<br>+-- This program is distributed in the hope that it will be useful,<br>+-- but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+-- GNU General Public License for more details.<br>+--<br>+<br>+with HW.GFX.GMA;<br>+with HW.GFX.GMA.Display_Probing;<br>+<br>+use HW.GFX.GMA;<br>+use HW.GFX.GMA.Display_Probing;<br>+<br>+private package GMA.Mainboard is<br>+<br>+   ports : constant Port_List :=<br>+     (HDMI1,<br>+      HDMI2,<br>+      Analog,<br>+      others => Disabled);<br>+<br>+end GMA.Mainboard;<br>diff --git a/src/mainboard/asrock/b75pro3-m/gpio.c b/src/mainboard/asrock/b75pro3-m/gpio.c<br>new file mode 100644<br>index 0000000..9775f71<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/gpio.c<br>@@ -0,0 +1,190 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2008-2009 coresystems GmbH<br>+ * Copyright (C) 2014 Vladimir Serbinenko<br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of<br>+ * the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <southbridge/intel/common/gpio.h><br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_mode = {<br>+    .gpio0 = GPIO_MODE_GPIO,<br>+     .gpio1 = GPIO_MODE_GPIO,<br>+     .gpio2 = GPIO_MODE_NATIVE,<br>+   .gpio3 = GPIO_MODE_NATIVE,<br>+   .gpio4 = GPIO_MODE_NATIVE,<br>+   .gpio5 = GPIO_MODE_NATIVE,<br>+   .gpio6 = GPIO_MODE_GPIO,<br>+     .gpio7 = GPIO_MODE_GPIO,<br>+     .gpio8 = GPIO_MODE_GPIO,<br>+     .gpio9 = GPIO_MODE_NATIVE,<br>+   .gpio10 = GPIO_MODE_NATIVE,<br>+  .gpio11 = GPIO_MODE_NATIVE,<br>+  .gpio12 = GPIO_MODE_GPIO,<br>+    .gpio13 = GPIO_MODE_GPIO,<br>+    .gpio14 = GPIO_MODE_NATIVE,<br>+  .gpio15 = GPIO_MODE_GPIO,<br>+    .gpio16 = GPIO_MODE_GPIO,<br>+    .gpio17 = GPIO_MODE_GPIO,<br>+    .gpio18 = GPIO_MODE_NATIVE,<br>+  .gpio19 = GPIO_MODE_NATIVE,<br>+  .gpio20 = GPIO_MODE_NATIVE,<br>+  .gpio21 = GPIO_MODE_NATIVE,<br>+  .gpio22 = GPIO_MODE_NATIVE,<br>+  .gpio23 = GPIO_MODE_NATIVE,<br>+  .gpio24 = GPIO_MODE_GPIO,<br>+    .gpio25 = GPIO_MODE_NATIVE,<br>+  .gpio26 = GPIO_MODE_NATIVE,<br>+  .gpio27 = GPIO_MODE_GPIO,<br>+    .gpio28 = GPIO_MODE_GPIO,<br>+    .gpio29 = GPIO_MODE_GPIO,<br>+    .gpio30 = GPIO_MODE_NATIVE,<br>+  .gpio31 = GPIO_MODE_GPIO,<br>+};<br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_direction = {<br>+    .gpio0 = GPIO_DIR_INPUT,<br>+     .gpio1 = GPIO_DIR_INPUT,<br>+     .gpio6 = GPIO_DIR_INPUT,<br>+     .gpio7 = GPIO_DIR_INPUT,<br>+     .gpio8 = GPIO_DIR_INPUT,<br>+     .gpio12 = GPIO_DIR_OUTPUT,<br>+   .gpio13 = GPIO_DIR_INPUT,<br>+    .gpio15 = GPIO_DIR_OUTPUT,<br>+   .gpio16 = GPIO_DIR_INPUT,<br>+    .gpio17 = GPIO_DIR_INPUT,<br>+    .gpio24 = GPIO_DIR_OUTPUT,<br>+   .gpio27 = GPIO_DIR_INPUT,<br>+    .gpio28 = GPIO_DIR_OUTPUT,<br>+   .gpio29 = GPIO_DIR_OUTPUT,<br>+   .gpio31 = GPIO_DIR_INPUT,<br>+};<br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_level = {<br>+        .gpio12 = GPIO_LEVEL_HIGH,<br>+   .gpio15 = GPIO_LEVEL_LOW,<br>+    .gpio24 = GPIO_LEVEL_LOW,<br>+    .gpio28 = GPIO_LEVEL_LOW,<br>+    .gpio29 = GPIO_LEVEL_HIGH,<br>+};<br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_reset = {<br>+};<br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_invert = {<br>+  .gpio13 = GPIO_INVERT,<br>+};<br>+<br>+static const struct pch_gpio_set1 pch_gpio_set1_blink = {<br>+};<br>+<br>+static const struct pch_gpio_set2 pch_gpio_set2_mode = {<br>+        .gpio32 = GPIO_MODE_GPIO,<br>+    .gpio33 = GPIO_MODE_GPIO,<br>+    .gpio34 = GPIO_MODE_GPIO,<br>+    .gpio35 = GPIO_MODE_NATIVE,<br>+  .gpio36 = GPIO_MODE_NATIVE,<br>+  .gpio37 = GPIO_MODE_NATIVE,<br>+  .gpio38 = GPIO_MODE_NATIVE,<br>+  .gpio39 = GPIO_MODE_NATIVE,<br>+  .gpio40 = GPIO_MODE_NATIVE,<br>+  .gpio41 = GPIO_MODE_NATIVE,<br>+  .gpio42 = GPIO_MODE_NATIVE,<br>+  .gpio43 = GPIO_MODE_NATIVE,<br>+  .gpio44 = GPIO_MODE_NATIVE,<br>+  .gpio45 = GPIO_MODE_NATIVE,<br>+  .gpio46 = GPIO_MODE_NATIVE,<br>+  .gpio47 = GPIO_MODE_NATIVE,<br>+  .gpio48 = GPIO_MODE_NATIVE,<br>+  .gpio49 = GPIO_MODE_GPIO,<br>+    .gpio50 = GPIO_MODE_NATIVE,<br>+  .gpio51 = GPIO_MODE_NATIVE,<br>+  .gpio52 = GPIO_MODE_NATIVE,<br>+  .gpio53 = GPIO_MODE_NATIVE,<br>+  .gpio54 = GPIO_MODE_NATIVE,<br>+  .gpio55 = GPIO_MODE_NATIVE,<br>+  .gpio56 = GPIO_MODE_NATIVE,<br>+  .gpio57 = GPIO_MODE_GPIO,<br>+    .gpio58 = GPIO_MODE_NATIVE,<br>+  .gpio59 = GPIO_MODE_NATIVE,<br>+  .gpio60 = GPIO_MODE_NATIVE,<br>+  .gpio61 = GPIO_MODE_NATIVE,<br>+  .gpio62 = GPIO_MODE_NATIVE,<br>+  .gpio63 = GPIO_MODE_NATIVE,<br>+};<br>+<br>+static const struct pch_gpio_set2 pch_gpio_set2_direction = {<br>+  .gpio32 = GPIO_DIR_OUTPUT,<br>+   .gpio33 = GPIO_DIR_OUTPUT,<br>+   .gpio34 = GPIO_DIR_INPUT,<br>+    .gpio49 = GPIO_DIR_INPUT,<br>+    .gpio57 = GPIO_DIR_INPUT,<br>+};<br>+<br>+static const struct pch_gpio_set2 pch_gpio_set2_level = {<br>+        .gpio32 = GPIO_LEVEL_HIGH,<br>+   .gpio33 = GPIO_LEVEL_HIGH,<br>+};<br>+<br>+static const struct pch_gpio_set2 pch_gpio_set2_reset = {<br>+};<br>+<br>+static const struct pch_gpio_set3 pch_gpio_set3_mode = {<br>+    .gpio64 = GPIO_MODE_NATIVE,<br>+  .gpio65 = GPIO_MODE_NATIVE,<br>+  .gpio66 = GPIO_MODE_NATIVE,<br>+  .gpio67 = GPIO_MODE_NATIVE,<br>+  .gpio68 = GPIO_MODE_GPIO,<br>+    .gpio69 = GPIO_MODE_GPIO,<br>+    .gpio70 = GPIO_MODE_NATIVE,<br>+  .gpio71 = GPIO_MODE_NATIVE,<br>+  .gpio72 = GPIO_MODE_GPIO,<br>+    .gpio73 = GPIO_MODE_NATIVE,<br>+  .gpio74 = GPIO_MODE_NATIVE,<br>+  .gpio75 = GPIO_MODE_NATIVE,<br>+};<br>+<br>+static const struct pch_gpio_set3 pch_gpio_set3_direction = {<br>+  .gpio68 = GPIO_DIR_INPUT,<br>+    .gpio69 = GPIO_DIR_INPUT,<br>+    .gpio72 = GPIO_DIR_INPUT,<br>+};<br>+<br>+static const struct pch_gpio_set3 pch_gpio_set3_level = {<br>+};<br>+<br>+static const struct pch_gpio_set3 pch_gpio_set3_reset = {<br>+};<br>+<br>+const struct pch_gpio_map mainboard_gpio_map = {<br>+ .set1 = {<br>+            .mode           = &pch_gpio_set1_mode,<br>+           .direction      = &pch_gpio_set1_direction,<br>+              .level          = &pch_gpio_set1_level,<br>+          .blink          = &pch_gpio_set1_blink,<br>+          .invert         = &pch_gpio_set1_invert,<br>+         .reset          = &pch_gpio_set1_reset,<br>+  },<br>+   .set2 = {<br>+            .mode           = &pch_gpio_set2_mode,<br>+           .direction      = &pch_gpio_set2_direction,<br>+              .level          = &pch_gpio_set2_level,<br>+          .reset          = &pch_gpio_set2_reset,<br>+  },<br>+   .set3 = {<br>+            .mode           = &pch_gpio_set3_mode,<br>+           .direction      = &pch_gpio_set3_direction,<br>+              .level          = &pch_gpio_set3_level,<br>+          .reset          = &pch_gpio_set3_reset,<br>+  },<br>+};<br>diff --git a/src/mainboard/asrock/b75pro3-m/hda_verb.c b/src/mainboard/asrock/b75pro3-m/hda_verb.c<br>new file mode 100644<br>index 0000000..cae9137<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/hda_verb.c<br>@@ -0,0 +1,88 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2008-2009 coresystems GmbH<br>+ * Copyright (C) 2014 Vladimir Serbinenko<br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of<br>+ * the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <device/azalia_device.h><br>+<br>+const u32 cim_verb_data[] = {<br>+  0x10ec0892, /* Codec Vendor / Device ID: Realtek */<br>+  0x18498892, /* Subsystem ID */<br>+<br>+    0x0000000f, /* Number of 4 dword sets */<br>+     /* NID 0x01: Subsystem ID.  */<br>+       AZALIA_SUBVENDOR(0x0, 0x18498892),<br>+<br>+        /* NID 0x11.  */<br>+     AZALIA_PIN_CFG(0x0, 0x11, 0x411111f0),<br>+<br>+    /* NID 0x12.  */<br>+     AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),<br>+<br>+    /* NID 0x14.  */<br>+     AZALIA_PIN_CFG(0x0, 0x14, 0x01014010),<br>+<br>+    /* NID 0x15.  */<br>+     AZALIA_PIN_CFG(0x0, 0x15, 0x01011012),<br>+<br>+    /* NID 0x16.  */<br>+     AZALIA_PIN_CFG(0x0, 0x16, 0x01016011),<br>+<br>+    /* NID 0x17.  */<br>+     AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),<br>+<br>+    /* NID 0x18.  */<br>+     AZALIA_PIN_CFG(0x0, 0x18, 0x01a19840),<br>+<br>+    /* NID 0x19.  */<br>+     AZALIA_PIN_CFG(0x0, 0x19, 0x02a19950),<br>+<br>+    /* NID 0x1a.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1a, 0x0181304f),<br>+<br>+    /* NID 0x1b.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1b, 0x02214120),<br>+<br>+    /* NID 0x1c.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0),<br>+<br>+    /* NID 0x1d.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1d, 0x4005e601),<br>+<br>+    /* NID 0x1e.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1e, 0x01452130),<br>+<br>+    /* NID 0x1f.  */<br>+     AZALIA_PIN_CFG(0x0, 0x1f, 0x411111f0),<br>+       0x80862806, /* Codec Vendor / Device ID: Intel */<br>+    0x80860101, /* Subsystem ID */<br>+<br>+    0x00000004, /* Number of 4 dword sets */<br>+     /* NID 0x01: Subsystem ID.  */<br>+       AZALIA_SUBVENDOR(0x3, 0x80860101),<br>+<br>+        /* NID 0x05.  */<br>+     AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),<br>+<br>+    /* NID 0x06.  */<br>+     AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),<br>+<br>+    /* NID 0x07.  */<br>+     AZALIA_PIN_CFG(0x3, 0x07, 0x18560030),<br>+};<br>+<br>+const u32 pc_beep_verbs[0] = {};<br>+<br>+AZALIA_ARRAY_SIZES;<br>diff --git a/src/mainboard/asrock/b75pro3-m/mainboard.c b/src/mainboard/asrock/b75pro3-m/mainboard.c<br>new file mode 100644<br>index 0000000..f0d0cf7<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/mainboard.c<br>@@ -0,0 +1,30 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; either version 2 of the License, or<br>+ * (at your option) any later version.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <device/device.h><br>+#include <drivers/intel/gma/int15.h><br>+#include <southbridge/intel/bd82x6x/pch.h><br>+<br>+static void mainboard_enable(device_t dev)<br>+{<br>+        install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_NONE,<br>+                   GMA_INT15_PANEL_FIT_DEFAULT,<br>+                 GMA_INT15_BOOT_DISPLAY_CRT, 0);<br>+}<br>+<br>+struct chip_operations mainboard_ops = {<br>+    .enable_dev = mainboard_enable,<br>+};<br>diff --git a/src/mainboard/asrock/b75pro3-m/romstage.c b/src/mainboard/asrock/b75pro3-m/romstage.c<br>new file mode 100644<br>index 0000000..f556443<br>--- /dev/null<br>+++ b/src/mainboard/asrock/b75pro3-m/romstage.c<br>@@ -0,0 +1,77 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Iru Cai <mytbk920423@gmail.com><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of<br>+ * the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include "northbridge/intel/sandybridge/raminit_native.h"<br>+#include <superio/nuvoton/nct6776/nct6776.h><br>+#include <superio/nuvoton/common/nuvoton.h><br>+<br>+#define SERIAL_DEV PNP_DEV(0x2e, NCT6776_SP1)<br>+<br>+void pch_enable_lpc(void)<br>+{<br>+ pci_write_config16(PCH_LPC_DEV, LPC_EN,<br>+                      CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN | COMA_LPC_EN);<br>+        pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0000);<br>+}<br>+<br>+void rcba_config(void)<br>+{<br>+     RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0;<br>+}<br>+<br>+const struct southbridge_usb_port mainboard_usb_ports[] = {<br>+   { 1, 0, 0 },<br>+ { 1, 0, 0 },<br>+ { 1, 1, 1 },<br>+ { 1, 1, 1 },<br>+ { 1, 1, 2 },<br>+ { 1, 1, 2 },<br>+ { 1, 0, 3 },<br>+ { 1, 0, 3 },<br>+ { 1, 0, 4 },<br>+ { 1, 0, 4 },<br>+ { 1, 0, 6 },<br>+ { 1, 1, 5 },<br>+ { 1, 1, 5 },<br>+ { 1, 0, 6 },<br>+};<br>+<br>+void mainboard_early_init(int s3resume)<br>+{<br>+}<br>+<br>+void mainboard_config_superio(void)<br>+{<br>+  /* Set GPIOs on superio, enable UART */<br>+      nuvoton_pnp_enter_conf_state(SERIAL_DEV);<br>+    pnp_set_logical_device(SERIAL_DEV);<br>+<br>+       pnp_write_config(SERIAL_DEV, 0x1c, 0x80);<br>+    pnp_write_config(SERIAL_DEV, 0x27, 0x80);<br>+    pnp_write_config(SERIAL_DEV, 0x2a, 0x60);<br>+<br>+ nuvoton_pnp_exit_conf_state(SERIAL_DEV);<br>+<br>+  nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);<br>+}<br>+<br>+void mainboard_get_spd(spd_raw_data *spd, bool id_only)<br>+{<br>+   read_spd(&spd[0], 0x50, id_only);<br>+        read_spd(&spd[1], 0x51, id_only);<br>+        read_spd(&spd[2], 0x52, id_only);<br>+        read_spd(&spd[3], 0x53, id_only);<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/20227">change 20227</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20227"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I94fbfcee06921538b32aa3c23efa642e7e405ef6 </div>
<div style="display:none"> Gerrit-Change-Number: 20227 </div>
<div style="display:none"> Gerrit-PatchSet: 12 </div>
<div style="display:none"> Gerrit-Owner: Iru Cai <mytbk920423@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> </div>
<div style="display:none"> Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de> </div>
<div style="display:none"> Gerrit-Reviewer: Iru Cai <mytbk920423@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Martin Roth <martinroth@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>