target: msm8996: Add addresses and clocks for secondary USB port
In SBC8096, secondary Port will be used for fastboot use cases.
We need secondary port controller and PHY addresses
to configure the right PHY for successful
USB enumeration.
Add secondary Port addresses define,
clocks lookup table and clock init sequence.
Change-Id: I4c9de8ea484bc2419c7a31a33d569774f9ed552e
diff --git a/platform/msm8996/platform.c b/platform/msm8996/platform.c
index 79bf7c9..1234eda 100644
--- a/platform/msm8996/platform.c
+++ b/platform/msm8996/platform.c
@@ -181,3 +181,39 @@
return false;
}
+
+
+/* USB platform specific bases*/
+uint32_t usb_ctrl_base()
+{
+ if (board_hardware_id() == HW_PLATFORM_SBC)
+ return MSM_USB20_SEC_BASE;
+ else
+ return MSM_USB30_PRIM_BASE;
+
+}
+
+uint32_t usb_qscratch_base()
+{
+ if (board_hardware_id() == HW_PLATFORM_SBC)
+ return MSM_USB20_SEC_QSCRATCH_BASE;
+ else
+ return MSM_USB30_QSCRATCH_PRIM_BASE;
+}
+
+uint32_t usb_phy_base()
+{
+ if (board_hardware_id() == HW_PLATFORM_SBC)
+ return QUSB2_SEC_PHY_BASE;
+ else
+ return QUSB2_PRIM_PHY_BASE;
+}
+
+uint32_t usb_phy_bcr()
+{
+ if (board_hardware_id() == HW_PLATFORM_SBC)
+ return GCC_QUSB2_SEC_PHY_BCR;
+ else
+ return GCC_QUSB2_PRIM_PHY_BCR;
+}
+