usb: cdns: starfive: Get dr mode from wrapper device dts node

Cdns core driver also get dr mode from wrapper devcie dts node
to make it is same with Starfive cdns USB Linux kernel driver,
Starfive 7110 OF_UPSTREAM is enabled

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Minda Chen
2025-03-06 14:20:28 +08:00
committed by Marek Vasut
parent 0cbecd6954
commit af65cc3ebf
2 changed files with 4 additions and 1 deletions

View File

@@ -170,7 +170,7 @@ static int starfive_pcie_phy_get_syscon(struct udevice *dev)
int ret; int ret;
/* get corresponding syscon phandle */ /* get corresponding syscon phandle */
ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 0, 0, ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 1, 0,
&sys_phandle); &sys_phandle);
if (ret < 0) { if (ret < 0) {

View File

@@ -410,6 +410,9 @@ int cdns3_bind(struct udevice *parent)
name = ofnode_get_name(node); name = ofnode_get_name(node);
dr_mode = usb_get_dr_mode(node); dr_mode = usb_get_dr_mode(node);
if (dr_mode == USB_DR_MODE_UNKNOWN)
dr_mode = usb_get_dr_mode(dev_ofnode(parent));
switch (dr_mode) { switch (dr_mode) {
#if defined(CONFIG_SPL_USB_HOST) || \ #if defined(CONFIG_SPL_USB_HOST) || \
(!defined(CONFIG_XPL_BUILD) && defined(CONFIG_USB_HOST)) (!defined(CONFIG_XPL_BUILD) && defined(CONFIG_USB_HOST))