Im trying to write a Device Tree node for iMX8 ethernet (fec2) with TJA1101 (rmii mode) as the phy transceiver.
1- Is there anything missing with the nodes names and types in the device tree that will be looked for at linux kernel 4.14.98.
2- The tja1101 driver is supposed to be supported with the tja110x.c driver. is there any configuration that could be done to select tja1101 specifically.
I tried to include the tja110x.dtsi with my dts. And as an example of the device tree nodes...
--------------------------------------------------------EOF
&fec1 {
status = "disabled";
};
fec2: ethernet@5b050000 {
compatible = "fsl,imx8qm-fec";
reg = <0x0 0x5b050000 0x0 0x10000>;
interrupt-parent = <&wu>;
interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8QXP_ENET1_IPG_CLK>, <&clk IMX8QXP_ENET1_AHB_CLK>, <&clk IMX8QXP_ENET1_RGMII_TX_CLK>, <&clk IMX8QXP_ENET1_PTP_CLK>, <&clk IMX8QXP_ENET1_TX_CLK>;
clock-names = "ipg", "ahb", "enet_clk_ref", "ptp", "enet_2x_txclk", "phy";
assigned-clocks = <&clk IMX8QXP_ENET1_ROOT_DIV>, <&clk IMX8QXP_ENET1_REF_DIV>;
assigned-clock-rates = <250000000>, <125000000>;
fsl,num-tx-queues=<3>;
fsl,num-rx-queues=<3>;
fsl,wakeup_irq = <0>;
power-domains = <&pd_conn_enet1>;
status = "disabled";
};
&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec2>;
phy-mode = "rgmii-txid";
phy-handle = <ðphy1>;
phy-supply = <®_fec2_supply>;
fsl,magic-packet;
fsl,rgmii_rxc_dly;
status = "disabled";
};
&fec2 {
pinctrl-0 = <&pinctrl_fec2_rmii>;
clocks = <&clk IMX8QXP_ENET1_IPG_CLK>,<&clk IMX8QXP_ENET1_AHB_CLK>,<&clk IMX8QXP_ENET1_REF_50MHZ_CLK>,<&clk IMX8QXP_ENET1_PTP_CLK>,<&clk IMX8QXP_ENET1_TX_CLK>;
phy-mode = "rmii";
phy-handle = <ðphy2>;
/delete-property/ phy-supply;
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
tja110x,refclk_in;
};
};
};
pinctrl_fec2_rmii: fec2rmiigrp {
fsl,pins = <
SC_P_ENET0_MDC_CONN_ENET1_MDC 0x06000020
SC_P_ENET0_MDIO_CONN_ENET1_MDIO 0x06000020
SC_P_ESAI0_FSR_CONN_ENET1_RCLK50M_OUT 0x06000020
SC_P_SPDIF0_RX_CONN_ENET1_RGMII_RXD0 0x06000020
SC_P_ESAI0_TX3_RX2_CONN_ENET1_RGMII_RXD1 0x06000020
SC_P_ESAI0_TX2_RX3_CONN_ENET1_RMII_RX_ER 0x06000020
SC_P_SPDIF0_TX_CONN_ENET1_RGMII_RX_CTL 0x06000020
SC_P_ESAI0_TX4_RX1_CONN_ENET1_RGMII_TXD0 0x06000020
SC_P_ESAI0_TX5_RX0_CONN_ENET1_RGMII_TXD1 0x06000020
SC_P_ESAI0_SCKR_CONN_ENET1_RGMII_TX_CTL 0x06000020
>;
};
--------------------------------------------------------EOF
while the output from the kernel was
"
[ 4.471375] fec 5b050000.ethernet: 5b050000.ethernet supply phy not found, using dummy regulator
[ 4.485249] fec 5b050000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[ 4.495277] fec 5b050000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 7a:ae:db:cd:b2:0f
[ 4.538153] mdio_bus 5b050000.ethernet-1: MDIO device at address 2 is missing.
[ 4.549625] fec 5b050000.ethernet eth0: registered PHC device 0
[ 40.369287] fec 5b050000.ethernet eth0: Unable to connect to phy
"
Is there anything here is not right.
Hi Muhamed
dts example of iMX8 ethernet (fec2) with TJA1101 can be found on
fsl-imx8qxp-enet2-tja1100.dtsi\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
thats exactly what i followed, you can look at the last fec2 node i have. but still no good results like the output i wrote.
please try to reproduce issue on NXP MEK reference board with
latest Demo Images from
Best regards
igor