Hi,
I am using a DP83848 TI chipset for ethernet and not able to detect the chip, Can any one help me how to read the registers using MDIO line in I.MX8MP
error:
Error: ethernet@30bf0000 address not set.
Error: ethernet@30bf0000 address not set.
Error: ethernet@30bf0000 address not set.
Error: ethernet@30bf0000 address not set.
Error: ethernet@30bf0000 address not set.
No ethernet found.
Error: ethernet@30bf0000 address not set.
u-boot=> mii info
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
No such device: <NULL>
NULL device name!
u-boot=> mii read 0-1 0-6
NULL device name!
No such device: <NULL>
Error reading from the PHY addr=00 reg=00
NULL device name!
No such device: <NULL>
Error reading from the PHY addr=00 reg=01
NULL device name!
No such device: <NULL>
Error reading from the PHY addr=00 reg=02
Regards
Jason
HI @JasonShu
Please port or use the phy driver based on drivers/net/phy/natsemi.c.
You can modify the eqos pinctrl node but this is decided by your hardware design.
Then define the phy node under eqos
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
status = "okay";
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@1 {
compatible = "NatSemi DP83848";
reg = <1>;
};
};
};
Best Regards
Zhiming
Hi Zhiming
I modified the eqos pinctrl node according to my hardware design
add the config
Unable to recognize network
Can you give me some advice on how to troubleshoot?
Best Regards
Jason
Hi @JasonShu
Can you share your eth hardware design?
Hi Zhiming
This is my eth hardware design.
Best Regards
Jason
Hi @JasonShu
Why do you modify IOMUXC_SW_PAD_CTL_PAD_ENET_X registers value in dts node?
This will adjust drive strength, do you need it?
The default REF clock is set in board/freescale/imx8mp_evk/imx8mp_evk.c, you need use 50Mhz refer DP83848 datasheet.
static int setup_eqos(void)
{
struct iomuxc_gpr_base_regs *gpr =
(struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;
/* set INTF as RGMII, enable RGMII TXC clock */
clrsetbits_le32(&gpr->gpr[1],
IOMUXC_GPR_GPR1_GPR_ENET_QOS_INTF_SEL_MASK, BIT(16));
setbits_le32(&gpr->gpr[1], BIT(19) | BIT(21));
return set_clk_eqos(ENET_125MHZ);
}
Best Regards
Zhiming
Hi Zhiming
I modified IOMUXC_SW_PAD_CTL_PAD_ENET_X registers value as imx6ull.
and the error always occurs
error:No ethernet found
I have located it here
why can not found device? can you give me some advice?
Best Regards
Jason
Hi @JasonShu
Please use below value in i.MX8MP dts
On EVK platform, arch/arm/dts/imx8mp-evk-u-boot.dtsi will cover imx8mp-evk.dts and modfiy eqos driver name: "fsl,imx-eqos".
&eqos {
compatible = "fsl,imx-eqos";
/delete-property/ assigned-clocks;
/delete-property/ assigned-clock-parents;
/delete-property/ assigned-clock-rates;
};
ðphy0 {
reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
reset-assert-us = <15000>;
reset-deassert-us = <100000>;
};
Please modify based on arch/arm/dts/imx8mp-evk-u-boot.dtsi
Hi Zhiming
1. The device information can be displayed now, but cannot ping the network.
2. Using a direct connection method, the PC shows that the network is not recognized.
3. How should I investigate next?
u-boot=> ping 192.168.1.3
phy_connect
get_phy_id
phy_device_create
phy_id is 536894608
phy_config
genphy_config_aneg
result is 1
phy_startup
dp83848_startup
ethernet@30bf0000 Waiting for PHY auto negotiation to complete..... done
Using ethernet@30bf0000 device
ARP Retry count exceeded; starting again
ping failed; host 192.168.1.3 is not alive
Best Regards
Jason