<p>Frans Hendriks has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30414">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mainboard/facebook/fbg1701: Do initial mainboard commit<br><br>No support for Facebook FBG-1701 available.<br>coreboot implementation includes support for measured boot and<br>verified boot.<br><br>This (braswell) implementation is based on Intel Strago.<br><br>BUG=N/A<br>TEST=Facebook FBG-1701 booting Embedded Linux<br><br>Change-Id: I28ac78a630ee705b1e546031f024bfe7f952ab39<br>Signed-off-by: Frans Hendriks <fhendriks@eltan.com><br>---<br>A Documentation/mainboard/facebook/fbg1701.md<br>M Documentation/mainboard/index.md<br>A src/mainboard/facebook/fbg1701/Kconfig<br>A src/mainboard/facebook/fbg1701/Kconfig.name<br>A src/mainboard/facebook/fbg1701/Makefile.inc<br>A src/mainboard/facebook/fbg1701/acpi/dptf.asl<br>A src/mainboard/facebook/fbg1701/acpi/ec.asl<br>A src/mainboard/facebook/fbg1701/acpi/mainboard.asl<br>A src/mainboard/facebook/fbg1701/acpi/sleepstates.asl<br>A src/mainboard/facebook/fbg1701/acpi/superio.asl<br>A src/mainboard/facebook/fbg1701/acpi_tables.c<br>A src/mainboard/facebook/fbg1701/board_info.txt<br>A src/mainboard/facebook/fbg1701/board_mboot.c<br>A src/mainboard/facebook/fbg1701/board_verified_boot.c<br>A src/mainboard/facebook/fbg1701/board_verified_boot.h<br>A src/mainboard/facebook/fbg1701/bootblock.c<br>A src/mainboard/facebook/fbg1701/cmos.layout<br>A src/mainboard/facebook/fbg1701/com_init.c<br>A src/mainboard/facebook/fbg1701/devicetree.cb<br>A src/mainboard/facebook/fbg1701/dsdt.asl<br>A src/mainboard/facebook/fbg1701/fadt.c<br>A src/mainboard/facebook/fbg1701/fmap.fmd<br>A src/mainboard/facebook/fbg1701/gpio.c<br>A src/mainboard/facebook/fbg1701/hda_verb.c<br>A src/mainboard/facebook/fbg1701/irqroute.c<br>A src/mainboard/facebook/fbg1701/irqroute.h<br>A src/mainboard/facebook/fbg1701/logo.c<br>A src/mainboard/facebook/fbg1701/mainboard.c<br>A src/mainboard/facebook/fbg1701/mainboard.h<br>A src/mainboard/facebook/fbg1701/manifest.h<br>A src/mainboard/facebook/fbg1701/onboard.h<br>A src/mainboard/facebook/fbg1701/ramstage.c<br>A src/mainboard/facebook/fbg1701/romstage.c<br>A src/mainboard/facebook/fbg1701/smihandler.c<br>A src/mainboard/facebook/fbg1701/spd/SAMSUNG_K4B8G1646D-MYKO.spd.hex<br>35 files changed, 2,404 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/30414/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Documentation/mainboard/facebook/fbg1701.md b/Documentation/mainboard/facebook/fbg1701.md</span><br><span>new file mode 100644</span><br><span>index 0000000..a0dbc82</span><br><span>--- /dev/null</span><br><span>+++ b/Documentation/mainboard/facebook/fbg1701.md</span><br><span>@@ -0,0 +1,100 @@</span><br><span style="color: hsl(120, 100%, 40%);">+# Facebook FBG1701</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This page describes how to run coreboot on the [Facebook FBG1701].</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Required blobs</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This board currently requires Braswell fsp blob</span><br><span style="color: hsl(120, 100%, 40%);">+(3rdparty/fsp/BraswellFspBinPkg/FspBin/BSWFSP.fd).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Building coreboot</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+A fully working image should be possible. You can set the basic config</span><br><span style="color: hsl(120, 100%, 40%);">+with the following commands. However, it is strongly advised to use</span><br><span style="color: hsl(120, 100%, 40%);">+`make menuconfig` afterwards (or instead), so that you can see all of</span><br><span style="color: hsl(120, 100%, 40%);">+the settings.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+```bash</span><br><span style="color: hsl(120, 100%, 40%);">+make distclean # Note: this will remove your current config, if it exists.</span><br><span style="color: hsl(120, 100%, 40%);">+touch .config</span><br><span style="color: hsl(120, 100%, 40%);">+./util/scripts/config --enable VENDOR_FACEBOOK</span><br><span style="color: hsl(120, 100%, 40%);">+./util/scripts/config --enable BOARD_FACEBOOK_FBG1701</span><br><span style="color: hsl(120, 100%, 40%);">+make olddefconfig</span><br><span style="color: hsl(120, 100%, 40%);">+```</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+If you don't plan on using coreboot's serial console to collect logs,</span><br><span style="color: hsl(120, 100%, 40%);">+you might want to disable it at this point (`./util/scripts/config</span><br><span style="color: hsl(120, 100%, 40%);">+--disable CONSOLE_SERIAL`). It should reduce the boot time by several</span><br><span style="color: hsl(120, 100%, 40%);">+seconds. However, a more flexible method is to change the console log</span><br><span style="color: hsl(120, 100%, 40%);">+level from within an OS using `util/nvramtool`, or with the `nvramcui`</span><br><span style="color: hsl(120, 100%, 40%);">+payload.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Now, run `make` to build the coreboot image.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Flashing coreboot</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+### Internal programming</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The main SPI flash can be accessed using [flashrom]. </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+### External programming</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The system has an internal flash chip which is a 8 MiB soldered DIP-8 chip.</span><br><span style="color: hsl(120, 100%, 40%);">+Specifically, it's a Winbond W25Q64FW (1.8V), whose datasheet can be found</span><br><span style="color: hsl(120, 100%, 40%);">+[here][W25Q64FW].</span><br><span style="color: hsl(120, 100%, 40%);">+The system has an external flash chip which is a 8 MiB soldered DIP-8 chip. It</span><br><span style="color: hsl(120, 100%, 40%);">+is located in the middle of carrier board close to the flex cable connection.</span><br><span style="color: hsl(120, 100%, 40%);">+The external flash chip is a Winbond W25Q64FV (3.5V), whose datasheet can be found</span><br><span style="color: hsl(120, 100%, 40%);">+[here][W25Q64FV].</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Known issues</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+- None</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Untested</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+- flashing coreboot</span><br><span style="color: hsl(120, 100%, 40%);">+- hardware monitor</span><br><span style="color: hsl(120, 100%, 40%);">+- SDIO</span><br><span style="color: hsl(120, 100%, 40%);">+- Full Embedded controller support</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Working</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+- USB</span><br><span style="color: hsl(120, 100%, 40%);">+- Gigabit Ethernet</span><br><span style="color: hsl(120, 100%, 40%);">+- integrated graphics</span><br><span style="color: hsl(120, 100%, 40%);">+- external graphics</span><br><span style="color: hsl(120, 100%, 40%);">+- PCIe</span><br><span style="color: hsl(120, 100%, 40%);">+- eMMC</span><br><span style="color: hsl(120, 100%, 40%);">+- SATA</span><br><span style="color: hsl(120, 100%, 40%);">+- serial port</span><br><span style="color: hsl(120, 100%, 40%);">+- SMBus</span><br><span style="color: hsl(120, 100%, 40%);">+- HDA</span><br><span style="color: hsl(120, 100%, 40%);">+- initialization with FSP MR2</span><br><span style="color: hsl(120, 100%, 40%);">+- SeaBIOS payload</span><br><span style="color: hsl(120, 100%, 40%);">+- Embedded Linux (Ubuntu 4.15+)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+## Technology</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+```eval_rst</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| Northbridge      | Intel Atom Processor N3710                       |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| Southbridge      | Intel SoC                                        |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| CPU              | Intel Braswell (N3710)                           |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| Super I/O        | None                                             |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| EC               | ITE8256                                          |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| Coprocessor      | Intel Management Engine                          |</span><br><span style="color: hsl(120, 100%, 40%);">++------------------+--------------------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+```</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[Facebook FBG1701]:</span><br><span style="color: hsl(120, 100%, 40%);">+[W25Q64FW]: https://www.winbond.com/resource-files/w25q64fw%20revn%2005182017%20sfdp.pdf</span><br><span style="color: hsl(120, 100%, 40%);">+[W25Q64FV]: https://www.winbond.com/resource-files/w25q64fv%20revs%2007182017.pdf</span><br><span style="color: hsl(120, 100%, 40%);">+[flashrom]: https://flashrom.org/Flashrom</span><br><span>diff --git a/Documentation/mainboard/index.md b/Documentation/mainboard/index.md</span><br><span>index f97e178..400157b 100644</span><br><span>--- a/Documentation/mainboard/index.md</span><br><span>+++ b/Documentation/mainboard/index.md</span><br><span>@@ -42,6 +42,10 @@</span><br><span> </span><br><span> - [Elgon](opencellular/elgon.md)</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+## Facebook</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+- [FBG-1701](facebook/fbg1701.md)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ## HP</span><br><span> </span><br><span> - [Compaq 8200 Elite SFF](hp/compaq_8200_sff.md)</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/Kconfig b/src/mainboard/facebook/fbg1701/Kconfig</span><br><span>new file mode 100644</span><br><span>index 0000000..3a125d5</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/Kconfig</span><br><span>@@ -0,0 +1,138 @@</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+## it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+## the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+## but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+## GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if BOARD_FACEBOOK_FBG1701</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config BOARD_SPECIFIC_OPTIONS</span><br><span style="color: hsl(120, 100%, 40%);">+ def_bool y</span><br><span style="color: hsl(120, 100%, 40%);">+    select BOARD_ROMSIZE_KB_8192</span><br><span style="color: hsl(120, 100%, 40%);">+  select HAVE_ACPI_TABLES</span><br><span style="color: hsl(120, 100%, 40%);">+       select HAVE_OPTION_TABLE</span><br><span style="color: hsl(120, 100%, 40%);">+      select MAINBOARD_HAS_LPC_TPM</span><br><span style="color: hsl(120, 100%, 40%);">+  select MAINBOARD_HAS_TPM2</span><br><span style="color: hsl(120, 100%, 40%);">+     select SOC_INTEL_BRASWELL</span><br><span style="color: hsl(120, 100%, 40%);">+     select PCIEXP_L1_SUB_STATE</span><br><span style="color: hsl(120, 100%, 40%);">+    select HAVE_FSP_BIN</span><br><span style="color: hsl(120, 100%, 40%);">+   select CACHE_MRC_SETTINGS</span><br><span style="color: hsl(120, 100%, 40%);">+     select C_ENVIRONMENT_BOOTBLOCK</span><br><span style="color: hsl(120, 100%, 40%);">+        select BOOTBLOCK_CONSOLE</span><br><span style="color: hsl(120, 100%, 40%);">+      select DISABLE_HPET</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config   USE_GENERIC_FSP_CAR_INC</span><br><span style="color: hsl(120, 100%, 40%);">+       bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default n</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config MAINBOARD_DIR</span><br><span style="color: hsl(120, 100%, 40%);">+     string</span><br><span style="color: hsl(120, 100%, 40%);">+        default facebook/fbg1701</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config MAINBOARD_PART_NUMBER</span><br><span style="color: hsl(120, 100%, 40%);">+      string</span><br><span style="color: hsl(120, 100%, 40%);">+        default "FBG-1701"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config MAINBOARD_SPD0_FILE_NAME</span><br><span style="color: hsl(120, 100%, 40%);">+       string</span><br><span style="color: hsl(120, 100%, 40%);">+        default "spd0.bin"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config CBFS_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+      hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x00800000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config CPU_MICROCODE_CBFS_LEN</span><br><span style="color: hsl(120, 100%, 40%);">+   hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x10C00</span><br><span style="color: hsl(120, 100%, 40%);">+       help</span><br><span style="color: hsl(120, 100%, 40%);">+    This should be updated when the microcode patch changes.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config CPU_MICROCODE_CBFS_LOC</span><br><span style="color: hsl(120, 100%, 40%);">+   hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0xFFFE9400</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config ROM_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+ hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x800000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config MRC_SETTINGS_CACHE_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+    hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x08000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config FMDFILE</span><br><span style="color: hsl(120, 100%, 40%);">+     string</span><br><span style="color: hsl(120, 100%, 40%);">+        default "$(top)/src/mainboard/$(CONFIG_MAINBOARD_DIR)/fmap.fmd"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config FSP_LOC</span><br><span style="color: hsl(120, 100%, 40%);">+   hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0xfff9c000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config FSP1_1_DISPLAY_LOGO</span><br><span style="color: hsl(120, 100%, 40%);">+      bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default n</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config OEM_MANIFEST_LOC</span><br><span style="color: hsl(120, 100%, 40%);">+  hex "OEM Manifest working dflt 0xFFFE9000"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config BOOTBLOCK_LOC</span><br><span style="color: hsl(120, 100%, 40%);">+  hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0xFFFF0000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config BOOTBLOCK_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+   hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0x10000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config ENABLE_SERIRQ</span><br><span style="color: hsl(120, 100%, 40%);">+       bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config SERIRQ_CONTINUOUS_MODE</span><br><span style="color: hsl(120, 100%, 40%);">+    bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config SPI_FLASH_INCLUDE_ALL_DRIVERS</span><br><span style="color: hsl(120, 100%, 40%);">+     bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default n</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config SPI_FLASH_WINBOND</span><br><span style="color: hsl(120, 100%, 40%);">+ bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config TPM_INIT</span><br><span style="color: hsl(120, 100%, 40%);">+  bool "TPM Setup in RAMSTAGE"</span><br><span style="color: hsl(120, 100%, 40%);">+        default n</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config C_ENV_BOOTBLOCK_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+      hex "C Bootblock Size"</span><br><span style="color: hsl(120, 100%, 40%);">+      default 0x4000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config VERIFIED_BOOT</span><br><span style="color: hsl(120, 100%, 40%);">+        bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config VERIFIED_BOOT_SIGNED_MANIFEST</span><br><span style="color: hsl(120, 100%, 40%);">+     bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config VERIFIED_BOOT_MANIFEST</span><br><span style="color: hsl(120, 100%, 40%);">+    string</span><br><span style="color: hsl(120, 100%, 40%);">+        default "mainboard/facebook/fbg1701/manifest.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config VERIFIED_BOOT_KEY_LOCATION</span><br><span style="color: hsl(120, 100%, 40%);">+        hex</span><br><span style="color: hsl(120, 100%, 40%);">+   default 0xFFFFBD00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+config MBOOT</span><br><span style="color: hsl(120, 100%, 40%);">+    bool</span><br><span style="color: hsl(120, 100%, 40%);">+  default y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+endif # BOARD_FACEBOOK_FBG1701</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/Kconfig.name b/src/mainboard/facebook/fbg1701/Kconfig.name</span><br><span>new file mode 100644</span><br><span>index 0000000..1cbc9936</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/Kconfig.name</span><br><span>@@ -0,0 +1,2 @@</span><br><span style="color: hsl(120, 100%, 40%);">+config BOARD_FACEBOOK_FBG1701</span><br><span style="color: hsl(120, 100%, 40%);">+    bool "FBG-1701"</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/Makefile.inc b/src/mainboard/facebook/fbg1701/Makefile.inc</span><br><span>new file mode 100644</span><br><span>index 0000000..42d1bcb</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/Makefile.inc</span><br><span>@@ -0,0 +1,58 @@</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+## it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+## the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+## but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+## GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifeq ($(CONFIG_VERIFIED_BOOT),y)</span><br><span style="color: hsl(120, 100%, 40%);">+bootblock-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += board_verified_boot.c</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+bootblock-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += bootblock.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-$(CONFIG_VERIFIED_BOOT) += board_verified_boot.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += gpio.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += hda_verb.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += irqroute.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += logo.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += ramstage.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+romstage-$(CONFIG_MBOOT) += board_mboot.c</span><br><span style="color: hsl(120, 100%, 40%);">+romstage-$(CONFIG_VERIFIED_BOOT) += board_verified_boot.c</span><br><span style="color: hsl(120, 100%, 40%);">+romstage-y += com_init.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+cbfs-files-$(CONFIG_FSP1_1_DISPLAY_LOGO) += logo.bmp</span><br><span style="color: hsl(120, 100%, 40%);">+logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP1_1_LOGO_FILE_NAME))</span><br><span style="color: hsl(120, 100%, 40%);">+logo.bmp-type := raw</span><br><span style="color: hsl(120, 100%, 40%);">+logo.bmp-compression := LZMA</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## Memory SPD for on-board memory</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+SPD0_BIN = $(obj)/sp0.bin</span><br><span style="color: hsl(120, 100%, 40%);">+SPD0_SOURCE  = spd/SAMSUNG_K4B8G1646D-MYKO</span><br><span style="color: hsl(120, 100%, 40%);">+SPD0_DEPS := $(top)/src/mainboard/$(MAINBOARDDIR)/$(SPD0_SOURCE).spd.hex</span><br><span style="color: hsl(120, 100%, 40%);">+# Include spd 0 rom data</span><br><span style="color: hsl(120, 100%, 40%);">+$(SPD0_BIN): $(SPD0_DEPS) $(top)/src/mainboard/$(MAINBOARDDIR)/Makefile.inc</span><br><span style="color: hsl(120, 100%, 40%);">+  echo "    CREATE SPD $@"</span><br><span style="color: hsl(120, 100%, 40%);">+    for f in $(SPD0_DEPS); \</span><br><span style="color: hsl(120, 100%, 40%);">+        do for c in $$(cat $$f | grep -v ^#); \</span><br><span style="color: hsl(120, 100%, 40%);">+         do printf $$(printf '\%o' 0x$$c); \</span><br><span style="color: hsl(120, 100%, 40%);">+         done; \</span><br><span style="color: hsl(120, 100%, 40%);">+     done > $@</span><br><span style="color: hsl(120, 100%, 40%);">+cbfs-files-y += $(CONFIG_MAINBOARD_SPD0_FILE_NAME)</span><br><span style="color: hsl(120, 100%, 40%);">+$(CONFIG_MAINBOARD_SPD0_FILE_NAME)-file := $(SPD0_BIN)</span><br><span style="color: hsl(120, 100%, 40%);">+$(CONFIG_MAINBOARD_SPD0_FILE_NAME)-type := spd</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi/dptf.asl b/src/mainboard/facebook/fbg1701/acpi/dptf.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..564237a</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi/dptf.asl</span><br><span>@@ -0,0 +1,47 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2012 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Mainboard specific _PDL is 1GHz */</span><br><span style="color: hsl(120, 100%, 40%);">+Name (MPDL, 8)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Name (DTRT, Package () {</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Name (MPPC, Package ()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+     0x2,            /* Revision */</span><br><span style="color: hsl(120, 100%, 40%);">+        Package () {    /* Power Limit 1 */</span><br><span style="color: hsl(120, 100%, 40%);">+           0,      /* PowerLimitIndex, 0 for Power Limit 1 */</span><br><span style="color: hsl(120, 100%, 40%);">+            2000,   /* PowerLimitMinimum */</span><br><span style="color: hsl(120, 100%, 40%);">+               6200,   /* PowerLimitMaximum */</span><br><span style="color: hsl(120, 100%, 40%);">+               1000,   /* TimeWindowMinimum */</span><br><span style="color: hsl(120, 100%, 40%);">+               1000,   /* TimeWindowMaximum */</span><br><span style="color: hsl(120, 100%, 40%);">+               200     /* StepSize */</span><br><span style="color: hsl(120, 100%, 40%);">+        },</span><br><span style="color: hsl(120, 100%, 40%);">+    Package () {    /* Power Limit 2 */</span><br><span style="color: hsl(120, 100%, 40%);">+           1,      /* PowerLimitIndex, 1 for Power Limit 2 */</span><br><span style="color: hsl(120, 100%, 40%);">+            8000,   /* PowerLimitMinimum */</span><br><span style="color: hsl(120, 100%, 40%);">+               8000,   /* PowerLimitMaximum */</span><br><span style="color: hsl(120, 100%, 40%);">+               1000,   /* TimeWindowMinimum */</span><br><span style="color: hsl(120, 100%, 40%);">+               1000,   /* TimeWindowMaximum */</span><br><span style="color: hsl(120, 100%, 40%);">+               1000    /* StepSize */</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Include DPTF */</span><br><span style="color: hsl(120, 100%, 40%);">+#include <acpi/dptf/dptf.asl></span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi/ec.asl b/src/mainboard/facebook/fbg1701/acpi/ec.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..3c9d818</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi/ec.asl</span><br><span>@@ -0,0 +1,14 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi/mainboard.asl b/src/mainboard/facebook/fbg1701/acpi/mainboard.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..9575748</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi/mainboard.asl</span><br><span>@@ -0,0 +1,45 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2012 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Scope (\_SB)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    Device (PWRB)</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+             Name (_HID, EisaId ("PNP0C0C"))</span><br><span style="color: hsl(120, 100%, 40%);">+             Name (_UID, 1)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Onboard CPLD</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+Scope (\_SB.PCI0.LPCB)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   Device (CPLD)           /* Onboard CPLD */</span><br><span style="color: hsl(120, 100%, 40%);">+    {</span><br><span style="color: hsl(120, 100%, 40%);">+             Name(_HID, EISAID("PNP0C01"))</span><br><span style="color: hsl(120, 100%, 40%);">+               Name(_CRS, ResourceTemplate()</span><br><span style="color: hsl(120, 100%, 40%);">+         {</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* Reserve 0x280 to 0x2BF for the CPLD */</span><br><span style="color: hsl(120, 100%, 40%);">+                     FixedIO (0x0280, 0x40)</span><br><span style="color: hsl(120, 100%, 40%);">+                        IRQNoFlags () {7}</span><br><span style="color: hsl(120, 100%, 40%);">+             })</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi/sleepstates.asl b/src/mainboard/facebook/fbg1701/acpi/sleepstates.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..428fda2</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi/sleepstates.asl</span><br><span>@@ -0,0 +1,20 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2007-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(120, 100%, 40%);">+ * the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Name(\_S0, Package(){0x0,0x0,0x0,0x0})</span><br><span style="color: hsl(120, 100%, 40%);">+Name(\_S4, Package(){0x6,0x6,0x0,0x0})</span><br><span style="color: hsl(120, 100%, 40%);">+Name(\_S5, Package(){0x7,0x7,0x0,0x0})</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi/superio.asl b/src/mainboard/facebook/fbg1701/acpi/superio.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..84af609</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi/superio.asl</span><br><span>@@ -0,0 +1,46 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* mainboard configuration */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      Device (COM1) {</span><br><span style="color: hsl(120, 100%, 40%);">+               Name (_HID, EISAID ("PNP0501"))</span><br><span style="color: hsl(120, 100%, 40%);">+             Name (_UID, 1)</span><br><span style="color: hsl(120, 100%, 40%);">+                Name (_ADR, 0)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              Method (_STA, 0, NotSerialized) {</span><br><span style="color: hsl(120, 100%, 40%);">+                     Return (0x0F)</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           Name (_CRS, ResourceTemplate ()</span><br><span style="color: hsl(120, 100%, 40%);">+               {</span><br><span style="color: hsl(120, 100%, 40%);">+                     FixedIO (0x03F8, 0x08)</span><br><span style="color: hsl(120, 100%, 40%);">+                        FixedIO (0x6E, 0x02)</span><br><span style="color: hsl(120, 100%, 40%);">+                  IRQNoFlags () {4}</span><br><span style="color: hsl(120, 100%, 40%);">+             })</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+          Name (_PRS, ResourceTemplate ()</span><br><span style="color: hsl(120, 100%, 40%);">+               {</span><br><span style="color: hsl(120, 100%, 40%);">+                     StartDependentFn (0, 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                             FixedIO (0x03F8, 0x08)</span><br><span style="color: hsl(120, 100%, 40%);">+                                FixedIO (0x6E, 0x02)</span><br><span style="color: hsl(120, 100%, 40%);">+                          IRQNoFlags () {4}</span><br><span style="color: hsl(120, 100%, 40%);">+                     }</span><br><span style="color: hsl(120, 100%, 40%);">+                     EndDependentFn ()</span><br><span style="color: hsl(120, 100%, 40%);">+             })</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/acpi_tables.c b/src/mainboard/facebook/fbg1701/acpi_tables.c</span><br><span>new file mode 100644</span><br><span>index 0000000..15c955a</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/acpi_tables.c</span><br><span>@@ -0,0 +1,54 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2012 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <arch/acpi.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <arch/ioapic.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/acpi.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void acpi_create_gnvs(global_nvs_t *gnvs)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+     acpi_init_gnvs(gnvs);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Enable USB ports in S3 */</span><br><span style="color: hsl(120, 100%, 40%);">+  gnvs->s3u0 = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+    gnvs->s3u1 = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Disable USB ports in S5 */</span><br><span style="color: hsl(120, 100%, 40%);">+ gnvs->s5u0 = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+    gnvs->s5u1 = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Disable DPTF */</span><br><span style="color: hsl(120, 100%, 40%);">+    gnvs->dpte = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* PMIC is configured in I2C1, hide it for the OS */</span><br><span style="color: hsl(120, 100%, 40%);">+  gnvs->dev.lpss_en[LPSS_NVS_I2C2] = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+unsigned long acpi_fill_madt(unsigned long current)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Local APICs */</span><br><span style="color: hsl(120, 100%, 40%);">+     current = acpi_create_madt_lapics(current);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* IOAPIC */</span><br><span style="color: hsl(120, 100%, 40%);">+  current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,</span><br><span style="color: hsl(120, 100%, 40%);">+                            2, IO_APIC_ADDR, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        current = acpi_madt_irq_overrides(current);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return current;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/board_info.txt b/src/mainboard/facebook/fbg1701/board_info.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..cebe653</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/board_info.txt</span><br><span>@@ -0,0 +1,6 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Vendor name: Facebook</span><br><span style="color: hsl(120, 100%, 40%);">+Board name: FBG-1701</span><br><span style="color: hsl(120, 100%, 40%);">+Category: misc</span><br><span style="color: hsl(120, 100%, 40%);">+ROM protocol: SPI</span><br><span style="color: hsl(120, 100%, 40%);">+ROM socketed: n</span><br><span style="color: hsl(120, 100%, 40%);">+Flashrom support: y</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/board_mboot.c b/src/mainboard/facebook/fbg1701/board_mboot.c</span><br><span>new file mode 100644</span><br><span>index 0000000..ac2c4d7</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/board_mboot.c</span><br><span>@@ -0,0 +1,33 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <mboot.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const mboot_measure_item_t mb_log_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+//  { "bootblock", CBFS_TYPE_BOOTBLOCK, MBOOT_PCR_INDEX_0,</span><br><span style="color: hsl(120, 100%, 40%);">+//            EV_NO_ACTION, NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+ { "config", CBFS_TYPE_RAW, MBOOT_PCR_INDEX_0, EV_NO_ACTION, NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+ { "revision", CBFS_TYPE_RAW, MBOOT_PCR_INDEX_0, EV_NO_ACTION, NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+       { "cmos_layout.bin", CBFS_COMPONENT_CMOS_LAYOUT, MBOOT_PCR_INDEX_0,</span><br><span style="color: hsl(120, 100%, 40%);">+         EV_NO_ACTION, NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+ { "oemmanifest.bin", CBFS_TYPE_RAW, MBOOT_PCR_INDEX_7, EV_NO_ACTION,</span><br><span style="color: hsl(120, 100%, 40%);">+                NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_VERIFIED_BOOT_SIGNED_MANIFEST)</span><br><span style="color: hsl(120, 100%, 40%);">+ { "vboot_public_key.bin", CBFS_TYPE_RAW, MBOOT_PCR_INDEX_6,</span><br><span style="color: hsl(120, 100%, 40%);">+         EV_NO_ACTION, NULL },</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const uint32_t mb_log_list_count = ARRAY_SIZE(mb_log_list);</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/board_verified_boot.c b/src/mainboard/facebook/fbg1701/board_verified_boot.c</span><br><span>new file mode 100644</span><br><span>index 0000000..fb0e2ee</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/board_verified_boot.c</span><br><span>@@ -0,0 +1,109 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include "board_verified_boot.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __BOOTBLOCK__</span><br><span style="color: hsl(120, 100%, 40%);">+/* The items verified by the bootblock, the bootblock will not measure the</span><br><span style="color: hsl(120, 100%, 40%);">+ * items to the TPM</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+const verify_item_t bootblock_verify_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+       { VERIFY_FILE, ROMSTAGE, { { NULL, CBFS_TYPE_STAGE } },</span><br><span style="color: hsl(120, 100%, 40%);">+               HASH_IDX_ROM_STAGE, MBOOT_PCR_INDEX_0 },</span><br><span style="color: hsl(120, 100%, 40%);">+      { VERIFY_BLOCK, "BootBlock", { { (void *)CONFIG_BOOTBLOCK_LOC,</span><br><span style="color: hsl(120, 100%, 40%);">+              CONFIG_BOOTBLOCK_SIZE } }, HASH_IDX_BOOTBLOCK,</span><br><span style="color: hsl(120, 100%, 40%);">+                MBOOT_PCR_INDEX_0 },</span><br><span style="color: hsl(120, 100%, 40%);">+  { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __ROMSTAGE__</span><br><span style="color: hsl(120, 100%, 40%);">+/* ROMSTAGE */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* The items used by the romstage */</span><br><span style="color: hsl(120, 100%, 40%);">+const verify_item_t romstage_verify_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+          {VERIFY_FILE, ROMSTAGE, {{NULL, CBFS_TYPE_STAGE } },</span><br><span style="color: hsl(120, 100%, 40%);">+                 HASH_IDX_ROM_STAGE, MBOOT_PCR_INDEX_0 },</span><br><span style="color: hsl(120, 100%, 40%);">+              { VERIFY_FILE, MICROCODE, { { NULL, CBFS_TYPE_MICROCODE } },</span><br><span style="color: hsl(120, 100%, 40%);">+                  HASH_IDX_MICROCODE, MBOOT_PCR_INDEX_1 },</span><br><span style="color: hsl(120, 100%, 40%);">+              { VERIFY_FILE, FSP, { { NULL, CBFS_TYPE_FSP}}, HASH_IDX_FSP,</span><br><span style="color: hsl(120, 100%, 40%);">+                  MBOOT_PCR_INDEX_1 },</span><br><span style="color: hsl(120, 100%, 40%);">+          { VERIFY_FILE, "spd0.bin", { { NULL, CBFS_TYPE_SPD } },</span><br><span style="color: hsl(120, 100%, 40%);">+                     HASH_IDX_SPD0, MBOOT_PCR_INDEX_1 },</span><br><span style="color: hsl(120, 100%, 40%);">+           { VERIFY_BLOCK, "BootBlock", { { (void *) CONFIG_BOOTBLOCK_LOC,</span><br><span style="color: hsl(120, 100%, 40%);">+                     CONFIG_BOOTBLOCK_SIZE } }, HASH_IDX_BOOTBLOCK,</span><br><span style="color: hsl(120, 100%, 40%);">+                        MBOOT_PCR_INDEX_0 },</span><br><span style="color: hsl(120, 100%, 40%);">+          { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* The FSP and VGA ROM are also used by the ramstage so check it here as well */</span><br><span style="color: hsl(120, 100%, 40%);">+static const verify_item_t ram_stage_additional_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                { VERIFY_FILE, FSP, { { NULL, CBFS_TYPE_FSP } }, HASH_IDX_FSP,</span><br><span style="color: hsl(120, 100%, 40%);">+                        -1 },</span><br><span style="color: hsl(120, 100%, 40%);">+         { VERIFY_FILE, OP_ROM_VBT, { { NULL, CBFS_TYPE_RAW } },</span><br><span style="color: hsl(120, 100%, 40%);">+                       HASH_IDX_OPROM, MBOOT_PCR_INDEX_2 },</span><br><span style="color: hsl(120, 100%, 40%);">+          { VERIFY_FILE, "logo.bmp", { { NULL, CBFS_TYPE_RAW } },</span><br><span style="color: hsl(120, 100%, 40%);">+                     HASH_IDX_LOGO, MBOOT_PCR_INDEX_2 },</span><br><span style="color: hsl(120, 100%, 40%);">+           { VERIFY_FILE, "fallback/dsdt.aml", { { NULL, CBFS_TYPE_RAW } },</span><br><span style="color: hsl(120, 100%, 40%);">+                    HASH_IDX_DSDT, MBOOT_PCR_INDEX_2 },</span><br><span style="color: hsl(120, 100%, 40%);">+           { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 }</span><br><span style="color: hsl(120, 100%, 40%);">+    };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* The items  used by the ramstage */</span><br><span style="color: hsl(120, 100%, 40%);">+const verify_item_t ramstage_verify_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+           { VERIFY_FILE, RAMSTAGE, { { ram_stage_additional_list,</span><br><span style="color: hsl(120, 100%, 40%);">+                       CBFS_TYPE_STAGE } }, HASH_IDX_RAM_STAGE,</span><br><span style="color: hsl(120, 100%, 40%);">+                      MBOOT_PCR_INDEX_0 },</span><br><span style="color: hsl(120, 100%, 40%);">+          { VERIFY_TERMINATOR, NULL, { { NULL, 0 } }, 0, 0 }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void car_mainboard_post_console_init(void) {</span><br><span style="color: hsl(120, 100%, 40%);">+        int wake_from_s3 = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME))</span><br><span style="color: hsl(120, 100%, 40%);">+              if (chipset_prev_sleep_state(fill_power_state()) == ACPI_S3)</span><br><span style="color: hsl(120, 100%, 40%);">+                  wake_from_s3 = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (IS_ENABLED(CONFIG_VERIFIED_BOOT) &&</span><br><span style="color: hsl(120, 100%, 40%);">+               IS_ENABLED(CONFIG_VERIFIED_BOOT_SIGNED_MANIFEST)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   printk(BIOS_SPEW, "%s: check the manifest\n", __func__);</span><br><span style="color: hsl(120, 100%, 40%);">+                    if (verified_boot_check_manifest() != 0)</span><br><span style="color: hsl(120, 100%, 40%);">+                              die("invalid manifest");</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (IS_ENABLED(CONFIG_MBOOT)) {</span><br><span style="color: hsl(120, 100%, 40%);">+               printk(BIOS_DEBUG, "mb_measure returned 0x%x\n",</span><br><span style="color: hsl(120, 100%, 40%);">+            mb_measure(wake_from_s3));</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (IS_ENABLED(CONFIG_VERIFIED_BOOT))</span><br><span style="color: hsl(120, 100%, 40%);">+         verified_boot_early_check();</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif //__ROMSTAGE__</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __RAMSTAGE__</span><br><span style="color: hsl(120, 100%, 40%);">+/* RAMSTAGE */</span><br><span style="color: hsl(120, 100%, 40%);">+const verify_item_t payload_verify_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+          {VERIFY_FILE, PAYLOAD, {{NULL, CBFS_TYPE_SELF |</span><br><span style="color: hsl(120, 100%, 40%);">+                       VERIFIED_BOOT_COPY_BLOCK}}, HASH_IDX_PAYLOAD,</span><br><span style="color: hsl(120, 100%, 40%);">+                 MBOOT_PCR_INDEX_3},</span><br><span style="color: hsl(120, 100%, 40%);">+           {VERIFY_TERMINATOR, NULL, {{NULL, 0}}, 0, 0}</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const verify_item_t oprom_verify_list[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+               {VERIFY_TERMINATOR, NULL, {{NULL, 0}}, 0, 0}</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif //__PRE_RAM__</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/board_verified_boot.h b/src/mainboard/facebook/fbg1701/board_verified_boot.h</span><br><span>new file mode 100644</span><br><span>index 0000000..30fcd8b</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/board_verified_boot.h</span><br><span>@@ -0,0 +1,23 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef BOARD_VERIFIED_BOOT_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define BOARD_VERIFIED_BOOT_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/romstage.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <vboot_check.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/bootblock.c b/src/mainboard/facebook/fbg1701/bootblock.c</span><br><span>new file mode 100644</span><br><span>index 0000000..5264e90</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/bootblock.c</span><br><span>@@ -0,0 +1,36 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <bootblock_common.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "board_verified_boot.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/pci_devs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SERIAL_DEV PNP_DEV(ITE8528_CMD_PORT, 1) /* ITE8528 UART1 */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void bootblock_mainboard_init(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      if (IS_ENABLED(CONFIG_VERIFIED_BOOT))</span><br><span style="color: hsl(120, 100%, 40%);">+         verified_boot_bootblock_check();</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void bootblock_mainboard_early_init(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Enable the serial port inside the EC */</span><br><span style="color: hsl(120, 100%, 40%);">+    pnp_set_logical_device(SERIAL_DEV);</span><br><span style="color: hsl(120, 100%, 40%);">+   pnp_set_enable(SERIAL_DEV, 1);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/cmos.layout b/src/mainboard/facebook/fbg1701/cmos.layout</span><br><span>new file mode 100644</span><br><span>index 0000000..e4204a7</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/cmos.layout</span><br><span>@@ -0,0 +1,124 @@</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2007-2008 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+## Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+## it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+## the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+## This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+## but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+## GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+##</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+entries</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#start-bit length  config config-ID    name</span><br><span style="color: hsl(120, 100%, 40%);">+#0            8       r       0        seconds</span><br><span style="color: hsl(120, 100%, 40%);">+#8            8       r       0        alarm_seconds</span><br><span style="color: hsl(120, 100%, 40%);">+#16           8       r       0        minutes</span><br><span style="color: hsl(120, 100%, 40%);">+#24           8       r       0        alarm_minutes</span><br><span style="color: hsl(120, 100%, 40%);">+#32           8       r       0        hours</span><br><span style="color: hsl(120, 100%, 40%);">+#40           8       r       0        alarm_hours</span><br><span style="color: hsl(120, 100%, 40%);">+#48           8       r       0        day_of_week</span><br><span style="color: hsl(120, 100%, 40%);">+#56           8       r       0        day_of_month</span><br><span style="color: hsl(120, 100%, 40%);">+#64           8       r       0        month</span><br><span style="color: hsl(120, 100%, 40%);">+#72           8       r       0        year</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# Status Register A</span><br><span style="color: hsl(120, 100%, 40%);">+#80           4       r       0        rate_select</span><br><span style="color: hsl(120, 100%, 40%);">+#84           3       r       0        REF_Clock</span><br><span style="color: hsl(120, 100%, 40%);">+#87           1       r       0        UIP</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# Status Register B</span><br><span style="color: hsl(120, 100%, 40%);">+#88           1       r       0        auto_switch_DST</span><br><span style="color: hsl(120, 100%, 40%);">+#89           1       r       0        24_hour_mode</span><br><span style="color: hsl(120, 100%, 40%);">+#90           1       r       0        binary_values_enable</span><br><span style="color: hsl(120, 100%, 40%);">+#91           1       r       0        square-wave_out_enable</span><br><span style="color: hsl(120, 100%, 40%);">+#92           1       r       0        update_finished_enable</span><br><span style="color: hsl(120, 100%, 40%);">+#93           1       r       0        alarm_interrupt_enable</span><br><span style="color: hsl(120, 100%, 40%);">+#94           1       r       0        periodic_interrupt_enable</span><br><span style="color: hsl(120, 100%, 40%);">+#95           1       r       0        disable_clock_updates</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# Status Register C</span><br><span style="color: hsl(120, 100%, 40%);">+#96           4       r       0        status_c_rsvd</span><br><span style="color: hsl(120, 100%, 40%);">+#100          1       r       0        uf_flag</span><br><span style="color: hsl(120, 100%, 40%);">+#101          1       r       0        af_flag</span><br><span style="color: hsl(120, 100%, 40%);">+#102          1       r       0        pf_flag</span><br><span style="color: hsl(120, 100%, 40%);">+#103          1       r       0        irqf_flag</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# Status Register D</span><br><span style="color: hsl(120, 100%, 40%);">+#104          7       r       0        status_d_rsvd</span><br><span style="color: hsl(120, 100%, 40%);">+#111          1       r       0        valid_cmos_ram</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# Diagnostic Status Register</span><br><span style="color: hsl(120, 100%, 40%);">+#112          8       r       0        diag_rsvd1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+0          120       r       0        reserved_memory</span><br><span style="color: hsl(120, 100%, 40%);">+#120        264       r       0        unused</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# RTC_BOOT_BYTE (coreboot hardcoded)</span><br><span style="color: hsl(120, 100%, 40%);">+384          1       e       4        boot_option</span><br><span style="color: hsl(120, 100%, 40%);">+388          4       h       0        reboot_counter</span><br><span style="color: hsl(120, 100%, 40%);">+#390          2       r       0        unused?</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot config options: console</span><br><span style="color: hsl(120, 100%, 40%);">+#392          3       r       0        unused</span><br><span style="color: hsl(120, 100%, 40%);">+395          4       e       6        debug_level</span><br><span style="color: hsl(120, 100%, 40%);">+#399          1       r       0        unused</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot config options: cpu</span><br><span style="color: hsl(120, 100%, 40%);">+#400          1       e       2        unused</span><br><span style="color: hsl(120, 100%, 40%);">+#401          7       r       0        unused</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot config options: southbridge</span><br><span style="color: hsl(120, 100%, 40%);">+408          1       e       1        nmi</span><br><span style="color: hsl(120, 100%, 40%);">+409          2       e       7        power_on_after_fail</span><br><span style="color: hsl(120, 100%, 40%);">+#411          5       r       0        unused</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot config options: bootloader</span><br><span style="color: hsl(120, 100%, 40%);">+#416        480       r        0       unused</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# SandyBridge MRC Scrambler Seed values</span><br><span style="color: hsl(120, 100%, 40%);">+896         32        r       0        mrc_scrambler_seed</span><br><span style="color: hsl(120, 100%, 40%);">+928         32        r       0        mrc_scrambler_seed_s3</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# coreboot config options: check sums</span><br><span style="color: hsl(120, 100%, 40%);">+984         16       h       0        check_sum</span><br><span style="color: hsl(120, 100%, 40%);">+#1000        24       r       0        amd_reserved</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+enumerations</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ID value   text</span><br><span style="color: hsl(120, 100%, 40%);">+1     0     Disable</span><br><span style="color: hsl(120, 100%, 40%);">+1     1     Enable</span><br><span style="color: hsl(120, 100%, 40%);">+2     0     Enable</span><br><span style="color: hsl(120, 100%, 40%);">+2     1     Disable</span><br><span style="color: hsl(120, 100%, 40%);">+4     0     Fallback</span><br><span style="color: hsl(120, 100%, 40%);">+4     1     Normal</span><br><span style="color: hsl(120, 100%, 40%);">+6     0     Emergency</span><br><span style="color: hsl(120, 100%, 40%);">+6     1     Alert</span><br><span style="color: hsl(120, 100%, 40%);">+6     2     Critical</span><br><span style="color: hsl(120, 100%, 40%);">+6     3     Error</span><br><span style="color: hsl(120, 100%, 40%);">+6     4     Warning</span><br><span style="color: hsl(120, 100%, 40%);">+6     5     Notice</span><br><span style="color: hsl(120, 100%, 40%);">+6     6     Info</span><br><span style="color: hsl(120, 100%, 40%);">+6     7     Debug</span><br><span style="color: hsl(120, 100%, 40%);">+6     8     Spew</span><br><span style="color: hsl(120, 100%, 40%);">+7     0     Disable</span><br><span style="color: hsl(120, 100%, 40%);">+7     1     Enable</span><br><span style="color: hsl(120, 100%, 40%);">+7     2     Keep</span><br><span style="color: hsl(120, 100%, 40%);">+# -----------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+checksums</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+checksum 392 415 984</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/com_init.c b/src/mainboard/facebook/fbg1701/com_init.c</span><br><span>new file mode 100644</span><br><span>index 0000000..063695b</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/com_init.c</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/romstage.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SERIAL_DEV PNP_DEV(ITE8528_CMD_PORT, 1) /* ITE8528 UART1 */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#if !IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)</span><br><span style="color: hsl(120, 100%, 40%);">+void car_mainboard_pre_console_init(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Enable the serial port inside the EC */</span><br><span style="color: hsl(120, 100%, 40%);">+    pnp_set_logical_device(SERIAL_DEV);</span><br><span style="color: hsl(120, 100%, 40%);">+   pnp_set_enable(SERIAL_DEV, 1);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/devicetree.cb b/src/mainboard/facebook/fbg1701/devicetree.cb</span><br><span>new file mode 100644</span><br><span>index 0000000..053d405</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/devicetree.cb</span><br><span>@@ -0,0 +1,127 @@</span><br><span style="color: hsl(120, 100%, 40%);">+chip soc/intel/braswell</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      ############################################################</span><br><span style="color: hsl(120, 100%, 40%);">+  # Set the parameters for MemoryInit</span><br><span style="color: hsl(120, 100%, 40%);">+   ############################################################</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        register "PcdMrcInitTsegSize" = "8" # SMM Region size in MiB</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdMrcInitMmioSize" = "0x0800"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "PcdMrcInitSpdAddr1" = "0xa0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdMrcInitSpdAddr2" = "0xa2"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdIgdDvmt50PreAlloc" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+     register "PcdApertureSize" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "PcdGttSize" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+       register "PcdDvfsEnable" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdCaMirrorEn" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  ############################################################</span><br><span style="color: hsl(120, 100%, 40%);">+  # Set the parameters for SiliconInit</span><br><span style="color: hsl(120, 100%, 40%);">+  ############################################################</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        register "PcdSdcardMode" = "PCH_PCI_MODE"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "PcdEnableHsuart0" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "PcdEnableHsuart1" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "PcdEnableAzalia" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "PcdEnableXhci" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableLpe" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+     register "PcdEnableDma0" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableDma1" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C0" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C1" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C2" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C3" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C4" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C5" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableI2C6" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PunitPwrConfigDisable" = "0"      # Enable SVID</span><br><span style="color: hsl(120, 100%, 40%);">+ register "ChvSvidConfig" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEmmcMode" = "PCH_PCI_MODE"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "PcdUsb3ClkSsc" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdDispClkSsc" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdSataClkSsc" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdEnableSata" = "0"              # Disable SATA</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port0PerPortPeTxiSet" = "7"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port0PerPortTxiSet" = "5"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "Usb2Port0IUsbTxEmphasisEn" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port0PerPortTxPeHalf" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port1PerPortPeTxiSet" = "7"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port1PerPortTxiSet" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "Usb2Port1IUsbTxEmphasisEn" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port1PerPortTxPeHalf" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port2PerPortPeTxiSet" = "7"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port2PerPortTxiSet" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "Usb2Port2IUsbTxEmphasisEn" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port2PerPortTxPeHalf" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port3PerPortPeTxiSet" = "7"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port3PerPortTxiSet" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "Usb2Port3IUsbTxEmphasisEn" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port3PerPortTxPeHalf" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port4PerPortPeTxiSet" = "7"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb2Port4PerPortTxiSet" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "Usb2Port4IUsbTxEmphasisEn" = "2"</span><br><span style="color: hsl(120, 100%, 40%);">+        register "Usb2Port4PerPortTxPeHalf" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "Usb3Lane0Ow2tapgen2deemph3p5" = "0x3a"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "Usb3Lane1Ow2tapgen2deemph3p5" = "0x64"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "Usb3Lane2Ow2tapgen2deemph3p5" = "0x64"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "Usb3Lane3Ow2tapgen2deemph3p5" = "0x3a"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "PcdSataInterfaceSpeed" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+    register "PcdPchSsicEnable" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+ register "PcdRtcLock" = "0" # Disable RTC access locking to NVRAM</span><br><span style="color: hsl(120, 100%, 40%);">+ register "PMIC_I2CBus" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+      register "ISPEnable" = "0"          # Disable IUNIT</span><br><span style="color: hsl(120, 100%, 40%);">+       register "ISPPciDevConfig" = "3"</span><br><span style="color: hsl(120, 100%, 40%);">+  register "PcdSdDetectChk" = "0" # Disable SD card detect</span><br><span style="color: hsl(120, 100%, 40%);">+  register "DptfDisable" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    # LPE audio codec settings</span><br><span style="color: hsl(120, 100%, 40%);">+    register "lpe_codec_clk_src" = "LPE_CLK_SRC_XTAL" # 19.2MHz clock</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       # Enable devices in PCI mode</span><br><span style="color: hsl(120, 100%, 40%);">+  register "lpss_acpi_mode" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "emmc_acpi_mode" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+   register "sd_acpi_mode" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+     register "lpe_acpi_mode" = "0"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  # Disable SLP_X stretching after SUS power well fail.</span><br><span style="color: hsl(120, 100%, 40%);">+ register "disable_slp_x_stretch_sus_fail" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # Allow PCIe devices to wake system from suspend</span><br><span style="color: hsl(120, 100%, 40%);">+      register "pcie_wake_enable" = "1"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       device cpu_cluster 0 on</span><br><span style="color: hsl(120, 100%, 40%);">+               device lapic 0 on end</span><br><span style="color: hsl(120, 100%, 40%);">+ end</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ device domain 0 on</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 00.0 on end # 8086 2280 - SoC router</span><br><span style="color: hsl(120, 100%, 40%);">+               device pci 02.0 on end # 8086 22B1 - GFX</span><br><span style="color: hsl(120, 100%, 40%);">+              device pci 0b.0 on end # 8086 22DC - PUNIT/DPTF</span><br><span style="color: hsl(120, 100%, 40%);">+               device pci 10.0 on end  # 8086 2294 - MMC Port</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 12.0 on end  # 8086 0F16 - SD Port</span><br><span style="color: hsl(120, 100%, 40%);">+         device pci 14.0 on end  # 8086 22b5 - USB XHCI - Only 1 USB controller at a time</span><br><span style="color: hsl(120, 100%, 40%);">+              device pci 18.0 off end # 8086 22c0 - SIO - DMA</span><br><span style="color: hsl(120, 100%, 40%);">+               device pci 18.1 off end # 8086 22c1 -   I2C Port 1</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.2 off end # 8086 22c2 -   I2C Port 2</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.3 off end # 8086 22c3 -   I2C Port 3</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.4 off end # 8086 22c4 -   I2C Port 4</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.5 off end # 8086 22c5 -   I2C Port 5</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.6 off end # 8086 22c6 -   I2C Port 6</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 18.7 off end # 8086 22c7 -   I2C Port 7</span><br><span style="color: hsl(120, 100%, 40%);">+            device pci 1a.0 on end  # 8086 2298 - Trusted Execution Engine</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1b.0 on end  # 8086 2284 - HD Audio</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1c.0 on end  # 8086 0000 - PCIe Root Port 1</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1c.1 off end # 8086 0000 - PCIe Root Port 2</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1c.2 off end # 8086 0000 - PCIe Root Port 3</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1c.3 on end  # 8086 0000 - PCIe Root Port 4</span><br><span style="color: hsl(120, 100%, 40%);">+                device pci 1e.0 off end # 8086 2286 - SIO - DMA</span><br><span style="color: hsl(120, 100%, 40%);">+               device pci 1e.3 off end # 8086 228a -   HSUART 1</span><br><span style="color: hsl(120, 100%, 40%);">+              device pci 1e.4 off end # 8086 228c -   HSUART 2</span><br><span style="color: hsl(120, 100%, 40%);">+              device pci 1f.0 on      # 8086 229c - LPC bridge</span><br><span style="color: hsl(120, 100%, 40%);">+                      chip drivers/pc80/tpm</span><br><span style="color: hsl(120, 100%, 40%);">+                         device pnp 0c31.0 on end</span><br><span style="color: hsl(120, 100%, 40%);">+                      end</span><br><span style="color: hsl(120, 100%, 40%);">+           end # LPC Bridge</span><br><span style="color: hsl(120, 100%, 40%);">+              device pci 1f.3 on end  # 8086 2292 - SMBus 0</span><br><span style="color: hsl(120, 100%, 40%);">+ end</span><br><span style="color: hsl(120, 100%, 40%);">+end</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/dsdt.asl b/src/mainboard/facebook/fbg1701/dsdt.asl</span><br><span>new file mode 100644</span><br><span>index 0000000..88a7128</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/dsdt.asl</span><br><span>@@ -0,0 +1,47 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2007-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015-2018 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <arch/acpi.h></span><br><span style="color: hsl(120, 100%, 40%);">+DefinitionBlock(</span><br><span style="color: hsl(120, 100%, 40%);">+  "dsdt.aml",</span><br><span style="color: hsl(120, 100%, 40%);">+ "DSDT",</span><br><span style="color: hsl(120, 100%, 40%);">+     0x02,           /* DSDT revision: ACPI v2.0 and up */</span><br><span style="color: hsl(120, 100%, 40%);">+ OEM_ID,</span><br><span style="color: hsl(120, 100%, 40%);">+       ACPI_TABLE_CREATOR,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x20110725      /* OEM revision */</span><br><span style="color: hsl(120, 100%, 40%);">+)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Some generic macros */</span><br><span style="color: hsl(120, 100%, 40%);">+     #include <acpi/platform.asl></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* global NVS and variables */</span><br><span style="color: hsl(120, 100%, 40%);">+        #include <acpi/globalnvs.asl></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ #include <cpu/intel/common/acpi/cpu.asl></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      Scope (\_SB) {</span><br><span style="color: hsl(120, 100%, 40%);">+                Device (PCI0)</span><br><span style="color: hsl(120, 100%, 40%);">+         {</span><br><span style="color: hsl(120, 100%, 40%);">+                     #include <acpi/southcluster.asl></span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Chipset specific sleep states */</span><br><span style="color: hsl(120, 100%, 40%);">+   #include "acpi/sleepstates.asl"</span><br><span style="color: hsl(120, 100%, 40%);">+     #include "acpi/mainboard.asl"</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/fadt.c b/src/mainboard/facebook/fbg1701/fadt.c</span><br><span>new file mode 100644</span><br><span>index 0000000..0479c97</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/fadt.c</span><br><span>@@ -0,0 +1,50 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2007-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/acpi.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <string.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        acpi_header_t *header = &(fadt->header);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     memset((void *) fadt, 0, sizeof(acpi_fadt_t));</span><br><span style="color: hsl(120, 100%, 40%);">+        memcpy(header->signature, "FACP", 4);</span><br><span style="color: hsl(120, 100%, 40%);">+    header->length = sizeof(acpi_fadt_t);</span><br><span style="color: hsl(120, 100%, 40%);">+      header->revision = 3;</span><br><span style="color: hsl(120, 100%, 40%);">+      memcpy(header->oem_id, OEM_ID, 6);</span><br><span style="color: hsl(120, 100%, 40%);">+ memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);</span><br><span style="color: hsl(120, 100%, 40%);">+       memcpy(header->asl_compiler_id, ASLC, 4);</span><br><span style="color: hsl(120, 100%, 40%);">+  header->asl_compiler_revision = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       fadt->firmware_ctrl = (unsigned long) facs;</span><br><span style="color: hsl(120, 100%, 40%);">+        fadt->dsdt = (unsigned long) dsdt;</span><br><span style="color: hsl(120, 100%, 40%);">+ fadt->model = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+   fadt->preferred_pm_profile = PM_MOBILE;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  fadt->x_firmware_ctl_l = (unsigned long)facs;</span><br><span style="color: hsl(120, 100%, 40%);">+      fadt->x_firmware_ctl_h = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+        fadt->x_dsdt_l = (unsigned long)dsdt;</span><br><span style="color: hsl(120, 100%, 40%);">+      fadt->x_dsdt_h = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      acpi_fill_in_fadt(fadt);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    fadt->iapc_boot_arch &= ~ACPI_FADT_8042;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     header->checksum =</span><br><span style="color: hsl(120, 100%, 40%);">+     acpi_checksum((void *) fadt, header->length);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/fmap.fmd b/src/mainboard/facebook/fbg1701/fmap.fmd</span><br><span>new file mode 100644</span><br><span>index 0000000..dca6838</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/fmap.fmd</span><br><span>@@ -0,0 +1,21 @@</span><br><span style="color: hsl(120, 100%, 40%);">+# layout for firmware residing at top of 4GB address space</span><br><span style="color: hsl(120, 100%, 40%);">+# +-------------+ <-- 4GB - ROM_SIZE / start of flash</span><br><span style="color: hsl(120, 100%, 40%);">+# | unspecified |</span><br><span style="color: hsl(120, 100%, 40%);">+# +-------------+ <-- 4GB - BIOS_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+# | FMAP        |</span><br><span style="color: hsl(120, 100%, 40%);">+# +-------------+ <-- 4GB - BIOS_SIZE + FMAP_SIZE</span><br><span style="color: hsl(120, 100%, 40%);">+# | CBFS        |</span><br><span style="color: hsl(120, 100%, 40%);">+# +-------------+ <-- 4GB / end of flash</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+FLASH@0xFF800000 0x800000 {</span><br><span style="color: hsl(120, 100%, 40%);">+        SI_ALL@0x0 0x200000 {</span><br><span style="color: hsl(120, 100%, 40%);">+         SI_DESC@0x0 0x1000</span><br><span style="color: hsl(120, 100%, 40%);">+            SI_ME@0x1000 0x1ff000</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+     BIOS@0x200000 0x600000 {</span><br><span style="color: hsl(120, 100%, 40%);">+              FMAP@0 0x200</span><br><span style="color: hsl(120, 100%, 40%);">+          RW_MRC_CACHE@0x200 0x8000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           COREBOOT(CBFS)@0x8200 0x5F7E00</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/gpio.c b/src/mainboard/facebook/fbg1701/gpio.c</span><br><span>new file mode 100644</span><br><span>index 0000000..6f9549a</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/gpio.c</span><br><span>@@ -0,0 +1,260 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include "irqroute.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/gpio.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdlib.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* South East Community */</span><br><span style="color: hsl(120, 100%, 40%);">+static const struct soc_gpio_map gpse_gpio_map[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1,/* 00 MF_PLT_CLK0 */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 01 PWM1 */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_INPUT_NO_PULL, /* 02 MF_PLT_CLK1, RAMID2 */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 03 MF_PLT_CLK4 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 04 MF_PLT_CLK3 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* PWM0 05 */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 06 MF_PLT_CLK5 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 07 MF_PLT_CLK2 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 15 SDMMC2_D3_CD_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      Native_M1, /* 16 SDMMC1_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        NATIVE_PU20K(1), /* 17 SDMMC1_D0 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 18 SDMMC2_D1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 19 SDMMC2_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1),/* 20 SDMMC1_D2 */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 21 SDMMC2_D2 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 22 SDMMC2_CMD  */</span><br><span style="color: hsl(120, 100%, 40%);">+ NATIVE_PU20K(1), /* 23 SDMMC1_CMD */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 24 SDMMC1_D1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 25 SDMMC2_D0 */</span><br><span style="color: hsl(120, 100%, 40%);">+   NATIVE_PU20K(1), /* 26 SDMMC1_D3_CD_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      NATIVE_PU20K(1), /* 30 SDMMC3_D1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   Native_M1, /* 31 SDMMC3_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        NATIVE_PU20K(1), /* 32 SDMMC3_D3 */</span><br><span style="color: hsl(120, 100%, 40%);">+   NATIVE_PU20K(1), /* 33 SDMMC3_D2 */</span><br><span style="color: hsl(120, 100%, 40%);">+   NATIVE_PU20K(1), /* 34 SDMMC3_CMD */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 35 SDMMC3_D0 */</span><br><span style="color: hsl(120, 100%, 40%);">+   NATIVE_PU20K(1), /* 45 MF_LPC_AD2 */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 46 LPC_CLKRUNB */</span><br><span style="color: hsl(120, 100%, 40%);">+ NATIVE_PU20K(1), /* 47 MF_LPC_AD0 */</span><br><span style="color: hsl(120, 100%, 40%);">+  Native_M1, /* 48 LPC_FRAMEB */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 49 MF_LPC_CLKOUT1 */</span><br><span style="color: hsl(120, 100%, 40%);">+    NATIVE_PU20K(1), /* 50 MF_LPC_AD3 */</span><br><span style="color: hsl(120, 100%, 40%);">+  Native_M1, /* 51 MF_LPC_CLKOUT0 */</span><br><span style="color: hsl(120, 100%, 40%);">+    NATIVE_PU20K(1), /* 52 MF_LPC_AD1 */</span><br><span style="color: hsl(120, 100%, 40%);">+  Native_M1,/* SPI1_MISO */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M1, /* 61 SPI1_CS0_B */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* SPI1_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+     NATIVE_PU20K(1), /* 63 MMC1_D6 */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M1, /* 62 SPI1_MOSI */</span><br><span style="color: hsl(120, 100%, 40%);">+ NATIVE_PU20K(1), /* 65 MMC1_D5 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 66 SPI1_CS1_B */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 67 MMC1_D4_SD_WE */</span><br><span style="color: hsl(120, 100%, 40%);">+       NATIVE_PU20K(1), /* 68 MMC1_D7 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 69 MMC1_RCLK */</span><br><span style="color: hsl(120, 100%, 40%);">+   Native_M1, /* 75 GPO USB_OC1_B */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M1, /* 76 PMU_RESETBUTTON_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 77 GPIO_ALERT */</span><br><span style="color: hsl(120, 100%, 40%);">+  Native_M1, /* 78 SDMMC3_PWR_EN_B */</span><br><span style="color: hsl(120, 100%, 40%);">+   Native_M1, /* 79 GPI ILB_SERIRQ */</span><br><span style="color: hsl(120, 100%, 40%);">+    Native_M1, /* 80 USB_OC0_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ NATIVE_INT_PU20K(1, L1), /* 81 SDMMC3_CD_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ Native_M1, /* 82 SPKR */</span><br><span style="color: hsl(120, 100%, 40%);">+      Native_M1, /* 83 SUSPWRDNACK */</span><br><span style="color: hsl(120, 100%, 40%);">+       SPARE_PIN, /* 84 spare pin */</span><br><span style="color: hsl(120, 100%, 40%);">+ Native_M1, /* 85 SDMMC3_1P8_EN */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_END</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* South West Community */</span><br><span style="color: hsl(120, 100%, 40%);">+static const struct soc_gpio_map  gpsw_gpio_map[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+   NATIVE_PU20K(1), /* 00 FST_SPI_D2 */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 01 FST_SPI_D0 */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 02 FST_SPI_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+ NATIVE_PU20K(1), /* 03 FST_SPI_D3 */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 04 FST_SPI_CS1_B */</span><br><span style="color: hsl(120, 100%, 40%);">+       NATIVE_PU20K(1), /* 05 FST_SPI_D1 */</span><br><span style="color: hsl(120, 100%, 40%);">+  NATIVE_PU20K(1), /* 06 FST_SPI_CS0_B */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 07 FST_SPI_CS2_B NC */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 15 UART1_RTS_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 16 UART1_RXD */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 17 UART2_RXD */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 18 UART1_CTS_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 19 UART2_RTS_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 20 UART1_TXD */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 21 UART2_TXD */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 22 UART2_CTS_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ Native_M2, /* 30 MF_HDA_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M2, /* 31 MF_HDA_RSTB */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 32 MF_HDA_SDI0 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 33 MF_HDA_SDO */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 34 MF_HDA_DOCKRSTB */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M2, /* 35 MF_HDA_SYNC */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 36 MF_HDA_SDI1 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 37 MF_HDA_DOCKENB */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 45 I2C5_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 46 I2C4_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_INPUT_NO_PULL, /* 47 I2C6_SDA SD_WP_1P8*/</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 48 I2C5_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 49 I2C_NFC_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 50 I2C4_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 51 I2C6_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 52 I2C_NFC_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 60 I2C1_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+    NATIVE_PU1K_CSEN_INVTX(1), /* 61 I2C0_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+  GPIO_NC, /* 62 I2C2_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 63 I2C1_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 64 I2C3_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+    NATIVE_PU1K_CSEN_INVTX(1), /* 65 I2C0_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+  GPIO_NC, /* 66 I2C2_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 67 I2C3_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 75 SATA_GP0 */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 76 GPI SATA_GP1 */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 77 SATA_LEDN */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 78 SATA_GP2 */</span><br><span style="color: hsl(120, 100%, 40%);">+    Native_M1, /* 79 MF_SMB_ALERT_N */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_INPUT_NO_PULL, /* 80 SATA_GP3, MMC1_RST */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 81 MF_SMB_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 82 MF_SMB_DATA */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 90 PCIE_CLKREQ0B */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M1, /* 91 PCIE_CLKREQ1B */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 92 GP_SSP_2_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 93 PCIE_CLKREQ2B */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 94 GP_SSP_2_RXD */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 93 PCIE_CLKREQ3B */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 96 GP_SSP_2_FS */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 97 GP_SSP_2_TXD */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_END</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* North Community */</span><br><span style="color: hsl(120, 100%, 40%);">+static const struct soc_gpio_map  gpn_gpio_map[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+ GPI(trig_edge_low, L8, NA, non_maskable, en_edge_rx_data,</span><br><span style="color: hsl(120, 100%, 40%);">+     UNMASK_WAKE, SCI), /* 00 GPIO_DFX0 SMC_EXTSMI_N */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 01 GPIO_DFX3 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 02 GPIO_DFX7 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPI(trig_edge_low, L8, NA, non_maskable, en_edge_rx_data,</span><br><span style="color: hsl(120, 100%, 40%);">+     UNMASK_WAKE, SCI), /* 03 GPIO_DFX1 PM_THRM_N */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPI(trig_edge_low, L8, NA, non_maskable, en_edge_rx_data,</span><br><span style="color: hsl(120, 100%, 40%);">+     UNMASK_WAKE, SCI), /* 04 GPIO_DFX5 LID_N */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 05 GPIO_DFX4 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 06 GPIO_DFX8 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 07 GPIO_DFX2 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPI(trig_edge_low, L8, NA, non_maskable, en_edge_rx_data,</span><br><span style="color: hsl(120, 100%, 40%);">+     UNMASK_WAKE, SCI), /* 08 GPIO_DFX6 WAKE1_N */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPI(trig_edge_low, L8, NA, non_maskable, en_edge_rx_data,</span><br><span style="color: hsl(120, 100%, 40%);">+     UNMASK_WAKE, SCI), /* 15 GPIO_SUS0 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 16 SEC_GPIO_SUS10 */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPI(trig_edge_low, L0, P_1K_H, non_maskable, NA, NA, NA),</span><br><span style="color: hsl(120, 100%, 40%);">+     /* 17 GPIO_SUS3 */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPI(trig_edge_low, L1, P_1K_H, non_maskable, NA, UNMASK_WAKE, NA),</span><br><span style="color: hsl(120, 100%, 40%);">+    /* 18 GPIO_SUS7 */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPI(trig_edge_low, L3, P_1K_H, non_maskable, NA, UNMASK_WAKE, NA),</span><br><span style="color: hsl(120, 100%, 40%);">+    /* 19 GPIO_SUS1 */</span><br><span style="color: hsl(120, 100%, 40%);">+    GPIO_NC, /* 20 GPIO_SUS5 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 21 SEC_GPIO_SUS11 */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 22 GPIO_SUS4 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 23 SEC_GPIO_SUS8 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M6, /* 24 GPIO_SUS2 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_INPUT_PU_5K,/* 25 GPIO_SUS6 */</span><br><span style="color: hsl(120, 100%, 40%);">+   Native_M1, /* 26 CX_PREQ_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 27 SEC_GPIO_SUS9 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 30 TRST_B */</span><br><span style="color: hsl(120, 100%, 40%);">+    Native_M1, /* 31 TCK */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_SKIP, /* 32 PROCHOT_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_SKIP, /* 33 SVID0_DATA */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 34 TMS */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 35 CX_PRDY_B_2 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 36 TDO_2 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 37 CX_PRDY_B */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_SKIP, /* 38 SVID0_ALERT_B */</span><br><span style="color: hsl(120, 100%, 40%);">+     Native_M1, /* 39 TDO */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_SKIP, /* 40 SVID0_CLK */</span><br><span style="color: hsl(120, 100%, 40%);">+ Native_M1, /* 41 TDI */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 45 GP_CAMERASB05 */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 46 GP_CAMERASB02 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 47 GP_CAMERASB08 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 48 GP_CAMERASB00 */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 49 GP_CAMERASBO6 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 50 GP_CAMERASB10 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 51 GP_CAMERASB03 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 52 GP_CAMERASB09 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 53 GP_CAMERASB01 */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 54 GP_CAMERASB07 */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M2, /* 55 GP_CAMERASB11 */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 56 GP_CAMERASB04 */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 60 PANEL0_BKLTEN */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 61 HV_DDI0_HPD */</span><br><span style="color: hsl(120, 100%, 40%);">+       GPIO_NC, /* 62 HV_DDI2_DDC_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 63 PANEL1_BKLTCTL */</span><br><span style="color: hsl(120, 100%, 40%);">+      Native_M1, /* 64 HV_DDI1_HPD */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 65 PANEL0_BKLTCTL */</span><br><span style="color: hsl(120, 100%, 40%);">+    NATIVE_PU20K(1), /* 66 HV_DDI0_DDC_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 67 HV_DDI2_DDC_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+     NATIVE_TX_RX_EN, /* 68 HV_DDI2_HPD */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 69 PANEL1_VDDEN */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 70 PANEL1_BKLTEN */</span><br><span style="color: hsl(120, 100%, 40%);">+       NATIVE_PU20K(1), /* 71 HV_DDI0_DDC_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+     GPIO_NC, /* 72 PANEL0_VDDEN */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_END</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* East Community */</span><br><span style="color: hsl(120, 100%, 40%);">+static const struct soc_gpio_map  gpe_gpio_map[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+  Native_M1, /* 00 PMU_SLP_S3_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 01 PMU_BATLOW_B */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 02 SUS_STAT_B */</span><br><span style="color: hsl(120, 100%, 40%);">+        Native_M1, /* 03 PMU_SLP_S0IX_B */</span><br><span style="color: hsl(120, 100%, 40%);">+    Native_M1, /* 04 PMU_AC_PRESENT */</span><br><span style="color: hsl(120, 100%, 40%);">+    Native_M1, /* 05 PMU_PLTRST_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      Native_M1, /* 06 PMU_SUSCLK */</span><br><span style="color: hsl(120, 100%, 40%);">+        GPIO_NC, /* 07 PMU_SLP_LAN_B */</span><br><span style="color: hsl(120, 100%, 40%);">+       Native_M1, /* 08 PMU_PWRBTN_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      Native_M1, /* 09 PMU_SLP_S4_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      NATIVE_FUNC(M1, P_1K_H, NA), /* 10 PMU_WAKE_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 11 PMU_WAKE_LAN_B */</span><br><span style="color: hsl(120, 100%, 40%);">+      GPIO_NC, /* 15 MF_GPIO_3 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 16 MF_GPIO_7 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 17 MF_I2C1_SCL */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 18 MF_GPIO_1 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 19 MF_GPIO_5 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 20 MF_GPIO_9 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 21 MF_GPIO_0 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_INPUT_PU_20K, /* 22 MF_GPIO_4 */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_NC, /* 23 MF_GPIO_8 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 24 MF_GPIO_2 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 25 MF_GPIO_6 */</span><br><span style="color: hsl(120, 100%, 40%);">+   GPIO_NC, /* 26 MF_I2C1_SDA */</span><br><span style="color: hsl(120, 100%, 40%);">+ GPIO_END</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static struct soc_gpio_config gpio_config = {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* BSW */</span><br><span style="color: hsl(120, 100%, 40%);">+     .north = gpn_gpio_map,</span><br><span style="color: hsl(120, 100%, 40%);">+        .southeast = gpse_gpio_map,</span><br><span style="color: hsl(120, 100%, 40%);">+   .southwest  = gpsw_gpio_map,</span><br><span style="color: hsl(120, 100%, 40%);">+  .east = gpe_gpio_map</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct soc_gpio_config *mainboard_get_gpios(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    return &gpio_config;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/hda_verb.c b/src/mainboard/facebook/fbg1701/hda_verb.c</span><br><span>new file mode 100644</span><br><span>index 0000000..344443f</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/hda_verb.c</span><br><span>@@ -0,0 +1,78 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(120, 100%, 40%);">+ * published by the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <device/azalia_device.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const u32 cim_verb_data[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* coreboot specific header */</span><br><span style="color: hsl(120, 100%, 40%);">+        0x10EC0298,     /* Codec Vendor - Device ID: Realtek ALC298 */</span><br><span style="color: hsl(120, 100%, 40%);">+        0x152D1165,     /* Subsystem ID Quanta */</span><br><span style="color: hsl(120, 100%, 40%);">+     0x0000000C,     /* Number of jacks */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* HDA Codec Subsystem ID Verb Table */</span><br><span style="color: hsl(120, 100%, 40%);">+       AZALIA_SUBVENDOR(0x0, 0x152D1165),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Pin Widget Verb Table */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Widget node 1 (NID 0x01) */</span><br><span style="color: hsl(120, 100%, 40%);">+        0x0017FF00,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0017FF00,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0017FF00,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0017FF00,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Pin Complex (NID 0x12) DMIC */</span><br><span style="color: hsl(120, 100%, 40%);">+     AZALIA_PIN_CFG(0x0, 0x12, 0x90A60130),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x13) DMIC */</span><br><span style="color: hsl(120, 100%, 40%);">+     AZALIA_PIN_CFG(0x0, 0x13, 0x411111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x14) SPEAKER-OUT (Port-D) */</span><br><span style="color: hsl(120, 100%, 40%);">+     AZALIA_PIN_CFG(0x0, 0x14, 0x90180110),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x17) I2S-OUT */</span><br><span style="color: hsl(120, 100%, 40%);">+  AZALIA_PIN_CFG(0x0, 0x17, 0x01011120),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x18) MIC1 (Port-B) */</span><br><span style="color: hsl(120, 100%, 40%);">+    AZALIA_PIN_CFG(0x0, 0x18, 0x41111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Pin Complex (NID 0x19) I2S-IN */</span><br><span style="color: hsl(120, 100%, 40%);">+   AZALIA_PIN_CFG(0x0, 0x19, 0x90870140),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x1A) LINE1 (Port-C) */</span><br><span style="color: hsl(120, 100%, 40%);">+   AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x1D) PC-BEEP */</span><br><span style="color: hsl(120, 100%, 40%);">+  AZALIA_PIN_CFG(0x0, 0x1D, 0x40400001),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x1E) SPDIF-OUT */</span><br><span style="color: hsl(120, 100%, 40%);">+        AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x1F) SPDIF-IN */</span><br><span style="color: hsl(120, 100%, 40%);">+ AZALIA_PIN_CFG(0x0, 0x1F, 0x411111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Pin Complex (NID 0x21) HP-OUT (Port-A) */</span><br><span style="color: hsl(120, 100%, 40%);">+  AZALIA_PIN_CFG(0x0, 0x21, 0x411111F0),</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* POST I2S bypass output SRC */</span><br><span style="color: hsl(120, 100%, 40%);">+      0x0205002D,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0204C020,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0205002D,</span><br><span style="color: hsl(120, 100%, 40%);">+   0x0204C020,</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const u32 pc_beep_verbs[0] = {};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AZALIA_ARRAY_SIZES;</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/irqroute.c b/src/mainboard/facebook/fbg1701/irqroute.c</span><br><span>new file mode 100644</span><br><span>index 0000000..a4ff6bf</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/irqroute.c</span><br><span>@@ -0,0 +1,18 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include "irqroute.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+DEFINE_IRQ_ROUTES;</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/irqroute.h b/src/mainboard/facebook/fbg1701/irqroute.h</span><br><span>new file mode 100644</span><br><span>index 0000000..6b7cb41</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/irqroute.h</span><br><span>@@ -0,0 +1,70 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/irq.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/pci_devs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/pm.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR02h GFX       INT(A)  - PIRQ A</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR0Bh PUNIT        INT(A)  - PIRQ F</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR10h EMMC INT(ABCD)       - PIRQ DEFG</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR11h SDIO      INT(A)  - PIRQ B</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR12h SD   INT(A)  - PIRQ C</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR13h SATA INT(A)  - PIRQ D</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR14h XHCI INT(A)  - PIRQ E</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR15h LP Audio     INT(A)  - PIRQ F</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR17h MMC  INT(A)  - PIRQ F</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR18h SIO  INT(ABCD)       - PIRQ BADC</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Ah TXE       INT(A)  - PIRQ F</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Bh HD Audio     INT(A)  - PIRQ G</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Ch PCIe INT(ABCD)       - PIRQ EFGH</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Dh EHCI      INT(A)  - PIRQ D</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Eh SIO  INT(ABCD)       - PIRQ BDEF</span><br><span style="color: hsl(120, 100%, 40%);">+ * IR1Fh LPC       INT(ABCD)       - PIRQ HGBC</span><br><span style="color: hsl(120, 100%, 40%);">+*/</span><br><span style="color: hsl(120, 100%, 40%);">+#define PCI_DEV_PIRQ_ROUTES \</span><br><span style="color: hsl(120, 100%, 40%);">+        PCI_DEV_PIRQ_ROUTE(GFX_DEV,    A, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(PUNIT_DEV,  F, F, F, F), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(MMC_DEV,    D, E, F, G), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(SD_DEV,     C, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(SATA_DEV,   D, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(XHCI_DEV,   E, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(LPE_DEV,    F, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(SIO1_DEV,   B, A, D, C), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(TXE_DEV,    F, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(HDA_DEV,    G, A, A, A), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(PCIE_DEV,   E, F, G, H), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(SIO2_DEV,   B, D, E, F), \</span><br><span style="color: hsl(120, 100%, 40%);">+ PCI_DEV_PIRQ_ROUTE(PCU_DEV,    H, G, B, C)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Route each PIRQ[A-H] to a PIC IRQ[0-15]</span><br><span style="color: hsl(120, 100%, 40%);">+ * Reserved: 0, 1, 2, 8, 13</span><br><span style="color: hsl(120, 100%, 40%);">+ * PS2 keyboard: 12</span><br><span style="color: hsl(120, 100%, 40%);">+ * ACPI/SCI: 9</span><br><span style="color: hsl(120, 100%, 40%);">+ * Floppy: 6</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#define PIRQ_PIC_ROUTES \</span><br><span style="color: hsl(120, 100%, 40%);">+  PIRQ_PIC(A, 11), \</span><br><span style="color: hsl(120, 100%, 40%);">+    PIRQ_PIC(B, 5), \</span><br><span style="color: hsl(120, 100%, 40%);">+     PIRQ_PIC(C, 5), \</span><br><span style="color: hsl(120, 100%, 40%);">+     PIRQ_PIC(D, 11), \</span><br><span style="color: hsl(120, 100%, 40%);">+    PIRQ_PIC(E, 11), \</span><br><span style="color: hsl(120, 100%, 40%);">+    PIRQ_PIC(F, 5), \</span><br><span style="color: hsl(120, 100%, 40%);">+     PIRQ_PIC(G, 11), \</span><br><span style="color: hsl(120, 100%, 40%);">+    PIRQ_PIC(H, 11)</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/logo.c b/src/mainboard/facebook/fbg1701/logo.c</span><br><span>new file mode 100644</span><br><span>index 0000000..7b2e51c</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/logo.c</span><br><span>@@ -0,0 +1,51 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/ramstage.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <include/cbfs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "mainboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_FSP1_1_DISPLAY_LOGO)</span><br><span style="color: hsl(120, 100%, 40%);">+static char logo_data[2 * MiB];</span><br><span style="color: hsl(120, 100%, 40%);">+static size_t logo_data_sz;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void *load_logo(size_t *logo_size)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  if (logo_data_sz != 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+              if (logo_size)</span><br><span style="color: hsl(120, 100%, 40%);">+                        *logo_size = logo_data_sz;</span><br><span style="color: hsl(120, 100%, 40%);">+            return (void *)logo_data;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   const char *filename = "logo.bmp";</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        size_t file_size = cbfs_boot_load_file(filename, logo_data,</span><br><span style="color: hsl(120, 100%, 40%);">+                           sizeof(logo_data), CBFS_TYPE_RAW);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  if (file_size == 0)</span><br><span style="color: hsl(120, 100%, 40%);">+           return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        if (logo_size)</span><br><span style="color: hsl(120, 100%, 40%);">+                *logo_size = file_size;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     printk(BIOS_INFO, "Found a Logo of %zu bytes after decompression\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                file_size);</span><br><span style="color: hsl(120, 100%, 40%);">+   logo_data_sz = file_size;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   return (void *)logo_data;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/mainboard.c b/src/mainboard/facebook/fbg1701/mainboard.c</span><br><span>new file mode 100644</span><br><span>index 0000000..f0ef6ce</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/mainboard.c</span><br><span>@@ -0,0 +1,75 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2007-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2011 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <device/device.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <device/smbus.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <delay.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/smbus.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "onboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "mainboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_configure_edp_bridge(void) {</span><br><span style="color: hsl(120, 100%, 40%);">+  edp_data_t *TC348860Table;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* set eDP bridge to eDP 1920 */</span><br><span style="color: hsl(120, 100%, 40%);">+      TC348860Table = (edp_data_t *)mainboard_TC348860InitTable;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* reset bridge */</span><br><span style="color: hsl(120, 100%, 40%);">+    outb(CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE, CPLD_RESET_PORT);</span><br><span style="color: hsl(120, 100%, 40%);">+      outb(CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE, CPLD_RESET_PORT);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  while (TC348860Table->deviceadress) {</span><br><span style="color: hsl(120, 100%, 40%);">+              i2c_block_write(TC348860Table->deviceadress,</span><br><span style="color: hsl(120, 100%, 40%);">+                       TC348860Table->registeraddress,</span><br><span style="color: hsl(120, 100%, 40%);">+                    TC348860Table->number_of_databytes,</span><br><span style="color: hsl(120, 100%, 40%);">+                        &TC348860Table->data[0]);</span><br><span style="color: hsl(120, 100%, 40%);">+              TC348860Table++;</span><br><span style="color: hsl(120, 100%, 40%);">+      };</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Declare the resources we are using</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static void mainboard_reserve_resources(struct device *dev)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       unsigned int idx = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct resource * res;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /*</span><br><span style="color: hsl(120, 100%, 40%);">+     * CPLD: Reserve the IRQ here all others are within the default LPC</span><br><span style="color: hsl(120, 100%, 40%);">+    * range 0 to 1000h</span><br><span style="color: hsl(120, 100%, 40%);">+    */</span><br><span style="color: hsl(120, 100%, 40%);">+   res = new_resource(dev, idx++);</span><br><span style="color: hsl(120, 100%, 40%);">+       res->base = 0x7;</span><br><span style="color: hsl(120, 100%, 40%);">+   res->size = 0x1;</span><br><span style="color: hsl(120, 100%, 40%);">+   res->flags = IORESOURCE_IRQ | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * mainboard_enable is executed as first thing after</span><br><span style="color: hsl(120, 100%, 40%);">+ * enumerate_buses().</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static void mainboard_enable(struct device *dev)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      mainboard_reserve_resources(dev);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct chip_operations mainboard_ops = {</span><br><span style="color: hsl(120, 100%, 40%);">+      .enable_dev = mainboard_enable,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/mainboard.h b/src/mainboard/facebook/fbg1701/mainboard.h</span><br><span>new file mode 100644</span><br><span>index 0000000..ffa2222</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/mainboard.h</span><br><span>@@ -0,0 +1,172 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef MAINBOARD_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define MAINBOARD_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+typedef struct {</span><br><span style="color: hsl(120, 100%, 40%);">+       u8 number_of_databytes;</span><br><span style="color: hsl(120, 100%, 40%);">+       u8 deviceadress;        /* Bus, device and function */</span><br><span style="color: hsl(120, 100%, 40%);">+        u8 registeraddress;</span><br><span style="color: hsl(120, 100%, 40%);">+   u8 data[5];</span><br><span style="color: hsl(120, 100%, 40%);">+} edp_data_t;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static const edp_data_t mainboard_TC348860InitTable[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* set eDP bridge to eDP 1920 */</span><br><span style="color: hsl(120, 100%, 40%);">+      /* IO */</span><br><span style="color: hsl(120, 100%, 40%);">+      { 5, 0x68, 0x08, {0x00, 0x01, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Boot */</span><br><span style="color: hsl(120, 100%, 40%);">+    { 5, 0x68, 0x10, {0x00, 0x78, 0x69, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x04, 0x02, 0x08, 0x02, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x08, 0x23, 0x00, 0x87, 0x02 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x0C, 0x19, 0x04, 0x00, 0x23 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x10, 0x06, 0x00, 0x67, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x14, 0x01, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x18, 0xFF, 0xFF, 0xFF, 0xFF } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Internal */</span><br><span style="color: hsl(120, 100%, 40%);">+        { 2, 0x68, 0xB0, {0x05, 0x0A, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB0, {0x06, 0x03, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB0, {0x07, 0x16, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB0, {0x08, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB0, {0x09, 0x21, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB0, {0x0A, 0x07, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x14, 0x03, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x18, 0xFF, 0xFF, 0xFF, 0xFF } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* eDP */</span><br><span style="color: hsl(120, 100%, 40%);">+     { 2, 0x68, 0x80, {0x03, 0x41, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB4, {0x00, 0x0D, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* DPRX */</span><br><span style="color: hsl(120, 100%, 40%);">+    { 2, 0x68, 0xB8, {0x8E, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x8F, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x9A, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x9B, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x00, 0x0E, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x26, 0x02, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x01, 0x20, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC0, 0xF1, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC1, 0xF1, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC2, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC3, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC4, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC5, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC6, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0xC7, 0xF0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x0B, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x33, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x5B, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x10, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x38, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x60, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x15, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x3D, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x65, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x1A, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x42, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x6A, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x1F, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x47, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x6F, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x24, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x4C, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x74, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x29, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x51, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x79, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x2E, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x56, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x7E, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x90, 0x10, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x91, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x92, 0xF6, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x93, 0x10, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x94, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x95, 0xF6, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x96, 0x10, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x97, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x98, 0xF6, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x99, 0x10, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x9A, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0x9B, 0xF6, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x8A, 0x03, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x96, 0x03, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0xD1, 0x07, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xBB, {0xB0, 0x07, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x8B, 0x04, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x8C, 0x45, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x8D, 0x05, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x97, 0x04, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x98, 0xE0, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x99, 0x2E, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x80, {0x0E, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x14, 0x07, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x10, {0x18, 0xFF, 0xFF, 0xFF, 0xFF } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Video size */</span><br><span style="color: hsl(120, 100%, 40%);">+      { 5, 0x68, 0x01, {0x48, 0xB0, 0x04, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x29, {0x20, 0x10, 0x0E, 0x0B, 0x3E } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* eDP */</span><br><span style="color: hsl(120, 100%, 40%);">+     { 2, 0x68, 0xB6, {0x31, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x80, {0x01, 0x14, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x80, {0x02, 0x02, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB6, {0x08, 0x0B, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0xB8, {0x00, 0x1E, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x87, {0x00, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x50, {0x10, 0x00, 0x00, 0x9D, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x8C, 0x40, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x80, 0x02, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Link Training */</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x82, {0x02, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x82, {0x03, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 2, 0x68, 0x82, {0x04, 0xFF, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x21, {0x58, 0x09, 0x00, 0x28, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x21, {0x60, 0x07, 0x00, 0x0F, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x21, {0x64, 0x28, 0x23, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x21, {0x68, 0x0E, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* DSI */</span><br><span style="color: hsl(120, 100%, 40%);">+     { 5, 0x68, 0x20, {0x7C, 0x81, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x20, {0x50, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x20, {0x1C, 0x01, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x20, {0x60, 0xFF, 0xFF, 0xFF, 0xFF } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* GPIO */</span><br><span style="color: hsl(120, 100%, 40%);">+    { 5, 0x68, 0x08, {0x04, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x80, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x84, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x84, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x00, {0x84, 0x0F, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* DSI clock */</span><br><span style="color: hsl(120, 100%, 40%);">+       { 5, 0x68, 0x20, {0x50, 0x20, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* LCD init */</span><br><span style="color: hsl(120, 100%, 40%);">+        { 5, 0x68, 0x22, {0xFC, 0x15, 0x01, 0x00, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x8C, 0x80, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0xC7, 0x50, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0xC5, 0x50, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x85, 0x04, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x86, 0x08, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x83, 0xAA, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x84, 0x11, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0x9C, 0x10, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x15, 0xA9, 0x4B, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x05, 0x11, 0x00, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x22, {0xFC, 0x05, 0x29, 0x00, 0x81 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x2A, {0x10, 0x10, 0x00, 0x04, 0x80 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x68, 0x2A, {0x04, 0x01, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Check Video */</span><br><span style="color: hsl(120, 100%, 40%);">+     { 5, 0x68, 0x01, {0x54, 0x01, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+   { 5, 0x00, 0x00, {0x00, 0x00, 0x00, 0x00, 0x00 } },</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_configure_edp_bridge(void);</span><br><span style="color: hsl(120, 100%, 40%);">+void *load_logo(size_t *logo_size);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/manifest.h b/src/mainboard/facebook/fbg1701/manifest.h</span><br><span>new file mode 100644</span><br><span>index 0000000..bb22686</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/manifest.h</span><br><span>@@ -0,0 +1,33 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef __MANIFEST_H__</span><br><span style="color: hsl(120, 100%, 40%);">+#define __MANIFEST_H__</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/**</span><br><span style="color: hsl(120, 100%, 40%);">+ * Make sure the index matches the actual order in the manifest generated</span><br><span style="color: hsl(120, 100%, 40%);">+ * using the HashCb.cmd file</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_ROM_STAGE 0</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_RAM_STAGE   1</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_PAYLOAD     2</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_OPROM               3</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_FSP         4</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_MICROCODE   5</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_SPD0                6</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_LOGO                7</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_DSDT                8</span><br><span style="color: hsl(120, 100%, 40%);">+#define HASH_IDX_BOOTBLOCK   9 /* Should always be the last one */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/onboard.h b/src/mainboard/facebook/fbg1701/onboard.h</span><br><span>new file mode 100644</span><br><span>index 0000000..d494727</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/onboard.h</span><br><span>@@ -0,0 +1,45 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef ONBOARD_H</span><br><span style="color: hsl(120, 100%, 40%);">+#define ONBOARD_H</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include "irqroute.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* SD CARD gpio */</span><br><span style="color: hsl(120, 100%, 40%);">+#define SDCARD_CD            81 /* Not used */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define DPTF_CPU_PASSIVE   88</span><br><span style="color: hsl(120, 100%, 40%);">+#define DPTF_CPU_CRITICAL   90</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define ITE8528_CMD_PORT  0x6E</span><br><span style="color: hsl(120, 100%, 40%);">+#define ITE8528_DATA_PORT         0x6F</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* CPLD definitions */</span><br><span style="color: hsl(120, 100%, 40%);">+#define CPLD_RESET_PORT 0x287</span><br><span style="color: hsl(120, 100%, 40%);">+#define CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE 0x20</span><br><span style="color: hsl(120, 100%, 40%);">+#define CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE 0x00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Define the items to be measured or verified */</span><br><span style="color: hsl(120, 100%, 40%);">+#define FSP                 (const char*) "fsp.bin"</span><br><span style="color: hsl(120, 100%, 40%);">+#define CMOS_LAYOUT  (const char*) "cmos_layout.bin"</span><br><span style="color: hsl(120, 100%, 40%);">+#define RAMSTAGE     (const char*) "fallback/ramstage"</span><br><span style="color: hsl(120, 100%, 40%);">+#define ROMSTAGE   (const char*) "fallback/romstage"</span><br><span style="color: hsl(120, 100%, 40%);">+#define PAYLOAD            (const char*) "fallback/payload"</span><br><span style="color: hsl(120, 100%, 40%);">+#define OP_ROM_VBT  (const char*) "vbt.bin"</span><br><span style="color: hsl(120, 100%, 40%);">+#define MICROCODE    (const char*) "cpu_microcode_blob.bin"</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/ramstage.c b/src/mainboard/facebook/fbg1701/ramstage.c</span><br><span>new file mode 100644</span><br><span>index 0000000..6de8e15</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/ramstage.c</span><br><span>@@ -0,0 +1,37 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/ramstage.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include "mainboard.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_silicon_init_params(SILICON_INIT_UPD *params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_FSP1_1_DISPLAY_LOGO)</span><br><span style="color: hsl(120, 100%, 40%);">+  size_t logo_len;</span><br><span style="color: hsl(120, 100%, 40%);">+      void *logo = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Configure the eDP bridge to eDP 1920 */</span><br><span style="color: hsl(120, 100%, 40%);">+    mainboard_configure_edp_bridge();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_FSP1_1_DISPLAY_LOGO)</span><br><span style="color: hsl(120, 100%, 40%);">+       logo = load_logo(&logo_len);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    if (logo) {</span><br><span style="color: hsl(120, 100%, 40%);">+           params->PcdLogoPtr = (u32)logo;</span><br><span style="color: hsl(120, 100%, 40%);">+            params->PcdLogoSize = logo_len;</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/romstage.c b/src/mainboard/facebook/fbg1701/romstage.c</span><br><span>new file mode 100644</span><br><span>index 0000000..6869616</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/romstage.c</span><br><span>@@ -0,0 +1,108 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2013 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <cbfs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <lib.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/lpc.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/pci_devs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/romstage.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <string.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <chip.h></span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_MBOOT)</span><br><span style="color: hsl(120, 100%, 40%);">+#include <mboot.h></span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#include <build.h></span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_VERIFIED_BOOT)</span><br><span style="color: hsl(120, 100%, 40%);">+#include "board_verified_boot.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* First call into mainboard. */</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_romstage_entry(struct romstage_params *params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        struct pei_data *ps = params->pei_data;</span><br><span style="color: hsl(120, 100%, 40%);">+    char buf[32];</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       post_code(0x31);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    strcpy(buf, CONFIG_MAINBOARD_SPD0_FILE_NAME);</span><br><span style="color: hsl(120, 100%, 40%);">+ ps->spd_data_ch0 = cbfs_boot_map_with_leak(buf, CBFS_TYPE_SPD, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+      ps->spd_ch0_config = 1; /* Memory down */</span><br><span style="color: hsl(120, 100%, 40%);">+  ps->spd_ch1_config = 2; /* Disabled */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Initialize memory */</span><br><span style="color: hsl(120, 100%, 40%);">+       romstage_common(params);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_memory_init_params(struct romstage_params *params,</span><br><span style="color: hsl(120, 100%, 40%);">+      MEMORY_INIT_UPD *memory_params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    memory_params->PcdMemoryTypeEnable = MEM_DDR3;</span><br><span style="color: hsl(120, 100%, 40%);">+     memory_params->PcdMemorySpdPtr = (u32)params->pei_data->spd_data_ch0;</span><br><span style="color: hsl(120, 100%, 40%);">+        memory_params->PcdMemChannel0Config = params->pei_data->spd_ch0_config;</span><br><span style="color: hsl(120, 100%, 40%);">+      memory_params->PcdMemChannel1Config = params->pei_data->spd_ch1_config;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_after_memory_init(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      printk(BIOS_DEBUG, "%s/%s called\n", __FILE__, __func__);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Disable the Braswell UART hardware for COM1. */</span><br><span style="color: hsl(120, 100%, 40%);">+    pci_write_config32(PCI_DEV(0, LPC_DEV, 0), UART_CONT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_MBOOT)</span><br><span style="color: hsl(120, 100%, 40%);">+/**</span><br><span style="color: hsl(120, 100%, 40%);">+ * mb_crtm</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Measures the crtm version. This consists of a string than can be defined</span><br><span style="color: hsl(120, 100%, 40%);">+ * using make menuconfig and automatically generated version information.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * @param[in]  activePcr bitmap of the support</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * @retval TPM_SUCCESS               Operation completed successfully.</span><br><span style="color: hsl(120, 100%, 40%);">+ * @retval TPM_E_IOERROR     Unexpected device behavior.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static const uint8_t crtm_version[] =       CONFIG_CRTM_VERSION_STRING \</span><br><span style="color: hsl(120, 100%, 40%);">+  COREBOOT_VERSION COREBOOT_EXTRA_VERSION " " COREBOOT_BUILD;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int mb_crtm(EFI_TCG2_EVENT_ALGORITHM_BITMAP activePcr)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    int status;</span><br><span style="color: hsl(120, 100%, 40%);">+   TCG_PCR_EVENT2_HDR tcgEventHdr;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Use FirmwareVersion string to represent CRTM version. */</span><br><span style="color: hsl(120, 100%, 40%);">+   printk(BIOS_DEBUG, "%s: Measure CRTM Version\n", __func__);</span><br><span style="color: hsl(120, 100%, 40%);">+ memset(&tcgEventHdr, 0, sizeof(tcgEventHdr));</span><br><span style="color: hsl(120, 100%, 40%);">+     tcgEventHdr.pcrIndex  = MBOOT_PCR_INDEX_0;</span><br><span style="color: hsl(120, 100%, 40%);">+    tcgEventHdr.eventType = EV_S_CRTM_VERSION;</span><br><span style="color: hsl(120, 100%, 40%);">+    tcgEventHdr.eventSize = sizeof(crtm_version);</span><br><span style="color: hsl(120, 100%, 40%);">+ printk(BIOS_DEBUG, "%s: EventSize - %u\n", __func__ ,</span><br><span style="color: hsl(120, 100%, 40%);">+               tcgEventHdr.eventSize);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     status = mboot_hash_extend_log(activePcr, 0, (uint8_t *)crtm_version,</span><br><span style="color: hsl(120, 100%, 40%);">+                 tcgEventHdr.eventSize, &tcgEventHdr,</span><br><span style="color: hsl(120, 100%, 40%);">+                      (uint8_t *)crtm_version, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        if (status)</span><br><span style="color: hsl(120, 100%, 40%);">+           printk (BIOS_DEBUG, "Measure CRTM Version returned 0x%x\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                 status);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    return status;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/smihandler.c b/src/mainboard/facebook/fbg1701/smihandler.c</span><br><span>new file mode 100644</span><br><span>index 0000000..537ab14</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/smihandler.c</span><br><span>@@ -0,0 +1,79 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2015 Intel Corp.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <arch/acpi.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <cpu/x86/smm.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/nvs.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <soc/pm.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* The wake gpio is SUS_GPIO[0]. */</span><br><span style="color: hsl(120, 100%, 40%);">+#define WAKE_GPIO_EN SUS_GPIO_EN0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int mainboard_io_trap_handler(int smif)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    switch (smif) {</span><br><span style="color: hsl(120, 100%, 40%);">+       case 0x99:</span><br><span style="color: hsl(120, 100%, 40%);">+            printk(BIOS_DEBUG, "Sample\n");</span><br><span style="color: hsl(120, 100%, 40%);">+             smm_get_gnvs()->smif = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+          break;</span><br><span style="color: hsl(120, 100%, 40%);">+        default:</span><br><span style="color: hsl(120, 100%, 40%);">+              return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /*</span><br><span style="color: hsl(120, 100%, 40%);">+     * On success, the IO Trap Handler returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+   * On failure, the IO Trap Handler returns a value != 0</span><br><span style="color: hsl(120, 100%, 40%);">+        *</span><br><span style="color: hsl(120, 100%, 40%);">+     * For now, we force the return value to 0 and log all traps to</span><br><span style="color: hsl(120, 100%, 40%);">+        * see what's going on.</span><br><span style="color: hsl(120, 100%, 40%);">+    */</span><br><span style="color: hsl(120, 100%, 40%);">+   return 1;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * The entire 32-bit ALT_GPIO_SMI register is passed as a parameter. Note, that</span><br><span style="color: hsl(120, 100%, 40%);">+ * this includes the enable bits in the lower 16 bits.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_smi_gpi(uint32_t alt_gpio_smi)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void mainboard_smi_sleep(uint8_t slp_typ)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Disable USB charging if required */</span><br><span style="color: hsl(120, 100%, 40%);">+        switch (slp_typ) {</span><br><span style="color: hsl(120, 100%, 40%);">+    case ACPI_S3:</span><br><span style="color: hsl(120, 100%, 40%);">+         /* Enable wake pin in GPE block. */</span><br><span style="color: hsl(120, 100%, 40%);">+           enable_gpe(WAKE_GPIO_EN);</span><br><span style="color: hsl(120, 100%, 40%);">+             break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case ACPI_S5:</span><br><span style="color: hsl(120, 100%, 40%);">+         break;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int mainboard_smi_apmc(uint8_t apmc)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+     switch (apmc) {</span><br><span style="color: hsl(120, 100%, 40%);">+       case APM_CNT_ACPI_ENABLE:</span><br><span style="color: hsl(120, 100%, 40%);">+             break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case APM_CNT_ACPI_DISABLE:</span><br><span style="color: hsl(120, 100%, 40%);">+            break;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+     return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/src/mainboard/facebook/fbg1701/spd/SAMSUNG_K4B8G1646D-MYKO.spd.hex b/src/mainboard/facebook/fbg1701/spd/SAMSUNG_K4B8G1646D-MYKO.spd.hex</span><br><span>new file mode 100644</span><br><span>index 0000000..482e5c0</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/facebook/fbg1701/spd/SAMSUNG_K4B8G1646D-MYKO.spd.hex</span><br><span>@@ -0,0 +1,244 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# Copyright (C) 2018 Eltan B.V.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+# it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+# the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+# but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+# GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# 8 Gb DDR3 (1600 MHz 11-11-11) Samsung K4B8G1646D-MYK0</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# DUAL DIE</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 2 * 256Mx16 ( 8 bank, 16 Rows, 10 Col, 1KB page size )</span><br><span style="color: hsl(120, 100%, 40%);">+# 5-6-7-8-9-10-11-12-13</span><br><span style="color: hsl(120, 100%, 40%);">+# DDR3L-1600</span><br><span style="color: hsl(120, 100%, 40%);">+# tCk 1.25ns</span><br><span style="color: hsl(120, 100%, 40%);">+# tRCD 13.75ns</span><br><span style="color: hsl(120, 100%, 40%);">+# tRP 13.75ns</span><br><span style="color: hsl(120, 100%, 40%);">+# tRAS 35ns</span><br><span style="color: hsl(120, 100%, 40%);">+# tRC 48.75ns</span><br><span style="color: hsl(120, 100%, 40%);">+# CL-tRCD-tRP 11-11-11</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#      0 Number of SPD Bytes used / Total SPD Size / CRC Coverage</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[3:0]: 3 = 384 SPD Bytes Used</span><br><span style="color: hsl(120, 100%, 40%);">+#            bits[6:4]: 1 = 256 SPD Bytes Total</span><br><span style="color: hsl(120, 100%, 40%);">+#           bit7 : 0 = CRC covers bytes 0 ~ 128</span><br><span style="color: hsl(120, 100%, 40%);">+23</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    1 SPD Revision</span><br><span style="color: hsl(120, 100%, 40%);">+#               0x10 = Revision 1.0</span><br><span style="color: hsl(120, 100%, 40%);">+10</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    2 Key Byte / DRAM Device Type</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[7:0]: 0x0c = DDR3 SDRAM</span><br><span style="color: hsl(120, 100%, 40%);">+0B</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#   3 Key Byte / Module Type</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[3:0]: 3 = SODIMM</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[6:4]: 0 = Not hybrid</span><br><span style="color: hsl(120, 100%, 40%);">+#            bits[7]: 0 = Not hybrid</span><br><span style="color: hsl(120, 100%, 40%);">+03</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#        4 SDRAM CHIP Density and Banks</span><br><span style="color: hsl(120, 100%, 40%);">+#               bits[3:0]: 4 = 4 Gigabits Total SDRAM capacity per chip</span><br><span style="color: hsl(120, 100%, 40%);">+#              bits[6:4]: 0 = 3 (8 banks)</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[7]: reserverd</span><br><span style="color: hsl(120, 100%, 40%);">+04</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#     5 SDRAM Addressing</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[2:0]: 1 = 10 Column Address Bits</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[5:3]: 4 = 16 Row Address Bits</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[7:6]: 0 = reserved</span><br><span style="color: hsl(120, 100%, 40%);">+21</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#        6 Module Nominal Voltage</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[0]: 0 = 1.5V operable</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[1]: 1 = 1.35V operable</span><br><span style="color: hsl(120, 100%, 40%);">+#          bits[2]: 0 = NOT 1.25V operable</span><br><span style="color: hsl(120, 100%, 40%);">+#              bits[7:3]: reserved</span><br><span style="color: hsl(120, 100%, 40%);">+02</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    7 Module Organization</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[2:0]: 010 = 16 bits SDRAM device</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[5:3]: 001 = 2 ranks</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[7:6]: reserved</span><br><span style="color: hsl(120, 100%, 40%);">+0A</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    8 Module Memory Bus width</span><br><span style="color: hsl(120, 100%, 40%);">+#            bits[2:0]: 3 = 64 bits pirmary bus width</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[4:3]: 0 = 0 bits bus witdth extension</span><br><span style="color: hsl(120, 100%, 40%);">+#           bits[7:5]: reserved</span><br><span style="color: hsl(120, 100%, 40%);">+03</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    9 Fine Timebase (FTB) dividend / divisor</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[3:0]: 1 = Divisor</span><br><span style="color: hsl(120, 100%, 40%);">+#               bits[7:4]: 1 = Dividend</span><br><span style="color: hsl(120, 100%, 40%);">+11</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#        10 Medium Timebase (MTB) dividend</span><br><span style="color: hsl(120, 100%, 40%);">+#            bits[7:0]: 0 = 1 (timebase 0.125ns)</span><br><span style="color: hsl(120, 100%, 40%);">+01</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    11 Medium Timebase (MTB) divisor</span><br><span style="color: hsl(120, 100%, 40%);">+#             bits[7:0]: 8 (timebase 0.125ns)</span><br><span style="color: hsl(120, 100%, 40%);">+08</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#        12 SDRAM Minimum cycle time (tCKmin)</span><br><span style="color: hsl(120, 100%, 40%);">+#         bits[7:0]: 10 (10 * 0x125 1 = 8 bits (Device Width)</span><br><span style="color: hsl(120, 100%, 40%);">+#          bits[5:4]: 0 = 1 Package rank</span><br><span style="color: hsl(120, 100%, 40%);">+#                bits[6]: 0 = Symmetrical (rank mix)</span><br><span style="color: hsl(120, 100%, 40%);">+#          bits[7]: 0 = reserved</span><br><span style="color: hsl(120, 100%, 40%);">+0A</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#  13 Reserved</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    14 CAS Latencies supported, Least Significate Byte</span><br><span style="color: hsl(120, 100%, 40%);">+FE</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#     15 CAS Latencies supported, Most Significate Byte</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#      16 Minimum CAS Latency Time (tAAmin)</span><br><span style="color: hsl(120, 100%, 40%);">+#         0x69 tAA = 13.125ns  (offset 00) DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+69</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    17 Minimum Write Recovery Time (tWRmin)</span><br><span style="color: hsl(120, 100%, 40%);">+78</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#        18 Minimum RAS to CAS Delay Time (tRCDmin)</span><br><span style="color: hsl(120, 100%, 40%);">+#           0x69 tAA = 13.125ns  (offset 00) DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+69</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    19 Minimum Row Active to Row Active Delay Time (tRRDmin)</span><br><span style="color: hsl(120, 100%, 40%);">+#             60 tRRD = 6.0ns   DDR3-1600, 1KB</span><br><span style="color: hsl(120, 100%, 40%);">+30</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#       20 Minimum Row Precharge Delay Time (tRPmin)</span><br><span style="color: hsl(120, 100%, 40%);">+#         0x69 tAA = 13.125ns  (offset 00) DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+69</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    21 Upper Nibble for tRAS and tRC</span><br><span style="color: hsl(120, 100%, 40%);">+#             7:0 tRC, 3:0 tRAS</span><br><span style="color: hsl(120, 100%, 40%);">+11</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#      22 Minimum Active to Precharge Delay Time (tRASmin), Least Significant byte</span><br><span style="color: hsl(120, 100%, 40%);">+18</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    23 Minimum Active to Precharge Delay Time (tRCmin), Most Significant byte</span><br><span style="color: hsl(120, 100%, 40%);">+#            0x181 tRC = 48.125ns  (offset 00) DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+81</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#   24 Minimum Refresh Recovery Delay time (tRFCmin), Least Significant byte</span><br><span style="color: hsl(120, 100%, 40%);">+#             0x680 tRFC = 208ns  DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+80</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 25 Minimum Refresh Recovery Delay time (tRFCmin), Most Significant byte</span><br><span style="color: hsl(120, 100%, 40%);">+#              0x680 tRFC = 208ns  DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+06</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 26 tWTRmin</span><br><span style="color: hsl(120, 100%, 40%);">+3C</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#     27 tRTPmin</span><br><span style="color: hsl(120, 100%, 40%);">+3C</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#     28 Upper Nibble for tFAW</span><br><span style="color: hsl(120, 100%, 40%);">+#             Upper 0x140 tRAW = 40ns  DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+01</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#    29 tFAWmin Lower</span><br><span style="color: hsl(120, 100%, 40%);">+#             0x140 tRAW = 40ns  DDR3-1600K downbin</span><br><span style="color: hsl(120, 100%, 40%);">+40</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 30 SDRAM Optional Features</span><br><span style="color: hsl(120, 100%, 40%);">+# byte [7]: 1 = DLL-Off Mode support</span><br><span style="color: hsl(120, 100%, 40%);">+# byte [1]: 1 = RZQ/7 is supported</span><br><span style="color: hsl(120, 100%, 40%);">+# byte [0]: 1 = RZQ/6 is support</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+83</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 31 Thermal options</span><br><span style="color: hsl(120, 100%, 40%);">+# byte [2]: 1 = Auto Self Refresh (ASR) is supported</span><br><span style="color: hsl(120, 100%, 40%);">+04</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 32 Module Thermal support</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 33 SDRAM device type</span><br><span style="color: hsl(120, 100%, 40%);">+#  byte [6:4] 100 = 7 die</span><br><span style="color: hsl(120, 100%, 40%);">+#  byte [1:0] 1 = multi load stack</span><br><span style="color: hsl(120, 100%, 40%);">+41</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 34 Fine tCKmin</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 35 Fine tAAmin</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 36 Fine tRCDmin</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 37 Fine tRPmin</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 38 Fine tRCmin</span><br><span style="color: hsl(120, 100%, 40%);">+00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 39-59 reserved, general section</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 60-116 Module specific section</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 117-118 Module Manufacturer</span><br><span style="color: hsl(120, 100%, 40%);">+80 CE</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 119 Module Manufacturing Location</span><br><span style="color: hsl(120, 100%, 40%);">+01</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 120-121 Module Manufacturing Date</span><br><span style="color: hsl(120, 100%, 40%);">+12 1B</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 122-125 Module Serial number</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 126-127 SPD CRC</span><br><span style="color: hsl(120, 100%, 40%);">+00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 128-145 Module Part number</span><br><span style="color: hsl(120, 100%, 40%);">+4B 34 42 38 47 31 36 34 36 44 2D 4D 59 4B 30 20</span><br><span style="color: hsl(120, 100%, 40%);">+20 20</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 145-146 Module revision code</span><br><span style="color: hsl(120, 100%, 40%);">+00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 148-149 DRAM Manufacturer ID code</span><br><span style="color: hsl(120, 100%, 40%);">+80 CE</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 150-175 Manufacturer Specific Data</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 176-255 Open for Customer Use</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# 175 - 255</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span style="color: hsl(120, 100%, 40%);">+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30414">change 30414</a>. To unsubscribe, or for help writing mail filters, 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/c/coreboot/+/30414"/><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-Change-Id: I28ac78a630ee705b1e546031f024bfe7f952ab39 </div>
<div style="display:none"> Gerrit-Change-Number: 30414 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Frans Hendriks <fhendriks@eltan.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>