Kernel doesn't initialize ethernet interface on custom board modeled directly off Beaglebone:

We have developed a custom board that is basically the Beaglebone with a couple of additional peripherals. Electrically, it is almost identical to the Beaglebone. For now, we have even programmed a configuration EEPROM that responds just like the one on a Beaglebone. The most significant difference between the boards is that the FTDI chip attached to UART0 has been removed. We are using UART1 as the console for both Linux and u-boot.

We have been using Ubuntu 12.04 from Robert’s directions at elinux.org/BeagleboardUbuntu. I have made a couple of kernel tweaks in order to support an additional SPI device, some GPIO’s and a USB joystick. However, I believe the same software should work on both the custom board and the Beaglebone, because the boards are so similar. With the Beaglebone, we have been connecting our peripherals though the expansion ports. For my current tests, I am using the same SD card for both devices, however, the behavior is different.

The problem I am seeing is that the kernel is not trying to open the network device eth0 at the end of the boot process. Both boards open the loopback device (lo), but only the Beaglebone opens eth0. What’s particularly strange is that Linux finds the SMSC Ethernet PHY on both the Beaglebone and our custom board over MDIO. The kernel is registering the MDIO and CPSW devices early during the boot process. However, the CPSW net device’s open function, cpsw_slave_open(), is only being called on the Beaglebone. (Again, the exact same SD card is placed in both devices.)

The only other difference I can see in dmesg occurs when the OMAP tries to interrogate the EEPROMs on the Cape boards. On the custom board, I get the following error twice for each of the I2C addresses being checked:

omap_i2c omap_i2c.3: controller timed out

I have included my dmesg output from both boards as well as a diff of the two files. I have I added some of my own printk’s to the kernel for debug’s sake. I have removed the timestamps from the dmesg output to accomodate a cleaner diff file.

I feellike I’m missing something really obvious. Any thoughts are appreciated.

Dave …

beaglebone.dmesg.txt (21.7 KB)

custom.dmesg.txt (20.9 KB)

diff.dmesg.txt (3.62 KB)

We have developed a custom board that is basically the Beaglebone
with a couple of additional peripherals. Electrically, it is almost
identical to the Beaglebone. For now, we have even programmed a
configuration EEPROM that responds just like the one on a
Beaglebone. The most significant difference between the boards is
that the FTDI chip attached to UART0 has been removed. We are using
UART1 as the console for both Linux and u-boot.

We have been using Ubuntu 12.04 from Robert's directions at
elinux.org/BeagleboardUbuntu. I have made a couple of kernel tweaks
in order to support an additional SPI device, some GPIO's and a USB
joystick. However, I believe the same software should work on both
the custom board and the Beaglebone, because the boards are so
similar. With the Beaglebone, we have been connecting our
peripherals though the expansion ports. For my current tests, I am
using the same SD card for both devices, however, the behavior is
different.

The problem I am seeing is that the kernel is not trying to open the
network device *eth0* at the end of the boot process. Both boards
open the loopback device (lo), but only the Beaglebone opens eth0.
What's particularly strange is that Linux finds the SMSC Ethernet
PHY on both the Beaglebone and our custom board over MDIO. The
kernel is registering the MDIO and CPSW devices early during the
boot process. However, the CPSW net device's open function,
cpsw_slave_open(), is only being called on the Beaglebone. (Again,
the exact same SD card is placed in both devices.)

<snip>

I feellike I'm missing something really obvious. Any thoughts are
appreciated.

Since you're using the same SD card on two different computers that have
different MAC addresses, the second computer may enumerate this new MAC
Ethernet port as eth1 instead of eth0. Like your dmesg says:

udevd[255]: renamed network interface eth0 to eth1

Are you sure you're having the startup scripts start that eth1 device to
do dhcp or similar? If not, most Debian derivatives won't run ifup on
it. You need settings for eth1 in /etc/network/interfaces, or clean out
the recording of what MAC eth0 had from the other board before booting.

Another way would be to image two different SD cards with the same image
and then boot one of each in each board, so both boards see the exact
same image. Then they should both set the first MAC found to eth0.

-Andrew

              we developed a board that is same as beaglebone with
some extra peripheral and some changes in UART and Ethernet hardware
connection.we are using the UART0 for some other purpose and i want
to use UART2 as my debug console.what are the changes i need to do
with u-boot and kernel configuration for change my console UART0 to
UART2.

For u-boot, simply build the 'am335x_evm_uart2' config. It'll put your
boot uart on uart2 instead of uart0.

For Linux, just spawn a getty (or your favorite login manager) on
ttyO2. All 6 uarts should get setup fine automatically, so long as you
have the mux set correctly.

On my board while booting i got the following error 6 times on each
bootup

omap_i2c omap_i2c.3: controller timed out
omap_i2c omap_i2c.3: controller timed out

on beaglebone the ethernet is connected to RMII1 on my board i am
using the RMII2 for ethernet interface,my ethernet interface is not
showing any IP address,

what is the changes i need to do with u-boot and kernel for working
on my board?

On beaglebone who is doing intilization of ethernet its the u-boot or
kernel?

Bone uses MII, not RMII, if memory serves. I also believe there's errata
with RMII. And the schematic net names aren't clear on the fact that
MII is being used, that's unfortunate.

Have you looked through the board-file if you're running the psp kernel?
There's decent hints in there for what needs changing to move Ethernet
and the uart.

-Andrew

Please keep the beagle list CC'ed.
Please use a sane mail client that prepends '>' to things you quote.

Hi Andrew,

For u-boot, simply build the 'am335x_evm_uart2' config. It'll put
your boot uart on uart2 instead of uart0.

For Linux, just spawn a getty (or your favorite login manager) on
ttyO2. All 6 uarts should get setup fine automatically, so long as
you have the mux set correctly.

I am using u-boot version 2011.09 for compiling the MLO and u-boot.img
I did changes in include/configs/am335x_evm.h file

"console=ttyO2,115200n8\0" \

on beaglebone FTDI to USB converter is connected to ttyO0

and my FTDI to USB converter is on ttyO2 but my board is still
booting on ttyO0 not on tty02.

Please try u-boot 2013.01-rc1 or later. That will have the
'am335x_evm_uart2' target.

> On my board while booting i got the following error 6 times on each
> bootup
>
> omap_i2c omap_i2c.3: controller timed out
> omap_i2c omap_i2c.3: controller timed out
>
> on beaglebone the ethernet is connected to RMII1 on my board i am
> using the RMII2 for ethernet interface,my ethernet interface is not
> showing any IP address,
>
> what is the changes i need to do with u-boot and kernel for working
> on my board?
>
> On beaglebone who is doing intilization of ethernet its the u-boot
> or kernel?

Bone uses MII, not RMII, if memory serves. I also believe there's
errata with RMII. And the schematic net names aren't clear on the
fact that MII is being used, that's unfortunate.

Have you looked through the board-file if you're running the psp
kernel? There's decent hints in there for what needs changing to move
Ethernet and the uart.

i am using the 3.2 kernel for uImage creation maintained for
beaglebone git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev/
git checkout origin/am33x-v3.2 -b am33x-v3.2

i saw the arch/arm/mach-omap2/board-am335xevm.c configuration file for
beaglebone

/* Module pin mux for rgmii1 */
static struct pinmux_config rgmii1_pin_mux = {
        {"mii1_txen.rgmii1_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"mii1_rxdv.rgmii1_rctl", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_txd3.rgmii1_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"mii1_txd2.rgmii1_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"mii1_txd1.rgmii1_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"mii1_txd0.rgmii1_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"mii1_txclk.rgmii1_tclk", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"mii1_rxclk.rgmii1_rclk", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxd3.rgmii1_rd3", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxd2.rgmii1_rd2", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxd1.rgmii1_rd1", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxd0.rgmii1_rd0", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mdio_data.mdio_data", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLUP}, {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT_PULLUP}, {NULL, 0},
};

/* Module pin mux for rgmii2 */
static struct pinmux_config rgmii2_pin_mux = {
        {"gpmc_a0.rgmii2_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
        {"gpmc_a1.rgmii2_rctl", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"gpmc_a4.rgmii2_td1", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE2 |
AM33XX_PIN_OUTPUT}, {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"gpmc_a9.rgmii2_rd2", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"gpmc_a10.rgmii2_rd1", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"gpmc_a11.rgmii2_rd0", OMAP_MUX_MODE2 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mdio_data.mdio_data", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLUP}, {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT_PULLUP}, {NULL, 0},
};
/* Module pin mux for mii1 */
static struct pinmux_config mii1_pin_mux = {
        {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_txen.mii1_txen", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
        {"mii1_rxdv.mii1_rxdv", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mii1_txd3.mii1_txd3", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT}, {"mii1_txd2.mii1_txd2", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT}, {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT}, {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT}, {"mii1_txclk.mii1_txclk", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxclk.mii1_rxclk", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxd3.mii1_rxd3", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mii1_rxd2.mii1_rxd2", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mdio_data.mdio_data", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLUP}, {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT_PULLUP}, {NULL, 0},
};

/* Module pin mux for rmii1 */
static struct pinmux_config rmii1_pin_mux = {
        {"mii1_crs.rmii1_crs_dv", OMAP_MUX_MODE1 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE1 |
AM33XX_PIN_INPUT_PULLDOWN},
        {"mii1_txen.mii1_txen", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
        {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
        {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
        {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE1 |
AM33XX_PIN_INPUT_PULLDOWN}, {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE1 |
AM33XX_PIN_INPUT_PULLDOWN}, {"rmii1_refclk.rmii1_refclk",
OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN},
        {"mdio_data.mdio_data", OMAP_MUX_MODE0 |
AM33XX_PIN_INPUT_PULLUP}, {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 |
AM33XX_PIN_OUTPUT_PULLUP}, {NULL, 0},
};

but i am confused that where to do changes for intilize the ethernet
in the same config file or ethernet driver?

In that board file, near the bottom, are each of the different boards
supported's initialization functions. Depending on which board is
detected via the EEPROM, one of the initialization functions gets
called which sets up the mux properly and enables each peripheral as
needed by the board. You'll need to make your own version of that, just
copy and adapt the bone one to set your mux and init your peripherals.
Setting your EEPROM with different data than the bone or evm would be
recommended.

-Andrew

Dear Pavan,

Please keep the beagle list CC'ed. It's only polite.
If you reply and do not, I will no longer reply to you.

           I didn't find the source code u-boot 2013.01-rc1 on main
u-boot source repository,can u please send the me the link from there
i will get the proper source code...

Please look in git [1]. 2013.01-rc2 has recently been tagged.

[1]: U-Boot / U-Boot · GitLab

Both the BeagleBone and the am335x_evm use the same configuration in
u-boot. If you need a pin-mux that's different than the bare-bones one
setup by u-boot, take a look at u-boot/board/ti/am335x/mux.c file.

u-boot identifies what board is being booted by checking the contents
of the I2C EEPROM on the baseboard. This value then decides which set
of pin-mux settings are used.

For u-boot, just setup the bare minimum needed in order to get a serial
console and boot to your OS. Then in your OS (probably Linux), setup
the pin-mux the way the OS will want. Do this in the board-file if
you're using the PSP kernel. The board-file is
arch/arm/mach-omap2/board-am335xevm.c in the PSP kernel.

There's good examples in those two files for both the bones and the
evm. Leverage the examples used for bone and the evm to setup your
hardware how its configured.

-Andrew

u-boot's defaults, if not overridden with a uEnv.txt file, will pass
boot args to the kernel saying to use ttyO0. Make a uEnv.txt that
changes the console setting to ttyO2, then regardless of what the
kernel's default console= setting is it'll use ttyO2.

-Andrew

Hi ,

i am working on Ti-Wi wl1271 chip on my board…WL1271 chip interface over an SDIO pins.this is thing i have done so far

I have configured the pin mux based on changes on the wireless support already there for the EVM board in board configuration file arch/arm/mach-omap2/board-am335x_evm.c.

recompiled the kernel and compile built-in kernel module wl12xx_sdio.c and dependent modules wl12xx.ko, mac80211.ko, cfg80211.ko, rfkill.ko.

i have install firmware /lib/firmware/ti-connectivity in filesystem …

my dmesg is showing me only this logs…

remove the unrelated stuff from logs
[ 0.143676] cfg80211: Calling CRDA to update world regulatory domain

i checked my pin configuration and its seems to be correct.

and when i did ifconfig its only showing eth0 and lo not wlan.

is there any option i need to enable in kernel config for load the firmware on bootup?

how do I build, the missing wl1271 firmware?help me out?

thanks

Pavan