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.

66AK2G12: interrupt property in K2G device tree

Part Number: 66AK2G12


Hello,

I am a beginner of TI processor and device tree. I am puzzled by the "interrupts" property of device tree of 66AK2G Processor.

For example, in /arch/arm/boot/dts/keystone-k2g.dtsi (https://elixir.bootlin.com/linux/v4.19.94/source/arch/arm/boot/dts/keystone-k2g.dtsi)

uart0, uart1 all have "interrupts" property. I am wondering what is GIC_SPI and what do 164, 165 mean?

		uart0: serial@2530c00 {
			compatible = "ti,da830-uart", "ns16550a";
			current-speed = <115200>;
			reg-shift = <2>;
			reg-io-width = <4>;
			reg = <0x02530c00 0x100>;
			interrupts = <GIC_SPI 164 IRQ_TYPE_EDGE_RISING>;
			clocks = <&k2g_clks 0x2c 0>;
			power-domains = <&k2g_pds 0x2c>;
			status = "disabled";
		};

		uart1: serial@2531000 {
			compatible = "ti,da830-uart", "ns16550a";
			current-speed = <115200>;
			reg-shift = <2>;
			reg-io-width = <4>;
			reg = <0x02531000 0x100>;
			interrupts = <GIC_SPI 165 IRQ_TYPE_EDGE_RISING>;
			clocks = <&k2g_clks 0x2d 0>;k2
			power-domains = <&k2g_pds 0x2d>;
			status = "disabled";
		};

Tom

  • Hi Tom,

    GIC_SPI represents the the GIC which handles the interrupt events.

    The numbers such as 164, 165 are the interrupt event ID input to the GIC.

  • Hi Bin,

    Thanks!

    If I have device like max3107, at SPI1 and its interrupt pin connects to K2G's GPIO1_67 pin, can I set "interrupts" property as below? I am wondering if I use 67 or the GIC number of GPIO1_67? should I set "interrupt-parent" as "gpio1"?

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

        /* UART expander, MAX3107 */
        max310x_0: max0@0 {
            compatible = "maxim,max3107";
            spi-max-frequency = <10000000>;
            reg = <0>;
            interrupt-parent = <&gpio1>;
            interrupts = <67 IRQ_TYPE_LEVEL_LOW>; //67 - the 67th pin of GPIO1
            clocks = <&clk_4M>;
            clock-names = "osc";
        };
    };

  •         interrupt-parent = <&gpio1>;
            interrupts = <67 IRQ_TYPE_LEVEL_LOW>; //67 - the 67th pin of GPIO1

    &gpio1 and 67 settings are correct. I am only not sure if the gpio LEVEL or EDGE interrupt should be used.

    Please also ensure the gpio1_67 pinmux is configured in device tree too.

  • Bin,

    Thanks!

    Tom