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: Regarding the node in device tree for ethernet switch BCM 89551

Part Number: TDA4VM

Dear Sir/Mam,

We have a external switch BCM 89551 connected to the TDA4 internal switch over port 8 of external switch. We are not using the MDIO interface at all. 

Do need to add the node for this external switch 89551 in the device tree ? If yes, than at the moment i am not able to find the corresponding binding for it. 

Also , do i need to add it in U-boot dtsi too ?

Please see the attached picture for internal switch

  • Hi Manish,

    I assume that this is a MAC-to-MAC connection between MCU_CPUSW0 (CPSW_2G) and the external switch, correct? If so, you'd need to add a "fixed-link" subnode inside the cpsw_port1 node of mcu_cpsw. The fixed link subnode is to be populated with the link parameters (speed/duplexity) which should be fixed and known, I believe that should be case in your setup.

    Please refer to below dts binding documentation for more info on fixed-link:

    <linux_kernel>/Documentation/devicetree/bindings/net/fixed-link.txt

    I'll get back to you on the u-boot configuration side.

  • Hello Misael,

    Thanks a lot for quick answer.

    I have done following steps :

    1)    Pin B26 changed to Output and the fixed link is added to the two files mentioned by TI after extending the mcu_cpsw

    2)     Removed the phy-handle = <&phy0>; from &cpsw_port1 in the file k3-j721e-common-proc-board.dts (row 541)

    3)    Remove the phy defined for Ethernet in &davinci_mdio extension in j721e-common-proc-board.dts. (Actually removing the entire extension of davinci_mdio as it is also not needed) – row 531 -537

    After doing 3 steps above i see a link-up between external switch BCM 89551 and internal switch but still no configuration which i might guess either on the external switch configuration or internal switch configuration (which is unlikely). Do you have had any request before to configure the external switch and if yes what changes i need to do considering the dts , a switch node with the pin configuration ?

    Looking forward for u-boot configuration side .

    Appreciate your help and incase you don't find my question clear please get back to me asap.

    Regards

    Manish

    ZF Automotive

  • Hello Misael,

    Any update on u-boot configuration side ?

  • Hi 

    There is a difference (unfortunate) in fixed-link configuration between u-boot and kernel:
    - kernel: "fixed-link" need to be added to the port node "cpsw_port1: port@1"
    - u-boot: "fixed-link" need to be added to the cpsw2g node "mcu_cpsw: ethernet@046000000"

    below diff works for me.

    Note. you need to be sure what speed and duplex is configured for "fixed-link". The reg CPSW_SS_RGMII_STATUS_REG can be used to check RGMII status, but note it's offset is 0x46000030 (not 0x46000018)

    diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi

    index a27017f370..1f76c35875 100644
    --- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
    @@ -324,7 +324,6 @@

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

    &mcu_cpsw {
    @@ -337,6 +336,10 @@
    reg= <0x0 0x40f04040 0x0 0x4>;
    reg-names = "gmii-sel";
    };
    +
    + fixed-link {
    + speed = <100>;
    + };
    };

    Regarding connection to BCM 89551. I assume what you need is DSA

    https://www.kernel.org/doc/html/latest/networking/dsa/index.html

    and good place to get more help could be Linux kernel networking mailing list: http://vger.kernel.org/vger-lists.html#netdev

  • Hello Manish,

    Can you please confirm if above helps? If not, any follow up questions?

  • Hello Prasad,

    I think from the changes from TI side we are ok and now we are in contact with Broadcom to resolve the issue.

    Thanks a lot.

    Regards

    Manish