This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4378: u-boot not running DHCP, ethernet in half duplex mode

Part Number: AM4378
Other Parts Discussed in Thread: TPS65218, DP83848M, AM4372

Tool/software: Linux

environment

Linux host ubuntu 16.04

SDK 4.03.0.5

U-Boot 2017.01-00458-gccd1c34

custom board loosely based on the am4378 gp evm

we've had some issues getting the board to come up but we did finally get u-boot to start and run. now i am trying to get dhcp to happen and it isn't.

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

our u-boot environment output is:

=> pr
arch=arm
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUU}
baudrate=115200
board=UTI-board
board_name=UTI-board
boot_fdt=try
boot_fit=0
bootcmd=run findfdt; run getuenv; setenv autoload no;dhcp ;tftp ${loadaddr} zIm}
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage-am437x-evm.bin
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
devtype=mmc
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 11
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x1
dfu_alt_info_qspi=u-boot.bin raw 0x0 0x080000;u-boot.backup raw 0x080000 0x08000
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ram0
dfu_bufsiz=0x10000
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mm;
eth1addr=f0:b5:d1:3e:83:64
ethact=cpsw
ethaddr=f0:b5:d1:3e:83:62
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=9df111b8
fdtfile=am437x-UTI.dtb
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage
fit_loadaddr=0x87000000
getuenv=setenv devnum ${mmcdev}; if mmc rescan; then if run loadbootenv; then r;
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t $}
ip_method=dhcp
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc ;
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; th;
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.ba)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfst}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-}
nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${sp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadima}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock,v3,tcp,rsize=4096,wsize=4096
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid}
pxefile_addr_r=0x80100000
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstyp}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05S
scriptaddr=0x80000000
serverip=192.168.61.105
soc=am33xx
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial@44e09000
stdin=serial@44e09000
stdout=serial@44e09000
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstyp}
usbboot=setenv devnum ${usbdev}; setenv devtype usb; usb start ${usbdev}; if usi
usbdev=0
usbroot=/dev/sda2 rw
usbrootfstype=ext4 rootwait
vendor=ti
ver=U-Boot 2017.01-00458-gccd1c34-dirty (Apr 03 2019 - 16:17:58 -0500)

Environment size: 5662/65532 bytes

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

the pinmux for mii1 is:

static struct module_pin_mux mii1_pin_mux[] = {
{OFFSET(mii1_txen), MODE(0)}, /* MII1_TCTL */
{OFFSET(mii1_rxdv), MODE(0) | RXACTIVE}, /* MII1_RCTL */
{OFFSET(mii1_txd3), MODE(0)}, /* MII1_TD3 */
{OFFSET(mii1_txd2), MODE(0)}, /* MII1_TD2 */
{OFFSET(mii1_txd1), MODE(0)}, /* MII1_TD1 */
{OFFSET(mii1_txd0), MODE(0)}, /* MII1_TD0 */
{OFFSET(mii1_txclk), MODE(0)}, /* MII1_TCLK */
{OFFSET(mii1_rxclk), MODE(0) | RXACTIVE}, /* MII1_RCLK */
{OFFSET(mii1_rxd3), MODE(0) | RXACTIVE}, /* MII1_RD3 */
{OFFSET(mii1_rxd2), MODE(0) | RXACTIVE}, /* MII1_RD2 */
{OFFSET(mii1_rxd1), MODE(0) | RXACTIVE}, /* MII1_RD1 */
{OFFSET(mii1_rxd0), MODE(0) | RXACTIVE}, /* MII1_RD0 */
{OFFSET(mii1_col), MODE(0) | RXACTIVE}, /* MII1_COL */
{OFFSET(mii1_crs), MODE(0) | RXACTIVE}, /* MII1_CRS */
{OFFSET(mii1_rxerr), MODE(0) | RXACTIVE}, /* MII1_RXERR */
{-1},
};

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

the ethernet setup in the board.c looks like:

#ifndef CONFIG_DM_ETH
#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
static void cpsw_control(int enabled)
{
/* Additional controls can be added here */
return;
}

static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_addr = 16,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_addr = 1,
},
};

static struct cpsw_platform_data cpsw_data = {
.mdio_base = CPSW_MDIO_BASE,
.cpsw_base = CPSW_BASE,
.mdio_div = 0xff,
.channels = 8,
.cpdma_reg_ofs = 0x800,
.slaves = 1,
.slave_data = cpsw_slaves,
.ale_reg_ofs = 0xd00,
.ale_entries = 1024,
.host_port_reg_ofs = 0x108,
.hw_stats_reg_ofs = 0x900,
.bd_ram_ofs = 0x2000,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
.version = CPSW_CTRL_VERSION_2,
};
#endif


/*
* This function will:
* Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
* in the environment
* Perform fixups to the PHY present on certain boards. We only need this
* function in:
* - SPL with either CPSW or USB ethernet support
* - Full U-Boot, with either CPSW or USB ethernet
* Build in only these cases to avoid warnings about unused variables
* when we build an SPL that has neither option but full U-Boot will.
*/
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || \
defined(CONFIG_SPL_USBETH_SUPPORT)) && \
defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
defined(CONFIG_USB_ETHER)) && !defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
int rv;
uint8_t mac_addr[6];
uint32_t mac_hi, mac_lo;

/* try reading mac address from efuse */
mac_lo = readl(&cdev->macid0l);
mac_hi = readl(&cdev->macid0h);
mac_addr[0] = mac_hi & 0xFF;
mac_addr[1] = (mac_hi & 0xFF00) >> 8;
mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;

printf("Mac Addr = %x:%x:%x:%x:%x:%x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);

#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
if (!getenv("ethaddr")) {
puts("<ethaddr> not set. Validating first E-fuse MAC\n");
if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}

#ifndef CONFIG_SPL_BUILD
mac_lo = readl(&cdev->macid1l);
mac_hi = readl(&cdev->macid1h);
mac_addr[0] = mac_hi & 0xFF;
mac_addr[1] = (mac_hi & 0xFF00) >> 8;
mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;

if (!getenv("eth1addr")) {
if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("eth1addr", mac_addr);
}
#endif
writel(MII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_MII;
cpsw_slaves[0].phy_addr = 1;

rv = cpsw_register(&cpsw_data);
if (rv < 0) {
printf("Error %d registering CPSW switch\n", rv);
return rv;
}
#endif

return rv;
}
#endif
#endif

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

the output of the u-boot when trying to dhcp is:

U-Boot SPL 2017.01-00458-gccd1c34-dirty (Apr 03 2019 - 16:17:58)
Trying to boot from MMC1
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img


U-Boot 2017.01-00458-gccd1c34-dirty (Apr 03 2019 - 16:17:58 -0500)

CPU : AM437X-GP rev 1.2
Model: TI AM437x UTI BOARD
DRAM: 512 MiB
Pinmux for MII1_COL: 40000
Board Init
Power Init
PMIC: TPS65218
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env
Board late Init
Processes Called: 0
Net: Mac Addr = f0:b5:d1:3e:83:62
cpsw
Hit any key to stop autoboot: 0
## Error: "findfdt" not defined
reading uEnv.txt
717 bytes read in 4 ms (174.8 KiB/s)
Importing environment from mmc0 ...
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17
BOOTP broadcast 18
BOOTP broadcast 19
BOOTP broadcast 20
BOOTP broadcast 21
BOOTP broadcast 22
BOOTP broadcast 23
BOOTP broadcast 24
BOOTP broadcast 25
BOOTP broadcast 26
BOOTP broadcast 27
BOOTP broadcast 28
BOOTP broadcast 29

Retry time exceeded; starting again
link up on port 0, speed 100, full duplex
*** ERROR: `ipaddr' not set
link up on port 0, speed 100, full duplex
*** ERROR: `ipaddr' not set

when i wireshark the line there are no DHCP packets present

the PHY reset is high so it is not in reset

where else do i look to fix this?

  • so new day, new brain. i am starting to see some things that i didn't yesterday

    So we are trying to run in MII mode. our PHY is NOT a gigabit PHY, it is a DP83848M PHY

    i see that the pinmux options for these balls are GMII, RMII, and RGMII, but not MII

    so my question currently is: if we use this PHY in MII mode, are we guarantee'd to not be able to use ethernet?
  • Hi,

    The AM437x parts only support MII so you should be to use the ethernet.

    Based on the console output the Ethernet link is being established but you are not seeing any packets come out on the interface, if my summary is correct. A quick review of the code looks like you are trying to use the second Ethernet interface on the board. Typically the TI boards use and only test the first port in u-boot. Is there a reason you are trying to use the second port? There maybe some significant code changes to implement using the second port in u-boot.

    Best Regards,
    Schuyler
  • well we have the PHY connected to MII1 (which the EVM uses) and i didn't actively try to use anything but the default port.

    if you are talking about our PHY address our PHy chip should default to address 1 without any pullups/downs

    where in the code does it specify the port we are trying to use? according to the output we are trying to use port 0:
    "link up on port 0, speed 100, full duplex"

    in addition how should i set up for my board? should i set it up in the pinmux as RGMII but MII in the u-boot code or should i do it exactly like the EVM even though my phy doesn't support gigabit ethernet? does RGMII automatically scale down to normal MII? 

  • Hi,
    First I need apologize for the delay in responding.

    To answer your question, the pin mux needs to match between the PHY and the MAC, if your PHY is configured through HW strapping to be MII the MAC interface needs to be MII.

    Let's first double check that the PHY is seeing a link partner. Please do the following commands to output the state of link and the PHY:
    mii dump 1 0 - the one is PHY address 1
    mii dump 1 1

    Also please look at this register in the HW statistics block, we looking to see if the MAC thinks it sent packets.
    md.l 4a100934
    md.l 4a100938
    md.l 4a100964

    I will review the code a little bit more in the meantime.

    Regards,
    Schuyler
  • output from mii dump 1 0:

    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)

    output from mii dump 1 1:
    1. (786d) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0020) 1. 5 = 1 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0004) 1. 2 = 1 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

    register values:
    md.l 4a100934 = 0
    md.l 4a100938 = 0
    md.l 4a100964 = 0

    so looks like it isn't putting out anything
  • additional info, we do not have a RTC crystal on the board. would this have any effect on the ethernet?
  • Hi,
    Thank you for posting the stats location registers and the MII registers.

    I agree that the MAC is not output putting packets. The MII registers indicate that there is a link between the PHY and the link partner so the conditions appear correct for packets to be transmitted.

    The RTC crystal is only needed to clock the RTC IP in the SOC and to my knowledge should not be needed for the Ethernet interface. For the custom board DTS file that have been done, what other included DTSI files have been modified?

    Best Regards,
    Schuyler
  • we copied the 4378 gp evm dtsi file and renamed it am437x-UTI-u-boot.dtsi. i am unaware anywhere where it has to be "linked in" but i am likely wrong. i was told we just need to have the file exist and named similar to the dts file we use. it's contents are:

    /{
    ocp {
    u-boot,dm-spl;
    };
    };

    &uart0 {
    u-boot,dm-spl;
    };

    &mmc1 {
    u-boot,dm-spl;
    };

    &mac {
    u-boot,dm-spl;
    };

    &davinci_mdio {
    u-boot,dm-spl;
    };

    &cpsw_emac0 {
    u-boot,dm-spl;
    };

    &phy_sel {
    u-boot,dm-spl;
    };

    the portions of our DTS files that i think would make a difference are:


    mii_1_pins_default: mii_1_pins_default {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D16) mii1_col.gmii1_col */
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B14) mii1_crs.gmii1_crs */
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B13) mii1_rx_er.gmii1_rxer */
    AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A13) mii1_tx_en.gmii1_txen */
    AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A15) mii1_rx_dv.gmii1_rxdv */
    AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D14) mii1_tx_clk.gmii1_txclk */
    AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D13) mii1_rx_clk.gmii1_rxclk */
    AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (B15) mii1_txd0.gmii1_txd0 */
    AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A14) mii1_txd1.gmii1_txd1 */
    AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C13) mii1_txd2.gmii1_txd2 */
    AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C16) mii1_txd3.gmii1_txd3 */
    AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (F17) mii1_rxd0.gmii1_rxd0 */
    AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B16) mii1_rxd1.gmii1_rxd1 */
    AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (E16) mii1_rxd2.gmii1_rxd2 */
    AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (C14) mii1_rxd3.gmii1_rxd3 */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    mii_1_pins_sleep: mii_1_pins_sleep {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D16) mii1_col.gmii1_col */
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B14) mii1_crs.gmii1_crs */
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B13) mii1_rx_er.gmii1_rxer */
    AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A13) mii1_tx_en.gmii1_txen */
    AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A15) mii1_rx_dv.gmii1_rxdv */
    AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D14) mii1_tx_clk.gmii1_txclk */
    AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D13) mii1_rx_clk.gmii1_rxclk */
    AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (B15) mii1_txd0.gmii1_txd0 */
    AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A14) mii1_txd1.gmii1_txd1 */
    AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C13) mii1_txd2.gmii1_txd2 */
    AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C16) mii1_txd3.gmii1_txd3 */
    AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (F17) mii1_rxd0.gmii1_rxd0 */
    AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B16) mii1_rxd1.gmii1_rxd1 */
    AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (E16) mii1_rxd2.gmii1_rxd2 */
    AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (C14) mii1_rxd3.gmii1_rxd3 */
    >;
    };

    mdio_1_pins_default: mdio_1_pins_default {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (B17) mdio_clk.mdio_clk */
    AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | MUX_MODE0) /* (A17) mdio_data.mdio_data */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    mdio_1_pins_sleep: mdio_1_pins_sleep {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B17) mdio_clk.mdio_clk */
    AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A17) mdio_data.mdio_data */
    >;
    };
    ----------------------------------------------------------
    &mac {
    slaves = <1>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mii_1_pins_default>;
    pinctrl-1 = <&mii_1_pins_sleep>;
    status = "okay";
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mdio_1_pins_default>;
    pinctrl-1 = <&mdio_1_pins_sleep>;
    status = "okay";
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "mii";
    };
  • does the ethernet code use the SYNCTIMER?

    since we do not have an RTC crystal and the default clock for SYNCTIMER is the RTC crystal (figure 6.22, Table 6-176 spruhl7h) is it possible it is breaking the system for packet time stamps?
  • sorry for the spam

    now that i can get to the command line, when i run ifconfig i get this output:
    root@am437x-evm:/sys/class/gpio/gpio86# ifconfig
    eth0 Link encap:Ethernet HWaddr F0:B5:D1:3E:99:88
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:43

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1%763860/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:9760 errors:0 dropped:0 overruns:0 frame:0
    TX packets:9760 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:741760 (724.3 KiB) TX bytes:741760 (724.3 KiB)

    it looks like we are in loopback mode. how does that happen?
  • Hi,

    Since you running in a Linux context there are some basic link checkout steps that can be used, could you please look at this link for doing basic ethernet triage. I would like to add to please attach the results to post and not cut and paste them into the thread window. We are asking for a lot data.

    The checklist is asking to you use some linux tools to make sure that there is a link partner, the hardware stats of the MAC and asking to attach the dts board file or at least the portion involving the pin mux and nodes used for network definition. Also please attach any dtsi files that were modified. Some of these steps or results will look the same as what has already been established during the u-boot debug you were doing. The boot log is also requested to be attached and we to see the entire boot log from power on.

    We still need to see if you are seeing the same no packets out of the MAC. 

    Best Regards,

    Schuyler

  • well part of my problem with doing it in linux is this:

    we have the ethernet PHY reset on a gpio line. in u-boot in board.c i take the PHY out of reset. when linux loads it appears to put the PHy back into reset. i only know this because 1) the PHY LED is off when the kernel loads and 2)the kernel can't find the PHY but u-boot can.


    i thought that if i took it out of reset in u-boot that the kernel wouldn't touch it but apparently it does. what can i do about this?
  • Hi,

    Linux has a means to control the PHY reset line via a DTS property value for either the MDIO or MAC node. I want to confirm though that the PHY reset in the board design is intended to be handled via the network drivers, is that the case? The DTS binding docs for the mdio and MAC nodes cover this, but I will confirm after I hear back from you.

    Best Regards,
    Schuyler
  • our board designer connected a GPIO to the PHY reset. i don't have anywhere in the DTS file that tells the system that this is the reset line for the PHY since i don't know how to do that (what field exists? which module is it included in? i'm not an expert here). i am currently writing directly to the GPIO registers to handle the reset and that it working for u-boot but not for the kernel

    if you could fill me in on the DTS propertly value for the reset that would be great.

    i have tried phy_id = <&davinci_mdio>, <0>; and phy_id = <&davinci_mdio>, <1>; and it doesn't make a difference (assuming the <#> is the phy address)

    my ethernet portion of my DTS looks just like the EVM:

    &mac {
    slaves = <1>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mii_1_pins_default>;
    pinctrl-1 = <&mii_1_pins_sleep>;
    status = "okay";
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mdio_1_pins_default>;
    pinctrl-1 = <&mdio_1_pins_sleep>;
    status = "okay";
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "mii";
    };
  • so her's the update

    I added ti,no-reset-on-init; to the gpio bank that performed the PHY reset and i changed to phy_id = <&davinci_mdio>, <1>; and when linux boots i get an address and i have internet access. however when i do "dhcp" from u-boot i still get nothing but BOOTP. in addition when i do get to the kernel i cannot do DNS. every single time i have to give the command "udhcpc" and then i am able to access DNS. i got this trick from this post:

    https://e2e.ti.com/support/processors/f/791/t/640808?tisearch=e2e-quicksearch&keymatch=dns%20brad

    does u-boot just not work with my phy? it is because i am at phy address 1 and not 0?

  • Hi,

    Using the ti, no-reset-on-init will work if the PHY is getting reset in U-Boot. It is important that the PHY is reset for certain amount of time. Are you exercising the reset line in U-Boot?

    The example I was thinking of would be found in arch/arm/boot/dts/am572x-idk.dts, this particular example is for the AM572x processors that are on the PRUs. In the pruss2_mdio node are two properties reset-gpios and reset-delay-us.

    To understand the first property you will need to look at the AM572x schematic to see the GPIOs selected to act as a reset to the PHY. Link to AM572x product page. The schematic is under the design files area.

    The second property refers to how the to how long of a reset pulse is needed. Please refer to Docmentation/devicetree/bindings/net/mdio.txt for details on these two properties.

    If you are able to get an address with an address of 1 for the PHY then this same address should work for U-Boot. The DHCP process should happen automatically too. Which file system are you using? The TI one? Could you attach the boot log?

    I will be out of the office this week and return on the 29th.

    Best Regards,
    Schuyler
  • i see:

    &pruss2_mdio {

    reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>,

         <&gpio5 9 GPIO_ACTIVE_LOW>;

    reset-delay-us = <2>; /* PHY datasheet states 1uS min */

    };

    following this example i was able to get linux to reset the phy, but u-boot did not take the phy out of reset (i removed my reset code from u-boot as i thought the addition of the reset code in the DTS file would do it for me). it would appear the dts file for the reset pin works in the kernel but nto u-boot

    i do know the importance of reset lines, and timing. this isn't my first board, it's just my first linux board

    we are using TI everything.

    here is the whole boot log:

    output6.txt
    U-Boot SPL 2017.01-00458-gccd1c34-dirty (Apr 22 2019 - 11:54:28)
    Trying to boot from MMC1
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2017.01-00458-gccd1c34-dirty (Apr 22 2019 - 11:54:28 -0500)
    
    CPU  : AM437X-GP rev 1.2
    Model: TI AM437x UTI BOARD
    DRAM:  512 MiB
    PMIC:  TPS65218
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    Net:   Mac Addr = f0:b5:d1:3e:83:62
    Could not get PHY for cpsw: addr 1
    cpsw
    Hit any key to stop autoboot:  0 
    ## Error: "findfdt" not defined
    reading uEnv.txt
    717 bytes read in 4 ms (174.8 KiB/s)
    Importing environment from mmc0 ...
    3658624 bytes read in 637 ms (5.5 MiB/s)
    54629 bytes read in 38 ms (1.4 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffef000, end 8ffff564 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.69-g9ce43c71ae (michael_j@UTI-CPELNX-03) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Mon Apr 15 14:21:15 CDT 2019
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt:Machine model: TI AM437x UTI BOARD
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM437x ES1.2 (sgx neon)
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyO0,115200n8 video=HDMI-A-1:800x600 root=PARTUUID=284581e2-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 457884K/524288K available (7168K kernel code, 295K rwdata, 2392K rodata, 1024K init, 288K bss, 17252K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
    [    0.000000]       .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
    [    0.000000]       .data : 0xc0c00000 - 0xc0c49cc8   ( 296 kB)
    [    0.000000]        .bss : 0xc0c49cc8 - 0xc0c91fb4   ( 289 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [    0.000000] OMAP L2C310: ROM does not support power control setting
    [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [    0.000000] OMAP clockevent source: timer2 at 19200000 Hz
    [    0.000011] sched_clock: 32 bits at 19MHz, resolution 52ns, wraps every 111848106981ns
    [    0.000029] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
    [    0.000037] OMAP clocksource: timer1 at 19200000 Hz
    [    0.000419] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000429] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000787] Console: colour dummy device 80x30
    [    0.000814] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000820] This ensures that you still see kernel messages. Please
    [    0.000824] update your kernel commandline.
    [    0.000842] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
    [    0.060169] pid_max: default: 32768 minimum: 301
    [    0.060292] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.060303] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.061029] CPU: Testing write buffer coherency: ok
    [    0.061373] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.062122] EFI services will not be available.
    [    0.062828] devtmpfs: initialized
    [    0.074196] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    0.074481] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.074504] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.077599] pinctrl core: initialized pinctrl subsystem
    [    0.078680] NET: Registered protocol family 16
    [    0.080010] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.180178] cpuidle: using governor ladder
    [    0.210168] cpuidle: using governor menu
    [    0.215405] omap_gpio 4804c000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_1_pins_default, deferring probe
    [    0.215710] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_2_pins_default, deferring probe
    [    0.216003] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_3_pins_default, deferring probe
    [    0.216273] omap_gpio 48320000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_4_pins_default, deferring probe
    [    0.216567] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_5_pins_default, deferring probe
    [    0.224237] No ATAGs?
    [    0.224265] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [    0.224275] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.266743] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.271408] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c_0_pins_default, deferring probe
    [    0.271467] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c_1_pins_default, deferring probe
    [    0.271600] media: Linux media interface: v0.10
    [    0.271641] Linux video capture interface: v2.00
    [    0.271681] pps_core: LinuxPPS API ver. 1 registered
    [    0.271687] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.271708] PTP clock support registered
    [    0.271750] EDAC MC: Ver: 3.0.0
    [    0.272581] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.272942] Advanced Linux Sound Architecture Driver Initialized.
    [    0.273898] clocksource: Switched to clocksource timer1
    [    0.282175] NET: Registered protocol family 2
    [    0.282819] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.282860] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.282902] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.282990] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.283004] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.283135] NET: Registered protocol family 1
    [    0.283513] RPC: Registered named UNIX socket transport module.
    [    0.283525] RPC: Registered udp transport module.
    [    0.283530] RPC: Registered tcp transport module.
    [    0.283535] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.285819] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.291030] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.291800] NFS: Registering the id_resolver key type
    [    0.291832] Key type id_resolver registered
    [    0.291839] Key type id_legacy registered
    [    0.291885] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.296600] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.296619] io scheduler noop registered
    [    0.296626] io scheduler deadline registered
    [    0.296735] io scheduler cfq registered (default)
    [    0.298460] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [    0.301183] backlight supply power not found, using dummy regulator
    [    0.348117] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.350658] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
    [    0.351388] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    1.072741] console [ttyS0] enabled
    [    1.076714] omap8250 481a6000.serial: No clock speed specified: using default: 48000000
    [    1.085417] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud = 3000000) is a 8250
    [    1.095821] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.102628] [drm] Initialized
    [    1.107239] 4832a000.dss supply vdda_video not found, using dummy regulator
    [    1.114451] OMAP DSS rev 2.0
    [    1.117500] omapdss_dss 4832a000.dss: bound 4832a400.dispc (ops dispc_component_ops)
    [    1.126642] display supply vcc not found, using dummy regulator
    [    1.145324] brd: module loaded
    [    1.154231] loop: module loaded
    [    1.159451] libphy: Fixed MDIO Bus: probed
    [    1.179194] cpsw 4a100000.ethernet: Detected MACID = f0:b5:d1:3e:99:88
    [    1.185919] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [    1.192941] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.201572] mousedev: PS/2 mouse device common for all mice
    [    1.207667] i2c /dev entries driver
    [    1.212949] cpuidle: enable-method property 'ti,am4372' found operations
    [    1.274636] OF: /ocp@44000000/mmc@47810000: could not get #dma-cells for /ocp@44000000/l4_wkup@44c00000/prcm@1f0000/clocks/dpll_mpu_ck@2d60
    [    1.288326] omap_hsmmc 47810000.mmc: RX DMA channel request failed
    [    1.297640] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.309610] NET: Registered protocol family 10
    [    1.315360] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.321938] NET: Registered protocol family 17
    [    1.326874] Key type dns_resolver registered
    [    1.331388] omap_voltage_late_init: Voltage driver support not added
    [    1.343316] omapdrm omapdrm.0: DMM not available, disable DMM support
    [    1.350376] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.357110] [drm] No driver support for vblank timestamp query.
    [    1.425798] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.429066] mmc0: new high speed SDHC card at address aaaa
    [    1.429731] mmcblk0: mmc0:aaaa SS08G 7.40 GiB 
    [    1.432326]  mmcblk0: p1 p2
    [    1.445029] Console: switching to colour frame buffer device 128x37
    [    1.493811] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    1.526461] OMAP GPIO hardware version 0.1
    [    1.579510] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.586341] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.663948] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.670082] davinci_mdio 4a101000.mdio: detected phy mask fffffffd
    [    1.676953] libphy: 4a101000.mdio: probed
    [    1.681016] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver NS DP83848C 10/100 Mbps PHY
    [    1.695139] hctosys: unable to open rtc device (rtc0)
    [    1.700938] ALSA device list:
    [    1.704113]   No soundcards found.
    [    1.724495] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.732702] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.744265] devtmpfs: mounted
    [    1.749039] Freeing unused kernel memory: 1024K
    [    1.755502] random: fast init done
    [    2.030202] systemd[1]: System time before build time, advancing clock.
    [    2.082935] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -ID)
    [    2.101954] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2017.12!
    
    [    2.148461] systemd[1]: Set hostname to <am437x-evm>.
    [    2.667692] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    2.704769] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    2.734387] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [    2.773092] systemd[1]: Listening on Process Core Dump Socket.
    [  OK  ] Listening on Process Core Dump Socket.
    [    2.804497] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    2.846062] systemd[1]: Created slice System Slice.
    [  OK  ] Created slice System Slice.
    [    2.875438] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Listening on Journal Socket.
             Starting Load Kernel Modules...
             [    3.129985] cmemk: loading out-of-tree module taints kernel.
    Mounting Debug File System...
    [  OK  ] Started Forward Password Requests to Wall Dir[    3.144871] CMEMK module: reference Linux version 4.9.69
    ectory Watch.
    [    3.163524] no physical memory specified
    [    3.168316] cmemk initialized
    [  OK  ] Reached target Paths.
             Starting Setup Virtual Console...
    [    3.197169] cryptodev: driver 1.8 loaded.
    [  OK  ] Reached target Swap.
             Starting Journal Service...
    [    3.251354] usbcore: registered new interface driver usbfs
    [  OK  ] Listening on /dev/initctl Compatibility Named[    3.265694] usbcore: registered new interface driver hub
     Pipe.
    [    3.278525] usbcore: registered new device driver usb
             Starting alignment.service...
    [    3.315806] usbcore: registered new interface driver usbserial
    [  OK  ] Created slice User and Session Slice.
    [    3.365785] usbcore: registered new interface driver ftdi_sio
    [    3.372431] usbserial: USB Serial support registered for FTDI USB Serial Device
             Mounting Temporary Directory...
             Mounting POSIX Message Queue File System...
    [  OK  ] Reached target Slices.
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Listening on Network Service Netlink Socket.
    [    3.570619] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Mounted Debug File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Temporary Directory.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Setup Virtual Console.
    [  OK  ] Started alignment.service.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Create Static Device Nodes in /dev.
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /var/volatile...
             Mounting /media/ram...
             Starting udev Coldplug all Devices...
             Mounting Configuration File System...
             Starting Apply Kernel Variables...
             Starting Flush Journal to Persistent Storage...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Apply Kernel Variables.
    [    4.583131] systemd-journald[101]: Received request to flush runtime journal from PID 1
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Load/Save Random Seed.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [    5.785124] remoteproc remoteproc0: wkup_m3 is available
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [    5.859538] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on RPCbind Server Activation Socket[    6.112233] remoteproc remoteproc0: powering up wkup_m3
    .
    [  OK  ] Reached target Sockets.
    [    6.234410] 1-0018 supply IOVDD not found, using dummy regulator
    [    6.248902] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224268
    [    6.249921] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [    6.250084] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [  OK  ] Reached target Basic System.
             Starting Avahi mDNS/DNS-SD Stack...
    [    6.520873] 1-0018 supply DVDD not found, using dummy regulator
    [  OK  ] Started D-Bus System Message Bus.
    [    6.581823] 1-0018 supply AVDD not found, using dummy regulator
    [    6.665924] 1-0018 supply DRVDD not found, using dummy regulator
    [    6.826447] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
    [    7.017842] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
    [    7.059325] omap-aes 53501000.aes: will run requests pump with realtime priority
    [    7.149902] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
    [    7.214782] omap-des 53701000.des: will run requests pump with realtime priority
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
             Starting Network Service...
    [    7.392509] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [  OK  ] Started Periodic Command Scheduler.
    [  OK  ] Started Kernel Logging Service.
             Starting Login Service...
    [    7.607399] input: matrix_keypad0 as /devices/platform/matrix_keypad0/input/input0
             Starting uim-sysfs.service...
    [    7.741168] PM: no-rtc available, rtc-only mode disabled.
             Starting Print notice about GPLv3 packages...
    [  OK  ] Started System Logging Service.
    [    7.909436] asoc-simple-card sound0: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok
    [  OK  ] Started Job spooling tools.
             Starting Telephony service...
    [  OK  ] Started Network Service.
    [    8.196085] net eth0: initializing cpsw version 1.15 (0)
    [    8.294086] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    8.294092] cpsw 4a100000.ethernet: ALE Table size 1024
    [    8.394444] NS DP83848C 10/100 Mbps PHY 4a101000.mdio:01: attached PHY driver [NS DP83848C 10/100 Mbps PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=-1)
    [    8.416917] cpts ptp bc clkid 0
    [    8.420350] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    8.939814] Bluetooth: Core ver 2.22
    [    8.939886] NET: Registered protocol family 31
    [    8.939890] Bluetooth: HCI device and connection manager initialized
    [    8.939909] Bluetooth: HCI socket layer initialized
    [    8.939918] Bluetooth: L2CAP socket layer initialized
    [    8.939945] Bluetooth: SCO socket layer initialized
    [    9.481853] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [  OK  ] Found device /dev/ttyS0.
    [   10.484761] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [   10.492682] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [  OK  ] Started Telephony service.
    [  OK  ] Started Login Service.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight...htness of backlight:backlight...
    [  OK  ] Reached target Network.
             Starting Permit User Sessions...
             Starting Network Name Resolution...
             Starting Lightning Fast Webserver With Light System Requirements...
             Starting Simple Network Management Protocol (SNMP) Daemon....
             Starting Enable and configure wl18xx bluetooth stack...
    [  OK  ] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
             Starting Wait for Network to be Configured...
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started Enable and configure wl18xx bluetooth stack.
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    [   12.712918] NET: Registered protocol family 15
    [   13.602638] Initializing XFRM netlink socket
    [  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
    [  OK  ] Started uim-sysfs.service.
    [   14.999180] input: ti-tsc as /devices/platform/44000000.ocp/44e0d000.tscadc/TI-am335x-tsc/input/input1
    [   15.052407] random: crng init done
    [   17.503483] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            autoconf
            binutils
            cifs-utils
            cpio
            cpp-symlinks
            cpp
            dosfstools
            findutils
            g++-symlinks
            g++
            gawk-dev
            gawk
            gcc-symlinks
            gcc
            gdb
            gdbserver
            glmark2
            gstreamer1.0-libav
            gzip
            hidapi
            libcairo-perf-utils
            libgmp10
            libidn11
            libmavconn
            libmpc3
            libmpfr4
            libreadline-dev
            libreadline6
            m4-dev
            m4
            make
            mavlink
            mavros-extras
            mavros-msgs
            mavros
            nettle
            socketcan-interface
            swig-dev
            swig
            which
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am437x-evm ttyS0
    
    Arago 2017.12 am437x-evm ttyS0
    
    

  • Hi,

    Something went wrong with the attached boot log, the link that is shown looks to be empty. Could you please try to attach the boot log again?

    I looked in the u-boot source and I believe I see why the reset-delay-us property is not working. This property works in Linux because the MDIO driver uses it and not the CPSW driver. In U-boot there is not an MDIO driver provided. Since U-Boot's is single threaded in nature the CPSW will do anything it needs to init, start and run a network transaction. The CPSW driver has it's own functions to read the mdio bus and gets the PHY information such as the PHY address stored in platform data which is in the board.c file. The CPSW driver does not read in the reset-delay-us property since it does not have code to perform the reset.

    Best Regards,
    Schuyler
  • reattaching even though "output6.txt" worked for me when i downloaded it and opened it

    4544.output6.txt
    U-Boot SPL 2017.01-00458-gccd1c34-dirty (Apr 22 2019 - 11:54:28)
    Trying to boot from MMC1
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2017.01-00458-gccd1c34-dirty (Apr 22 2019 - 11:54:28 -0500)
    
    CPU  : AM437X-GP rev 1.2
    Model: TI AM437x UTI BOARD
    DRAM:  512 MiB
    PMIC:  TPS65218
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    Net:   Mac Addr = f0:b5:d1:3e:83:62
    Could not get PHY for cpsw: addr 1
    cpsw
    Hit any key to stop autoboot:  0 
    ## Error: "findfdt" not defined
    reading uEnv.txt
    717 bytes read in 4 ms (174.8 KiB/s)
    Importing environment from mmc0 ...
    3658624 bytes read in 637 ms (5.5 MiB/s)
    54629 bytes read in 38 ms (1.4 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffef000, end 8ffff564 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.69-g9ce43c71ae (michael_j@UTI-CPELNX-03) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Mon Apr 15 14:21:15 CDT 2019
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt:Machine model: TI AM437x UTI BOARD
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM437x ES1.2 (sgx neon)
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyO0,115200n8 video=HDMI-A-1:800x600 root=PARTUUID=284581e2-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 457884K/524288K available (7168K kernel code, 295K rwdata, 2392K rodata, 1024K init, 288K bss, 17252K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
    [    0.000000]       .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
    [    0.000000]       .data : 0xc0c00000 - 0xc0c49cc8   ( 296 kB)
    [    0.000000]        .bss : 0xc0c49cc8 - 0xc0c91fb4   ( 289 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
    [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [    0.000000] OMAP L2C310: ROM does not support power control setting
    [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [    0.000000] OMAP clockevent source: timer2 at 19200000 Hz
    [    0.000011] sched_clock: 32 bits at 19MHz, resolution 52ns, wraps every 111848106981ns
    [    0.000029] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
    [    0.000037] OMAP clocksource: timer1 at 19200000 Hz
    [    0.000419] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000429] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000787] Console: colour dummy device 80x30
    [    0.000814] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000820] This ensures that you still see kernel messages. Please
    [    0.000824] update your kernel commandline.
    [    0.000842] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
    [    0.060169] pid_max: default: 32768 minimum: 301
    [    0.060292] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.060303] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.061029] CPU: Testing write buffer coherency: ok
    [    0.061373] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.062122] EFI services will not be available.
    [    0.062828] devtmpfs: initialized
    [    0.074196] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [    0.074481] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.074504] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.077599] pinctrl core: initialized pinctrl subsystem
    [    0.078680] NET: Registered protocol family 16
    [    0.080010] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.180178] cpuidle: using governor ladder
    [    0.210168] cpuidle: using governor menu
    [    0.215405] omap_gpio 4804c000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_1_pins_default, deferring probe
    [    0.215710] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_2_pins_default, deferring probe
    [    0.216003] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_3_pins_default, deferring probe
    [    0.216273] omap_gpio 48320000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_4_pins_default, deferring probe
    [    0.216567] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/gpio_5_pins_default, deferring probe
    [    0.224237] No ATAGs?
    [    0.224265] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [    0.224275] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [    0.266743] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.271408] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c_0_pins_default, deferring probe
    [    0.271467] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c_1_pins_default, deferring probe
    [    0.271600] media: Linux media interface: v0.10
    [    0.271641] Linux video capture interface: v2.00
    [    0.271681] pps_core: LinuxPPS API ver. 1 registered
    [    0.271687] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.271708] PTP clock support registered
    [    0.271750] EDAC MC: Ver: 3.0.0
    [    0.272581] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.272942] Advanced Linux Sound Architecture Driver Initialized.
    [    0.273898] clocksource: Switched to clocksource timer1
    [    0.282175] NET: Registered protocol family 2
    [    0.282819] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.282860] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.282902] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.282990] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.283004] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.283135] NET: Registered protocol family 1
    [    0.283513] RPC: Registered named UNIX socket transport module.
    [    0.283525] RPC: Registered udp transport module.
    [    0.283530] RPC: Registered tcp transport module.
    [    0.283535] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.285819] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.291030] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.291800] NFS: Registering the id_resolver key type
    [    0.291832] Key type id_resolver registered
    [    0.291839] Key type id_legacy registered
    [    0.291885] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.296600] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.296619] io scheduler noop registered
    [    0.296626] io scheduler deadline registered
    [    0.296735] io scheduler cfq registered (default)
    [    0.298460] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [    0.301183] backlight supply power not found, using dummy regulator
    [    0.348117] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.350658] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
    [    0.351388] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    1.072741] console [ttyS0] enabled
    [    1.076714] omap8250 481a6000.serial: No clock speed specified: using default: 48000000
    [    1.085417] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud = 3000000) is a 8250
    [    1.095821] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.102628] [drm] Initialized
    [    1.107239] 4832a000.dss supply vdda_video not found, using dummy regulator
    [    1.114451] OMAP DSS rev 2.0
    [    1.117500] omapdss_dss 4832a000.dss: bound 4832a400.dispc (ops dispc_component_ops)
    [    1.126642] display supply vcc not found, using dummy regulator
    [    1.145324] brd: module loaded
    [    1.154231] loop: module loaded
    [    1.159451] libphy: Fixed MDIO Bus: probed
    [    1.179194] cpsw 4a100000.ethernet: Detected MACID = f0:b5:d1:3e:99:88
    [    1.185919] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [    1.192941] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.201572] mousedev: PS/2 mouse device common for all mice
    [    1.207667] i2c /dev entries driver
    [    1.212949] cpuidle: enable-method property 'ti,am4372' found operations
    [    1.274636] OF: /ocp@44000000/mmc@47810000: could not get #dma-cells for /ocp@44000000/l4_wkup@44c00000/prcm@1f0000/clocks/dpll_mpu_ck@2d60
    [    1.288326] omap_hsmmc 47810000.mmc: RX DMA channel request failed
    [    1.297640] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.309610] NET: Registered protocol family 10
    [    1.315360] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.321938] NET: Registered protocol family 17
    [    1.326874] Key type dns_resolver registered
    [    1.331388] omap_voltage_late_init: Voltage driver support not added
    [    1.343316] omapdrm omapdrm.0: DMM not available, disable DMM support
    [    1.350376] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.357110] [drm] No driver support for vblank timestamp query.
    [    1.425798] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.429066] mmc0: new high speed SDHC card at address aaaa
    [    1.429731] mmcblk0: mmc0:aaaa SS08G 7.40 GiB 
    [    1.432326]  mmcblk0: p1 p2
    [    1.445029] Console: switching to colour frame buffer device 128x37
    [    1.493811] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    1.526461] OMAP GPIO hardware version 0.1
    [    1.579510] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.586341] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.663948] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.670082] davinci_mdio 4a101000.mdio: detected phy mask fffffffd
    [    1.676953] libphy: 4a101000.mdio: probed
    [    1.681016] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver NS DP83848C 10/100 Mbps PHY
    [    1.695139] hctosys: unable to open rtc device (rtc0)
    [    1.700938] ALSA device list:
    [    1.704113]   No soundcards found.
    [    1.724495] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.732702] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.744265] devtmpfs: mounted
    [    1.749039] Freeing unused kernel memory: 1024K
    [    1.755502] random: fast init done
    [    2.030202] systemd[1]: System time before build time, advancing clock.
    [    2.082935] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -ID)
    [    2.101954] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2017.12!
    
    [    2.148461] systemd[1]: Set hostname to <am437x-evm>.
    [    2.667692] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    2.704769] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    2.734387] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [    2.773092] systemd[1]: Listening on Process Core Dump Socket.
    [  OK  ] Listening on Process Core Dump Socket.
    [    2.804497] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    2.846062] systemd[1]: Created slice System Slice.
    [  OK  ] Created slice System Slice.
    [    2.875438] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Listening on Journal Socket.
             Starting Load Kernel Modules...
             [    3.129985] cmemk: loading out-of-tree module taints kernel.
    Mounting Debug File System...
    [  OK  ] Started Forward Password Requests to Wall Dir[    3.144871] CMEMK module: reference Linux version 4.9.69
    ectory Watch.
    [    3.163524] no physical memory specified
    [    3.168316] cmemk initialized
    [  OK  ] Reached target Paths.
             Starting Setup Virtual Console...
    [    3.197169] cryptodev: driver 1.8 loaded.
    [  OK  ] Reached target Swap.
             Starting Journal Service...
    [    3.251354] usbcore: registered new interface driver usbfs
    [  OK  ] Listening on /dev/initctl Compatibility Named[    3.265694] usbcore: registered new interface driver hub
     Pipe.
    [    3.278525] usbcore: registered new device driver usb
             Starting alignment.service...
    [    3.315806] usbcore: registered new interface driver usbserial
    [  OK  ] Created slice User and Session Slice.
    [    3.365785] usbcore: registered new interface driver ftdi_sio
    [    3.372431] usbserial: USB Serial support registered for FTDI USB Serial Device
             Mounting Temporary Directory...
             Mounting POSIX Message Queue File System...
    [  OK  ] Reached target Slices.
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Listening on Network Service Netlink Socket.
    [    3.570619] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Mounted Debug File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Temporary Directory.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Setup Virtual Console.
    [  OK  ] Started alignment.service.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Create Static Device Nodes in /dev.
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /var/volatile...
             Mounting /media/ram...
             Starting udev Coldplug all Devices...
             Mounting Configuration File System...
             Starting Apply Kernel Variables...
             Starting Flush Journal to Persistent Storage...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Apply Kernel Variables.
    [    4.583131] systemd-journald[101]: Received request to flush runtime journal from PID 1
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Load/Save Random Seed.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [    5.785124] remoteproc remoteproc0: wkup_m3 is available
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [    5.859538] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on RPCbind Server Activation Socket[    6.112233] remoteproc remoteproc0: powering up wkup_m3
    .
    [  OK  ] Reached target Sockets.
    [    6.234410] 1-0018 supply IOVDD not found, using dummy regulator
    [    6.248902] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224268
    [    6.249921] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [    6.250084] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [  OK  ] Reached target Basic System.
             Starting Avahi mDNS/DNS-SD Stack...
    [    6.520873] 1-0018 supply DVDD not found, using dummy regulator
    [  OK  ] Started D-Bus System Message Bus.
    [    6.581823] 1-0018 supply AVDD not found, using dummy regulator
    [    6.665924] 1-0018 supply DRVDD not found, using dummy regulator
    [    6.826447] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
    [    7.017842] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
    [    7.059325] omap-aes 53501000.aes: will run requests pump with realtime priority
    [    7.149902] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
    [    7.214782] omap-des 53701000.des: will run requests pump with realtime priority
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
             Starting Network Service...
    [    7.392509] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [  OK  ] Started Periodic Command Scheduler.
    [  OK  ] Started Kernel Logging Service.
             Starting Login Service...
    [    7.607399] input: matrix_keypad0 as /devices/platform/matrix_keypad0/input/input0
             Starting uim-sysfs.service...
    [    7.741168] PM: no-rtc available, rtc-only mode disabled.
             Starting Print notice about GPLv3 packages...
    [  OK  ] Started System Logging Service.
    [    7.909436] asoc-simple-card sound0: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok
    [  OK  ] Started Job spooling tools.
             Starting Telephony service...
    [  OK  ] Started Network Service.
    [    8.196085] net eth0: initializing cpsw version 1.15 (0)
    [    8.294086] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    8.294092] cpsw 4a100000.ethernet: ALE Table size 1024
    [    8.394444] NS DP83848C 10/100 Mbps PHY 4a101000.mdio:01: attached PHY driver [NS DP83848C 10/100 Mbps PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=-1)
    [    8.416917] cpts ptp bc clkid 0
    [    8.420350] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    8.939814] Bluetooth: Core ver 2.22
    [    8.939886] NET: Registered protocol family 31
    [    8.939890] Bluetooth: HCI device and connection manager initialized
    [    8.939909] Bluetooth: HCI socket layer initialized
    [    8.939918] Bluetooth: L2CAP socket layer initialized
    [    8.939945] Bluetooth: SCO socket layer initialized
    [    9.481853] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [  OK  ] Found device /dev/ttyS0.
    [   10.484761] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [   10.492682] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [  OK  ] Started Telephony service.
    [  OK  ] Started Login Service.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight...htness of backlight:backlight...
    [  OK  ] Reached target Network.
             Starting Permit User Sessions...
             Starting Network Name Resolution...
             Starting Lightning Fast Webserver With Light System Requirements...
             Starting Simple Network Management Protocol (SNMP) Daemon....
             Starting Enable and configure wl18xx bluetooth stack...
    [  OK  ] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
             Starting Wait for Network to be Configured...
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started Enable and configure wl18xx bluetooth stack.
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.
    [   12.712918] NET: Registered protocol family 15
    [   13.602638] Initializing XFRM netlink socket
    [  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
    [  OK  ] Started uim-sysfs.service.
    [   14.999180] input: ti-tsc as /devices/platform/44000000.ocp/44e0d000.tscadc/TI-am335x-tsc/input/input1
    [   15.052407] random: crng init done
    [   17.503483] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            autoconf
            binutils
            cifs-utils
            cpio
            cpp-symlinks
            cpp
            dosfstools
            findutils
            g++-symlinks
            g++
            gawk-dev
            gawk
            gcc-symlinks
            gcc
            gdb
            gdbserver
            glmark2
            gstreamer1.0-libav
            gzip
            hidapi
            libcairo-perf-utils
            libgmp10
            libidn11
            libmavconn
            libmpc3
            libmpfr4
            libreadline-dev
            libreadline6
            m4-dev
            m4
            make
            mavlink
            mavros-extras
            mavros-msgs
            mavros
            nettle
            socketcan-interface
            swig-dev
            swig
            which
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am437x-evm ttyS0
    
    Arago 2017.12 am437x-evm ttyS0
    
    

    so resetting the PHY via gpio will never allow us to turn on the PHY in u-boot and we would have to do it via registers directly. is that accurate?

  • Hi,
    First apologies I thought I had responded to the post earlier.

    To answer your question yes, the U-Boot driver does not comprehend (at least not yet) resetting the PHY like the Linux driver does. The code you added will need to be added to get the network to function. Have you added the U-Boot code back in and is both U-Boot and the Linux kernel working network wise now?

    Best Regards,
    Schuyler
  • i have not been able to get u-boot to work with the network driver
  • Hi,
    Just to confirm though networking is working with the kernel and not with u-boot.

    Could you post a the snippet of the schematic that shows the EMAC with the PHY? In post the you mentioned that a GPIO reset line was added but I want to start at the beginning again debugging u-boot so we will review pin mux, phy addressing. The earlier mii tool dumps showed the PHY had auto-negotiated successfully with a link partner.

    This thread has gotten long as it has traveled from u-boot to Linux back to u-boot. The Linux portion proved the MAC /PHY interface is working so this can be claimed as a known good which means it should work in u-boot.

    Best Regards,
    Schuyler
  • yup, network works fine in the kernel.

    schematic:

    pinmux from DTS:

    mii_1_pins_default: mii_1_pins_default {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D16) mii1_col.gmii1_col */
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B14) mii1_crs.gmii1_crs */
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B13) mii1_rx_er.gmii1_rxer */
    AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A13) mii1_tx_en.gmii1_txen */
    AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A15) mii1_rx_dv.gmii1_rxdv */
    AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D14) mii1_tx_clk.gmii1_txclk */
    AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D13) mii1_rx_clk.gmii1_rxclk */
    AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (B15) mii1_txd0.gmii1_txd0 */
    AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A14) mii1_txd1.gmii1_txd1 */
    AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C13) mii1_txd2.gmii1_txd2 */
    AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C16) mii1_txd3.gmii1_txd3 */
    AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (F17) mii1_rxd0.gmii1_rxd0 */
    AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B16) mii1_rxd1.gmii1_rxd1 */
    AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (E16) mii1_rxd2.gmii1_rxd2 */
    AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (C14) mii1_rxd3.gmii1_rxd3 */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    mii_1_pins_sleep: mii_1_pins_sleep {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D16) mii1_col.gmii1_col */
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B14) mii1_crs.gmii1_crs */
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B13) mii1_rx_er.gmii1_rxer */
    AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A13) mii1_tx_en.gmii1_txen */
    AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A15) mii1_rx_dv.gmii1_rxdv */
    AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D14) mii1_tx_clk.gmii1_txclk */
    AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (D13) mii1_rx_clk.gmii1_rxclk */
    AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (B15) mii1_txd0.gmii1_txd0 */
    AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (A14) mii1_txd1.gmii1_txd1 */
    AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C13) mii1_txd2.gmii1_txd2 */
    AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (C16) mii1_txd3.gmii1_txd3 */
    AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (F17) mii1_rxd0.gmii1_rxd0 */
    AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B16) mii1_rxd1.gmii1_rxd1 */
    AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (E16) mii1_rxd2.gmii1_rxd2 */
    AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (C14) mii1_rxd3.gmii1_rxd3 */
    >;
    };

    pinmux from mux.c:

    static struct module_pin_mux mii1_pin_mux[] = {
    {OFFSET(mii1_txen), MODE(0)}, /* MII1_TCTL */
    {OFFSET(mii1_rxdv), MODE(0) | RXACTIVE}, /* MII1_RCTL */
    {OFFSET(mii1_txd3), MODE(0)}, /* MII1_TD3 */
    {OFFSET(mii1_txd2), MODE(0)}, /* MII1_TD2 */
    {OFFSET(mii1_txd1), MODE(0)}, /* MII1_TD1 */
    {OFFSET(mii1_txd0), MODE(0)}, /* MII1_TD0 */
    {OFFSET(mii1_txclk), MODE(0)}, /* MII1_TCLK */
    {OFFSET(mii1_rxclk), MODE(0) | RXACTIVE}, /* MII1_RCLK */
    {OFFSET(mii1_rxd3), MODE(0) | RXACTIVE}, /* MII1_RD3 */
    {OFFSET(mii1_rxd2), MODE(0) | RXACTIVE}, /* MII1_RD2 */
    {OFFSET(mii1_rxd1), MODE(0) | RXACTIVE}, /* MII1_RD1 */
    {OFFSET(mii1_rxd0), MODE(0) | RXACTIVE}, /* MII1_RD0 */
    {OFFSET(mii1_col), MODE(0) | RXACTIVE}, /* MII1_COL */
    {OFFSET(mii1_crs), MODE(0) | RXACTIVE}, /* MII1_CRS */
    {OFFSET(mii1_rxerr), MODE(0) | RXACTIVE}, /* MII1_RXERR */
    {-1},
    };

    PHY addressing from board.c:

    static struct cpsw_slave_data cpsw_slaves[] = {
    {
    .slave_reg_ofs = 0x208,
    .sliver_reg_ofs = 0xd80,
    .phy_addr = 16,
    },
    {
    .slave_reg_ofs = 0x308,
    .sliver_reg_ofs = 0xdc0,
    .phy_addr = 1,
    },
    };

    static struct cpsw_platform_data cpsw_data = {
    .mdio_base = CPSW_MDIO_BASE,
    .cpsw_base = CPSW_BASE,
    .mdio_div = 0xff,
    .channels = 8,
    .cpdma_reg_ofs = 0x800,
    .slaves = 1,
    .slave_data = cpsw_slaves,
    .ale_reg_ofs = 0xd00,
    .ale_entries = 1024,
    .host_port_reg_ofs = 0x108,
    .hw_stats_reg_ofs = 0x900,
    .bd_ram_ofs = 0x2000,
    .mac_control = (1 << 5),
    .control = cpsw_control,
    .host_port_num = 0,
    .version = CPSW_CTRL_VERSION_2,
    };
    #endif


    /*
    * This function will:
    * Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
    * in the environment
    * Perform fixups to the PHY present on certain boards. We only need this
    * function in:
    * - SPL with either CPSW or USB ethernet support
    * - Full U-Boot, with either CPSW or USB ethernet
    * Build in only these cases to avoid warnings about unused variables
    * when we build an SPL that has neither option but full U-Boot will.
    */
    #if ((defined(CONFIG_SPL_ETH_SUPPORT) || \
    defined(CONFIG_SPL_USBETH_SUPPORT)) && \
    defined(CONFIG_SPL_BUILD)) || \
    ((defined(CONFIG_DRIVER_TI_CPSW) || \
    defined(CONFIG_USB_ETHER)) && !defined(CONFIG_SPL_BUILD))
    int board_eth_init(bd_t *bis)
    {
    int rv;
    uint8_t mac_addr[6];
    uint32_t mac_hi, mac_lo;

    /* try reading mac address from efuse */
    mac_lo = readl(&cdev->macid0l);
    mac_hi = readl(&cdev->macid0h);
    mac_addr[0] = mac_hi & 0xFF;
    mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    mac_addr[4] = mac_lo & 0xFF;
    mac_addr[5] = (mac_lo & 0xFF00) >> 8;

    printf("Mac Addr = %x:%x:%x:%x:%x:%x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);

    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    if (!getenv("ethaddr")) {
    puts("<ethaddr> not set. Validating first E-fuse MAC\n");
    if (is_valid_ethaddr(mac_addr))
    eth_setenv_enetaddr("ethaddr", mac_addr);
    }

    #ifndef CONFIG_SPL_BUILD
    mac_lo = readl(&cdev->macid1l);
    mac_hi = readl(&cdev->macid1h);
    mac_addr[0] = mac_hi & 0xFF;
    mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    mac_addr[4] = mac_lo & 0xFF;
    mac_addr[5] = (mac_lo & 0xFF00) >> 8;

    if (!getenv("eth1addr")) {
    if (is_valid_ethaddr(mac_addr))
    eth_setenv_enetaddr("eth1addr", mac_addr);
    }
    #endif
    writel(MII_MODE_ENABLE, &cdev->miisel);
    cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_MII;
    cpsw_slaves[0].phy_addr = 1;

    rv = cpsw_register(&cpsw_data);
    if (rv < 0) {
    printf("Error %d registering CPSW switch\n", rv);
    return rv;
    }
    #endif

    return rv;
    }
    #endif
    #endif

    output from dhcp command in u-boot with PHY out of reset:

    U-Boot 2017.01-00458-gccd1c34-dirty (May 02 2019 - 14:20:03 -0500)

    CPU : AM437X-GP rev 1.2
    Model: TI AM437x UTI BOARD
    DRAM: 512 MiB
    PMIC: TPS65218
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    Net: Mac Addr = f0:b5:d1:3e:99:88
    cpsw
    Hit any key to stop autoboot: 0
    => dhcp
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17
    BOOTP broadcast 18
    BOOTP broadcast 19
    BOOTP broadcast 20
    BOOTP broadcast 21
    BOOTP broadcast 22
    BOOTP broadcast 23
    BOOTP broadcast 24
    BOOTP broadcast 25
    BOOTP broadcast 26
    BOOTP broadcast 27
    BOOTP broadcast 28
    BOOTP broadcast 29

    Retry time exceeded; starting again

  • Hi,

    Could you look at and post the hw_stats registers using this command in u-boot after the BOOTP process has time out:

    md.l 0x4a100900 

    Best Regards,

    Schuyler

  • => dhcp
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17
    BOOTP broadcast 18
    BOOTP broadcast 19
    BOOTP broadcast 20
    BOOTP broadcast 21
    BOOTP broadcast 22
    BOOTP broadcast 23
    BOOTP broadcast 24
    BOOTP broadcast 25
    BOOTP broadcast 26
    BOOTP broadcast 27
    BOOTP broadcast 28
    BOOTP broadcast 29

    Retry time exceeded; starting again
    => md.l 0x4a100900
    4a100900: 00000000 00000000 00000000 00000000 ................
    4a100910: 00000000 00000000 00000000 00000000 ................
    4a100920: 00000000 00000000 00000000 00000000 ................
    4a100930: 00000000 00000000 00000000 00000000 ................
    4a100940: 00000000 00000000 00000000 00000000 ................
    4a100950: 00000000 00000000 00000000 00000000 ................
    4a100960: 00000000 00000000 00000000 00000000 ................
    4a100970: 00000000 00000000 00000000 00000000 ................
    4a100980: 00000000 00000000 00000000 00000000 ................
    4a100990: 00000000 00000000 00000000 00000000 ................
    4a1009a0: 00000000 00000000 00000000 00000000 ................
    4a1009b0: 00000000 00000000 00000000 00000000 ................
    4a1009c0: 00000000 00000000 00000000 00000000 ................
    4a1009d0: 00000000 00000000 00000000 00000000 ................
    4a1009e0: 00000000 00000000 00000000 00000000 ................
    4a1009f0: 00000000 00000000 00000000 00000000 ................
    =>

  • Hi,

    The stats structure is empty which means no packets are leaving the PHY. Could you please post a scope shot of the Clocks coming from the PHY?

    Also please post the results of the following commands:

    mii info

    The next two commands are expecting the PHY to be at address 1 on the mdio bus.

    mii dump 1 0 

    mii dump 1 1 

    Regards,

    Schuyler

  • Hi,

    I am just checking in to see if this issue is still open. If so please post the requested info from the previous post, thanks.

    Best Regards,

    Schuyler

  • => mii info
    PHY 0x01: OUI = 0x80017, Model = 0x09, Rev = 0x00, 100baseT, FDX

    => mii dump 1 0
    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)

    => mii dump 1 1
    1. (786d) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0020) 1. 5 = 1 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0004) 1. 2 = 1 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

  • Hi,

    Could you please attach the .config file from the u-boot directory that was generated with the make defconfig process? I am looking to see if the PHY driver that you are using got built in. 

    Best Regards,

    Schuyler