Add address of USB3.0 host controller registers in RK3568

This commit is contained in:
xj 2024-06-25 23:39:18 -07:00
parent 9bf663c476
commit e44ae64451
2 changed files with 12 additions and 1 deletions

View File

@ -84,7 +84,16 @@ __WEAK void usb_hc_free()
/* one may get xhci register base address by PCIe bus emuration */
__WEAK unsigned long usb_hc_get_register_base(uint32_t id)
{
return 0U;
unsigned long base_addr;
if(USB3_0_ID == id)
base_addr = USB3_0_BASE_ADDR;
else if(USB3_1_ID == id)
base_addr = USB3_1_BASE_ADDR;
else
base_addr = 0;
return base_addr;
}

View File

@ -48,6 +48,8 @@ extern "C" {
/*
* Address of USB3 host control base Register in RK3568.
*/
#define USB3_0_ID 0
#define USB3_1_ID 1
#define USB3_0_BASE_ADDR 0xFCC00000
#define USB3_1_BASE_ADDR 0xFD000000