usb: dwc3: init phy utmi width in platform data

On rk3399 board, we need to configure phy interface UTMI+ width
to 16 bits via the property "snps,phyif-utmi-bits" of dwc3 node.
But we can't the get the property from kernel dtb. So this patch
initialize the phy interface UTMI+ width in dwc3 platform data,
and not dependent on the property in dtb.

Change-Id: I3f6b05e0d72806242a128c85f82b260f61ac4f95
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu 2018-06-27 16:28:51 +08:00 committed by Kever Yang
parent 6281205a07
commit 2878d5a3aa
3 changed files with 5 additions and 0 deletions

View File

@ -194,6 +194,7 @@ static struct dwc3_device dwc3_device_data = {
.dr_mode = USB_DR_MODE_PERIPHERAL,
.index = 0,
.dis_u2_susphy_quirk = 1,
.usb2_phyif_utmi_width = 16,
};
int usb_gadget_handle_interrupts(void)

View File

@ -694,6 +694,9 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
dwc->index = dwc3_dev->index;
if (dwc3_dev->usb2_phyif_utmi_width)
dwc->usb2_phyif_utmi_width = dwc3_dev->usb2_phyif_utmi_width;
node = fdt_node_offset_by_compatible(blob, -1,
"rockchip,rk3399-xhci");
if (node < 0)

View File

@ -33,6 +33,7 @@ struct dwc3_device {
unsigned dis_u2_susphy_quirk;
unsigned tx_de_emphasis_quirk;
unsigned tx_de_emphasis;
unsigned usb2_phyif_utmi_width;
int index;
};