From: Francesco Lavra <francescolavra.fl@gmail.com> To: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: Heiko Stuebner <heiko@sntech.de> Subject: RK3288 USB OTG controller in peripheral mode Date: Thu, 23 Feb 2017 19:11:37 +0100 [thread overview] Message-ID: <2b818d21-62a6-515e-8116-f243a2c07e08@gmail.com> (raw) I'm having trouble getting the RK3288 OTG controller (the one at ff580000) to work in peripheral mode. I'm using a Firefly Reload board, and I know the hardware is fine because I can successfully use the port in device mode with U-Boot's mass storage gadget driver. Under Linux, the OTG port works fine when used in host mode, but fails to work in device mode: nothing happens when the a USB host is plugged into the OTG port, not even a single interrupt is generated by the controller. I'm using the latest device tree definitions from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git. Tried with different gadget drivers (g_audio, g_ether, g_mass_storage), but it makes no difference. Tried also forcing peripheral mode in the device tree, with dr_mode = "peripheral", to no avail. Are there any known problems with the RK3288 OTG controller? Here is the relevant log when the dwc2 driver is loaded at boot: [ 1.376935] ff580000.usb supply vusb_d not found, using dummy regulator [ 1.383683] ff580000.usb supply vusb_a not found, using dummy regulator [ 1.390627] dwc2 ff580000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001 [ 1.509048] dwc2 ff580000.usb: dwc2_wait_for_mode: Couldn't set device mode [ 1.750626] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average [ 1.761828] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[1]=104 [ 1.771192] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[2]=104 [ 1.780529] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[3]=104 [ 1.789888] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[4]=104 [ 1.799245] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[5]=104 [ 1.808614] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[6]=104 [ 1.817993] usb 1-1: new high-speed USB device number 2 using dwc2 [ 1.824390] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM [ 1.832098] dwc2 ff580000.usb: DWC OTG Controller [ 1.836924] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2 [ 1.844125] dwc2 ff580000.usb: irq 41, io mem 0xff580000 [ 1.849747] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.856598] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.863875] usb usb2: Product: DWC OTG Controller [ 1.868601] usb usb2: Manufacturer: Linux 4.8.1+ dwc2_hsotg [ 1.874215] usb usb2: SerialNumber: ff580000.usb and this is what I get when I load a gadget driver (in this case, g_audio): [ 19.848590] dwc2 ff580000.usb: bound driver g_audio [ 19.853816] dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11) Thank you, Francesco Lavra
WARNING: multiple messages have this Message-ID (diff)
From: francescolavra.fl@gmail.com (Francesco Lavra) To: linux-arm-kernel@lists.infradead.org Subject: RK3288 USB OTG controller in peripheral mode Date: Thu, 23 Feb 2017 19:11:37 +0100 [thread overview] Message-ID: <2b818d21-62a6-515e-8116-f243a2c07e08@gmail.com> (raw) I'm having trouble getting the RK3288 OTG controller (the one at ff580000) to work in peripheral mode. I'm using a Firefly Reload board, and I know the hardware is fine because I can successfully use the port in device mode with U-Boot's mass storage gadget driver. Under Linux, the OTG port works fine when used in host mode, but fails to work in device mode: nothing happens when the a USB host is plugged into the OTG port, not even a single interrupt is generated by the controller. I'm using the latest device tree definitions from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git. Tried with different gadget drivers (g_audio, g_ether, g_mass_storage), but it makes no difference. Tried also forcing peripheral mode in the device tree, with dr_mode = "peripheral", to no avail. Are there any known problems with the RK3288 OTG controller? Here is the relevant log when the dwc2 driver is loaded at boot: [ 1.376935] ff580000.usb supply vusb_d not found, using dummy regulator [ 1.383683] ff580000.usb supply vusb_a not found, using dummy regulator [ 1.390627] dwc2 ff580000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001 [ 1.509048] dwc2 ff580000.usb: dwc2_wait_for_mode: Couldn't set device mode [ 1.750626] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average [ 1.761828] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[1]=104 [ 1.771192] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[2]=104 [ 1.780529] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[3]=104 [ 1.789888] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[4]=104 [ 1.799245] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[5]=104 [ 1.808614] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[6]=104 [ 1.817993] usb 1-1: new high-speed USB device number 2 using dwc2 [ 1.824390] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM [ 1.832098] dwc2 ff580000.usb: DWC OTG Controller [ 1.836924] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2 [ 1.844125] dwc2 ff580000.usb: irq 41, io mem 0xff580000 [ 1.849747] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.856598] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.863875] usb usb2: Product: DWC OTG Controller [ 1.868601] usb usb2: Manufacturer: Linux 4.8.1+ dwc2_hsotg [ 1.874215] usb usb2: SerialNumber: ff580000.usb and this is what I get when I load a gadget driver (in this case, g_audio): [ 19.848590] dwc2 ff580000.usb: bound driver g_audio [ 19.853816] dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11) Thank you, Francesco Lavra
next reply other threads:[~2017-02-23 18:11 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-02-23 18:11 Francesco Lavra [this message] 2017-02-23 18:11 ` RK3288 USB OTG controller in peripheral mode Francesco Lavra [not found] ` <2b818d21-62a6-515e-8116-f243a2c07e08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-02-23 19:27 ` dwc2 gadget issues (was: RK3288 USB OTG controller in peripheral mode) Heiko Stuebner 2017-02-27 17:57 ` dwc2 gadget issues Francesco Lavra 2017-02-27 17:57 ` Francesco Lavra 2017-02-28 8:41 ` Vardan Mikayelyan 2017-02-28 8:41 ` Vardan Mikayelyan 2017-02-28 11:43 ` Francesco Lavra 2017-02-28 11:43 ` Francesco Lavra 2017-02-28 13:44 ` Vardan Mikayelyan 2017-02-28 13:44 ` Vardan Mikayelyan 2017-03-01 7:37 ` Francesco Lavra 2017-03-01 7:37 ` Francesco Lavra 2017-03-02 5:58 ` Randy Li 2017-03-02 5:58 ` Randy Li [not found] ` <11c40609-d59a-8e8e-1c9b-3989cd98b5e7-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-03-03 7:43 ` Francesco Lavra
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2b818d21-62a6-515e-8116-f243a2c07e08@gmail.com \ --to=francescolavra.fl@gmail.com \ --cc=heiko@sntech.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-rockchip@lists.infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.