Fail to configure interrupt for new device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am working on implementing a new device on the raspberry pi 4, an I2C
slave. The interrupt is not working, and I think I did something wrong
with the DTS. But I cannot quite figure out what it is.

Here is what I have so far:
In bcm2711-rpi-4-b.dts

	i2c_slave0_pins: i2cs0 {
		brcm,pins = <10 11>;
		brcm,function = <BCM2835_FSEL_ALT3>;
	};

In bcm2711.dtsi


		i2cs0: i2c_slave@7e214000 {
			compatible = "brcm,bcm2711-i2c-slave";
			reg = <0x7e214000 0x200>;
			interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&clocks BCM2835_CLOCK_VPU>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
		};

Interrupt number 107 here is a guess. The guess goes as follows: In the
bcm2711 ARM periphials file there is a table on page 108. This table
shows my interrupt (SPI/BSC slave) to be at place 43. This table also
shows all I2C master interrupts to be at place 53. A I2C master 
interrupt uses number 117. 117 - (53 - 43) = 107. So, that approach
might be an issue.

Moreover, I have never specifed that I want that interrupt to be
attached to pin 11. There was a large renovation somewhat recently, but
before that I could drop a line like

interrupts = <2 11>;

Somewhere.

To be complete: here is the overlay:

/dts-v1/;
/plugin/;

/{
	compatible = "brcm,bcm2711";

	fragment@0 {
		target = <&i2cs0>;
		frag0: __overlay__ {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&i2c_slave0_pins>;
		};
	};
};

Any feedback or input would be very welcome.

Jacko Dirks



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux