I am trying to use usb on my custom board with zynqmp and usb3310 phy.
The usb full speed works great but when I insert an high speed device (like usb storage) the kernel seems to not switch to high speed.
My dtsi file :
usb1: usb@ff9e0000 {
#address-cells = <2>;
#size-cells = <2>;
status = "disabled";
compatible = "xlnx,zynqmp-dwc3";
reg = <0x0 0xff9e0000 0x0 0x100>;
clock-names = "bus_clk", "ref_clk";
power-domains = <&zynqmp_firmware PD_USB_1>;
resets = <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>,
<&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>,
<&zynqmp_reset ZYNQMP_RESET_USB1_APB>;
reset-names = "usb_crst", "usb_hibrst", "usb_apbrst";
ranges;
phy_type = "ulpi";
usb-phy = <&usb_phy1>;
dwc3_1: usb@fe300000 {
compatible = "snps,dwc3";
reg = <0x0 0xfe300000 0x0 0x40000>;
interrupt-parent = <&gic>;
interrupt-names = "host", "peripheral", "otg";
//interrupt-names = "dwc_usb3", "otg", "hiber";
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "bus_early", "ref";
iommus = <&smmu 0x861>;
snps,quirk-frame-length-adjustment = <0x20>;
snps,resume-hs-terminations;
dr_mode = "host";
//snps,refclk_fladj;
//snps,enable_guctl1_resume_quirk;
//snps,enable_guctl1_ipd_quirk;
//snps,xhci-stream-quirk;
//dma-coherent;
};
};
My dtb file:
&usb1 {
status = "okay";
xlnx,tz-nonsecure = <0x0>;
xlnx,usb-polarity = <0x0>;
xlnx,usb-reset-io = <0x1c>;
xlnx,usb-reset-mode = <0x2>;
};
&dwc3_1 {
/delete-property/ phy-names ;
/delete-property/ phys ;
//maximum-speed = "full-speed";
snps,dis_u2_susphy_quirk ;
snps,dis_u3_susphy_quirk ;
status = "okay";
};
Enabled kernel options :
CONFIG_USB_ULPI_BUS
CONFIG_USB
CONFIG_USB_ANNOUNCE_NEW_DEVICES
CONFIG_USB_OTG
CONFIG_USB_XHCI_HCD
CONFIG_USB_XHCI_DBGCAP
CONFIG_USB_XHCI_PLATFORM
CONFIG_USB_STORAGE
CONFIG_USB_DWC3
CONFIG_USB_DWC3_ULPI
CONFIG_USB_DWC3_DUAL_ROLE
CONFIG_USB_DWC3_OF_SIMPLE
CONFIG_USB_DWC3_XILINX
CONFIG_USB_GADGET
Error log :
[ 22.982212] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 23.195353] usb 1-1: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[ 23.203533] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 23.210668] usb 1-1: Product: Flash Disk
[ 23.214589] usb 1-1: Manufacturer: USB
[ 23.218331] usb 1-1: SerialNumber: SCY0000000016251
[ 23.223791] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 23.230184] usb-storage 1-1:1.0: Quirks match for vid 090c pid 1000: 400
[ 23.236963] scsi host0: usb-storage 1-1:1.0
[ 24.703206] scsi 0:0:0:0: Direct-Access USB Flash Disk 1100 PQ: 0 ANSI: 4
[ 24.713527] sd 0:0:0:0: [sda] 15974400 512-byte logical blocks: (8.18 GB/7.62 GiB)
[ 24.721903] sd 0:0:0:0: [sda] Write Protect is off
[ 24.726699] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 24.732515] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 24.874292] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 25.682259] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 26.490258] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 27.294256] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 28.098271] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 28.902260] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[ 29.114969] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=DRIVER_OK cmd_age=4s
[ 29.124536] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[ 29.132105] blk_update_request: I/O error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 29.141930] Buffer I/O error on dev sda, logical block 0, async page read
The usb works with baremetal usb-ethernet gadget (my PCB is ok).
Any idea ?