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.

AM335x WAN port communicate with LAN port

Hi TI


Now, Our board can be appointed with IP from server, but the WAN(1) can not communicate with LAN port (4)
, and four of LAN can communicate with each other. We use  ICPLUS IP175C switch chip.

Which directions that We can to try and look, thank you.

  • Hi Bernie,

    Please post more details about your setup in order for someone to be able to understand and help you.

    Also post the software you are using. Is this an EVM board or a custom board?

    Best regards,
    Miroslav

  • Hello Ti

    We use 3.2 kernel & ti-linux & custom board

    We want to use ethtool -S ethx, but it cant work, and the message "no state available" appeared, does kernel not support ethtool? What can we do? Thanks.

    BestRegards

    Bernie

  • Do the following:

    root@am335x-evm:~# ethtool -i eth0

    driver: TI CPSW Driver v1.0
    version: 1.0
    firmware-version:
    bus-info: cpsw
    supports-statistics: no
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: no
    supports-priv-flags: no

    I'm sorry, but the cpsw driver doesn't support statistics.

    Best regards,
    Miroslav

  • Hi Ti

    Thanks your reply.

    OK, Is any tool or method to dump phy register ?

    BestRegards

    Bernie

  • You can write a simple user space application to read the memory region you are interested in. Example found on the web:

    int memfd;
    memfd = open("/dev/mem", O_RDONLY | O_NONBLOCK, 0);
    if (memfd == -1) {
    	ERR("Cannot open /dev/mem (%s)\n", strerror(errno));
    	return FAILURE;
    }
    
    unsigned char *memread;
    memread = (unsigned char*)malloc(512);
    memread = (unsigned char*)mmap(NULL, 4096, PROT_READ, MAP_SHARED, memfd, 0x4A10100C); 
    printf("PLL Values %08x\n", *(unsigned int*)memread);

    0x4A10100C is the address of the PHY Link Status Register. I don't know if this is what you are interested in.

    Best regards,
    Miroslav

  • We build icplus.c into 3.2 kernel, icplus is switch driver named IP175C, now we can ping eth0(this is LAN port interface) in LAN port, but the packet is lost very seriously, kernel have message that it catch IP175C below.

    [    1.179016]davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver ICPlus IP175C
    [    1.186950] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver ICPlus IP175C
    [    1.194854] davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver ICPlus IP175C
    [    1.202758] davinci_mdio davinci_mdio.0: phy[3]: device 0:03, driver ICPlus IP175C
    [    1.210693] davinci_mdio davinci_mdio.0: phy[4]: device 0:04, driver ICPlus IP175C

    But I think cpsw doesn't control IP175C driver, because that in icplus.c

    static struct phy_driver ip175c_driver = {
        .phy_id        = 0x02430d80,
        .name        = "ICPlus IP175C",
        .phy_id_mask    = 0x0ffffff0,
        .features    = PHY_BASIC_FEATURES,
        .config_init    = &ip175c_config_init,
        .config_aneg    = &ip175c_config_aneg,
        .read_status    = &ip175c_read_status,
        .suspend    = genphy_suspend,
        .resume        = genphy_resume,
        .driver        = { .owner = THIS_MODULE,},
    };

    ip175c_config_init, ip175c_config_aneg, ip175c_read_status are not be executed. How could I combine IP175C with CPSW? Thank you.