Home › Forums › snickerdoodle Baseboards › • piSmasher › Petalinux 2023.1 with PiSmasher dual ethernet issues

Viewing 14 reply threads
  • Author
    Posts
    • sirmaxim
      Participant
      Post count: 14

      Hello, I am currently trying to bring up a custom linux image for the Pismasher using the petalinux toolchain. I’m running into an issue were only one of my ethernet interfaces (gem1/eth1) are functioning correctly. on boot I see some network related logs like this:

      xgmiitorgmii e000b000.ethernet-ffffffff:09: Couldn’t find phydev
      hwmon hwmon0: temp1_input not attached to any thermal zone
      macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 41 (00:0a:35:00:1e:53)
      xgmiitorgmii e000c000.ethernet-ffffffff:09: Couldn’t find phydev
      [Firmware Warn]: /axi/ethernet@e000c000/mdio/ethernet-phy@1: Whitelisted compatible string. Please remove
      hwmon hwmon1: temp1_input not attached to any thermal zone
      macb e000c000.ethernet eth1: Cadence GEM rev 0x00020118 at 0xe000c000 irq 42 (00:0a:35:00:c0:13)
      e1000e: Intel(R) PRO/1000 Network Driver
      e1000e: Copyright(c) 1999 – 2015 Intel Corporation.

      #####cut#####

      [ OK ] Started systemd-networkd.service – Network Configuration.
      macb e000c000.ethernet eth1: PHY [e000c000.ethernet-ffffffff:00] driver [Marvell 88E1510] (irq=POLL)
      random: crng init done
      macb e000c000.ethernet eth1: configuring for phy/rgmii-id link mode
      [ OK ] Found device dev-mmcblk0p1.device – /dev/mmcblk0p1.
      macb e000b000.ethernet eth0: PHY [e000b000.ethernet-ffffffff:00] driver [Marvell 88E1510] (irq=POLL)
      macb e000b000.ethernet eth0: configuring for phy/rgmii-id link mode

      ####cut####

      eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
      ether 00:0a:35:00:1e:53 txqueuelen 1000 (Ethernet)
      RX packets 0 bytes 0 (0.0 B)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 0 bytes 0 (0.0 B)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      device interrupt 41 base 0xb000

      eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.1.124 netmask 255.255.255.0 broadcast 192.168.1.255
      inet6 2600:8801:d523:e500:20a:35ff:fe00:c013 prefixlen 64 scopeid 0x0<global>
      inet6 fe80::20a:35ff:fe00:c013 prefixlen 64 scopeid 0x20<link>
      inet6 2600:8801:d523:e500::b7be prefixlen 128 scopeid 0x0<global>
      ether 00:0a:35:00:c0:13 txqueuelen 1000 (Ethernet)
      RX packets 260 bytes 79045 (77.1 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 233 bytes 23586 (23.0 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      device interrupt 42 base 0xc000

       

      For the build, the system-user.dtsi  needs to be modified to override some default in the generated file pcw.dtsi

      ###system-user.dtsi ###

      &gem0 {
      phy-handle = <&phy0>;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 19 1>;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_0>;

      ps7_ethernet_0_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      phy0: ethernet-phy@0 {
      compatible = “marvell,88e1510”;
      reg = <0x0>;
      device_type = “ethernet-phy”;

      };
      gmii_to_rgmii_0: gmii_to_rgmii_0@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <9>;
      phy-handle = <&phy0>;
      };
      };
      };

      &gem1 {
      local-mac-address = [00 0a 35 00 c0 13];
      phy-handle = <&phy1>;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 17 1>;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_1>;

      ps7_ethernet_1_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      phy1: ethernet-phy@1 {
      compatible = “marvell,88e1510”;
      reg = <0x0>;
      device_type = “ethernet-phy”;
      };
      gmii_to_rgmii_1: gmii_to_rgmii_1@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <9>;
      phy-handle = <&phy1>;
      };
      };
      };

      ####pcw.dtsi####
      &gem0 {
      phy-handle = <&phy1>;
      phy-mode = “gmii”;
      status = “okay”;
      xlnx,ptp-enet-clock = <0x89c0b91>;
      ps7_ethernet_0_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      gmii_to_rgmii_0: gmii_to_rgmii_0@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&phy1>;
      reg = <9>;
      };
      };
      };
      &gem1 {
      phy-handle = <&phy1>;
      phy-mode = “gmii”;
      status = “okay”;
      xlnx,ptp-enet-clock = <0x89c0b91>;
      ps7_ethernet_1_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      gmii_to_rgmii_1: gmii_to_rgmii_1@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&phy1>;
      reg = <9>;
      };
      };
      };

      Im not sure if im configuring gem0 incorrectly but gem1 is functioning fine. when i boot up using a prebuilt image both Ethernet ports work correctly tho.

    • Ryan Cousins
      Keymaster
      Post count: 343

      Maxim,

      See below for the gem entries for the ‘default’ snickerdoodle black + piSmasher dts (formatting is  bit off here, so be mindful of whitespace, etc.):

      &gem0 {
      status = “okay”;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 19 1>;

      eth_phy0: ethernet-phy@0 {
      compatible = “marvell,88E1510”;
      reg = <0>;
      device_type = “ethernet-phy”;
      };

      gmii2rgmii0: gmiitorgmii@8 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <8>;
      phy-handle = <&eth_phy0>;
      };
      };

      &gem1 {
      status = “okay”;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 17 1>;

      eth_phy1: ethernet-phy@1 {
      compatible = “marvell,88E1510”;
      reg = <0>;
      device_type = “ethernet-phy”;
      };

      gmii2rgmii1: gmiitorgmii@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <9>;
      phy-handle = <&eth_phy1>;
      };
      };

      Looks like you might have some overlapping/conflicting entries (phy-handle, reg, etc.) worth looking into. Hopefully that helps; if you aren’t able to resolve the issue we might require reviewing your Vivado project.

      -RC

    • sirmaxim
      Participant
      Post count: 14

      Hello Ryan,

      Sorry for the delay. That device tree is actually what I started with. Ive gone changed it back. Here is what I have now.

      #### system-user.dtsi ####

      &gem0 {
      phy-handle = <&ethernet0>;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 19 1>;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_0>;

      ps7_ethernet_0_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      ethernet0: ethernet-phy@0 {
      compatible = “marvell,88e1510”;
      reg = <0x0>;
      device_type = “ethernet-phy”;

      };
      gmii_to_rgmii_0: gmii_to_rgmii_0@8 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <8>;
      phy-handle = <&ethernet0>;
      };
      };
      };

      &gem1 {
      local-mac-address = [00 0a 35 00 c0 13];
      phy-handle = <&ethernet1>;
      phy-mode = “rgmii-id”;
      reset-gpios = <&gpio0 17 1>;
      gmii2rgmii-phy-handle = <&gmii_to_rgmii_1>;

      ps7_ethernet_1_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      ethernet1: ethernet-phy@1 {
      compatible = “marvell,88e1510”;
      reg = <0x0>;
      device_type = “ethernet-phy”;
      };
      gmii_to_rgmii_1: gmii_to_rgmii_1@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      reg = <9>;
      phy-handle = <&ethernet1>;
      };
      };
      };

       

      Here is my Vivado setup aswell.

      vivado network setup

      I did also notice that uboot doesn’t pickup the interfaces as well

      U-Boot 2023.01 (Sep 21 2023 – 11:02:37 +0000)

      CPU: Zynq 7z020
      Silicon: v3.1
      DRAM: ECC disabled 1 GiB
      Core: 33 devices, 18 uclasses, devicetree: board
      Flash: 0 Bytes
      NAND: 0 MiB
      MMC: mmc@e0100000: 0, mmc@e0101000: 1
      Loading Environment from FAT… *** Error – No Valid Environment Area found
      *** Warning – bad env area, using default environment

      In: serial@e0000000
      Out: serial@e0000000
      Err: serial@e0000000
      Net: Incorrect interface type
      Incorrect interface type
      Incorrect interface type
      No ethernet found.

      #### Cut ####

       

      Perhaps this is a uboot issue? not sure why only one interface gem1 works though.

    • jmcewen
      Participant
      Post count: 12

      Maxim,

      If you are still experiencing this issue, can you provide your project  so the team can take a look?

       

      Thanks,

      Jake

    • sirmaxim
      Participant
      Post count: 14

      Hello Jake,

      I’ve uploaded my projects to GitHub. Here are the links
      https://github.com/SirMaximilian/Snickerdoodle-Vivado.git

      https://github.com/SirMaximilian/Snickerdoodle-Petalinux.git

      let me know if there are any issues.

    • jmcewen
      Participant
      Post count: 12

      Hello, apologies, is this still an open issue? If not I can close this out

    • sirmaxim
      Participant
      Post count: 14

      Hello Jake,

      Im still having issues with gem0. ethernet 1 and wlan0 are working fine. i have updated to petalinux 2024. here is my system-user.dtsi

      https://github.com/SirMaximilian/Snickerdoodle-Petalinux/blob/master/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

    • jmcewen
      Participant
      Post count: 12

      Maxim,

      Your .dtsi file still does not match the snickerdoodle black default dtsi for the gem components, is this intentional?

    • sirmaxim
      Participant
      Post count: 14

      Hey Jake,

      Xilinx Petalinux auto generates a pcw.dtsi file that has gems in them. this is how my generated pcw.dtsi file looks like

      /*
      * CAUTION: This file is automatically generated by Xilinx.
      * Version: XSCT
      * Today is: Sat Dec 7 07:45:59 2024
      */

      / {
      cpus {
      cpu@0 {
      operating-points = <866665 1000000 433332 1000000 216666 1000000>;
      };
      };
      };
      &gem0 {
      phy-handle = <&phy1>;
      phy-mode = “gmii”;
      status = “okay”;
      xlnx,ptp-enet-clock = <0x89c0b91>;
      ps7_ethernet_0_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      gmii_to_rgmii_0: gmii_to_rgmii_0@8 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&phy1>;
      reg = <8>;
      };
      };
      };
      &gem1 {
      phy-handle = <&phy1>;
      phy-mode = “gmii”;
      status = “okay”;
      xlnx,ptp-enet-clock = <0x89c0b91>;
      ps7_ethernet_1_mdio: mdio {
      #address-cells = <1>;
      #size-cells = <0>;
      gmii_to_rgmii_1: gmii_to_rgmii_1@9 {
      compatible = “xlnx,gmii-to-rgmii-1.0”;
      phy-handle = <&phy1>;
      reg = <9>;
      };
      };
      };
      &gpio0 {
      emio-gpio-width = <64>;
      gpio-mask-high = <0x0>;
      gpio-mask-low = <0x5600>;
      };
      &intc {
      num_cpus = <2>;
      num_interrupts = <96>;
      };
      &qspi {
      is-dual = <0>;
      num-cs = <1>;
      spi-rx-bus-width = <4>;
      spi-tx-bus-width = <4>;
      status = “okay”;
      };
      &sdhci0 {
      status = “okay”;
      xlnx,has-cd = <0x0>;
      xlnx,has-power = <0x0>;
      xlnx,has-wp = <0x0>;
      };
      &sdhci1 {
      status = “okay”;
      xlnx,has-cd = <0x0>;
      xlnx,has-power = <0x0>;
      xlnx,has-wp = <0x0>;
      };
      &spi1 {
      is-decoded-cs = <0>;
      num-cs = <1>;
      status = “okay”;
      };
      &uart0 {
      cts-override ;
      device_type = “serial”;
      port-number = <0>;
      status = “okay”;
      };
      &usb0 {
      phy_type = “ulpi”;
      status = “okay”;
      };
      &clkc {
      fclk-enable = <0x8>;
      ps-clk-frequency = <33333300>;
      };

       

      #### end file ####

      My system-user.dtsi needs to match the gems in the pcw file and add any missinig fields like the phy-handle. im not sure if there is a way to ignore the gems in the pcw file.
      This article and other sources on the Xilinx forums are how I got what i have running. https://www.hackster.io/news/hello-petalinux-on-the-snickerdoodle-black-with-pismasher-baseboard-b30fe2cc9f83

       

    • jmcewen
      Participant
      Post count: 12

      Hey Maxim,

      This system.dtsi, how did you make it? Did you generate it, make it by hand, etc… ?

    • sirmaxim
      Participant
      Post count: 14

      the system-user.dtsi? that is created by hand yeah.

    • jmcewen
      Participant
      Post count: 12

      I would recommend trying to generated this using the device tree generator

    • sirmaxim
      Participant
      Post count: 14

      i dont understand. the device tree files are mostly auto generated by the petalinux  tools System Device Tree Generator. the system-user.dtsi is there for user additions and edits.

      https://adaptivesupport.amd.com/s/question/0D52E00006hplgGSAQ/xgmiitorgmii-problem-with-petalinux20174?language=en_US

      • jmcewen
        Participant
        Post count: 12

        yes I am following, apologies for being unclear. I will take a look at this post and see if I can find any clues. In the mean time, can you give it a try one more time with our implementation? I know you tried it back in the summer, but I want to confirm it is still the case. If it is, then maybe this is a bug introduced by Xilinx that I will investigate more

        • sirmaxim
          Participant
          Post count: 14

          using your implementation still causes an error because of the missing mdio

    • jmcewen
      Participant
      Post count: 12

      I don’t think you need to manually make that, but if you do, did you try copying what was sent to you previously? I can see right away that you are reusing names that are also aliases, which we do not do in our dts. Not sure if that is the issue, but one potential problem

    • jmcewen
      Participant
      Post count: 12

      By that, I mean I wouldn’t really think you would need to correct the gems I could be wrong there. For your customer dtsi, did you follow the advice here: https://adaptivesupport.amd.com/s/question/0D54U00008COspkSAD/how-to-add-custom-dtsi-file-in-systemuserdtsi?language=en_US

Viewing 14 reply threads
  • You must be logged in to reply to this topic.