target: msm8994: Enable blue LED as a boot notification

By turning on the blue LED in 8994 Liquid devices we get a notification
that the boot process has started. The LED will be turned-off when HLOS
display takes over.

Change-Id: I437483ecef5d36ca926bd1647ee800a8aedb6b3e
diff --git a/platform/msm8994/include/platform/iomap.h b/platform/msm8994/include/platform/iomap.h
index ae8f3e4..0bcae0a 100644
--- a/platform/msm8994/include/platform/iomap.h
+++ b/platform/msm8994/include/platform/iomap.h
@@ -552,4 +552,9 @@
 #define VIDEO_MODE_VSYNC            0x034
 #define VIDEO_MODE_VSYNC_VPOS       0x038
 
+#define QPNP_LED_CTRL_BASE          0xD000
+#define QPNP_BLUE_LPG_CTRL_BASE     0xB100
+#define QPNP_GREEN_LPG_CTRL_BASE    0xB200
+#define QPNP_RED_LPG_CTRL_BASE      0xB300
+
 #endif
diff --git a/target/msm8994/init.c b/target/msm8994/init.c
index 4990ea0..8c9cdaf 100644
--- a/target/msm8994/init.c
+++ b/target/msm8994/init.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -58,6 +58,8 @@
 #include <qusb2_phy.h>
 #include <rpm-smd.h>
 #include <sdhci_msm.h>
+#include <pm8x41_wled.h>
+#include <qpnp_led.h>
 
 #include "target/display.h"
 
@@ -75,7 +77,7 @@
 
 #define FASTBOOT_MODE           0x77665500
 
-#define PMIC_WLED_SLAVE_ID      3
+#define PMIC_LED_SLAVE_ID      3
 #define DDR_CFG_DLY_VAL         0x80040870
 
 void target_crypto_init_params(void);
@@ -334,6 +336,14 @@
 	mmc_read_partition_table(0);
 
 	rpm_smd_init();
+
+	/* QPNP LED init for boot process notification */
+	if (board_hardware_id() == HW_PLATFORM_LIQUID){
+		pm8x41_wled_config_slave_id(PMIC_LED_SLAVE_ID);
+		qpnp_led_init(QPNP_LED_BLUE, QPNP_LED_CTRL_BASE,
+			QPNP_BLUE_LPG_CTRL_BASE);
+	}
+
 }
 
 unsigned board_machtype(void)
diff --git a/target/msm8994/rules.mk b/target/msm8994/rules.mk
index ec35e53..3637a57 100644
--- a/target/msm8994/rules.mk
+++ b/target/msm8994/rules.mk
@@ -20,6 +20,7 @@
 	dev/keys \
 	dev/pmic/pm8x41 \
 	dev/qpnp_wled \
+	dev/qpnp_led \
     lib/ptable \
 	dev/gcdb/display \
     lib/libfdt