morsucci

Members
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    1

morsucci last won the day on March 1 2018

morsucci had the most liked content!

1 Follower

About morsucci

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @deppenkaiser The path structure and repository structure of the petalinux projects has changed recently. The .BSPs for our petalinux projects have not been updated though. For now, use the repo to build your projects rather than the BSP
  2. @Kampi try to change your device fragment to this: &gem0 { phy-handle = <&ethernet_phy>; /* phy-reset-gpio = <&axi_gpio_eth 0 0>; phy-reset-active-low; phy-reset-duration = <10>; */ ethernet_phy: ethernet-phy@1 { /* rtl8211e-vl */ reg = <1>; device_type = "ethernet-phy"; }; }; and let me know if this helps. This is linked from the Digilent Petalinux project for Zybo Z7-20, which is found here: https://github.com/Digilent/Petalinux-Zybo-Z7-20
  3. @amurices I may be totally wrong about this, but I think that if you are using Axi Quad Spi as your spi controller, the frequency will be locked at whatever you set it to in your Vivado design. That is, you wouldnt be able to change the frequency of the transfer from software or in Linux.
  4. @gautam I did find a device-tree fragment that someone else wrote for it this chip on BeagleBone Black.. There will obviously be some differences between that and Zynq, but it should be close enough to follow. The project im referencing can be found here https://github.com/bwilcutt/encx24j600 spi1: spi@481a0000 { compatible = "ti,omap4-mcspi"; #address-cells = <1>; #size-cells = <0>; reg = <0x481a0000 0x400>; ti,spi-num-cs = <2>; ti,hwmods = "spi1"; dmas = <&edma 42 &edma 43 &edma 44 &edma 45>; dma-names = "tx0", "rx0", "tx1", "rx1"; status = "okay"; interrupts = <125>; spi@1 { compatible = "microchip,encx24j600"; status = "okay"; spi-max-frequency = <1000000>; /* 1MHz */ reg = <0x0>; /* Mapping encx24j600 to IRQ is done in-code. */ }; }; Additionally, there is another overlay on that repo that handles the pin-control encx24j600_pins: encx24j600_pins { pinctrl-single,pins = < 0x190 0x33 /* spi.clk output */ 0x194 0x33 /* spi.d0 input */ 0x198 0x33 /* spi.d1 output */ 0x19c 0x33 /* spi.cs */ /* Pin must be in GPIO mux_mode7 to be an interrupt */ 0x07c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* Interrupt from ENC chip, gpio1[29], P8_26 */ >; }; Unfortunately, this will be all that I will be able to help you with, but definitely look at that project as it should be a good starting point
  5. @gautam you'll need to add some spi slave node inside of the Zynq Spi controller. Microchip sells another similar adapter and the documentation for it shows a slave node like this: enc28j60: ethernet@0 { compatible = "microchip,enc28j60"; pinctrl-names = "default"; pinctrl-0 = <&enc28j60_pins>; reg = <0>; interrupt-parent = <&gpio3>; interrupts = <3 IRQ_TYPE_EDGE_FALLING>; spi-max-frequency = <12000000>; }; I've looked at the driver for the encx24j600 and it does not look like the driver responds to anything in the compatible string of the spi slave node.
  6. @deppenkaiser check out this thread: also, check out this code from a Xilinx forum: https://forums.xilinx.com/t5/Embedded-Processor-System-Design/Handling-AXI-GPIO-interrupts-in-linux-using-UIO-drivers/td-p/529333
  7. @deppenkaiser Where are you looking for the interrupts to be registered? Are you checking /proc/interrupts? There you should be able to see a count of all the interrupts that have been fired since the system booted. Check this file and then fire some more interrupts, and then check it again and see if you have any change under the /uio devices.
  8. @amurices I have run into this problem before. I was able to solve it by updating the kernel that I was using. Are you working inside of Petalinux? Mitchell
  9. @deppenkaiser Can you send me the file "plnx_arm-system.dts"? You can find it in base_project/components/plnx_workspace/device-tree/device-tree-generation Also can you verify in your block design that you connected the interrupt of the GPIO block to the interrupt controller on Zynq? Mitchell
  10. @deppenkaiser are you modifying system-conf.dtsi? When you are adding entries into the device tree in petalinux, you should be modifying system-user.dtsi, not system-conf.dtsi. System-user.dtsi can be found in /base_project_folder/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi If you want, send me a copy of your system-user.dtsi as well as your "pl.dtsi" file which can be found in /base_project_folder/components/plnx_workspace/device-tree-generation/pl.dtsi Erase anything you added to system-conf.dtsi and then try adding this stuff to system-user.dtsi. Re-run build and send me the output
  11. @deppenkaiser Petalinux will not enable you to connect to a standard debian package repository using apt Petalinux just isnt set up for that. The reasons for this are outside the scope of this forum. Any packages that you wish to include in your image that are not listed in "petalinux-config -c rootfs" would need to be built from source and manually included in your custom linux image as an app or package. Digilent will not provide step-by-step instructions for this, but there are some resources on the internet that would show you how to do this. Regards, Mitchell
  12. @deppenkaiser It is true that you can use /dev/mem and uio drivers to accomplish the same functionality. However, It is almost always a better idea to use uio as a opposed to /dev/mem Here is why: using /dev/mem directly opens your system up to security risks. You could be potentially accessing memory that can be harmful to your system. Additionally, other people may be able to exploit this to access memory that they would otherwise not be able to access. UIO provides kernel interrupt functionality. That is: UIO drivers can register interrupts with the kernel and the kernel can recognize when an interrupt has occurred and carry out the assigned task. Currently, the only way you would do this using /dev/mem is through polling of an interrupt register. Polling usually is not always the best approach, especially when you are trying to catch interrupts from FPGA hardware. Regards, Mitchell
  13. @deppenkaiser Try moving the "chosen" field into the first bracket set. The rest of your entries should be outside of the bracket set. Here is an example: /include/ "system-conf.dtsi" / { chosen { bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio"; }; }; &GPIO_RGB_LED { compatible = "generic-uio"; }; &GPIO_SW { compatible = "generic-uio"; }; Try out this configuration and let me know if you run into errors during the build process
  14. @Enrico Thanks for the question. I have run into similar issues with the Zynq Spi driver in different kernel versions provided by Xilinx. I think that the best option here would be to use the kernel for Petalinux v2017.4 provided by Xilinx on their github. This is accomplished using the petalinux-config menu Let me know if you have any questions about this process. Also, keep me posted on whether this process fixes your bug. Regards, Mitchell
  15. @deppenkaiser In order for the GPIO devices to be registered with the Kernel as UIO devices, you must declare them as such in the device tree. gpio@41210000 { #gpio-cells = <0x2>; compatible = "generic-uio"; gpio-controller; reg = <0x41210000 0x10000>; xlnx,all-inputs = <0x0>; xlnx,all-inputs-2 = <0x0>; xlnx,all-outputs = <0x0>; xlnx,all-outputs-2 = <0x0>; xlnx,dout-default = <0x0>; xlnx,dout-default-2 = <0x0>; xlnx,gpio-width = <0xe>; xlnx,gpio2-width = <0x20>; xlnx,interrupt-present = <0x0>; xlnx,is-dual = <0x0>; xlnx,tri-default = <0xffffffff>; xlnx,tri-default-2 = <0xffffffff>; }; Here is an example of a GPIO device in the device tree with the compatible string of "generic-uio" To set one of your devices as a UIO device, you must use "system-user.dtsi" which will allow you to overwrite certain properties in the Xilinx-generated device tree for your hardware design. This file can be accessed in "you-base-project/project-spec/meta-user/recipes-bsp/device-tree/files". In "system-user.dtsi", add a part such as this: &GPIO_RGB_LED { compatible = "generic-uio"; }; &GPIO_SW { compatible = "generic-uio"; }; Additionally, add a portion like this: chosen { bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio"; }; This last portion will tell the kernel to load the uio drivers on boot. You can find examples for this in our repo for the Arty-Z7-20 which is here. After adding these parts to system-user.dtsi, re-build and re-boot your project and look at your /dev folder again. you should now see some uio entries. Let me know if you need any more help with this. Regards, morsucci