Home › Forums › snickerdoodle Baseboards › • Community Built › PS-Connected Ethernet – ENET Reset Conection/Configuration

Viewing 5 reply threads
  • Author
    Posts
    • ferniebola
      Participant
      Post count: 11

      I have a custom board that mounts on Snickerdoodle Black and I am running Linux on the Snickerdoodle. My problem is that Snickerdoodle is not driving the ENET_RESET signal at all.

      These are the features of my design:

      • The custom board has the exact same Ethernet PHY as piSmasher but it is connected to the PS through Snickerdoodle Black’s J3 connector.
      • The PHY’s reset pin is connected to pin T9 of the Snickerdoodle Black’s FPGA through the JC1 connector.
        PS GPIO_O
        gpio to eth_rst_n connection
      • In the Vivado design; I am connecting EMIO[0] (zero) to pin T9.
        eth_rst_n on pin T9

        • Background: the typical output for the ENET_RESET signal is through the MIO. But my design uses ETHERNET0, USB0, I2C0, I2C1, and UART through the PS leaving only MIO bits 0, 7, and 9 available for the PHY reset signals of ENET, USB, and RTC. None of these pins are available through any of the Snickerdoodle Black mezzanine connectors to reach my Ethernet PHY.
          Peripheral I/O Pins
      • I generated the bitstream and exported hardware for SDK.
      • In SDK I generated the FSBL and the device tree.
        • For some unknown reason; the device tree generates an entry for the Ethernet reset that looks like this: “enet-reset = <&gpio0 0 0>”.
      • I have manually changed the device tree entry to “enet-reset = <&gpio0 54 1>”.
        enet-reset entry on device tree

      My question is; what would be the correct way for bringing the enet-reset signal from the PS to pin T9 and to represent the connection in the FSBL and device tree such that u-boot and/or Linux can drive it as required?

    • Bush
      Moderator
      Post count: 125

      If you’re going to use an EMIO GPIO (or PL GPIO) you will need to make sure that the bitstream is loaded by the FSBL before U-Boot or Linux are started. This means that you will need to build the bitstream into your boot.bin image.

      You’re ethernet bindings don’t appear to be too far off. Try “reset-gpios = <&gpio0 54 1>;” and take a look at the devicetree for the piSmasher for bindings you will need for the PHY. You can ignore the gmii-to-rgmii device. It’s also unclear how/if you are connected to the PHY with MDC/MDIO as you will need to set those pins in the PS MIO configuration.

    • ferniebola
      Participant
      Post count: 11

      Hello Bush,

      Thank you for responding to my inquiry. I did the following:

      1. Changed the device tree as you indicated and re-compiled the device tree blob.
      2. Changed the BOOT.bif file to include the system.bit bitstream in the BOOT.bin and re-generated the BOOT.bin.
      3. Copied the new devicetree.dtb and BOOT.bin into the BOOT partition and powered on the snickerdoodle + fenix system.

      Results:

      Ethernet still in reset. If I use the following commands I can bring the Ethernet out of reset; which means that I have the Ethernet reset correctly attached to EMIO[0].

      cd /sys/class/gpio/
      echo 960 > export
      cd gpio960
      echo out > direction
      echo 1 > value

      In the above; the value 960 is because the base is 906, and EMIO[0] is at address 54 (the MIO has 54 pins): 906 +54 = 960.

      I am attaching my device tree files (fenix_turn_on.dts, pcw.dtsi, zynq-7000.dtsi and the Makefile) as well as my BOOT.bif file.

      Hmmm… I can’t find a way to attach my files. Could I e-mail them to you? I have Ryan’s e-mail address. Would it be OK to e-mail the files to him for you?

    • ferniebola
      Participant
      Post count: 11

      Hello again, Bush.

      Forgot to mention. I have the Ethernet MDC/MDIO connected to the MIO[53:52] bits (Zynq-7020’s pins C11:C10; Snickerdoodle connector pins J2_P4 and J2_P2).

    • ferniebola
      Participant
      Post count: 11

      Hi Bush,

      While doing some more research I noticed that the “ps7_parameters.xml” file auto-generated by SDK for the FSBL project has the following entries:

      <PARAMETER NAME=”PCW_ENET0_RESET_ENABLE” VALUE=”” />
      <PARAMETER NAME=”PCW_ENET0_RESET_IO” VALUE=”” />

      I would expect that somehow the fact that the ENET-RESET is being driven through the EMIO_GPIO[0] be reflected on those. What am I missing?

    • ferniebola
      Participant
      Post count: 11

      SOLUTION: After checking out the “devel” branch of the snickerdoodle-dts.git repository I had access to the snickerdoodle-black-pismasher.dts file. I leveraged from that file and all the .dtsi files in the “include” chain. I copied the “snickerdoodle-black-pismasher.dts” into a file “snickerdoodle-black-mybaseboard.dts” and performed a few modifications to match the specific hardware in my base board.

      The device tree files chain ended having the following source files structure:

      snickerdoodle-black-mybaseboard.dts
      +->snickerdoodle-black.dtsi
      +->snickerdoodle.dtsi
      +->zynq-7000.dtsi

      The resulting device tree blob did not have any disconnects between the driver nodes and the PHY nodes and had the correct addressing of GPIO for the PHY resets. I was able to verify that by reverse-compiling the device tree blob with the command:

      dtc -I dtb -O dts -o reversed_devicetree.dts snickerdoodle-black-mybaseboard.dtb

      Thank you Mr. Bush and Mr. Cousin from Krtkl for all your help

      • Ryan Cousins
        Keymaster
        Post count: 343

        2Thanks for the update and resolution @ferniebola! This is very helpful commentary.

        Note: I have now merged the dts devel branch with the master branch to avoid confusion (we’ll clean out the devel branch shortly). I’ll work on updating the wiki to make this process easier going forward.

        -Cousins

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