Home › Forums › snickerdoodle Baseboards › • Community Built › Wired Ethernet Configuration

Viewing 7 reply threads
  • Author
    Posts
    • Shane
      Participant
      Post count: 28
      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
      Attached Files:

      ENET+Block+Design.pngENET+Package+Pins.pngENET0+Clock.pngMIO+Configuration.pngENET+BOOT+ERRORS.png

    • Bush
      Moderator
      Post count: 125
      What do you have for network interface files (i.e. what is in /etc/network/interfaces.d/)?
      What does ifconfig -a give you?

      Your configuration looks right as far as I can tell. I can provide a reference project that you can compare with. Are you using the snickerdoodle board files to create your project before customizing PS for ENET?

      On Saturday, April 22, 2017 at 7:28:39 AM UTC-7, Shane wrote:

      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
    • Shane
      Participant
      Post count: 28
      A known good working project for reference would be a huge help!

      Here is the process that I'm following:
      1. Create simple zynq7 processing system in Vivado block design (using snickerdoodle prime le board files for project)
      2. Modify MIO configuration to include ENET0 (MIO 16…27, MIO 52…53)
      3. Generate Block Design (under IP Integrator in the left pane)
      4. Export hardware, Launch SDK
      5. Create new FSBL
      6. Create new boot image using newly created fsbl.elf and known good u-boot image (Xilinx Tools->Create Boot Image)
      7. Update SD card with new boot.bin and snickerdoodle-piSmasher.dtb
      I've attached a screenshot which shows my configuration.
      Do I need to rebuild either snickerdoodle-linux or snickerdoodle-u-boot to get this working?  Also, I've seen two kernel modules for ethernet – emacps and macb – which do you use?

      On Friday, April 28, 2017 at 4:55:24 PM UTC-5, Bush wrote:

      What do you have for network interface files (i.e. what is in /etc/network/interfaces.d/)?
      What does ifconfig -a give you?

      Your configuration looks right as far as I can tell. I can provide a reference project that you can compare with. Are you using the snickerdoodle board files to create your project before customizing PS for ENET?

      On Saturday, April 22, 2017 at 7:28:39 AM UTC-7, Shane wrote:

      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
      Attached Files:

      ifconfig+eth0.png

    • Bush
      Moderator
      Post count: 125

      After checking with a known working configuration, I see that your MIO pins are configured differently than what I have. You shouldn't have to rebuild the kernel or U-Boot. The default U-Boot configuration does not use ENET but it will not override any peripheral configuration from FSBL. If you want to use ENET from U-Boot (to do a network boot or the like), you can rebuild U-Boot with the updated device tree and device driver settings. Otherwise, you shouldn't need to touch it.

      The documentation on setting the I/O level from LVCMOS +1.8 to HSTL +1.8 is pretty slim but it makes sense to set them to HSTL for an ENET interface. I'm going to generate a base project from a larger working configuration that I have and test the effect of the HSTL setting on my setup. Can you try to duplicate the configuration that I have and see if you get any results. This is the dmesg for the ethernet bringup on my setup:

      $ dmesg | grep "eth"
      [    1.039195] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      [    1.039212] of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      [    1.139993] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 148 (00:0a:35:00:01:22)
      [    1.149858] Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
      [    7.604886] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
      [   10.700136] macb e000b000.ethernet eth0: link up (1000/Full)
      [   10.700170] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

      On Saturday, April 29, 2017 at 6:08:03 AM UTC-7, Shane wrote:

      A known good working project for reference would be a huge help!

      Here is the process that I'm following:
      1. Create simple zynq7 processing system in Vivado block design (using snickerdoodle prime le board files for project)
      2. Modify MIO configuration to include ENET0 (MIO 16…27, MIO 52…53)
      3. Generate Block Design (under IP Integrator in the left pane)
      4. Export hardware, Launch SDK
      5. Create new FSBL
      6. Create new boot image using newly created fsbl.elf and known good u-boot image (Xilinx Tools->Create Boot Image)
      7. Update SD card with new boot.bin and snickerdoodle-piSmasher.dtb
      I've attached a screenshot which shows my configuration.
      Do I need to rebuild either snickerdoodle-linux or snickerdoodle-u-boot to get this working?  Also, I've seen two kernel modules for ethernet – emacps and macb – which do you use?

      On Friday, April 28, 2017 at 4:55:24 PM UTC-5, Bush wrote:

      What do you have for network interface files (i.e. what is in /etc/network/interfaces.d/)?
      What does ifconfig -a give you?

      Your configuration looks right as far as I can tell. I can provide a reference project that you can compare with. Are you using the snickerdoodle board files to create your project before customizing PS for ENET?

      On Saturday, April 22, 2017 at 7:28:39 AM UTC-7, Shane wrote:

      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
    • Bush
      Moderator
      Post count: 125
      I've verified the following configuration with my setup:

      and attached is a base project (the USB is enabled as well) for the piSmasher that I used to verify the configuration: https://drive.google.com/file/d/0B_ml55LKC9BQRW15Y1Z6QVY4TnM/view?usp=sharing

      On Saturday, April 29, 2017 at 3:25:13 PM UTC-7, Bush wrote:

      After checking with a known working configuration, I see that your MIO pins are configured differently than what I have. You shouldn't have to rebuild the kernel or U-Boot. The default U-Boot configuration does not use ENET but it will not override any peripheral configuration from FSBL. If you want to use ENET from U-Boot (to do a network boot or the like), you can rebuild U-Boot with the updated device tree and device driver settings. Otherwise, you shouldn't need to touch it.

      The documentation on setting the I/O level from LVCMOS +1.8 to HSTL +1.8 is pretty slim but it makes sense to set them to HSTL for an ENET interface. I'm going to generate a base project from a larger working configuration that I have and test the effect of the HSTL setting on my setup. Can you try to duplicate the configuration that I have and see if you get any results. This is the dmesg for the ethernet bringup on my setup:

      $ dmesg | grep "eth"
      [    1.039195] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      [    1.039212] of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      [    1.139993] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 148 (00:0a:35:00:01:22)
      [    1.149858] Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
      [    7.604886] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
      [   10.700136] macb e000b000.ethernet eth0: link up (1000/Full)
      [   10.700170] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

      On Saturday, April 29, 2017 at 6:08:03 AM UTC-7, Shane wrote:

      A known good working project for reference would be a huge help!

      Here is the process that I'm following:
      1. Create simple zynq7 processing system in Vivado block design (using snickerdoodle prime le board files for project)
      2. Modify MIO configuration to include ENET0 (MIO 16…27, MIO 52…53)
      3. Generate Block Design (under IP Integrator in the left pane)
      4. Export hardware, Launch SDK
      5. Create new FSBL
      6. Create new boot image using newly created fsbl.elf and known good u-boot image (Xilinx Tools->Create Boot Image)
      7. Update SD card with new boot.bin and snickerdoodle-piSmasher.dtb
      I've attached a screenshot which shows my configuration.
      Do I need to rebuild either snickerdoodle-linux or snickerdoodle-u-boot to get this working?  Also, I've seen two kernel modules for ethernet – emacps and macb – which do you use?

      On Friday, April 28, 2017 at 4:55:24 PM UTC-5, Bush wrote:

      What do you have for network interface files (i.e. what is in /etc/network/interfaces.d/)?
      What does ifconfig -a give you?

      Your configuration looks right as far as I can tell. I can provide a reference project that you can compare with. Are you using the snickerdoodle board files to create your project before customizing PS for ENET?

      On Saturday, April 22, 2017 at 7:28:39 AM UTC-7, Shane wrote:

      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
    • Shane
      Participant
      Post count: 28
      Thanks for providing the example project.  After configuring my setup to match yours, and installing 2016.4 (I've been using 2017.1) to stay consistent, I'm receiving a kernel panic when trying to boot into linux ("Unable to handle kernel NULL pointer dereference at virtual address 0000000c").  This only occurs when I update the device tree to the piSmasher version.  Also, we are using a Micrel PHY (KSZ8081MLX) which after doing some research might make things a bit more difficult.  I've attached two screenshots of the kernel panic.

      I'm assuming that your dtb file was built using the default piSmasher configuration (no modifications)?  
      Originally we were going to use the 88E1510 Marvell PHY but couldn't find them in stock anywhere.
      Could you provide the SD card build files that you successfully used to help me narrow down whether or not the issues I'm facing are hardware or software?

      On Saturday, April 29, 2017 at 7:37:09 PM UTC-5, Bush wrote:

      I've verified the following configuration with my setup:

      and attached is a base project (the USB is enabled as well) for the piSmasher that I used to verify the configuration: https://drive.google.com/file/d/0B_ml55LKC9BQRW15Y1Z6QVY4TnM/view?usp=sharing

      On Saturday, April 29, 2017 at 3:25:13 PM UTC-7, Bush wrote:

      After checking with a known working configuration, I see that your MIO pins are configured differently than what I have. You shouldn't have to rebuild the kernel or U-Boot. The default U-Boot configuration does not use ENET but it will not override any peripheral configuration from FSBL. If you want to use ENET from U-Boot (to do a network boot or the like), you can rebuild U-Boot with the updated device tree and device driver settings. Otherwise, you shouldn't need to touch it.

      The documentation on setting the I/O level from LVCMOS +1.8 to HSTL +1.8 is pretty slim but it makes sense to set them to HSTL for an ENET interface. I'm going to generate a base project from a larger working configuration that I have and test the effect of the HSTL setting on my setup. Can you try to duplicate the configuration that I have and see if you get any results. This is the dmesg for the ethernet bringup on my setup:

      $ dmesg | grep "eth"
      [    1.039195] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      [    1.039212] of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      [    1.139993] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 148 (00:0a:35:00:01:22)
      [    1.149858] Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
      [    7.604886] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
      [   10.700136] macb e000b000.ethernet eth0: link up (1000/Full)
      [   10.700170] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

      On Saturday, April 29, 2017 at 6:08:03 AM UTC-7, Shane wrote:

      A known good working project for reference would be a huge help!

      Here is the process that I'm following:
      1. Create simple zynq7 processing system in Vivado block design (using snickerdoodle prime le board files for project)
      2. Modify MIO configuration to include ENET0 (MIO 16…27, MIO 52…53)
      3. Generate Block Design (under IP Integrator in the left pane)
      4. Export hardware, Launch SDK
      5. Create new FSBL
      6. Create new boot image using newly created fsbl.elf and known good u-boot image (Xilinx Tools->Create Boot Image)
      7. Update SD card with new boot.bin and snickerdoodle-piSmasher.dtb
      I've attached a screenshot which shows my configuration.
      Do I need to rebuild either snickerdoodle-linux or snickerdoodle-u-boot to get this working?  Also, I've seen two kernel modules for ethernet – emacps and macb – which do you use?

      On Friday, April 28, 2017 at 4:55:24 PM UTC-5, Bush wrote:

      What do you have for network interface files (i.e. what is in /etc/network/interfaces.d/)?
      What does ifconfig -a give you?

      Your configuration looks right as far as I can tell. I can provide a reference project that you can compare with. Are you using the snickerdoodle board files to create your project before customizing PS for ENET?

      On Saturday, April 22, 2017 at 7:28:39 AM UTC-7, Shane wrote:

      I've been struggling to get ethernet working through the PS interface (I have a custom board with an ethernet PHY, similar to piSmasher).  In Vivado, I am enabling ENET0 and configuring it to use the MIO pins.  I have also set the clock to 100Mbps as shown in an example design I found for the ZC702 board which is also using rgmii ethernet through the PS interface.  I have attached several screenshots of my configuration.  After updating the FSBL in SDK (I'm not sure if that is even necessary), I can still boot into linux, however when I run 'ifconfig' there is no eth0 interface available.  I'm assuming this should come up if configured correctly?

      I also tried altering the device tree settings, mainly status="disabled" to status="okay" for gem0.  In addition to this I have also tried using the piSmasher device tree.  This doesn't seem to help either.  
      After booting into snickerdoodle with my updated bitstream/fsbl/dtb, running 'dmesg | grep eth' show:
      macb e000b000.ethernet: invalid hw address, using random
      of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/amba/ethernet@e000b000/ethernet-phy@0[0]'
      of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/amba/ethernet@e000b000[0]'
      We based our custom ethernet board off of the piSmasher, so I was wondering if there is a Vivado/SDK design built for piSmasher that I could use as a starting point to try to troubleshoot?
      Any advice on where to go from here would be greatly appreciated.
      Shane
      Attached Files:

      Kernel+Panic+00.pngKernel+Panic+01.png

    • Shane
      Participant
      Post count: 28

      Quick follow-up question, does your system boot without the piSmasher attached? I’m also assuming that it doesn’t matter that I have a prime le board?

    • ferniebola
      Participant
      Post count: 11

      Hello Shane,

      I also have a design with an Ethernet PHY connected to the PS and I am experiencing a similar problem but I know for a fact that it is related to the Ethernet reset signal. I have a question; how did you connect the ENET_RESET signal from the PS to the PHY and what port of the MIO/EMIO did you use?

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