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.

[参考译文] AM6442:在 TI SDK 中添加新的 PHY

Guru**** 2562120 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1068085/am6442-add-new-phy-in-ti-sdk

部件号:AM6442
“线程:测试”中讨论的其它部件

TI 专家您好,

我有一个使用 PHY TJA1101B 而不是 dp83867 EVM 的定制板。

我使用 RMII 模式和 CPSW 驱动程序设计 PHY 设备。

我的主板不使用 EEPROM。

现在我使用 SKD 8.0.0.21。

以下是我们的 uBoot 的 DTS:

/* MDIO interface for TJA1101 PHY Ethernet1 and Ethernet2 */
	mdio0_pins_default: mdio0-pins-default {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x015c, PIN_OUTPUT, 4) /* (Y6) PRG1_MDIO0_MDC.MDIO0_MDC */
			AM64X_IOPAD(0x0158, PIN_INPUT, 4) /* (AA6) PRG1_MDIO0_MDIO.MDIO0_MDIO */
		>;
	};

	/* RMII1 interface for TJA1101 PHY Ethernet1 */
	rmii1_pins_default: rmii1-pins-default {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x01fc, PIN_INPUT, 5) /* (R2) PRG0_PRU1_GPO19.RMII1_CRS_DV */
			AM64X_IOPAD(0x01cc, PIN_INPUT, 5) /* (W5) PRG0_PRU1_GPO7.RMII1_RXD0 */
			AM64X_IOPAD(0x01d4, PIN_INPUT, 5) /* (Y5) PRG0_PRU1_GPO9.RMII1_RXD1 */
			AM64X_IOPAD(0x0184, PIN_INPUT, 5) /* (W6) PRG0_PRU0_GPO9.RMII1_RX_ER */
			AM64X_IOPAD(0x01d8, PIN_OUTPUT, 5) /* (V6) PRG0_PRU1_GPO10.RMII1_TXD0 */
			AM64X_IOPAD(0x01f4, PIN_OUTPUT, 5) /* (V5) PRG0_PRU1_GPO17.RMII1_TXD1 */
			AM64X_IOPAD(0x01f8, PIN_OUTPUT, 5) /* (P5) PRG0_PRU1_GPO18.RMII1_TX_EN */
		>;
	};

	/* RMII1 interface for TJA1101 PHY Ethernet2 */
    rmii2_pins_default: rmii2-pins-default {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x013c, PIN_INPUT, 5) /* (U10) PRG1_PRU1_GPO13.RMII2_CRS_DV */
			AM64X_IOPAD(0x0108, PIN_INPUT, 5) /* (W11) PRG1_PRU1_GPO0.RMII2_RXD0 */
			AM64X_IOPAD(0x010c, PIN_INPUT, 5) /* (V11) PRG1_PRU1_GPO1.RMII2_RXD1 */
			AM64X_IOPAD(0x0118, PIN_INPUT, 5) /* (W12) PRG1_PRU1_GPO4.RMII2_RX_ER */
			AM64X_IOPAD(0x0134, PIN_OUTPUT, 5) /* (AA10) PRG1_PRU1_GPO11.RMII2_TXD0 */
			AM64X_IOPAD(0x0138, PIN_OUTPUT, 5) /* (V10) PRG1_PRU1_GPO12.RMII2_TXD1 */
			AM64X_IOPAD(0x0144, PIN_OUTPUT, 5) /* (Y11) PRG1_PRU1_GPO15.RMII2_TX_EN */
		>;
	};

	tja1101_eth_ctrl1_pins_default: tja1101-eth-ctrl1-pins-default {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x01b0, PIN_OUTPUT, 7) /* (Y2) PRG0_PRU1_GPO0.GPIO1_20 (EN) */
			AM64X_IOPAD(0x01b4, PIN_OUTPUT, 7) /* (W2) PRG0_PRU1_GPO1.GPIO1_21 (nRST) */
			AM64X_IOPAD(0x01b8, PIN_INPUT, 7) /* (V3) PRG0_PRU1_GPO2.GPIO1_22 (nINT) */
		>;
	};
	tja1101_eth_ctrl2_pins_default: tja1101-eth-ctrl2-pins-default {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x00bc, PIN_OUTPUT, 7) /* (U8) PRG1_PRU0_GPO1.GPIO0_46 (EN) */
			AM64X_IOPAD(0x00c0, PIN_OUTPUT, 7) /* (W8) PRG1_PRU0_GPO2.GPIO0_47 (nRST) */
			AM64X_IOPAD(0x00c4, PIN_INPUT, 7) /* (V8) PRG1_PRU0_GPO3.GPIO0_48 (nINT) */
		>;
	};
	/* end >> */
	
/* << Modify cpsw3g node for Automotive Ethernet PHY */
&cpsw3g {
	pinctrl-names = "default";
	pinctrl-0 = <&mdio0_pins_default
		     &rmii1_pins_default
		     &rmii2_pins_default
		     &tja1101_eth_ctrl1_pins_default
		     &tja1101_eth_ctrl2_pins_default>;
};

&cpsw_port1 {
	phy-handle = <&cpsw3g_phy0>;
	phy-mode = "rmii";
};

&cpsw3g_mdio {
	cpsw3g_phy0: ethernet-phy@0 {
		reg = <0>;
	};
};

在 U-Boot 上,我使用 MII 命令读取/写入 PHY 正常。

Ping 服务器地址以测试连接失败

=> ping 192.168.8.100                                                                                                                                                    
link up on port 1, speed 100, full duplex                                                                                                                                  
Using ethernet@8000000 device                                                                                                                                            

ARP Retry count exceeded; starting again                                                                                                                                  
ping failed; host 192.168.8.100 is not alive

请告诉我要修改的 DTS 和驱动程序(Uboot 和 Linux)中的几点,以便与新 PHY 兼容。

谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,

    对延误表示歉意。 我将在今天晚些时候再次作出回应。

    此致,

    舒勒

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Schuyler 您好,

    我修复了这个问题,它在 Uboot 和 Kernel 中运行良好。

    谢谢,