Required Information from the Device Tree

Linux Drivers

Release Date
2023-07-22

Use your preferred editor to open the device tree DTS file and locate the GPIO controller under the AXI interconnect; it should look something like this:

ps7_gpio_0: ps7-gpio@e000a000 {
    #gpio-cells = <2>;
    clocks = <&clkc 42>;
    compatible = "xlnx,zynq-gpio-1.0";
    emio-gpio-width = <64>;
    gpio-controller ;
    gpio-mask-high = <0x0>;
    gpio-mask-low = <0x5600>;
    interrupt-parent = <&ps7_scugic_0>;
    interrupts = <0 20 4>;
    reg = <0xe000a000 0x1000>;
};

Note the name of your GPIO controller, since you will need it to create the new nodes; in this example it is ps7_gpio_0.