Quantcast

Tobi board with U-Boot falcon mode: Ethernet does not work

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tobi board with U-Boot falcon mode: Ethernet does not work

velvet
Dear Gumstix users,

I've successfully implemented U-Boot falcon mode for the Overo, along with a few other tweaks, in order to improve the boot time. My Overo now boots to the command prompt about 4 seconds after power is applied.

(In U-Boot falcon mode, the MLO executable (a.k.a. SPL) starts the Linux kernel directly, bypassing the normal U-Boot executable.)

My one problem is that the SMC911x / SMSC9221 Ethernet chip does not work when the system is started with U-Boot falcon mode.

The dmesg output from the Linux kernel was silent. It was as if there was simply no Ethernet hardware present. To troubleshoot, I increased the verbosity of the smsc911x driver by #defining USE_DEBUG to 5 in the file 'drivers/net/ethernet/smsc/smsc911x.h'. Now the smsc911x driver reports the following when the system boots:


root@overo:~# dmesg | grep sms
[    1.818359] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): Driver Parameters:
[    1.818389] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): LAN base: 0xE087E000
[    1.818420] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): IRQ: 288
[    1.818450] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): PHY will be autodetected.
[    1.818572] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): BYTE_TEST: 0xFFFFFFFF
[    1.818603] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: BYTE_TEST: 0xFFFFFFFF
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: top 16 bits equal to bottom 16 bits
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): This may mean the chip is set for 32 bit while the bus is reading 16 bit


Other observations:
  • Same thing happens whether the smsc911x driver is compiled as a module or built into the kernel
  • Same thing happens with a Linux kernel compiled with the stock Gumstix config started with U-Boot falcon mode (so it's not a kernel config issue, probably)

Ethernet hardware does work when booting from a stock Gumstix SD card image that goes through the complete SPL -> U-Boot -> kernel stages

I can see that the U-Boot code resets the Ethernet hardware via GPIO and performs some other setup. However so far I was not successful to do the same thing from SPL for falcon mode (copy + pasting the code from U-Boot).

It seems like a weakness that the Ethernet hardware depends on U-Boot to work. It would be cleaner if all the setup could be done from the Linux kernel, without relying on the boot loader.

Has anyone else encountered this issue?
Any patches or suggestions for a solution? Help would be most appreciated.

Thank you & best regards
Velvet


------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tobi board with U-Boot falcon mode: Ethernet does not work

Akram Hameed
Hi Velvet,

Without actually going off to investigate directly, I presume that u-boot is doing some muxing on the OMAP/DM to set up the pins required for the SMSC IC. If you check out the overo.h file, you can see what is normally set up for the default Gumstix expansion boards in u-boot. Do note, I am assuming that this pin muxing is not performed by MLO (since I am guessing it has neither the memory nor time set aside to do it).

I could be wrong about the latter point though.

Cheers,

Akram

On Sun, Aug 28, 2016 at 2:28 AM, Velvet Worm <[hidden email]> wrote:
Dear Gumstix users,

I've successfully implemented U-Boot falcon mode for the Overo, along with a few other tweaks, in order to improve the boot time. My Overo now boots to the command prompt about 4 seconds after power is applied.

(In U-Boot falcon mode, the MLO executable (a.k.a. SPL) starts the Linux kernel directly, bypassing the normal U-Boot executable.)

My one problem is that the SMC911x / SMSC9221 Ethernet chip does not work when the system is started with U-Boot falcon mode.

The dmesg output from the Linux kernel was silent. It was as if there was simply no Ethernet hardware present. To troubleshoot, I increased the verbosity of the smsc911x driver by #defining USE_DEBUG to 5 in the file 'drivers/net/ethernet/smsc/smsc911x.h'. Now the smsc911x driver reports the following when the system boots:


root@overo:~# dmesg | grep sms
[    1.818359] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): Driver Parameters:
[    1.818389] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): LAN base: 0xE087E000
[    1.818420] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): IRQ: 288
[    1.818450] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): PHY will be autodetected.
[    1.818572] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): BYTE_TEST: 0xFFFFFFFF
[    1.818603] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: BYTE_TEST: 0xFFFFFFFF
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: top 16 bits equal to bottom 16 bits
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): This may mean the chip is set for 32 bit while the bus is reading 16 bit


Other observations:
  • Same thing happens whether the smsc911x driver is compiled as a module or built into the kernel
  • Same thing happens with a Linux kernel compiled with the stock Gumstix config started with U-Boot falcon mode (so it's not a kernel config issue, probably)

Ethernet hardware does work when booting from a stock Gumstix SD card image that goes through the complete SPL -> U-Boot -> kernel stages

I can see that the U-Boot code resets the Ethernet hardware via GPIO and performs some other setup. However so far I was not successful to do the same thing from SPL for falcon mode (copy + pasting the code from U-Boot).

It seems like a weakness that the Ethernet hardware depends on U-Boot to work. It would be cleaner if all the setup could be done from the Linux kernel, without relying on the boot loader.

Has anyone else encountered this issue?
Any patches or suggestions for a solution? Help would be most appreciated.

Thank you & best regards
Velvet


------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tobi board with U-Boot falcon mode: Ethernet does not work

Akram Hameed
I might also mention, to work around u-boot not setting things up the way you want, you can do the pin muxing in the kernel via device tree files. That subject has been covered by others and a quick google will get you there (most of the gumstix device trees explicitly set things up in the kernel anyway, but I bet there are a few things that expect u-boot to have run).

On Mon, Aug 29, 2016 at 9:02 AM, Akram Hameed <[hidden email]> wrote:
Hi Velvet,

Without actually going off to investigate directly, I presume that u-boot is doing some muxing on the OMAP/DM to set up the pins required for the SMSC IC. If you check out the overo.h file, you can see what is normally set up for the default Gumstix expansion boards in u-boot. Do note, I am assuming that this pin muxing is not performed by MLO (since I am guessing it has neither the memory nor time set aside to do it).

I could be wrong about the latter point though.

Cheers,

Akram

On Sun, Aug 28, 2016 at 2:28 AM, Velvet Worm <[hidden email]> wrote:
Dear Gumstix users,

I've successfully implemented U-Boot falcon mode for the Overo, along with a few other tweaks, in order to improve the boot time. My Overo now boots to the command prompt about 4 seconds after power is applied.

(In U-Boot falcon mode, the MLO executable (a.k.a. SPL) starts the Linux kernel directly, bypassing the normal U-Boot executable.)

My one problem is that the SMC911x / SMSC9221 Ethernet chip does not work when the system is started with U-Boot falcon mode.

The dmesg output from the Linux kernel was silent. It was as if there was simply no Ethernet hardware present. To troubleshoot, I increased the verbosity of the smsc911x driver by #defining USE_DEBUG to 5 in the file 'drivers/net/ethernet/smsc/smsc911x.h'. Now the smsc911x driver reports the following when the system boots:


root@overo:~# dmesg | grep sms
[    1.818359] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): Driver Parameters:
[    1.818389] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): LAN base: 0xE087E000
[    1.818420] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): IRQ: 288
[    1.818450] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): PHY will be autodetected.
[    1.818572] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): BYTE_TEST: 0xFFFFFFFF
[    1.818603] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: BYTE_TEST: 0xFFFFFFFF
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): smsc911x_init: top 16 bits equal to bottom 16 bits
[    1.818634] smsc911x 2c000000.ethernet (unnamed net_device) (uninitialized): This may mean the chip is set for 32 bit while the bus is reading 16 bit


Other observations:
  • Same thing happens whether the smsc911x driver is compiled as a module or built into the kernel
  • Same thing happens with a Linux kernel compiled with the stock Gumstix config started with U-Boot falcon mode (so it's not a kernel config issue, probably)

Ethernet hardware does work when booting from a stock Gumstix SD card image that goes through the complete SPL -> U-Boot -> kernel stages

I can see that the U-Boot code resets the Ethernet hardware via GPIO and performs some other setup. However so far I was not successful to do the same thing from SPL for falcon mode (copy + pasting the code from U-Boot).

It seems like a weakness that the Ethernet hardware depends on U-Boot to work. It would be cleaner if all the setup could be done from the Linux kernel, without relying on the boot loader.

Has anyone else encountered this issue?
Any patches or suggestions for a solution? Help would be most appreciated.

Thank you & best regards
Velvet


------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users




------------------------------------------------------------------------------

_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...