This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x question about GPIO interrupt configuration

I developed one ethernet cape that uses the SPI. The configuration node bellow is working if I make some changes in the drive to handle GPIO interrupts and included code to map gpio pin 47 to an internal interrupt number,  I am getting 191.

If I understand correctly I shouldn't have to apply any patch, the interrupt should be described in the device tree so that the SPI drive could
understand what interrupt has to be assigned. When I don't apply the patch, the SPI assign the IRQ 63 (47 to 63 ???) that  doesn't work.

I would like to know how should be GPIO interrupt configuration in the device tree to use the drive as is without any patch.


&spi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_pins>;
        status = "okay";

        spidev2: spi@0 {
                compatible = "microchip,enc28j60";
                reg = <0>;
                spi-max-frequency = <24000000>;
                interrupts = <47>;
        };
};

  • I found out that the configuration for gpio1_15 as the interrupt line for SPI1 has to be:

    &spi1 {
            pinctrl-names = "default";
            pinctrl-0 = <&spi1_pins>;
            status = "okay";

            spidev2: spi@0 {
                    compatible = "microchip,enc28j60";
                    reg = <0>;
                    spi-max-frequency = <24000000>;
                    interrupts = <15 2>;
                    interrupt-parent = <&gpio1>;
            };
    };

    Using this configuration the enc28j60 1.0.1 works as is without do any change and that was my target.

  • Thanks for updating your post.

  • May I know which document you are referring to?
    interrupts = <15 2>;
    interrupt-parent = <&gpio1>;