tja1101 with imx6dl and kernel 5.4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

tja1101 with imx6dl and kernel 5.4

Jump to solution
608 Views
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 Kudos
1 Solution
543 Views
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,

View solution in original post

0 Kudos
1 Reply
544 Views
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 Kudos