Hello,
we are trying to connect the Ethernet PHY DP83848 to our custom board with an AM6442. The hardware of the custom board was validated with the BOOTP functionality in RBL, which worked properly. We are using SDK 09.00.00.03 and our Ethernet hardware is connected for RMII2 and MDIO. The PHYAD is 0x10.
We have made several changes in the U-Boot directory of the SDK listed below:
- am64x_evm_a53_defconfig
CONFIG_MULTI_DTB_FIT=n CONFIG_SPL_MULTI_DTB_FIT=n CONFIG_PHY_TI_GENERIC=y
- k3-am642-r5-sk.dts
mdio1_pins_default: mdio1-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 */ >; }; &main_pmx0 { bootph-pre-ram; main_uart0_pins_default: main-uart0-pins-default { bootph-pre-ram; pinctrl-single,pins = < AM64X_IOPAD(0x0238, PIN_INPUT, 0) /* (B16) UART0_CTSn */ AM64X_IOPAD(0x023c, PIN_OUTPUT, 0) /* (A16) UART0_RTSn */ AM64X_IOPAD(0x0230, PIN_INPUT, 0) /* (D15) UART0_RXD */ AM64X_IOPAD(0x0234, PIN_OUTPUT, 0) /* (C16) UART0_TXD */ >; }; main_uart1_pins_default: main-uart1-pins-default { bootph-pre-ram; pinctrl-single,pins = < AM64X_IOPAD(0x0248, PIN_INPUT, 0) /* (D16) UART1_CTSn */ AM64X_IOPAD(0x024c, PIN_OUTPUT, 0) /* (E16) UART1_RTSn */ AM64X_IOPAD(0x0240, PIN_INPUT, 0) /* (E15) UART1_RXD */ AM64X_IOPAD(0x0244, PIN_OUTPUT, 0) /* (E14) UART1_TXD */ >; }; main_mmc0_pins_default: main-mmc0-pins-default { bootph-pre-ram; pinctrl-single,pins = < AM64X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */ AM64X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */ AM64X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */ AM64X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */ AM64X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */ AM64X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */ AM64X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */ AM64X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */ AM64X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */ AM64X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */ AM64X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */ >; }; main_usb0_pins_default: main-usb0-pins-default { bootph-pre-ram; pinctrl-single,pins = < AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */ >; }; mdio1_pins_default: mdio1-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 */ >; }; 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 */ AM64X_IOPAD(0x00e0, PIN_INPUT, 5) /* (U14) PRG1_PRU0_GPO10.RMII_REF_CLK */ >; }; ospi0_pins_default: ospi0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (N20) OSPI0_CLK */ AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */ AM64X_IOPAD(0x000c, PIN_INPUT, 0) /* (M19) OSPI0_D0 */ AM64X_IOPAD(0x0010, PIN_INPUT, 0) /* (M18) OSPI0_D1 */ AM64X_IOPAD(0x0014, PIN_INPUT, 0) /* (M20) OSPI0_D2 */ AM64X_IOPAD(0x0018, PIN_INPUT, 0) /* (M21) OSPI0_D3 */ AM64X_IOPAD(0x001c, PIN_INPUT, 0) /* (P21) OSPI0_D4 */ AM64X_IOPAD(0x0020, PIN_INPUT, 0) /* (P20) OSPI0_D5 */ AM64X_IOPAD(0x0024, PIN_INPUT, 0) /* (N18) OSPI0_D6 */ AM64X_IOPAD(0x0028, PIN_INPUT, 0) /* (M17) OSPI0_D7 */ AM64X_IOPAD(0x0008, PIN_INPUT, 0) /* (N19) OSPI0_DQS */ >; }; }; &cpsw3g { pinctrl-names = "default"; pinctrl-0 = <&mdio1_pins_default &rmii2_pins_default>; }; &cpsw_port1 { phy-mode = "rmii"; phy-handle = <&cpsw3g_phy0>; }; &cpsw3g_mdio { cpsw3g_phy0: ethernet-phy@0 { status = "okay"; reg = <16>; }; };
- k3-am642-sk.dts
&main_pmx0 { main_mmc0_pins_default: main-mmc0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */ AM64X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */ AM64X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */ AM64X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */ AM64X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */ AM64X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */ AM64X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */ AM64X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */ AM64X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */ AM64X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */ AM64X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */ >; }; main_uart0_pins_default: main-uart0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0238, PIN_INPUT, 0) /* (B16) UART0_CTSn */ AM64X_IOPAD(0x023c, PIN_OUTPUT, 0) /* (A16) UART0_RTSn */ AM64X_IOPAD(0x0230, PIN_INPUT, 0) /* (D15) UART0_RXD */ AM64X_IOPAD(0x0234, PIN_OUTPUT, 0) /* (C16) UART0_TXD */ >; }; main_usb0_pins_default: main-usb0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */ >; }; main_i2c1_pins_default: main-i2c1-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */ AM64X_IOPAD(0x026c, PIN_INPUT_PULLUP, 0) /* (B19) I2C1_SDA */ >; }; mdio1_pins_default: mdio1-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 */ >; }; 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 */ AM64X_IOPAD(0x00e0, PIN_INPUT, 5) /* (U14) PRG1_PRU0_GPO10.RMII_REF_CLK */ >; }; ospi0_pins_default: ospi0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (N20) OSPI0_CLK */ AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */ AM64X_IOPAD(0x000c, PIN_INPUT, 0) /* (M19) OSPI0_D0 */ AM64X_IOPAD(0x0010, PIN_INPUT, 0) /* (M18) OSPI0_D1 */ AM64X_IOPAD(0x0014, PIN_INPUT, 0) /* (M20) OSPI0_D2 */ AM64X_IOPAD(0x0018, PIN_INPUT, 0) /* (M21) OSPI0_D3 */ AM64X_IOPAD(0x001c, PIN_INPUT, 0) /* (P21) OSPI0_D4 */ AM64X_IOPAD(0x0020, PIN_INPUT, 0) /* (P20) OSPI0_D5 */ AM64X_IOPAD(0x0024, PIN_INPUT, 0) /* (N18) OSPI0_D6 */ AM64X_IOPAD(0x0028, PIN_INPUT, 0) /* (M17) OSPI0_D7 */ AM64X_IOPAD(0x0008, PIN_INPUT, 0) /* (N19) OSPI0_DQS */ >; }; main_ecap0_pins_default: main-ecap0-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0270, PIN_INPUT, 0) /* (D18) ECAP0_IN_APWM_OUT */ >; }; main_wlan_en_pins_default: main-wlan-en-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x00c4, PIN_OUTPUT_PULLUP, 7) /* (V8) GPIO0_48 */ >; }; main_com8_ls_en_pins_default: main-com8-ls-en-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x00fc, PIN_OUTPUT, 7) /* (U7) PRG1_PRU0_GPO17.GPIO0_62 */ >; }; main_wlan_pins_default: main-wlan-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x00bc, PIN_INPUT, 7) /* (U8) GPIO0_46 */ >; }; }; &cpsw3g { pinctrl-names = "default"; pinctrl-0 = <&rmii2_pins_default>; }; &cpsw_port1 { phy-mode = "rmii"; phy-handle = <&cpsw3g_phy0>; }; &cpsw3g_mdio { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&mdio1_pins_default>; cpsw3g_phy0: ethernet-phy@0 { status = "okay"; reg = <16>; }; };
- k3-am642-sk-u-boot.dtsi
&main_mmc0_pins_default { bootph-pre-ram; }; &cpsw3g { reg = <0x0 0x8000000 0x0 0x200000>, <0x0 0x43000200 0x0 0x8>; reg-names = "cpsw_nuss", "mac_efuse"; /delete-property/ ranges; pinctrl-0 = <&mdio1_pins_default &rmii2_pins_default>; bootph-pre-ram; cpsw-phy-sel@04044 { compatible = "ti,am64-phy-gmii-sel"; reg = <0x0 0x43004044 0x0 0x8>; bootph-pre-ram; rmii-clock-ext; }; ethernet-ports { bootph-pre-ram; }; }; &cpsw_port1 { bootph-pre-ram; }; &cpsw_port2 { status = "disabled"; }; &rmii2_pins_default { bootph-pre-ram; }; &mdio1_pins_default { bootph-pre-ram; }; &cpsw3g_phy0 { bootph-pre-ram; };
Once we compiled everything, flashed the files and are in U-Boot, we get the following output for the commands:
=> mii device MII devices: 'ethernet@8000000port@1' Current device: 'ethernet@8000000port@1' => mii info PHY 0x10: OUI = 0x80017, Model = 0x09, Rev = 0x00, 100baseT, FDX => mdio read ethernet@8000000port@1 0 Reading from bus ethernet@8000000port@1 PHY at address 10: 0 - 0x3100 => mdio read ethernet@8000000port@1 1 Reading from bus ethernet@8000000port@1 PHY at address 10: 1 - 0x786d => mdio read ethernet@8000000port@1 2 Reading from bus ethernet@8000000port@1 PHY at address 10: 2 - 0x2000 => mdio read ethernet@8000000port@1 3 Reading from bus ethernet@8000000port@1 PHY at address 10: 3 - 0x5c90 => mdio read ethernet@8000000port@1 4 Reading from bus ethernet@8000000port@1 PHY at address 10: 4 - 0x1e1 => mdio read ethernet@8000000port@1 5 Reading from bus ethernet@8000000port@1 PHY at address 10: 5 - 0xcde1 => mdio read ethernet@8000000port@1 6 Reading from bus ethernet@8000000port@1 PHY at address 10: 6 - 0xf => mdio read ethernet@8000000port@1 7 Reading from bus ethernet@8000000port@1 PHY at address 10: 7 - 0x2801 => mdio read ethernet@8000000port@1 8 Reading from bus ethernet@8000000port@1 PHY at address 10: 8 - 0x0 => mdio read ethernet@8000000port@1 9 Reading from bus ethernet@8000000port@1 PHY at address 10: 9 - 0x0 => mdio read ethernet@8000000port@1 10 Reading from bus ethernet@8000000port@1 PHY at address 10: 16 - 0x15 => mdio read ethernet@8000000port@1 11 Reading from bus ethernet@8000000port@1 PHY at address 10: 17 - 0x0 => mdio read ethernet@8000000port@1 12 Reading from bus ethernet@8000000port@1 PHY at address 10: 18 - 0x2c00 => mdio read ethernet@8000000port@1 13 Reading from bus ethernet@8000000port@1 PHY at address 10: 19 - 0x0 => mdio read ethernet@8000000port@1 14 Reading from bus ethernet@8000000port@1 PHY at address 10: 20 - 0x0 => mdio read ethernet@8000000port@1 15 Reading from bus ethernet@8000000port@1 PHY at address 10: 21 - 0x0 => mdio read ethernet@8000000port@1 16 Reading from bus ethernet@8000000port@1 PHY at address 10: 22 - 0x100 => mdio read ethernet@8000000port@1 17 Reading from bus ethernet@8000000port@1 PHY at address 10: 23 - 0x21 => mdio read ethernet@8000000port@1 18 Reading from bus ethernet@8000000port@1 PHY at address 10: 24 - 0x0 => mdio read ethernet@8000000port@1 19 Reading from bus ethernet@8000000port@1 PHY at address 10: 25 - 0x8030 => mii dump 10 0 0. (3100) -- PHY control register -- (8000:0000) 0.15 = 0 reset (4000:0000) 0.14 = 0 loopback (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps (1000:1000) 0.12 = 1 A/N enable (0800:0000) 0.11 = 0 power-down (0400:0000) 0.10 = 0 isolate (0200:0000) 0. 9 = 0 restart A/N (0100:0100) 0. 8 = 1 duplex = full (0080:0000) 0. 7 = 0 collision test enable (003f:0000) 0. 5- 0 = 0 (reserved) => ping 192.168.1.1 link up on port 1, speed 100, full duplex *** ERROR: `ipaddr' not set ping failed; host 192.168.1.1 is not alive => setenv ipaddr 192.168.1.111 => ping 192.168.1.1 link up on port 1, speed 100, full duplex Using ethernet@8000000port@1 device ARP Retry count exceeded; starting again ping failed; host 192.168.1.1 is not alive
Our goal is to have the PHY properly integrated so that a ping is possible. Please let us know where in our configuration we have an error or if you need more information.
Thanks for your help in advance!
Sam