coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
usb.c File Reference
#include <device/mmio.h>
#include <assert.h>
#include <console/console.h>
#include <soc/clock.h>
#include <soc/grf.h>
#include <soc/soc.h>
#include <soc/usb.h>
Include dependency graph for usb.c:

Go to the source code of this file.

Functions

static void isolate_tcphy (struct rk3399_tcphy *tcphy)
 
static void tcphy_cfg_24m (struct rk3399_tcphy *tcphy)
 
static void tcphy_phy_init (struct rk3399_tcphy *tcphy)
 
static void reset_dwc3 (struct rockchip_usb_dwc3 *dwc3)
 
static void setup_dwc3 (struct rockchip_usb_dwc3 *dwc3)
 
void reset_usb_otg0 (void)
 
void reset_usb_otg1 (void)
 
void setup_usb_otg0 (void)
 
void setup_usb_otg1 (void)
 

Function Documentation

◆ isolate_tcphy()

static void isolate_tcphy ( struct rk3399_tcphy tcphy)
static

Definition at line 13 of file usb.c.

References rk3399_tcphy::isolation_ctrl, TCPHY_ISOLATION_CTRL_CMN_EN, TCPHY_ISOLATION_CTRL_EN, TCPHY_ISOLATION_CTRL_LN_EN, TCPHY_ISOLATION_CTRL_MODE_SEL, and write32().

Referenced by tcphy_phy_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_dwc3()

static void reset_dwc3 ( struct rockchip_usb_dwc3 dwc3)
static

◆ reset_usb_otg0()

void reset_usb_otg0 ( void  )

Definition at line 112 of file usb.c.

References BIOS_DEBUG, cru_ptr, printk, reset_dwc3(), rk3399_grf, RK_CLRBITS, RK_CLRSETBITS, RK_SETBITS, rockchip_usb_otg0_dwc3, rockchip_usb_otg0_phy, tcphy_phy_init(), rk3399_grf_regs::usb3otg0_con1, and write32().

Referenced by prepare_usb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_usb_otg1()

void reset_usb_otg1 ( void  )

Definition at line 130 of file usb.c.

References BIOS_DEBUG, cru_ptr, printk, reset_dwc3(), rk3399_grf, RK_CLRBITS, RK_CLRSETBITS, RK_SETBITS, rockchip_usb_otg1_dwc3, rockchip_usb_otg1_phy, tcphy_phy_init(), rk3399_grf_regs::usb3otg1_con1, and write32().

Referenced by prepare_usb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_dwc3()

◆ setup_usb_otg0()

void setup_usb_otg0 ( void  )

Definition at line 148 of file usb.c.

References BIOS_DEBUG, cru_ptr, printk, RK_CLRBITS, rockchip_usb_otg0_dwc3, setup_dwc3(), and write32().

Referenced by setup_usb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_usb_otg1()

void setup_usb_otg1 ( void  )

Definition at line 157 of file usb.c.

References BIOS_DEBUG, cru_ptr, printk, RK_CLRBITS, rockchip_usb_otg1_dwc3, setup_dwc3(), and write32().

Referenced by setup_usb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcphy_cfg_24m()

static void tcphy_cfg_24m ( struct rk3399_tcphy tcphy)
static

◆ tcphy_phy_init()

static void tcphy_phy_init ( struct rk3399_tcphy tcphy)
static

Definition at line 48 of file usb.c.

References isolate_tcphy(), rk3399_tcphy::lane, tcphy_cfg_24m(), rk3399_tcphy::tx_diag_tx_drv, rk3399_tcphy::tx_psc_a2, and write32().

Referenced by reset_usb_otg0(), and reset_usb_otg1().

Here is the call graph for this function:
Here is the caller graph for this function: