Hello,
I am using imx8mp custom board and i have interfaced Ethernet with custom board, In custom board we interfaced ksz9021rl Phy..
But while booting kernel panic is happened.
Blow is device tree configuration :
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
phy-reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
phy-reset-post-delay = <150>;
phy-reset-duration = <10>;
status = "okay";
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
rxc-skew-ps = <3000>;
txc-skew-ps = <3000>;
};
};
};
pinctrl_eqos: eqosgrp {
fsl,pins = <
MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x3
MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x3
MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x91
MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x91
MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x91
MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x91
MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x91
MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x91
MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x1f
MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x1f
MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x1f
MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x1f
MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x1f
MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x1f
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19
>;
};
Below are changes in imx8mp_gki.fragment
CONFIG_MICREL_PHY=y
CONFIG_STMMAC_ETH=y
CONFIG_STMMAC_PLATFORM=y
CONFIG_DWMAC_IMX8=y
CONFIG_NET_VENDOR_STMICRO=y
While booting kernel panic is happed.
I am attaching the logs.
Please suggest some solution.
Thanks in advance
Hello @joanxie
Thanks for quick response,
I refereed this document, and i add the phy configuration as per the document,
But, in my case ksz9021rl Phy connected with eqos node in device tree.(In document phy is connected with fec node)
To enable the driver i have done the below configuration in imx8mp_gki.fragment.
CONFIG_MICREL_PHY=y
CONFIG_STMMAC_ETH=y
CONFIG_STMMAC_PLATFORM=y
CONFIG_DWMAC_IMX8=y
CONFIG_NET_VENDOR_STMICRO=y
But kernel get panic.
So, i need a support for Eqos node.
I am attaching the logs.
Please check logs and suggest a solution.
Thanks
for imx8mp evk, SAI1_TXD7 is for type C, did you change this in HW?
pinctrl_typec: typec1grp {
fsl,pins = <
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x1c4
so you have already removed this in dts for type C?
Hello joanxie,
Thanks for quick reply,
Yes we already removed this in dts for type C
I found a patch, hope helpful for you
debug logs :
imx8mp:/ # ifconfig eth0 up
[ 229.435458][ T1986] Unexpected kernel BRK exception at EL1
[ 229.440967][ T1986] Internal error: BRK handler: f2005512 [#1] PREEMPT SMP
[ 229.447841][ T1986] Modules linked in: dwmac_imx stmmac_platform stmmac pcs_xpcs fec ptp pps_core realtek pci_imx6 rtc_snvs snd_soc_imx_rpmsg snd_soc_rpmsg_wm8960_i2c snd_soc_rpmsg_wm8960 imx_audio_rpmsg snd_soc_fsl_rpmsg imx_pcm_rpmsg i2c_rpmsg_imx imx_dsp_rproc imx_rproc rpmsg_raw virtio_rpmsg_bus imx_mailbox vsiv4l2 hantrodec_845s hx280enc_vc8000e snd_soc_fsl_dsp snd_soc_fsl_dsp_audiomix snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_simple_card snd_soc_simple_card_utils snd_soc_bt_sco snd_soc_wm8960 snd_soc_imx_cdnhdmi snd_soc_hdmi_codec dw_hdmi_gp_audio dw_hdmi_cec snd_soc_fsl_sai snd_soc_fsl_easrc snd_soc_fsl_asrc snd_soc_fsl_aud2htx snd_soc_imx_micfil snd_soc_fsl_micfil imx_pcm_dma_v2 imx_pcm_dma imx_sdma galcore moal(O) mlan(O) mac80211 cfg80211 imx8_media_dev(C) trusty_virtio trusty_ipc trusty_log trusty_irq imx8_mipi_csi2_sam(C) imx8_capture(C) imx8_isi_m2m(C) imx8_isi_cap(C) imx8_isi_hw(C) ov5640 v4l2_fwnode imx_cpufreq_dt cpufreq_dt imx8mm_thermal device_cooling
[ 229.447993][ T1986] nvmem_imx_ocotp dummy_battery gpio_switch dwc3_imx8mp panel_simple panel_raydium_rm67191 sec_mipi_dsim_imx imx_lcdifv3_crtc imx_lcdifv3_core imx_lcdif_crtc imx8mp_ldb dw_hdmi_imx imx8mp_hdmi_pavi imxdrm cdns_mhdp_imx dw_hdmi sec_dsim it6263 fsl_imx_ldb cdns_mhdp_drmcore adv7511 imx_lcdif_core synaptics_dsx_i2c snvs_pwrkey trusty_core phy_fsl_imx8_pcie phy_fsl_imx8mq_usb phy_fsl_samsung_hdmi phy_fsl_imx8mp_lvds reset_imx7 dsp_heap ion_unmapped_heap(C) ion_cma_heap(C) ion_sys_heap(C) ion_alloc(C) sdhci_esdhc_imx cqhci pwm_bl pwm_imx27 pca9450_regulator i2c_imx imx2_wdt imx gpio_mxc pinctrl_imx8mp pinctrl_imx irq_imx_irqsteer busfreq_imx8mq timer_imx_sysctr imx8m_pm_domains clk_blk_ctrl clk_imx8mp mxc_clk mx8_mu soc_imx8m
[ 229.599970][ T1986] CPU: 2 PID: 1986 Comm: ifconfig Tainted: G C O 5.10.72-gff08c85e6931-dirty #5
[ 229.609976][ T1986] Hardware name: SimpliCyclerGUI P1 BOARD (DT)
[ 229.615983][ T1986] pstate: a0400005 (NzCv daif +PAN -UAO -TCO BTYPE=--)
[ 229.622689][ T1986] pc : mdiobus_get_phy+0x38/0x3c
[ 229.627611][ T1986] lr : stmmac_init_phy+0x58/0x108 [stmmac]
[ 229.633269][ T1986] sp : ffffffc02685ba40
[ 229.637277][ T1986] x29: ffffffc02685ba60 x28: 0000000000000000
[ 229.643285][ T1986] x27: 0000000000000000 x26: ffffffc02685bc80
[ 229.649293][ T1986] x25: ffffff80c903a410 x24: 0000000000008914
[ 229.655301][ T1986] x23: 0000000000000041 x22: ffffff80c9c709c0
[ 229.661308][ T1986] x21: 0000000000000000 x20: 00000000ffffffff
[ 229.667315][ T1986] x19: ffffff80c9c70000 x18: ffffffc023fe5070
[ 229.673323][ T1986] x17: 0000000000000000 x16: 0000000000000000
[ 229.679331][ T1986] x15: 0000000000000000 x14: ffffffffffffffff
[ 229.685338][ T1986] x13: 0000000000015a2e x12: 0000000000000000
[ 229.691346][ T1986] x11: 0000000000000000 x10: 0000000000000001
[ 229.697353][ T1986] x9 : cff9802caed1f500 x8 : ffffff80c9c6c080
[ 229.703361][ T1986] x7 : 606c2b6b7264ff64 x6 : 0080223c3b626d53
[ 229.709368][ T1986] x5 : 536d623b3c220000 x4 : 0000000000008000
[ 229.715376][ T1986] x3 : ffffffc01081a350 x2 : 0000000000000000
[ 229.721384][ T1986] x1 : 00000000ffffffff x0 : ffffff80c918c000
[ 229.727392][ T1986] Call trace:
[ 229.730536][ T1986] mdiobus_get_phy+0x38/0x3c
[ 229.735089][ T1986] stmmac_open+0x94/0xcc8 [stmmac]
[ 229.740056][ T1986] __dev_open+0x104/0x1e8
[ 229.744239][ T1986] __dev_change_flags+0xac/0x1dc
[ 229.749030][ T1986] dev_change_flags+0x28/0x6c
[ 229.753561][ T1986] devinet_ioctl+0x418/0x5d8
[ 229.758005][ T1986] inet_ioctl+0x88/0x16c
[ 229.762101][ T1986] sock_do_ioctl+0x4c/0x160
[ 229.766457][ T1986] sock_ioctl+0x438/0x568
[ 229.770641][ T1986] __arm64_sys_ioctl+0x94/0xd0
[ 229.775263][ T1986] el0_svc_common+0xb8/0x1a4
[ 229.779706][ T1986] do_el0_svc+0x28/0x7c
[ 229.783716][ T1986] el0_svc+0x14/0x24
[ 229.787464][ T1986] el0_sync_handler+0x6c/0xb4
[ 229.791995][ T1986] el0_sync+0x1b4/0x1c0
[ 229.796008][ T1986] Code: d65f03c0 aa1f03e0 d50323bf d65f03c0 (d42aa240)
[ 229.802795][ T1986] ---[ end trace 1a9f8afae0f8d772 ]---
[ 229.820968][ T1986] Kernel panic - not syncing: BRK handler: Fatal exception
[ 229.828043][ T1986] SMP: stopping secondary CPUs
[ 229.832981][ T1986] Kernel Offset: disabled
[ 229.837165][ T1986] CPU features: 0x000,10240002,2000200c
[ 229.842561][ T1986] Memory Limit: none
U-Boot SPL 2021.04 (Jan 24 2023 - 13:02:29 +0530)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 2400MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0: RNG instantiated
*******************************************************************************************************************