tja1101 with imx6dl and kernel 5.4

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

tja1101 with imx6dl and kernel 5.4

跳至解决方案
632 次查看
ycardaillac
Contributor III

Hi,

I'm currently upgrading BSP from yocto sumo to dunfell on freescale supported branches. I'm trying to reintegrate my TJA1101 that I use for broad r reach.

In the past I used to use the tja11xx linux driver that we can find on this forum. This driver is now incompatible with the new kernel, it seems to have been replaced with an in tree driver called nxp-tja11xx.

When I enable this driver on my kernel I end up with my phy detected correctly, however it's not usable as it gets stuck in a reset pattern:

[ 1218.655559] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1219.695411] fec 2188000.ethernet eth0: Link is Down
[ 1223.855596] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1224.895379] fec 2188000.ethernet eth0: Link is Down

I've been trying to add some reset timing to the phy on my dts :

 

&fec {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_enet_5>;
  phy-mode = "rmii";
  status = "okay";
  phy-reset-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  phy-reset-duration = <10>;
};

 

but that didn't help.

I am assuming that my problem has something to do with the fact that in the past I had to pass the following command :

echo 0 > /sys/bus/mdio_bus/devices/2188000.ethernet\:04/configuration/master_cfg

Which I don't necessary understand how to do now with newer BSP. How shall I do that configuration?

Would you happen to have any integration example with working TJA1100 example that I can base my work on?

Best regards,

0 项奖励
1 解答
567 次查看
ycardaillac
Contributor III

Hi,

I've been figuring this out:

@@ -407,6 +407,16 @@
        phy-reset-gpios = <&gpio3 0 0>;
        fsl,magic-packet;
        phy-reset-duration = <10>;
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy2: ethernet-phy@4 {
+                       reg = <4>;
+                       tja110x,refclk_in;
+               };
+       };
 };

 

best regards,

在原帖中查看解决方案

0 项奖励
1 回复
568 次查看
ycardaillac
Contributor III

Hi,

I've been figuring this out:

@@ -407,6 +407,16 @@
        phy-reset-gpios = <&gpio3 0 0>;
        fsl,magic-packet;
        phy-reset-duration = <10>;
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy2: ethernet-phy@4 {
+                       reg = <4>;
+                       tja110x,refclk_in;
+               };
+       };
 };

 

best regards,

0 项奖励