Other Parts Discussed in Thread: TDA4VH
Tool/software:
Hi,
I want make my device tree like this,
This is my device tree code.
// SPDX-License-Identifier: GPL-2.0 /** * DT Overlay for CPSW9G in dual port fixed-link USXGMII mode using ENET-1 * and ENET-2 Expansion slots of J784S4 EVM. * * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ */ /dts-v1/; /plugin/; #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/mux/ti-serdes.h> #include <dt-bindings/phy/phy-cadence.h> #include <dt-bindings/phy/phy.h> &main_cpsw0 { status = "okay"; pinctrl-names = "default"; }; &main_cpsw0_port1 { status = "okay"; phy-mode = "usxgmii"; mac-address = [00 00 00 00 00 00]; phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_usxgmii_link>; phy-names = "mac", "serdes"; fixed-link { speed = <10000>; full-duplex; }; }; &main_cpsw0_port2 { status = "okay"; phy-mode = "usxgmii"; mac-address = [00 00 00 00 00 00]; phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_usxgmii_link>; phy-names = "mac", "serdes"; fixed-link { speed = <10000>; full-duplex; }; }; &main_cpsw0_port5 { status = "okay"; phy-mode = "qsgmii"; mac-address = [00 00 00 00 00 00]; phys = <&cpsw0_phy_gmii_sel 5>, <&serdes2_sgmii_link>; phy-names = "mac", "serdes"; fixed-link { speed = <1000>; full-duplex; }; }; &main_cpsw0_port6 { status = "okay"; phy-mode = "qsgmii"; mac-address = [00 00 00 00 00 00]; phys = <&cpsw0_phy_gmii_sel 6>, <&serdes2_sgmii_link>; phy-names = "mac", "serdes"; fixed-link { speed = <1000>; full-duplex; }; }; &serdes_wiz2 { status = "okay"; assigned-clock-parents = <&k3_clks 406 9>; }; &serdes2 { status = "okay"; #address-cells = <1>; #size-cells = <0>; serdes2_sgmii_link: phy@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_SGMII>; resets = <&serdes_wiz2 1>, <&serdes_wiz2 2>; }; serdes2_usxgmii_link: phy@2 { reg = <2>; cdns,num-lanes = <2>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_USXGMII>; resets = <&serdes_wiz2 3>, <&serdes_wiz2 4>; }; }; &serdes_ln_ctrl { idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>, <J784S4_SERDES0_LANE1_PCIE1_LANE1>, <J784S4_SERDES0_LANE2_IP3_UNUSED>, <J784S4_SERDES0_LANE3_USB>, <J784S4_SERDES1_LANE0_PCIE0_LANE0>, <J784S4_SERDES1_LANE1_PCIE0_LANE1>, <J784S4_SERDES1_LANE2_PCIE0_LANE2>, <J784S4_SERDES1_LANE3_PCIE0_LANE3>, <J784S4_SERDES2_LANE0_QSGMII_LANE5>, <J784S4_SERDES2_LANE1_QSGMII_LANE6>, <J784S4_SERDES2_LANE2_QSGMII_LANE1>, <J784S4_SERDES2_LANE3_QSGMII_LANE2>; };
and dmesg output
root@j784s4-evm:~# dmesg | grep eth [ 0.000000] psci: probing for conduit method from DT. [ 1.035384] optee: probing for conduit method. [ 1.496067] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000 [ 1.508918] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4 [ 1.516125] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64 [ 1.526416] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1 [ 1.536238] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000 [ 1.603680] am65-cpsw-nuss c200000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000 [ 1.616421] am65-cpsw-nuss c200000.ethernet: Use random MAC address [ 1.622675] am65-cpsw-nuss c200000.ethernet: initialized cpsw ale version 1.4 [ 1.629793] am65-cpsw-nuss c200000.ethernet: ALE Table size 64 [ 1.635910] am65-cpsw-nuss c200000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0 [ 2.152066] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000 [ 2.164927] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4 [ 2.172134] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64 [ 2.182401] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1 [ 2.192279] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48 [ 2.199929] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000 [ 2.326304] am65-cpsw-nuss: probe of c000000.ethernet failed with error -110 [ 2.387692] am65-cpsw-nuss c200000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000 [ 2.400439] am65-cpsw-nuss c200000.ethernet: Use random MAC address [ 2.406694] am65-cpsw-nuss c200000.ethernet: initialized cpsw ale version 1.4 [ 2.413812] am65-cpsw-nuss c200000.ethernet: ALE Table size 64 [ 2.419927] am65-cpsw-nuss c200000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0 [ 2.429729] am65-cpsw-nuss c200000.ethernet: set new flow-id-base 82 [ 4.857992] systemd[1]: /lib/systemd/system/bt-enable.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, a. [ 4.917741] systemd[1]: /etc/systemd/system/sync-clocks.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file. [ 10.768388] am65-cpsw-nuss c200000.ethernet eth1: PHY [c200f00.mdio:00] driver [TI DP83867] (irq=POLL) [ 10.777836] am65-cpsw-nuss c200000.ethernet eth1: configuring for phy/rgmii-rxid link mode [ 10.799784] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:00] driver [TI DP83867] (irq=POLL) [ 10.809264] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode [ 13.900014] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 13.908755] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
error -110
and When i disable the
&serdes_wiz2 {
status = "okay";
/*assigned-clock-parents = <&k3_clks 406 9>;*/ /*disable*/
};
the eth1~4 will be create, but also can't work.
how can I fix it?
thanks
dongzhang