Post Go back to editing

ADP5589 for Zynq Petalinux

We are using the PMOD-IOXP from Digilent containing the ADP5589 chip, for interfacing a 4*4 Matrix Keypad with the Zynq running on Petalinux.

We have gone through the official link containing the driver details for interfacing with the Linux OS:
The link provides the details for interfacing as a platform driver. We want to load the driver as a device-tree driver that gets loaded during boot-up.
Can someone please suggest the necessary device tree changes and bindings/ overlay?
  • Hi Nagesn,

    you just need to register the I2C address in the device tree and rebuild the kernel.

    registration should be something like this. ( This is just a sample )

    IIC: i2c@e0004000 {
        compatible = "xlnx,xps-iic-2.00.a";
        interrupt-parent = <&xps_intc_0>;
        interrupts = < 6 2 >;
        #address-cells = <1>;
        #size-cells = <0>;
    
        BNO055@28 {
            compatible = "at,24c08";
            reg = <0x28>;
        };
    };

    you need to correctly register the I2C address.
    For our Driver, it is intended to be accessed using IOCTL.
    if you intend to access it using Sysfs you need to update it.

    to confirm you can install the I2C detect app of linux.
    here's the manual below:
    https://linux.die.net/man/8/i2cdetect


    I hope it helps.
  • Hi Nageshn,

    You just need to register the device I2C Address to the device tree then rebuild the kernel.

    here's a sample of registering the code to the device tree.

    Please take note of the "BNO055@28" and the "reg" where it is tie up to the address. compatible tag is for the driver.

    IIC: i2c@e0004000 {
        compatible = "xlnx,xps-iic-2.00.a";
        interrupt-parent = <&xps_intc_0>;
        interrupts = < 6 2 >;
        #address-cells = <1>;
        #size-cells = <0>;
    
        BNO055@28 {
            compatible = "at,24c08";
            reg = <0x28>;
        };
    };

    for the driver in the link you provide, it is intended to access the device using IOCTL, if you intend to access is via 

    sysfs you need to update the driver.

    to confirm the driver you can install the I2Cdetect app using apt-get and check if it is already detected by the kernel.

    I hope this helps.