siemens/mc_apl1: Activate PTN3460 eDP to LVDS bridge IC

This mainboard uses a LVDS connection for LCD panels. Apollo Lake SoC
provides a display controller with three independent pipes (1x eDP and
2x DP/HDMI). PTN3460 is an embedded DisplayPort to LVDS bridge device
that enables connectivity between an eDP source and LVDS display panel
(http://www.nxp.com/documents/data_sheet/PTN3460.pdf).
The bridge contains an On-chip Extended Display Identification Data
(EDIT) emulation for EDIT data structures.
This patch sets up PTN3460 to be used with the appropriate LCD panel.

Change-Id: Ib8fa79bb608f1842f26c1af3d7bf4bb0513fa94d
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/19043
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c
index 692a076..a15daa9 100644
--- a/src/mainboard/siemens/mc_apl1/mainboard.c
+++ b/src/mainboard/siemens/mc_apl1/mainboard.c
@@ -14,12 +14,15 @@
  * GNU General Public License for more details.
  */
 
+#include <device/pci.h>
 #include <device/device.h>
 #include <console/console.h>
+#include <soc/pci_devs.h>
 #include <string.h>
 #include <hwilib.h>
 #include <i210.h>
 #include "brd_gpio.h"
+#include "ptn3460.h"
 
 #define MAX_PATH_DEPTH		12
 #define MAX_NUM_MAPPINGS	10
@@ -108,6 +111,22 @@
 	gpio_configure_pads(pads, num);
 }
 
+static void mainboard_final(void *chip_info)
+{
+	int status;
+
+	/**
+	 * Set up the DP2LVDS converter.
+	 * ptn3460_init() may only be executed after i2c bus init.
+	 */
+	status = ptn3460_init("hwinfo.hex");
+	if (status)
+		printk(BIOS_ERR, "LCD: Set up PTN with status 0x%x\n", status);
+	else
+		printk(BIOS_INFO, "LCD: Set up PTN was successful.\n");
+}
+
 struct chip_operations mainboard_ops = {
 	.init = mainboard_init,
+	.final = mainboard_final,
 };