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.

TDA4VM: Connecting Ethernet PHY to CPSW0

Part Number: TDA4VM

Hello, we are developing a custom platform with a main TDA4 SoC.

Processor SDK version: 06_02_00  (we are planing to upgrade to latest 7_0x_xx in the next phase of development)

On our platform we have connected several Marvell 88E1512 Ethernet PHY to Ethernet switch CPSW0 on main domain.
Now, we are having problems to understand how it is intended to assign physical Ethernet devices to virtual MAC cpsw9g_virt_mac.

For example, on switch found in MCU domain we attached same PHY, added the MCU CPSW in device tree, and under that node we have the ports and mdio nodes, under which we have added for our platform the PHY we wanted:

mcu_cpsw: ethernet@046000000 {
...
ports {
  #address-cells = <1>;
  #size-cells = <0>;

  host: host@0 {
    reg = <0>;
    ti,label = "host";
  };

  cpsw_port1: port@1 {
    reg = <1>;
    ti,mac-only;
    ti,label = "port1";
    ti,syscon-efuse = <&mcu_conf 0x200>;
    };
};

davinci_mdio: mdio {
    #address-cells = <1>;
    #size-cells = <0>;
    bus_freq = <1000000>;
};

...

&davinci_mdio {
  reset-gpios = <&exp2 15 GPIO_ACTIVE_LOW>; // PHY reset is connected to GPIO pin 15 on GPIO expander 2
  reset-delay-us = <10000>; // Minimum reset pulse width during normal operation is 10ms for Marvell 88E1512
  phy0: ethernet-phy@0 {
    device_type = "ethernet-phy";
    reg = <0>;
  };
};

&cpsw_port1 {
  phy-mode = "rgmii-id";
  phy-handle = <&phy0>;
};

We never before worked with virtual MAC in Linux kernel so we regarded the device tree documentation for virt_mac: 

Further we implemented the main_r5fss_cpsw9g_virt_mac0 node per documentation guide, and now we can't figure it out under which node we should attach physical Ethernet devices to the CPSW.

Can you provide quick guide, or any form of assistance?

Regards
Uros.

  • Hi Uros,

    Can you look at this page ?

    Look at the PHY integration guide under "Documentation References"

    Regards

    Vineet

  • Hi Vineet

    I took a look at the page, which is documentation part of newer SDK and i think we did not find anything similar for older version.

    The link to the CPSW integration guide - HW and driver overview, CPSW examples is not working and
    the link to the PHY integration guide - to help integrating new PHY with CPSW LLD is a guide how to implement specific PHY driver handler in CPSW0, or precisely Enet low-level driver.

    I failed to find locations and files mentioned in the guide, as enet cannot be found neither in PDK or EthFw in PSDKRA.

    Ill mention once more that we are still using older version of Processor SDK: 06_02_00, maybe Enet LLD is something added in newer version?

    Nonetheless this seems to be the guide for problems to come, as our current problem is attaching the pinmux addresses of physical pins to the CPSW0 in linux device tree.

    We have added the pinmux in our DT for our PHY connected on, for example rgmii5, as such:

    main_rgmii5_pins_default: main-rgmii5-pins-default {
            pinctrl-single,pins = <
                J721E_IOPAD(0x184, PIN_INPUT, 0) /* (T23) RGMII5_RD0 */
                J721E_IOPAD(0x180, PIN_INPUT, 0) /* (R23) RGMII5_RD1 */
                J721E_IOPAD(0x17c, PIN_INPUT, 0) /* (U24) RGMII5_RD2 */
                J721E_IOPAD(0x178, PIN_INPUT, 0) /* (U27) RGMII5_RD3 */
                J721E_IOPAD(0x15c, PIN_INPUT, 0) /* (U26) RGMII5_RXCTL */
                J721E_IOPAD(0x174, PIN_INPUT, 0) /* (U25) RGMII5_RXC */
                J721E_IOPAD(0x16c, PIN_OUTPUT, 0) /* (U28) RGMII5_TD0 */
                J721E_IOPAD(0x168, PIN_OUTPUT, 0) /* (U27) RGMII5_TD1 */
                J721E_IOPAD(0x164, PIN_OUTPUT, 0) /* (V29) RGMII5_TD2 */
                J721E_IOPAD(0x160, PIN_OUTPUT, 0) /* (V28) RGMII5_TD3 */
                J721E_IOPAD(0x158, PIN_OUTPUT, 0) /* (U23) RGMII5_TXCTL */
                J721E_IOPAD(0x170, PIN_INPUT, 0) /* (U29) RGMII5_TXC */
            >;
        };

    But we do not know what further needs to be done, how to attach it to the CPSW port nor to the MDIO which is to handle them.

    Hope i made our problem a bit more clear.

    Thank you for your response.
    Uros

  • Hi Uros,

    Sorry, re-opening this thread after some time.

    Are you still facing this issue ? Did you upgrade to newer version of the SDK ?

    Regards

    Vineet