Hi there,
I am trying to use the same configuration that works from a Linux kernel 4.14 to a Linux kernel 5.4 but it doesn't :
root@hdl-hobc:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: no
From what I see in the logs the libphy doesn't probe the devices.
root@hdl-hobc:~# dmesg | grep fec
[ 3.369549] fec 30be0000.ethernet: 30be0000.ethernet supply phy not found, using dummy regulator
[ 3.407414] fec 30be0000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[ 3.417545] fec 30be0000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 72:4d:f6:20:89:1a
[ 3.429237] libphy: fec_enet_mii_bus: probed
[ 3.436035] fec 30be0000.ethernet eth0: registered PHC device 0
[ 3.443095] fec 30bf0000.ethernet: 30bf0000.ethernet supply phy not found, using dummy regulator
[ 3.481159] fec 30bf0000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[ 3.491266] fec 30bf0000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 72:eb:53:5b:c1:d6
[ 3.503667] fec 30bf0000.ethernet eth1: registered PHC device 1
root@hdl-hobc:~# dmesg | grep fec
[ 2.927762] fec 30be0000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[ 2.934782] fec 30be0000.ethernet: Using random MAC address: e6:c5:f7:eb:6c:81
[ 2.955895] fec 30be0000.ethernet eth0: registered PHC device 0
[ 2.993873] fec 30bf0000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[ 3.000922] fec 30bf0000.ethernet: Using random MAC address: 32:dc:67:04:83:31
[ 3.012529] fec 30bf0000.ethernet eth1: registered PHC device 1
As you can see on kernel 5 the line [ 3.429237] libphy: fec_enet_mii_bus: probed never appears.
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mdio &pinctrl_enet1>;
assigned-clocks = <&clks IMX7D_ENET1_REF_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_SRC>,
<&clks IMX7D_ENET1_TIME_ROOT_SRC>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <0>, <0>, <100000000>, <250000000>;
clocks = <&clks IMX7D_ENET1_IPG_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET1_REF_ROOT_DIV>;
phy-mode = "rmii";
phy-handle = <ðphy1>;
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
fsl,magic-packet;
status = "okay";
phy-reset-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>; // 10mS
phy-reset-post-delay = <10>; // 10mS
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
clock-names = "rmii-ref";
clocks = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>;
interrupt-parent = <&gpio1>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
};
ethphy2: ethernet-phy@2 {
compatible = "ethernet-phy-id0022.1561", "ethernet-phy-ieee802.3-c22";
reg = <2>;
clock-names = "rmii-ref";
clocks = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>;
interrupt-parent = <&gpio2>;
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
};
};
};
&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet2>;
assigned-clocks = <&clks IMX7D_ENET2_REF_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <0>, <0>, <100000000>, <250000000>;
clocks = <&clks IMX7D_ENET2_IPG_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET2_REF_ROOT_DIV>;
phy-mode = "rmii";
phy-handle = <ðphy2>;
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
fsl,magic-packet;
phy-reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>; // 10mS
phy-reset-post-delay = <10>; // 10mS
status = "okay";
};
pinctrl_mdio: mdio-grp {
fsl,pins = <
MX7D_PAD_SD2_CD_B__ENET1_MDIO 0x0c
MX7D_PAD_SD2_WP__ENET1_MDC 0x04
>;
};
pinctrl_enet1: enet1grp {
fsl,pins = <
MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x0c /* ENET1_nINTid (rev1+) */
MX7D_PAD_EPDC_DATA00__GPIO2_IO0 0x04 /* ENET1_RST */
MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x1e
MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x1e
MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x1e
MX7D_PAD_ENET1_RGMII_RXC__ENET1_RX_ER 0x1e
MX7D_PAD_ENET1_RGMII_TX_CTL__ENET1_RGMII_TX_CTL 0x16
MX7D_PAD_ENET1_TX_CLK__CCM_ENET_REF_CLK1 0x40000036
MX7D_PAD_ENET1_RGMII_TD0__ENET1_RGMII_TD0 0x16
MX7D_PAD_ENET1_RGMII_TD1__ENET1_RGMII_TD1 0x16
>;
};
pinctrl_enet2: enet2grp {
fsl,pins = <
MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30 0x0c /* ENET2_nINTid (rev1+) */
MX7D_PAD_EPDC_DATA01__GPIO2_IO1 0x04 /* ENET2_RSTidn */
MX7D_PAD_EPDC_SDCE0__ENET2_RGMII_RX_CTL 0x1e
MX7D_PAD_EPDC_SDCLK__ENET2_RGMII_RD0 0x1e
MX7D_PAD_EPDC_SDLE__ENET2_RGMII_RD1 0x1e
MX7D_PAD_EPDC_SDCE1__ENET2_RX_ER 0x1e
MX7D_PAD_EPDC_GDRL__ENET2_RGMII_TX_CTL 0x16
MX7D_PAD_EPDC_BDR0__CCM_ENET_REF_CLK2 0x40000036
MX7D_PAD_EPDC_SDCE2__ENET2_RGMII_TD0 0x16
MX7D_PAD_EPDC_SDCE3__ENET2_RGMII_TD1 0x16
>;
};
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mdio &pinctrl_enet1>;
assigned-clocks = <&clks IMX7D_ENET_PHY_REF_ROOT_SRC>,
<&clks IMX7D_ENET_AXI_ROOT_SRC>,
<&clks IMX7D_ENET1_TIME_ROOT_SRC>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <0>, <0>, <100000000>, <250000000>;
clocks = <&clks IMX7D_ENET1_IPG_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET1_REF_ROOT_DIV>;
phy-mode = "rmii";
phy-supply = <®_vref_3v3>;
phy-reset-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>; // 10mS
phy-reset-post-delay = <10>; // 10mS
phy-handle = <ðphy1>;
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
fsl,magic-packet;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
clock-names = "rmii-ref";
clocks = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>;
interrupt-parent = <&gpio1>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
};
ethphy2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
clock-names = "rmii-ref";
clocks = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>;
interrupt-parent = <&gpio2>;
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
};
};
};
&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet2>;
assigned-clocks = <&clks IMX7D_ENET_PHY_REF_ROOT_SRC>,
<&clks IMX7D_ENET_AXI_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <0>, <0>, <100000000>, <250000000>;
clocks = <&clks IMX7D_ENET2_IPG_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET2_REF_ROOT_DIV>;
phy-mode = "rmii";
phy-supply = <®_vref_3v3>;
phy-reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>; // 10mS
phy-reset-post-delay = <10>; // 10mS
phy-handle = <ðphy2>;
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
fsl,magic-packet;
status = "okay";
};
Thanks for your help.
No, I didn't I finally stopped the update to switch from kernel 4 to 6. We will start the update soon, I hope you will find the issue, if you find it I am curious to know the answer. Good luck!
Hello,
You are playing with a non-supported version of the kernel please download a supported version from:
Regards
Hi Bio,
Thanks for your answer, I took the Linux FSL to create my branch. Can you please explain me the difference between Linux FSL and Linux IMX ?
I don't get everything. Should I base my branch on Linux IMX ?
For example what version should I use here ?
https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-fslc-imx_5.4.bb
https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-imx_5.4.bb
Thanks,