Hi Stefan,
thanks for the answer!
I did some additional tests, this time with a RPi 3 Model B (a few changes on the kernel config, but no code changes at genode) and on this platform the usb driver sometimes (rarely) completely initializes and is usable. For the RPi 2 I'm still out of luck - but I'm pretty sure IRQs are handled correctly and go through.
RPi 3 successfully initializing USB:
[init -> platform_drv] --- Raspberry Pi platform driver --- [init] child "timer" announces service "Timer" [init -> usb_drv] No <hid> config node found - not starting the USB HID (Input) service [init -> usb_drv] No <storage> config node found - not starting the USB Storage (Block) service [init -> usb_drv] No <raw> config node found - not starting external USB service [init -> foc_gpio_drv] --- Raspberry Pi GPIO driver --- [init -> usb_drv] Enabled EHCI (USB 2.0) support [init -> foc_gpio_drv] Warning: no GPIO config [init -> foc_gpio_drv] Warning: no GPIO config [init] child "platform_drv" announces service "Platform" [init] child "foc_gpio_drv" announces service "Gpio" [init -> platform_drv] Error: Mbox: timeout waiting for response [init -> usb_drv] Using configured mac: 0x405ffbfc [init -> usb_drv] dev_info: DWC OTG Controller [init -> usb_drv] dev_info: new USB bus registered, assigned bus number 1 [init -> usb_drv] dev_info: irq 9, io mem 0x00000000 [init -> usb_drv] dev_info: USB hub found [init -> usb_drv] dev_info: 1 port detected [init -> usb_drv] dev_info: new high-speed USB device number 2 using dwc_otg [init -> usb_drv] dev_info: USB hub found [init -> usb_drv] dev_info: 5 ports detected [init -> usb_drv] dev_info: new high-speed USB device number 3 using dwc_otg [init -> usb_drv] Using configured mac: 0x408ffc24 [init -> usb_drv] netif_info: open: enable queueing (rx 4, tx 60) mtu 1500 simple framing [init -> usb_drv] nedev_info: hardware isn't capable of remote wakeup [init] child "usb_drv" announces service "Nic" [init -> usb_drv] netif_info: register 'smsc95xx' at usb-dwc_otg-1.1, smsc95xx USB 2.0 Ethernet, 02:00:00:00:01:01 [init -> test-lwip_httpsrv] Create new socket ... [init -> test-lwip_httpsrv] Now, I will bind ... [init -> test-lwip_httpsrv] Now, I will listen ... [init -> test-lwip_httpsrv] Start the server loop ... [init -> test-lwip_httpsrv] got IP address 192.168.137.136
I also need to take a look at "Error: Mbox: timeout waiting for response", which I'm getting for both the RPi 2 and RPi 3 but I think the error is unrelated to the USB problem.
Additional ideas what I could check?
Best regards Alexander
PS: The RPi 2 sometimes hangs at startup, presumably around the 'Calibrating timer loop...'. Interestingly I'm also not able to boot this image in QEMU (with the raspi2 machine), since it's always stuck at this position in the boot process.
On Thu, Jun 21, 2018 at 01:20:57PM +0200, Stefan Kalkowski wrote:
Hello Alexander,
On Wed, Jun 20, 2018 at 02:19:29PM +0200, Alexander Weidinger wrote:
Hello everyone,
when executing 'lwip' on the RPi 2, I get the following output for the usb_drv:
[init -> usb_drv] dev_info: DWC OTG Controller [init -> usb_drv] dev_info: new USB bus registered, assigned bus number 1 [init -> usb_drv] dev_info: irq 9, io mem 0x00000000 [init -> usb_drv] dev_info: USB hub found [init -> usb_drv] dev_info: 1 port detected [init -> usb_drv] dev_info: new high-speed USB device number 2 using dwc_otg [init -> usb_drv] dev_error: device descriptor read/all, error -92 [init -> usb_drv] dev_info: new high-speed USB device number 3 using dwc_otg [init -> usb_drv] dev_error: device descriptor read/all, error -92 [init -> usb_drv] dev_info: new high-speed USB device number 4 using dwc_otg [init -> usb_drv] dev_error: device descriptor read/8, error -92 [init -> usb_drv] dev_error: device descriptor read/8, error -92 [init -> usb_drv] dev_info: new high-speed USB device number 5 using dwc_otg [init -> usb_drv] dev_error: device descriptor read/8, error -92 [init -> usb_drv] dev_error: device descriptor read/8, error -92 [init -> usb_drv] dev_error: unable to enumerate USB device
Does anyone have an idea what I can do, to get the Ethernet adapter working? Any help is appreciated! I don't really understand the problem here, since the driver works flawlessly for the RPi 1 B+ (using foc_rpi as platform) - which uses the same chip as the RPi 2 (SMSC LAN9514).
I assume that the driver does not get any interrupt. Probably the interrupt controller hierarchy is different in between Pi 1 and 2 resp. BCM2835 and BCM2836. So the question is how Fiasco.OC maps interrupt numbers that core is asking for to the SoC' ones. To validate or refute my assumption, you can instrument the dde_linux code at:
https://github.com/genodelabs/genode/blob/18.05/repos/dde_linux/src/lx_kit/i...
and proof whether an interrupt is delivered to the driver.
regards Stefan
My Genode version [2] and Fiasco.OC version [3].
To the backstory:
I am currently in the process of "porting" Fiasco.OC/Genode to the Raspberry Pi 2 (Model B).
As a basis I use Genode in the version 18.05 and Fiasco.OC in the version 79. I created a new device, the rpi2, and based it on the already available rpi model.
The main changes I did for the rpi2 platform [1] are
- the different arm architecture - from armv6 to armv7a in a few files
- the different physical base address - from 0x2000:0000 to 0x3f00:0000
- a RAM size of 1008 MB starting at 0x0000:0000 (1024 MB - 16 MB for
peripherals)
I use version 79 of the Fiasco.OC kernel since it adds support for the three different BCM283X platforms. In order to get version 79 of the kernel running with Genode, I used the official 79 as a basis and cherry-picked commits from Genode's version of Fiasco.OC (72). [0]
My setup works completely fine for the RPi 1 (Model B+), even for the usb/nic driver. As the RPi 1 (Model B+) makes use of the SMSC LAN9514, instead of the SMSC LAN9512 (used in RPi Model B) it should also work for the RPi 2 (Model B), since this SBC also uses the SMSC LAN9514.
[0] https://github.com/skalk/foc/commits/r72 [1] https://github.com/irgendwie/genode/commits/foc-rpi2 [2] https://github.com/irgendwie/genode/tree/foc-rpi2 [3] https://github.com/irgendwie/foc/tree/genode-r79-rpi2
Best regards Alexander
pub RSA 4096/2751A2CE 2018-04-04 Alexander Weidinger alexander.weidinger@tum.de
sub RSA 4096/0453A69B 2018-04-04 sub RSA 4096/7852D6D1 2018-04-04
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
-- Stefan Kalkowski Genode labs
https://github.com.skalk | https://genode.org
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users