pm8x41: diff clock control api

Adds an api to control the diff clock.

Change-Id: Id6437a0e2f574378ca1f66142c6f53f903fa9de4
diff --git a/dev/pmic/pm8x41/include/pm8x41.h b/dev/pmic/pm8x41/include/pm8x41.h
index b230549..236aed7 100644
--- a/dev/pmic/pm8x41/include/pm8x41.h
+++ b/dev/pmic/pm8x41/include/pm8x41.h
@@ -202,5 +202,5 @@
 void pm8x41_config_output_mpp(struct pm8x41_mpp *mpp);
 void pm8x41_enable_mpp(struct pm8x41_mpp *mpp, enum mpp_en_ctl enable);
 uint8_t pm8x41_get_is_cold_boot();
-
+void pm8x41_diff_clock_ctrl(uint8_t enable);
 #endif
diff --git a/dev/pmic/pm8x41/include/pm8x41_hw.h b/dev/pmic/pm8x41/include/pm8x41_hw.h
index 9c10ab8..c8c83ce 100644
--- a/dev/pmic/pm8x41/include/pm8x41_hw.h
+++ b/dev/pmic/pm8x41/include/pm8x41_hw.h
@@ -105,4 +105,8 @@
 #define LDO_POWER_MODE                        0x45
 #define LDO_EN_CTL_REG                        0x46
 
+/* USB3 phy clock */
+#define DIFF_CLK1_EN_CTL                      0x5746
+#define DIFF_CLK1_EN_BIT                      7
+
 #endif
diff --git a/dev/pmic/pm8x41/pm8x41.c b/dev/pmic/pm8x41/pm8x41.c
index 0e1109b..915cf52 100644
--- a/dev/pmic/pm8x41/pm8x41.c
+++ b/dev/pmic/pm8x41/pm8x41.c
@@ -382,3 +382,22 @@
 	dprintf(INFO,"%s: cold boot\n", __func__);
 	return 1;
 }
+
+/* api to control diff clock */
+void pm8x41_diff_clock_ctrl(uint8_t enable)
+{
+	uint8_t reg;
+
+	reg = REG_READ(DIFF_CLK1_EN_CTL);
+
+	if (enable)
+	{
+		reg |= BIT(DIFF_CLK1_EN_BIT);
+	}
+	else
+	{
+		reg &= ~BIT(DIFF_CLK1_EN_BIT);
+	}
+
+	REG_WRITE(DIFF_CLK1_EN_CTL, reg);
+}