coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
qusb_phy.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/mmio.h>
4 #include <console/console.h>
5 
6 #define PORT_TUNE1_MASK 0xf0
7 
8 /* QUSB2PHY_PWR_CTRL1 register related bits */
9 #define POWER_DOWN BIT(0)
10 
11 /* DEBUG_CTRL2 register value to program VSTATUS MUX for PHY status */
12 #define DEBUG_CTRL2_MUX_PLL_LOCK_STATUS 0x4
13 
14 /* STAT5 register bits */
15 #define VSTATUS_PLL_LOCK_STATUS_MASK BIT(0)
16 
17 /* QUSB PHY register values */
18 #define QUSB2PHY_PLL_ANALOG_CONTROLS_TWO 0x03
19 #define QUSB2PHY_PLL_CLOCK_INVERTERS 0x7c
20 #define QUSB2PHY_PLL_CMODE 0x80
21 #define QUSB2PHY_PLL_LOCK_DELAY 0x0a
22 #define QUSB2PHY_PLL_DIGITAL_TIMERS_TWO 0x19
23 #define QUSB2PHY_PLL_BIAS_CONTROL_1 0x40
24 #define QUSB2PHY_PLL_BIAS_CONTROL_2 0x22
25 #define QUSB2PHY_PWR_CTRL2 0x21
26 #define QUSB2PHY_IMP_CTRL1 0x08
27 #define QUSB2PHY_IMP_CTRL2 0x58
28 #define QUSB2PHY_PORT_TUNE1 0xc5
29 #define QUSB2PHY_PORT_TUNE2 0x29
30 #define QUSB2PHY_PORT_TUNE3 0xca
31 #define QUSB2PHY_PORT_TUNE4 0x04
32 #define QUSB2PHY_PORT_TUNE5 0x03
33 #define QUSB2PHY_CHG_CTRL2 0x30
34 
35 
36 #define QFPROM_BASE 0x00780000
37 #define QUSB_PRIM_PHY_BASE 0x088e3000
38 #define QUSB_PRIM_PHY_DIG_BASE 0x088e3200
39 
40 #define HS_USB_PRIM_PHY_BASE QUSB_PRIM_PHY_BASE
41 
43  /* Register values going to override from the boardfile */
47 };
48 
50  u8 rsvd1[16];
53  u8 rsvd2[8];
56  u8 rsvd3[20];
63  u8 rsvd4[44];
65  u8 rsvd5[28];
67 };
69 check_member(usb_qusb_phy_dig, debug_ctrl2, 0x80);
70 check_member(usb_qusb_phy_dig, debug_stat5, 0xA0);
71 
73  u8 rsvd0[4];
75  u8 rsvd1[36];
77  u8 rsvd2[132];
79  u8 rsvd3[204];
81  u8 rsvd4[4];
83  u8 rsvd5[4];
86 };
88 check_member(usb_qusb_phy_pll, bias_ctrl_2, 0x198);
90 
96 };
check_member(usb_qusb_phy_dig, tune5, 0x50)
uint32_t u32
Definition: stdint.h:51
uint8_t u8
Definition: stdint.h:45
struct usb_board_data * board_data
Definition: qusb_phy.h:94
struct usb_qusb_phy_dig * phy_dig
Definition: qusb_phy.h:93
struct usb_qusb_phy_pll * phy_pll
Definition: qusb_phy.h:92
u32 efuse_offset
Definition: qusb_phy.h:95
u32 pll_bias_control_2
Definition: qusb_phy.h:44
u32 port_tune1
Definition: qusb_phy.h:46
u8 rsvd1[16]
Definition: qusb_phy.h:50
u8 rsvd3[20]
Definition: qusb_phy.h:56
u8 rsvd4[44]
Definition: qusb_phy.h:63
u8 rsvd5[28]
Definition: qusb_phy.h:65
u32 analog_controls_two
Definition: qusb_phy.h:74
u8 rsvd1[36]
Definition: qusb_phy.h:75
u8 rsvd2[132]
Definition: qusb_phy.h:77
u32 clock_inverters
Definition: qusb_phy.h:82
u8 rsvd3[204]
Definition: qusb_phy.h:79