![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | ssusb_ippc_regs |
struct | sif_u2_phy_com |
struct | sif_u3phyd |
struct | sif_u3phya |
struct | sif_u3phya_da |
Macros | |
#define | CTRL0_IP_SW_RST (0x1 << 0) |
#define | CTRL1_IP_HOST_PDN (0x1 << 0) |
#define | STS1_U3_MAC_RST (0x1 << 16) |
#define | STS1_SYS125_RST (0x1 << 10) |
#define | STS1_REF_RST (0x1 << 8) |
#define | STS1_SYSPLL_STABLE (0x1 << 0) |
#define | STS2_U2_MAC_RST (0x1 << 0) |
#define | CAP_U3_PORT_NUM(p) ((p) & 0xff) |
#define | CAP_U2_PORT_NUM(p) (((p) >> 8) & 0xff) |
#define | CTRL_U3_PORT_HOST_SEL (0x1 << 2) |
#define | CTRL_U3_PORT_PDN (0x1 << 1) |
#define | CTRL_U3_PORT_DIS (0x1 << 0) |
#define | CTRL_U2_PORT_HOST_SEL (0x1 << 2) |
#define | CTRL_U2_PORT_PDN (0x1 << 1) |
#define | CTRL_U2_PORT_DIS (0x1 << 0) |
#define | PA5_RG_U2_HSTX_SRCTRL (0x7 << 12) |
#define | PA5_RG_U2_HSTX_SRCTRL_VAL(x) ((0x7 & (x)) << 12) |
#define | PA5_RG_U2_HS_100U_U3_EN (0x1 << 11) |
#define | PA6_RG_U2_ISO_EN (0x1 << 31) |
#define | PA6_RG_U2_BC11_SW_EN (0x1 << 23) |
#define | PA6_RG_U2_OTG_VBUSCMP_EN (0x1 << 20) |
#define | PA6_RG_U2_DISCTH (0xf << 4) |
#define | PA6_RG_U2_DISCTH_VAL(x) ((0xf & (x)) << 4) |
#define | PA6_RG_U2_SQTH (0xf << 0) |
#define | PA6_RG_U2_SQTH_VAL(x) ((0xf & (x)) << 0) |
#define | P2C_RG_USB20_GPIO_CTL (0x1 << 9) |
#define | P2C_USB20_GPIO_MODE (0x1 << 8) |
#define | P2C_U2_GPIO_CTR_MSK (P2C_RG_USB20_GPIO_CTL | P2C_USB20_GPIO_MODE) |
#define | P2C_FORCE_UART_EN (0x1 << 26) |
#define | P2C_FORCE_DATAIN (0x1 << 23) |
#define | P2C_FORCE_DM_PULLDOWN (0x1 << 21) |
#define | P2C_FORCE_DP_PULLDOWN (0x1 << 20) |
#define | P2C_FORCE_XCVRSEL (0x1 << 19) |
#define | P2C_FORCE_SUSPENDM (0x1 << 18) |
#define | P2C_FORCE_TERMSEL (0x1 << 17) |
#define | P2C_RG_DATAIN (0xf << 10) |
#define | P2C_RG_DATAIN_VAL(x) ((0xf & (x)) << 10) |
#define | P2C_RG_DMPULLDOWN (0x1 << 7) |
#define | P2C_RG_DPPULLDOWN (0x1 << 6) |
#define | P2C_RG_XCVRSEL (0x3 << 4) |
#define | P2C_RG_XCVRSEL_VAL(x) ((0x3 & (x)) << 4) |
#define | P2C_RG_SUSPENDM (0x1 << 3) |
#define | P2C_RG_TERMSEL (0x1 << 2) |
#define | P2C_DTM0_PART_MASK |
#define | P2C_RG_UART_EN (0x1 << 16) |
#define | P2C_RG_VBUSVALID (0x1 << 5) |
#define | P2C_RG_SESSEND (0x1 << 4) |
#define | P2C_RG_AVALID (0x1 << 2) |
#define | P3A_RG_U3_VUSB10_ON (1 << 5) |
#define | P3A_RG_TX_EIDLE_CM (0xf << 28) |
#define | P3A_RG_TX_EIDLE_CM_VAL(x) ((0xf & (x)) << 28) |
#define | P3A_RG_RX_DAC_MUX (0x1f << 1) |
#define | P3A_RG_RX_DAC_MUX_VAL(x) ((0x1f & (x)) << 1) |
#define | P3A_RG_XTAL_EXT_EN_U3 (0x3 << 10) |
#define | P3A_RG_XTAL_EXT_EN_U3_VAL(x) ((0x3 & (x)) << 10) |
#define | P3D_RG_CDR_BIR_LTD1 (0x1f << 24) |
#define | P3D_RG_CDR_BIR_LTD1_VAL(x) ((0x1f & (x)) << 24) |
#define | P3D_RG_CDR_BIR_LTD0 (0x1f << 8) |
#define | P3D_RG_CDR_BIR_LTD0_VAL(x) ((0x1f & (x)) << 8) |
Functions | |
check_member (sif_u2_phy_com, u2phydtm0, 0x68) | |
void | mtk_usb_prepare (void) |
void | mtk_usb_adjust_phy_shift (void) |
void | setup_usb_host (void) |
#define CAP_U2_PORT_NUM | ( | p | ) | (((p) >> 8) & 0xff) |
Definition at line 25 of file usb_common.h.
#define CAP_U3_PORT_NUM | ( | p | ) | ((p) & 0xff) |
Definition at line 24 of file usb_common.h.
#define CTRL0_IP_SW_RST (0x1 << 0) |
Definition at line 9 of file usb_common.h.
#define CTRL1_IP_HOST_PDN (0x1 << 0) |
Definition at line 12 of file usb_common.h.
#define CTRL_U2_PORT_DIS (0x1 << 0) |
Definition at line 35 of file usb_common.h.
#define CTRL_U2_PORT_HOST_SEL (0x1 << 2) |
Definition at line 33 of file usb_common.h.
#define CTRL_U2_PORT_PDN (0x1 << 1) |
Definition at line 34 of file usb_common.h.
#define CTRL_U3_PORT_DIS (0x1 << 0) |
Definition at line 30 of file usb_common.h.
#define CTRL_U3_PORT_HOST_SEL (0x1 << 2) |
Definition at line 28 of file usb_common.h.
#define CTRL_U3_PORT_PDN (0x1 << 1) |
Definition at line 29 of file usb_common.h.
#define P2C_DTM0_PART_MASK |
Definition at line 86 of file usb_common.h.
#define P2C_FORCE_DATAIN (0x1 << 23) |
Definition at line 72 of file usb_common.h.
#define P2C_FORCE_DM_PULLDOWN (0x1 << 21) |
Definition at line 73 of file usb_common.h.
#define P2C_FORCE_DP_PULLDOWN (0x1 << 20) |
Definition at line 74 of file usb_common.h.
#define P2C_FORCE_SUSPENDM (0x1 << 18) |
Definition at line 76 of file usb_common.h.
#define P2C_FORCE_TERMSEL (0x1 << 17) |
Definition at line 77 of file usb_common.h.
#define P2C_FORCE_UART_EN (0x1 << 26) |
Definition at line 71 of file usb_common.h.
#define P2C_FORCE_XCVRSEL (0x1 << 19) |
Definition at line 75 of file usb_common.h.
#define P2C_RG_AVALID (0x1 << 2) |
Definition at line 96 of file usb_common.h.
#define P2C_RG_DATAIN (0xf << 10) |
Definition at line 78 of file usb_common.h.
Definition at line 79 of file usb_common.h.
#define P2C_RG_DMPULLDOWN (0x1 << 7) |
Definition at line 80 of file usb_common.h.
#define P2C_RG_DPPULLDOWN (0x1 << 6) |
Definition at line 81 of file usb_common.h.
#define P2C_RG_SESSEND (0x1 << 4) |
Definition at line 95 of file usb_common.h.
#define P2C_RG_SUSPENDM (0x1 << 3) |
Definition at line 84 of file usb_common.h.
#define P2C_RG_TERMSEL (0x1 << 2) |
Definition at line 85 of file usb_common.h.
#define P2C_RG_UART_EN (0x1 << 16) |
Definition at line 93 of file usb_common.h.
#define P2C_RG_USB20_GPIO_CTL (0x1 << 9) |
Definition at line 66 of file usb_common.h.
#define P2C_RG_VBUSVALID (0x1 << 5) |
Definition at line 94 of file usb_common.h.
#define P2C_RG_XCVRSEL (0x3 << 4) |
Definition at line 82 of file usb_common.h.
Definition at line 83 of file usb_common.h.
#define P2C_U2_GPIO_CTR_MSK (P2C_RG_USB20_GPIO_CTL | P2C_USB20_GPIO_MODE) |
Definition at line 68 of file usb_common.h.
#define P2C_USB20_GPIO_MODE (0x1 << 8) |
Definition at line 67 of file usb_common.h.
#define P3A_RG_RX_DAC_MUX (0x1f << 1) |
Definition at line 106 of file usb_common.h.
Definition at line 107 of file usb_common.h.
#define P3A_RG_TX_EIDLE_CM (0xf << 28) |
Definition at line 102 of file usb_common.h.
Definition at line 103 of file usb_common.h.
#define P3A_RG_U3_VUSB10_ON (1 << 5) |
Definition at line 99 of file usb_common.h.
#define P3A_RG_XTAL_EXT_EN_U3 (0x3 << 10) |
Definition at line 110 of file usb_common.h.
Definition at line 111 of file usb_common.h.
#define P3D_RG_CDR_BIR_LTD0 (0x1f << 8) |
Definition at line 116 of file usb_common.h.
Definition at line 117 of file usb_common.h.
#define P3D_RG_CDR_BIR_LTD1 (0x1f << 24) |
Definition at line 114 of file usb_common.h.
Definition at line 115 of file usb_common.h.
#define PA5_RG_U2_HS_100U_U3_EN (0x1 << 11) |
Definition at line 54 of file usb_common.h.
#define PA5_RG_U2_HSTX_SRCTRL (0x7 << 12) |
Definition at line 52 of file usb_common.h.
Definition at line 53 of file usb_common.h.
#define PA6_RG_U2_BC11_SW_EN (0x1 << 23) |
Definition at line 58 of file usb_common.h.
#define PA6_RG_U2_DISCTH (0xf << 4) |
Definition at line 60 of file usb_common.h.
Definition at line 61 of file usb_common.h.
#define PA6_RG_U2_ISO_EN (0x1 << 31) |
Definition at line 57 of file usb_common.h.
#define PA6_RG_U2_OTG_VBUSCMP_EN (0x1 << 20) |
Definition at line 59 of file usb_common.h.
#define PA6_RG_U2_SQTH (0xf << 0) |
Definition at line 62 of file usb_common.h.
Definition at line 63 of file usb_common.h.
#define STS1_REF_RST (0x1 << 8) |
Definition at line 17 of file usb_common.h.
#define STS1_SYS125_RST (0x1 << 10) |
Definition at line 16 of file usb_common.h.
#define STS1_SYSPLL_STABLE (0x1 << 0) |
Definition at line 18 of file usb_common.h.
#define STS1_U3_MAC_RST (0x1 << 16) |
Definition at line 15 of file usb_common.h.
#define STS2_U2_MAC_RST (0x1 << 0) |
Definition at line 21 of file usb_common.h.
check_member | ( | sif_u2_phy_com | , |
u2phydtm0 | , | ||
0x68 | |||
) |
Definition at line 148 of file usb.c.
References INTR_CAL_MASK, INTR_CAL_SHIFT, sif_u3phya::phya_reg0, sif_u3phyd::phyd_cal0, sif_u3phyd::phyd_cal1, sif_u3phyd::phyd_reserved, read32(), RX_IMP_MASK, RX_IMP_SHIFT, SET32_BITFIELDS, SSUSB_SIF_BASE, TX_IMP_MASK, TX_IMP_SHIFT, ssusb_sif_port::u3phya, ssusb_sif_port::u3phyd, and USB_PHY_SETTING_REG.
Referenced by setup_usb_host().
Definition at line 143 of file usb.c.
References BIT, clrbits32, GPIO, gpio_output(), mt8195_infracfg_ao_regs::module_sw_cg_2_clr, mt8195_infracfg_ao, mt_pll_enable_ssusb_clk(), mtk_topckgen, PERI_U3_WAKE_CTRL0, PERI_USB_WAKEUP_DEC_CON1, PERICFG_BASE, REG_SPM_POWERON_CONFIG_EN, REG_SPM_SSPM_PWR_CON, setbits32, and write32p().
Referenced by setup_usb_host().
Definition at line 153 of file usb.c.
References mtk_usb_adjust_phy_shift(), mtk_usb_prepare(), ssusb_soft_reset(), u3p_err, u3p_msg, u3phy_ports_enable(), and u3phy_power_on().
Referenced by configure_usb(), mainboard_init(), setup_usb(), and setup_usb_host0().