PROCESSOR-SDK-J721S2: No ethernet found - Marvell-88q2112

Part Number: PROCESSOR-SDK-J721S2

Tool/software:

In 'u-boot', 'm trying to detect Marvell 88q2112 Phy device on TDA4AL SOC

But 'ethernet' is not found. How to fix this issue.

<Logs>

name=Marvell 88Q2112, uid=2820480, mask=268435440, phy_id=2820480
ethernet@46000000port@1 connected to Marvell 88Q2112 mode rgmii-rxid
phy_connect:1044
initQ2112Ge
_applyQ2112GeSetting
getAnegEnabled
@3. No ethernet found.


=> mdio list
mdio@f00:
ethernet@46000000port@1:
7 - Marvell 88Q2112 <--> ethernet@46000000port@1

=> mii read 0-1 0-6
Error reading from the PHY addr=00 reg=00
Error reading from the PHY addr=00 reg=01
Error reading from the PHY addr=00 reg=02

mdio read 1 1
1 is not a known ethernet
Reading from bus mdio@f00
PHY at address 1:
Error
=> mdio read 0x1 0x0900
0x1 is not a known ethernet
Reading from bus mdio@f00
PHY at address 1:
Error

</Logs>

<DTS>

aliases {
ethernet0 = &cpsw_port1;
};

+ mcu_eth0_pins_default: mcu-eth0-pins-default {
pinctrl-single,pins = <
+ J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 7) /* (E28) WKUP_GPIO0_61 ETH_SOC_INT */
+ J721S2_WKUP_IOPAD(0x050, PIN_OUTPUT, 7) /* (E27) WKUP_GPIO0_60 SOC_ETH_PHY_RESET */
>;
};

&davinci_mdio {
phy0: ethernet-phy@0 {
- reg = <0>;
+ reg = <7>;                /* As per schematic */
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,min-output-impedance;
+ compatible = "ethernet-phy-id002b.0980";
+ ti,dp83867-rxctrl-strap-quirk;
+ reset-assert-us = <100>;
+ reset-deassert-us = <280>;
+ reset-gpios = <&exp1 60 GPIO_ACTIVE_HIGH>;
};
};

&cpsw_port1 {
+ status = "okay";
phy-mode = "rgmii-rxid";
phy-handle = <&phy0>;
+ pinctrl-0 = <&mcu_eth0_pins_default>;
};

mcu_cpsw_pins_default: mcu-cpsw-pins-default {
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x094, PIN_INPUT, 0) /* (B22) MCU_RGMII1_RD0 */
J721S2_WKUP_IOPAD(0x090, PIN_INPUT, 0) /* (B21) MCU_RGMII1_RD1 */
J721S2_WKUP_IOPAD(0x08c, PIN_INPUT, 0) /* (C22) MCU_RGMII1_RD2 */
J721S2_WKUP_IOPAD(0x088, PIN_INPUT, 0) /* (D23) MCU_RGMII1_RD3 */
J721S2_WKUP_IOPAD(0x084, PIN_INPUT, 0) /* (D22) MCU_RGMII1_RXC */
J721S2_WKUP_IOPAD(0x06c, PIN_INPUT, 0) /* (E23) MCU_RGMII1_RX_CTL */
J721S2_WKUP_IOPAD(0x07c, PIN_OUTPUT, 0) /* (F23) MCU_RGMII1_TD0 */
J721S2_WKUP_IOPAD(0x078, PIN_OUTPUT, 0) /* (G22) MCU_RGMII1_TD1 */
J721S2_WKUP_IOPAD(0x074, PIN_OUTPUT, 0) /* (E21) MCU_RGMII1_TD2 */
J721S2_WKUP_IOPAD(0x070, PIN_OUTPUT, 0) /* (E22) MCU_RGMII1_TD3 */
J721S2_WKUP_IOPAD(0x080, PIN_OUTPUT, 0) /* (F21) MCU_RGMII1_TXC */
J721S2_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (F22) MCU_RGMII1_TX_CTL */
>;
};


</DTS>

  • just to add, I received earlier the MDIO configuration for the customer board:



  • Hi,

    Which SDK is being used here?

    Regards,
    Tanmay

  • PROCESSOR-SDK-J721S2
    SOC-TDA4AL

  • can you add the version number ..  SDK 9.2 or SDK 10 or  ?

    thanks, Stefan

  • Hi,

    In case of static configuration, can you try setting the variable "ipaddr" and directly pinging the server.

    For dhcp, run "dhcp" and then try ping.

    Your all other things seem correct

    Regards,
    Tanmay

  • // SPDX-License-Identifier: GPL-2.0
    /*
     * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
     *
     * Common Processor Board: https://www.ti.com/tool/J721EXCPXEVM
     */
    
    /dts-v1/;
    
    #include "k3-j721s2-som-p0.dtsi"
    #include <dt-bindings/net/ti-dp83867.h>
    #include <dt-bindings/phy/phy-cadence.h>
    #include <dt-bindings/phy/phy.h>
    #include <dt-bindings/mux/ti-serdes.h>
    
    / {
    	compatible = "ti,j721s2-evm", "ti,j721s2";
    	model = "Texas Instruments J721S2 EVM";
    
    	chosen {
    		stdout-path = "serial1:115200n8";
    		bootargs = "console=ttyS1,115200n8 earlycon=ns16550a,mmio32,0x40a00000";
    	};
    
    	aliases {
    		serial1 = &mcu_uart0;
    		mmc0 = &main_sdhci0;
    		mmc1 = &main_sdhci1;
    		can0 = &main_mcan16;
    		can1 = &mcu_mcan0;
    		can2 = &mcu_mcan1;
    		can3 = &main_mcan3;
    		can4 = &main_mcan5;
    		ethernet0 = &cpsw_port1;
    
    	};
    
    	evm_12v0: fixedregulator-evm12v0 {
    		/* main supply */
    		compatible = "regulator-fixed";
    		regulator-name = "evm_12v0";
    		regulator-min-microvolt = <12000000>;
    		regulator-max-microvolt = <12000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vsys_3v3: fixedregulator-vsys3v3 {
    		/* Output of LM5140 */
    		compatible = "regulator-fixed";
    		regulator-name = "vsys_3v3";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&evm_12v0>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vsys_5v0: fixedregulator-vsys5v0 {
    		/* Output of LM5140 */
    		compatible = "regulator-fixed";
    		regulator-name = "vsys_5v0";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&evm_12v0>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vdd_mmc1: fixedregulator-sd {
    		/* Output of TPS22918 */
    		compatible = "regulator-fixed";
    		regulator-name = "vdd_mmc1";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		enable-active-high;
    		vin-supply = <&vsys_3v3>;
    		gpio = <&exp2 2 GPIO_ACTIVE_HIGH>;
    	};
    
    	vdd_sd_dv: gpio-regulator-TLV71033 {
    		/* Output of TLV71033 */
    		compatible = "regulator-gpio";
    		regulator-name = "tlv71033";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vdd_sd_dv_pins_default>;
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&vsys_5v0>;
    		gpios = <&main_gpio0 8 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    
    	transceiver1: can-phy1 {
    		compatible = "ti,tcan1043";
    		#phy-cells = <0>;
    		max-bitrate = <5000000>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&mcu_mcan0_gpio_pins_default>;
    		standby-gpios = <&wkup_gpio0 69 GPIO_ACTIVE_LOW>;
    		enable-gpios = <&wkup_gpio0 0 GPIO_ACTIVE_HIGH>;
    	};
    
    	transceiver2: can-phy2 {
    		compatible = "ti,tcan1042";
    		#phy-cells = <0>;
    		max-bitrate = <5000000>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&mcu_mcan1_gpio_pins_default>;
    		standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>;
    	};
    
    	transceiver3: can-phy3 {
    		compatible = "ti,tcan1043";
    		#phy-cells = <0>;
    		max-bitrate = <5000000>;
    		standby-gpios = <&exp2 7 GPIO_ACTIVE_LOW>;
    		enable-gpios = <&exp2 6 GPIO_ACTIVE_HIGH>;
    		mux-states = <&mux0 1>;
    	};
    
    	transceiver4: can-phy4 {
    		compatible = "ti,tcan1042";
    		#phy-cells = <0>;
    		max-bitrate = <5000000>;
    		standby-gpios = <&exp_som 7 GPIO_ACTIVE_HIGH>;
    		mux-states = <&mux1 1>;
    	};
    
    	dp0_pwr_3v3: fixedregulator-dp0-prw {
    		compatible = "regulator-fixed";
    		regulator-name = "dp0-pwr";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		gpio = <&exp4 0 0>;	/* P0 - DP0_PWR_SW_EN */
    		enable-active-high;
    	};
    
    	dp1_pwr_3v3: regulator-dp1-prw {
    		compatible = "regulator-fixed";
    		regulator-name = "dp1-pwr";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		gpio = <&exp4 1 GPIO_ACTIVE_HIGH>; /* P1 - DP1_PWR_SW_EN */
    		enable-active-high;
    		regulator-always-on;
    	};
    
    	dp0: dp0-connector {
    		compatible = "dp-connector";
    		label = "DP0";
    		type = "full-size";
    		dp-pwr-supply = <&dp0_pwr_3v3>;
    
    		port {
    			dp0_connector_in: endpoint {
    				remote-endpoint = <&dp0_out>;
    			};
    		};
    	};
    };
    
    &main_i2c4 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c4_pins_default>;
    	clock-frequency = <400000>;
    
    	exp4: gpio@20 {
    		compatible = "ti,tca6408";
    		reg = <0x20>;
    		gpio-controller;
    		#gpio-cells = <2>;
    	};
    };
    
    &main_i2c5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c5_pins_default>;
    	clock-frequency = <400000>;
    
    	exp5: gpio@20 {
    		compatible = "ti,tca6408";
    		reg = <0x20>;
    		gpio-controller;
    		#gpio-cells = <2>;
    	};
    };
    
    &main_pmx0 {
    	main_uart8_pins_default: main-uart8-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x040, PIN_INPUT, 14) /* (AC28) MCASP0_AXR0.UART8_CTSn */
    			J721S2_IOPAD(0x044, PIN_OUTPUT, 14) /* (Y26) MCASP0_AXR1.UART8_RTSn */
    			J721S2_IOPAD(0x0d0, PIN_INPUT, 11) /* (AF26) SPI0_CS1.UART8_RXD */
    			J721S2_IOPAD(0x0d4, PIN_OUTPUT, 11) /* (AH27) SPI0_CLK.UART8_TXD */
    		>;
    	};
    
    	main_i2c3_pins_default: main-i2c3-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x064, PIN_INPUT_PULLUP, 13) /* (W28) MCAN0_TX.I2C3_SCL */
    			J721S2_IOPAD(0x060, PIN_INPUT_PULLUP, 13) /* (AC27) MCASP2_AXR1.I2C3_SDA */
    		>;
    	};
    
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x104, PIN_INPUT, 0) /* (P23) MMC1_CLK */
    			J721S2_IOPAD(0x108, PIN_INPUT, 0) /* (N24) MMC1_CMD */
    			J721S2_IOPAD(0x100, PIN_INPUT, 0) /* (###) MMC1_CLKLB */
    			J721S2_IOPAD(0x0fc, PIN_INPUT, 0) /* (M23) MMC1_DAT0 */
    			J721S2_IOPAD(0x0f8, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */
    			J721S2_IOPAD(0x0f4, PIN_INPUT, 0) /* (R24) MMC1_DAT2 */
    			J721S2_IOPAD(0x0f0, PIN_INPUT, 0) /* (R22) MMC1_DAT3 */
    			J721S2_IOPAD(0x0e8, PIN_INPUT, 8) /* (AE25) TIMER_IO0.MMC1_SDCD */
    		>;
    	};
    
    	vdd_sd_dv_pins_default: vdd-sd-dv-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x020, PIN_INPUT, 7) /* (AA23) MCAN15_RX.GPIO0_8 */
    		>;
    	};
    
    	main_usbss0_pins_default: main-usbss0-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AG25) TIMER_IO1.USB0_DRVVBUS */
    		>;
    	};
    
    	main_mcan3_pins_default: main-mcan3-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x080, PIN_INPUT, 0) /* (U26) MCASP0_AXR4.MCAN3_RX */
    			J721S2_IOPAD(0x07c, PIN_OUTPUT, 0) /* (T27) MCASP0_AXR3.MCAN3_TX */
    		>;
    	};
    
    	main_mcan5_pins_default: main-mcan5-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x03c, PIN_INPUT, 0) /* (U27) MCASP0_AFSX.MCAN5_RX */
    			J721S2_IOPAD(0x038, PIN_OUTPUT, 0) /* (AB28) MCASP0_ACLKX.MCAN5_TX */
    		>;
    	};
    
    	main_i2c4_pins_default: main-i2c4-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x014, PIN_INPUT_PULLUP, 8) /* (AD25) I2C4_SCL */
    			J721S2_IOPAD(0x010, PIN_INPUT_PULLUP, 8) /* (AF28) I2C4_SDA */
    		>;
    	};
    
    	main_i2c5_pins_default: main-i2c5-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x01c, PIN_INPUT, 8) /* (Y24) MCAN15_TX.I2C5_SCL */
    			J721S2_IOPAD(0x018, PIN_INPUT, 8) /* (W23) MCAN14_RX.I2C5_SDA */
    		>;
    	};
    
    	dp0_pins_default: dp0-pins-default {
    		pinctrl-single,pins = <
    			J721S2_IOPAD(0x0b8, PIN_INPUT, 3) /* (AA24) MCASP1_ACLKX.DP0_HPD */
    		>;
    	};
    };
    
    &wkup_pmx0 {
    	mcu_uart0_pins_default: mcu-uart0-pins-default {
    		pinctrl-single,pins = <
                            J721S2_WKUP_IOPAD(0x018, PIN_INPUT, 4) /* (G20) MCU_OSPI1_D1.MCU_UART0_RXD */
                            J721S2_WKUP_IOPAD(0x01c, PIN_INPUT, 4) /* (C20) MCU_OSPI1_D2.MCU_UART0_TXD */
    		>;
    	};
    };
    
    &wkup_pmx1 {
    	wkup_gpio0_pins_default: wkup_gpio0_pins_default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x020, PIN_INPUT, 7) /* (A20) MCU_OSPI1_D3.WKUP_GPIO0_37 */
    		>;
    	};
    };
    
    &wkup_pmx2 {
    	mcu_cpsw_pins_default: mcu-cpsw-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x02c, PIN_INPUT, 0) /* (B22) MCU_RGMII1_RD0 */
    			J721S2_WKUP_IOPAD(0x028, PIN_INPUT, 0) /* (B21) MCU_RGMII1_RD1 */
    			J721S2_WKUP_IOPAD(0x024, PIN_INPUT, 0) /* (C22) MCU_RGMII1_RD2 */
    			J721S2_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (D23) MCU_RGMII1_RD3 */
    			J721S2_WKUP_IOPAD(0x01c, PIN_INPUT, 0) /* (D22) MCU_RGMII1_RXC */
    			J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E23) MCU_RGMII1_RX_CTL */
    			J721S2_WKUP_IOPAD(0x014, PIN_OUTPUT, 0) /* (F23) MCU_RGMII1_TD0 */
    			J721S2_WKUP_IOPAD(0x010, PIN_OUTPUT, 0) /* (G22) MCU_RGMII1_TD1 */
    			J721S2_WKUP_IOPAD(0x00c, PIN_OUTPUT, 0) /* (E21) MCU_RGMII1_TD2 */
    			J721S2_WKUP_IOPAD(0x008, PIN_OUTPUT, 0) /* (E22) MCU_RGMII1_TD3 */
    			J721S2_WKUP_IOPAD(0x018, PIN_OUTPUT, 0) /* (F21) MCU_RGMII1_TXC */
    			J721S2_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (F22) MCU_RGMII1_TX_CTL */
    		>;
    	};
    
    	mcu_mdio_pins_default: mcu-mdio-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x034, PIN_OUTPUT, 0) /* (A21) MCU_MDIO0_MDC 0x4301 C09C */
    			J721S2_WKUP_IOPAD(0x030, PIN_INPUT, 0) /* (A22) MCU_MDIO0_MDIO 0x4301 C098 */
    		>;
    	};
    
    	mcu_eth0_pins_default: mcu-eth0-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 7) /* (E28) WKUP_GPIO0_61 ETH_SOC_INT 0x4301 C0BC */ 
    			J721S2_WKUP_IOPAD(0x050, PIN_OUTPUT, 7) /* (E27) WKUP_GPIO0_60 SOC_ETH_PHY_RESET 0x4301 C0B8 */
    		>;
    	};
    
    	mcu_mcan1_pins_default: mcu-mcan1-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x06c, PIN_INPUT, 0) /* (F26) WKUP_GPIO0_5.MCU_MCAN1_RX */
    			J721S2_WKUP_IOPAD(0x068, PIN_OUTPUT, 0) /* (C23) WKUP_GPIO0_4.MCU_MCAN1_TX */
    		>;
    	};
    
    	mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x058, PIN_INPUT, 7) /* (D26) WKUP_GPIO0_0 */
    			J721S2_WKUP_IOPAD(0x040, PIN_INPUT, 7) /* (B25) MCU_SPI0_D1.WKUP_GPIO0_69 */
    		>;
    	};
    
    	mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x060, PIN_INPUT, 7) /* (C28) WKUP_GPIO0_2 */
    		>;
    	};
    
    	mcu_adc0_pins_default: mcu-adc0-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x0cc, PIN_INPUT, 0) /* (L25) MCU_ADC0_AIN0 */
    			J721S2_WKUP_IOPAD(0x0d0, PIN_INPUT, 0) /* (K25) MCU_ADC0_AIN1 */
    			J721S2_WKUP_IOPAD(0x0d4, PIN_INPUT, 0) /* (M24) MCU_ADC0_AIN2 */
    			J721S2_WKUP_IOPAD(0x0d8, PIN_INPUT, 0) /* (L24) MCU_ADC0_AIN3 */
    			J721S2_WKUP_IOPAD(0x0dc, PIN_INPUT, 0) /* (L27) MCU_ADC0_AIN4 */
    			J721S2_WKUP_IOPAD(0x0e0, PIN_INPUT, 0) /* (K24) MCU_ADC0_AIN5 */
    			J721S2_WKUP_IOPAD(0x0e4, PIN_INPUT, 0) /* (M27) MCU_ADC0_AIN6 */
    			J721S2_WKUP_IOPAD(0x0e8, PIN_INPUT, 0) /* (M26) MCU_ADC0_AIN7 */
    		>;
    	};
    
    	mcu_adc1_pins_default: mcu-adc1-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x0ec, PIN_INPUT, 0) /* (P25) MCU_ADC1_AIN0 */
    			J721S2_WKUP_IOPAD(0x0f0, PIN_INPUT, 0) /* (R25) MCU_ADC1_AIN1 */
    			J721S2_WKUP_IOPAD(0x0f4, PIN_INPUT, 0) /* (P28) MCU_ADC1_AIN2 */
    			J721S2_WKUP_IOPAD(0x0f8, PIN_INPUT, 0) /* (P27) MCU_ADC1_AIN3 */
    			J721S2_WKUP_IOPAD(0x0fc, PIN_INPUT, 0) /* (N25) MCU_ADC1_AIN4 */
    			J721S2_WKUP_IOPAD(0x100, PIN_INPUT, 0) /* (P26) MCU_ADC1_AIN5 */
    			J721S2_WKUP_IOPAD(0x104, PIN_INPUT, 0) /* (N26) MCU_ADC1_AIN6 */
    			J721S2_WKUP_IOPAD(0x108, PIN_INPUT, 0) /* (N27) MCU_ADC1_AIN7 */
    		>;
    	};
    
    
    	wkup_uart0_pins_default: wkup-uart0-pins-default {
    		pinctrl-single,pins = <
    			J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 0) /* (D28) WKUP_UART0_RXD */
    			J721S2_WKUP_IOPAD(0x04c, PIN_OUTPUT, 0) /* (D27) WKUP_UART0_TXD */
    		>;
    	};
    };
    
    &main_gpio2 {
    	status = "disabled";
    };
    
    &main_gpio4 {
    	status = "disabled";
    };
    
    &main_gpio6 {
    	status = "disabled";
    };
    
    &wkup_gpio0 {
    	status = "okay";
    	pinctrl-0 = <&wkup_gpio0_pins_default>;
    };
    
    &wkup_gpio1 {
    	status = "disabled";
    };
    
    &wkup_uart0 {
    	status = "disabled";
    	pinctrl-names = "default";
    	pinctrl-0 = <&wkup_uart0_pins_default>;
    };
    
    &mcu_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_uart0_pins_default>;
    };
    
    &main_uart8 {
    	status = "disabled";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart8_pins_default>;
    	/* Shared with TFA on this platform */
    	power-domains = <&k3_pds 357 TI_SCI_PD_SHARED>;
    };
    
    &main_i2c0 {
    	clock-frequency = <400000>;
    
    	exp1: gpio@20 {
    		compatible = "ti,tca6416";
    		reg = <0x20>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "PCIE_2L_MODE_SEL", "PCIE_2L_PERSTZ", "PCIE_2L_RC_RSTZ",
    				  "PCIE_2L_EP_RST_EN", "PCIE_1L_MODE_SEL", "PCIE_1L_PERSTZ",
    				  "PCIE_1L_RC_RSTZ", "PCIE_1L_EP_RST_EN", "PCIE_2L_PRSNT#",
    				  "PCIE_1L_PRSNT#", "CDCI1_OE1/OE4", "CDCI1_OE2/OE3", "EXP_MUX1",
    				  "EXP_MUX2", "EXP_MUX3", "GESI_EXP_PHY_RSTz";
    	};
    
    	exp2: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "APPLE_AUTH_RSTZ", "MLB_RSTZ", "GPIO_USD_PWR_EN", "USBC_PWR_EN",
    				  "USBC_MODE_SEL1", "USBC_MODE_SEL0", "MCAN0_EN", "MCAN0_STB#",
    				  "MUX_SPAREMUX_SPARE", "MCASP/TRACE_MUX_S0", "MCASP/TRACE_MUX_S1",
    				  "MLB_MUX_SEL", "MCAN_MUX_SEL", "MCASP2/SPI3_MUX_SEL", "PCIe_CLKREQn_MUX_SEL",
    				  "CDCI2_RSTZ", "ENET_EXP_PWRDN", "ENET_EXP_RESETZ", "ENET_I2CMUX_SEL",
    				  "ENET_EXP_SPARE2", "M2PCIE_RTSZ", "USER_INPUT1", "USER_LED1", "USER_LED2";
    	};
    };
    
    &main_sdhci0 {
    	/* eMMC */
    	non-removable;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    };
    
    &main_sdhci1 {
    	/* SD card */
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	pinctrl-names = "default";
    	disable-wp;
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vdd_sd_dv>;
    };
    
    &mcu_cpsw {
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
    
    	cpts@3d000 {
    		/* Map HW4_TS_PUSH to GENF1 */
    		ti,pps = <3 1>;
    	};
    };
    
    &davinci_mdio {
    	  status = "okay";
    	phy0: ethernet-phy@0 {
    //	compatible = "ethernet-phy-ieee802.3-c22"; 
    //		compatible = "ethernet-phy-id002b.0980";
    		reg = <7>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    		ti,dp83867-rxctrl-strap-quirk;
    		reset-assert-us = <100>;
    		reset-deassert-us = <280>;
    		reset-gpios = <&wkup_gpio0 60 GPIO_ACTIVE_HIGH>;
    	};
    };
    
    &cpsw_port1 {
            status = "okay";
    	phy-mode = "rgmii";
    	phy-handle = <&phy0>;
            pinctrl-0 = <&mcu_eth0_pins_default>;
    };
    
    &serdes_ln_ctrl {
    	idle-states = <J721S2_SERDES0_LANE0_PCIE1_LANE0>, <J721S2_SERDES0_LANE1_USB>,
    		      <J721S2_SERDES0_LANE2_EDP_LANE2>, <J721S2_SERDES0_LANE3_EDP_LANE3>;
    };
    
    &serdes_refclk {
    	clock-frequency = <100000000>;
    };
    
    &serdes0 {
    	status = "okay";
    	serdes0_pcie_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_PCIE>;
    		resets = <&serdes_wiz0 1>;
    	};
    	serdes0_usb_link: phy@1 {
    		reg = <0>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz0 2>;
    	};
    
    };
    
    &usb_serdes_mux {
    	idle-states = <1>; /* USB0 to SERDES lane 1 */
    };
    
    &edp_serdes_mux {
    	idle-states = <1>; /* EDP0 to SERDES lane 2/3 */
    };
    
    &usbss0 {
    	status = "okay";
    	pinctrl-0 = <&main_usbss0_pins_default>;
    	pinctrl-names = "default";
    	ti,vbus-divider;
    	ti,usb2-only;
    };
    
    &usb0 {
    	dr_mode = "host";
    	maximum-speed = "super-speed";
    	phys = <&serdes0_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &pcie1_rc {
    	status = "okay";
    	reset-gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
    	phys = <&serdes0_pcie_link>;
    	phy-names = "pcie-phy";
    	num-lanes = <1>;
    };
    
    &mcu_mcan0 {
    	status = "okay";
    	pinctrl-names = "default";
    	/* pinctrl-0 = <&mcu_mcan0_pins_default>; */
    	phys = <&transceiver1>;
    };
    
    &mcu_mcan1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_mcan1_pins_default>;
    	phys = <&transceiver2>;
    };
    
    &main_mcan3 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcan3_pins_default>;
    	phys = <&transceiver3>;
    };
    
    &main_mcan5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcan5_pins_default>;
    	phys = <&transceiver4>;
    };
    
    &tscadc0 {
    	pinctrl-0 = <&mcu_adc0_pins_default>;
    	pinctrl-names = "default";
    	status = "okay";
    	adc {
    		ti,adc-channels = <0 1 2 3 4 5 6 7>;
    	};
    };
    
    &tscadc1 {
    	pinctrl-0 = <&mcu_adc1_pins_default>;
    	pinctrl-names = "default";
    	status = "okay";
    	adc {
    		ti,adc-channels = <0 1 2 3 4 5 6 7>;
    	};
    };
    
    &dss {
    	/*
    	 * These clock assignments are chosen to enable the following outputs:
    	 *
    	 * VP0 - DisplayPort SST
    	 * VP1 - DPI0
    	 * VP2 - DSI
    	 * VP3 - DPI1
    	 */
    	status = "okay";
    	assigned-clocks = <&k3_clks 158 2>,
    			  <&k3_clks 158 5>,
    			  <&k3_clks 158 14>,
    			  <&k3_clks 158 18>;
    	assigned-clock-parents = <&k3_clks 158 3>,
    				 <&k3_clks 158 7>,
    				 <&k3_clks 158 16>,
    				 <&k3_clks 158 22>;
    };
    
    &dss_ports {
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	port@0 {
    		reg = <0>;
    		dpi0_out: endpoint {
    			remote-endpoint = <&dp0_in>;
    		};
    	};
    
    	port@2 {
    		reg = <2>;
    		dpi2_out: endpoint {
    			remote-endpoint = <&dsi0_in>;
    		};
    	};
    };
    
    &dsi0_ports {
    	port@0 {
    		reg = <0>;
    		dsi0_out: endpoint {
    			remote-endpoint = <&dp1_in>;
    		};
    	};
    
    	port@1 {
    		reg = <1>;
    		dsi0_in: endpoint {
    			remote-endpoint = <&dpi2_out>;
    		};
    	};
    };
    
    &dsi_edp_bridge_ports {
    	port@0 {
    		reg = <0>;
    		dp1_in: endpoint {
    			remote-endpoint = <&dsi0_out>;
    		};
    	};
    
    	port@1 {
    		reg = <1>;
    		dp1_out: endpoint {
    			remote-endpoint = <&dp1_panel_in>;
    		};
    	};
    };
    
    &dsi_edp_bridge {
    	aux-bus {
    		panel {
    			compatible = "ti,panel-edp";
    			power-supply = <&dp1_pwr_3v3>;
    
    			port {
    				dp1_panel_in: endpoint {
    					remote-endpoint = <&dp1_out>;
    				};
    			};
    		};
    	};
    };
    
    &mhdp {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&dp0_pins_default>;
    	cdns,no-hpd;
    };
    
    &dp0_ports {
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	port@0 {
    		reg = <0>;
    		dp0_in: endpoint {
    			remote-endpoint = <&dpi0_out>;
    		};
    	};
    
    	port@4 {
    		reg = <4>;
    		dp0_out: endpoint {
    			remote-endpoint = <&dp0_connector_in>;
    		};
    	};
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    	/* MIPI-CSI Connector */
    };
    
    &ti_csi2rx1 {
    	status = "okay";
    	/* MIPI-CSI Connector */
    };
    
    &dphy_rx0 {
    	status = "okay";
    };
    
    &dphy_rx1 {
    	status = "okay";
    };
    
    &dphy_tx0 {
    	status = "okay";
    };
    
    &dsi0 {
    	status = "okay";
    };
    
    #define K3_TS_OFFSET(pa, val)  (0x4+(pa)*4) (0x10000 | val)
    
    &timesync_router {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_cpsw_cpts>;
    
    	/* Use Time Sync Router to map GENF1 input to HW4_TS_PUSH output */
    	mcu_cpsw_cpts: mcu-cpsw-cpts {
    		pinctrl-single,pins = <
    			/* pps [mcu cpsw cpts genf1] in17 -> out25 [mcu cpsw cpts hw4_push] */
    			K3_TS_OFFSET(25, 17)
    			>;
    	};
    };
    


    In Linux Kernel, I'm able to see 

    [ 1.565743] mdio_bus 46000f00.mdio: registered phy (____ptrval____) fwnode at address 7
    [ 1.573738] fwnode_mdiobus_register_phy, l.178
    [ 1.578180] davinci_mdio 46000f00.mdio: phy[7]: device 46000f00.mdio:07, driver unknown
    [ 1.586253] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
    [ 1.599122] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4

    But ethernet is not up.

    ifconfig -a
    eth0 Link encap:Ethernet HWaddr 88:0C:E0:63:4F:5A
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    Does the Marvell phy chip need a FEC driver?

  • Hi,

    Is the issue you are trying to debug in u-boot or linux kernel. Lets focus one at a time.


    Does the Marvell phy chip need a FEC driver?

    All phy chips need a driver. These drivers come from the phy manufacturer. In u-boot I am seeing that you are able to detect the phy correctly. That means you have the phy driver present. In linux, as you are seeing unknown in the MDIO, kernel is not able to find the correct driver for the part.

    Can you please check with marvell once and update the phy drivers in both u-boot and kernel to the latest version.

    In case of static configuration, can you try setting the variable "ipaddr" and directly pinging the server.

    For dhcp, run "dhcp" and then try ping.

    Also, Any results for this?

    Just an additional note, in your device-tree, the ti specific properties in MDIO nodes won't work with marvell phys

    Regards,
    Tanmay

  • Im able to reset the Phy chip.
    But my kernel logs always show phy link down.
    ifconfig shows interface up


    [ 7.534879] getRevNum=0x983, OrgId=0x2b
    [ 7.566475] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:07] driver [88q2112] (irq=POLL)
    [ 7.582487] am65-cpsw-nuss 46000000.ethernet eth0: phy: rgmii setting supported 00000018,00000000,00002000 advertising 00000018,00000000,00002000
    [ 7.606982] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii link mode
    [ 7.621309] am65-cpsw-nuss 46000000.ethernet eth0: major config rgmii
    [ 7.631062] am65-cpsw-nuss 46000000.ethernet eth0: phylink_mac_config: mode=phy/rgmii/Unknown/Unknown/none adv=00000000,00000000,00000000 pause=00 link=0 an=0
    [ 7.658693] am65-cpsw-nuss 46000000.ethernet eth0: phy link down rgmii/1Gbps/Full/none/off


    ifconfig -a
    eth0 Link encap:Ethernet HWaddr 88:0C:E0:63:4F:5A
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    Ping test fails.