From: Jacko Dirks <jdirks.linuxdev@gmail.com>
To: devicetree@vger.kernel.org
Subject: Fail to configure interrupt for new device
Date: Fri, 15 May 2020 16:05:46 +0200 [thread overview]
Message-ID: <20200515140546.GA31320@vasteMachine> (raw)
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
reply other threads:[~2020-05-15 14:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515140546.GA31320@vasteMachine \
--to=jdirks.linuxdev@gmail.com \
--cc=devicetree@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).