• 0

Where I can find a reference to create a custom device visible in the petalinux final system?



It's quite clear and "simple" understand how a new device driver is added in the sdk using the xilinx base libraries, but i i want to see  the device in the /dev in linux.

I don't know how link correctly this path, i suppose related to define the device tree and peraphs have a different driver code linux compatible. Where I can find documentation about that?

Now i'm trying to see in the /dev the PmodGPIO, all work fine at the bare SDK level, but i don't see the device in linux.




Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0


Unfortunately we don't have Linux examples for the Pmod IP cores.

In general, for devices that have good Linux support you should modify system-user.dtsi in your petalinux project to load the required drivers. Often times you will need to add the device as a child node of an existing I2C or SPI bus. To find out if the external device you are trying to use has drivers in the kernel, look for a document that corresponds to it here: https://github.com/Digilent/linux-digilent/tree/master/Documentation/devicetree/bindings . If you find one, then it will describe what your device tree will need to look like in order for the driver to get loaded.

For devices that don't seem to have good linux support, I would look around for petalinux examples that describe how to use /dev/mem or UIO to gain access to the register maps of devices in the PL. From there it will be a matter of porting any existing SDK examples to use the mmaped files to access the registers. 


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now