13 #define PHY_CTRL0_ADDR 0x000
14 #define PHY_CTRL1_ADDR 0x004
15 #define PHY_CTRL2_ADDR 0x008
16 #define PHY_CTRL3_ADDR 0x00C
17 #define PHY_CTRL4_ADDR 0x010
18 #define PHY_MISC_ADDR 0x024
19 #define PHY_IPG_ADDR 0x030
21 #define PHY_CTRL0_VAL 0xA4600015
22 #define PHY_CTRL1_VAL 0x09500000
23 #define PHY_CTRL2_VAL 0x00058180
24 #define PHY_CTRL3_VAL 0x6DB6DCD6
25 #define PHY_CTRL4_VAL 0x836DB6DB
26 #define PHY_MISC_VAL 0x3803FB0C
27 #define PHY_IPG_VAL 0x47323232
29 #define USB_HOST3_PHY_BASE ((void *)0x8a00000)
30 #define USB_HOST3_BALDUR_PHY_BASE ((void *)0xa6000)
31 #define GCC_USB3_RST_CTRL ((void *)0x0181E038)
33 #define DWC3_GCTL 0xc110
34 #define DWC3_GUSB3PIPECTL(n) (0xc2c0 + (n * 0x04))
35 #define DWC3_GUSB2PHYCFG(n) (0xc200 + (n * 0x04))
38 #define DWC3_GUSB3PIPECTL_PHYSOFTRST (1 << 31)
39 #define DWC3_GUSB3PIPECTL_SUSPHY (1 << 17)
40 #define DWC3_GCTL_CORESOFTRESET (1 << 11)
41 #define DWC3_GCTL_PRTCAPDIR(n) ((n) << 12)
42 #define DWC3_GCTL_PRTCAP_OTG 3
43 #define DWC3_DCTL_CSFTRST (1 << 30)
44 #define DWC3_GSNPSID 0xc120
45 #define DWC3_DCTL 0xc704
48 #define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31)
49 #define DWC3_GUSB2PHYCFG_SUSPHY (1 << 6)
50 #define DWC3_GSNPSID_MASK 0xffff0000
51 #define DWC3_GEVTEN 0xc114
53 #define DWC3_GCTL_SCALEDOWN(n) ((n) << 4)
54 #define DWC3_GCTL_SCALEDOWN_MASK DWC3_GCTL_SCALEDOWN(3)
55 #define DWC3_GCTL_DISSCRAMBLE (1 << 3)
56 #define DWC3_GCTL_DSBLCLKGTNG (1 << 0)
57 #define DWC3_GCTL_U2RSTECN (1 << 16)
58 #define DWC3_REVISION_190A 0x5533190a
60 #define USB30_HS_PHY_CTRL 0x00000010
61 #define SW_SESSVLD (0x01 << 0x1C)
62 #define UTMI_OTG_VBUS_VALID (0x01 << 0x14)
64 #define USB30_SS_PHY_CTRL 0x00000030
65 #define LANE0_PWR_PRESENT (0x01 << 0x18)
95 write_val = tmp |
val;
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
void mdelay(unsigned int msecs)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define USB_HOST3_BALDUR_PHY_BASE
#define LANE0_PWR_PRESENT
#define DWC3_REVISION_190A
#define DWC3_GUSB2PHYCFG(n)
#define GCC_USB3_RST_CTRL
#define DWC3_GCTL_PRTCAP_OTG
#define DWC3_GUSB3PIPECTL_SUSPHY
#define DWC3_GUSB2PHYCFG_PHYSOFTRST
static void qcom_baldur_hs_phy_init(void)
#define USB30_HS_PHY_CTRL
static void qscratch_write_readback(void *base, u32 offset, const u32 mask, u32 val)
Write register and read back masked value to confirm it is written.
#define DWC3_GUSB2PHYCFG_SUSPHY
#define DWC3_GUSB3PIPECTL_PHYSOFTRST
#define PHY_CTRL0_ADDR
USB Hardware registers.
#define DWC3_GCTL_SCALEDOWN_MASK
static void qscratch_write(void *base, u32 offset, u32 val)
Write register.
#define DWC3_GCTL_CORESOFTRESET
#define USB30_SS_PHY_CTRL
#define DWC3_DCTL_CSFTRST
#define DWC3_GCTL_DISSCRAMBLE
#define DWC3_GCTL_U2RSTECN
#define DWC3_GCTL_DSBLCLKGTNG
#define UTMI_OTG_VBUS_VALID
static void setup_dwc3(void)
#define DWC3_GSNPSID_MASK
static void qcom_uni_ss_phy_init(void)
#define DWC3_GUSB3PIPECTL(n)
#define DWC3_GCTL_PRTCAPDIR(n)
void setup_usb_host1(void)
#define USB_HOST3_PHY_BASE
static void dwc3_ipq40xx_enable_vbus_valid(void)