Other Parts Discussed in Thread: TDA4VH
Tool/software:
Hi,
Platform:TDA4VH J784s4-evm(Our company test board cards)
SDK:ti-processor-sdk-linux-adas-j784s4-evm-09_01_00_06
We added the following patches.
In order to enable SGMII mode on J784S4, please ensure that the following commits are present in your Linux Source:
1. https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/phy/ti/phy-gmii-sel.c?h=ti-linux-6.6.y&id=b64dce7e8b3032252df43667d46cf37b28c6b943
2. https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/phy/ti/phy-j721e-wiz.c?h=ti-linux-6.6.y&id=888fe8dd74a2dc3e32396b8cd9e4b76069db87eb
3. https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/net/ethernet/ti?h=ti-linux-6.6.y&id=e63dcf67e8c90d8e0f26728de7fe96cc3dda57da
We want to use all four lanes of serdes2 and configure as sgmii at once(&serdes2 create four serdes_sgmii_xx_link{}). However, after the configuration, none of them can work properly
We tried to configure it separately(&serdes2 creates only one serdes_sgmii_xx_link). Then start the board to test the corresponding network port
serdes2 lane2 -> qsgmii line1 , the network can be used normally.
serdes2 lane3 -> qsgmii line2,the network can be used normally.
serdes2 lane0 -> qsgmii line5,the network can not be used.
serdes2 lane1 -> qsgmii line6,the network can not be used.
The k3-j784s-evm-quad-eth-exp1.dtso :
&main_cpsw0_port1 {
status = "okay";
phy-handle = <&cpsw9g_phy1>;
phy-mode = "sgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_sgmii_3_link>;
phy-names = "mac", "serdes";
};
&main_cpsw0_port2 {
status = "okay";
phy-handle = <&cpsw9g_phy2>;
phy-mode = "sgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_sgmii_4_link>;
phy-names = "mac", "serdes";
};
&main_cpsw0_port3 {
status = "okay";
phy-handle = <&cpsw9g_phy3>;
phy-mode = "sgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 5>, <&serdes2_sgmii_1_link>;
phy-names = "mac", "serdes";
};
&main_cpsw0_port4 {
status = "okay";
phy-handle = <&cpsw9g_phy4>;
phy-mode = "sgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 6>, <&serdes2_sgmii_2_link>;
phy-names = "mac", "serdes";
};
&main_cpsw0_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio0_pins_default>;
bus_freq = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
// sgmii1 -- J784S4_SERDES2_LANE2_QSGMII_LANE1 -- addr:1
cpsw9g_phy1: ethernet-phy@1 {
reg = <1>;
};
// sgmii2 -- J784S4_SERDES2_LANE3_QSGMII_LANE2 -- addr:2
cpsw9g_phy2: ethernet-phy@2 {
reg = <2>;
};
// sgmii5 -- J784S4_SERDES2_LANE0_QSGMII_LANE5 -- addr:16
cpsw9g_phy2: ethernet-phy@16 {
reg = <16>;
};
// sgmii6 -- J784S4_SERDES2_LANE1_QSGMII_LANE6 -- addr:19
cpsw9g_phy2: ethernet-phy@19 {
reg = <19>;
};
};
&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>;
};
&serdes_wiz2 {
status = "okay";
};
&serdes2 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
serdes2_sgmii_1_link: phy@1 {
reg = <0>;
cdns,num-lanes = <1>;
#phy-cells = <0>;
cdns,phy-type = <PHY_TYPE_SGMII>;
resets = <&serdes_wiz2 1>;
};
serdes2_sgmii_2_link: phy@2 {
reg = <1>;
cdns,num-lanes = <1>;
#phy-cells = <0>;
cdns,phy-type = <PHY_TYPE_SGMII>;
resets = <&serdes_wiz2 2>;
};
serdes2_sgmii_3_link: phy@3 {
reg = <2>;
cdns,num-lanes = <1>;
#phy-cells = <0>;
cdns,phy-type = <PHY_TYPE_SGMII>;
resets = <&serdes_wiz2 3>;
};
serdes2_sgmii_4_link: phy@4 {
reg = <3>;
cdns,num-lanes = <1>;
#phy-cells = <0>;
cdns,phy-type = <PHY_TYPE_SGMII>;
resets = <&serdes_wiz2 4>;
};
};
1、 When lane channels are configured separately, why do two lanes work and the other two not? What might be the cause of this.
2、When four lanes are configured at the same time, none of them work properly. And the ehternet phy probe function is called repeatedly when the kernel starts. What might be the cause of this.
Thanks,