spi: bcm2835: driver for "auxiliar" spi1/spi2
Quick question: for the auxiliar spi1 and spi2 of the BCM2835 chipset should I create a separate driver - say spi-bcm2835aux.c - or incorporate it into the exising spi-bcm2835.c driver.
Note that the register set for the auxiliar spi devices is totally different so any code-overlap with the existing spi-bcm2835.c would be minimal.
Any preferences?
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Den 18.06.2015 11:45, skrev Martin Sperl:
Quoted 7 lines
Quick question: for the auxiliar spi1 and spi2 of the BCM2835 chipset should I create a separate driver - say
spi-bcm2835aux.c- or incorporate it into the exisingspi-bcm2835.cdriver.Note that the register set for the auxiliar spi devices is totally different so any code-overlap with the existing
spi-bcm2835.cwould be minimal.
There is also an aux mini uart that shares interrupt with spi1/2. The AUXIRQ register determines the interrupt source. How should this sharing be done? This uart is really only useful on the Compute Module since it's pins overlap the pl011 uart pins on the other boards. This is how the mini uart is used/setup downstream:
https://github.com/raspberrypi/linux/pull/1008
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Martin Sperl
Quick question: for the auxiliar spi1 and spi2 of the BCM2835 chipset should I create a separate driver - say
spi-bcm2835aux.c- or incorporate it into the exisingspi-bcm2835.cdriver.Note that the register set for the auxiliar spi devices is totally different so any code-overlap with the existing
spi-bcm2835.cwould be minimal.Any preferences?
If there's no code overlap it should be a separate driver, your proposed name sounds good.
Quoted 6 lines · Noralf Trønnes
There is also an aux mini uart that shares interrupt with spi1/2. The AUXIRQ register determines the interrupt source. How should this sharing be done? This uart is really only useful on the Compute Module since it's pins overlap the pl011 uart pins on the other boards. This is how the mini uart is used/setup downstream:
https://github.com/raspberrypi/linux/pull/1008
Linux supports shared interrupts perfectly fine, though it sounds like this is actually a cascaded interrupt (the demux is another interrupt controller) which we also support just fine.
Quoted 4 lines · Mark Brown
On Thu, Jun 18, 2015 at 12:19:04PM +0200, Noralf Trønnes wrote:
Linux supports shared interrupts perfectly fine, though it sounds like this is actually a cascaded interrupt (the demux is another interrupt controller) which we also support just fine.
So we need to move the route of using a cascaded demux interrupt handler for interrupt separation.
The other thing is: is there a "framework" to handle access to the the "enable" register shared by all three devices (spi1/spi2/uart1), or do we have to create a tiny module (aux-bcm2835 or similar) to serialize access to this register?
For the moment I will start focusing on the implementation itself while we can figure out the interrupt-controller configuration in DT in parallel...
We also should look into upstreaming the configuration of uart1 - even if only available on the compute board...
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Mark Brown
Quoted 6 lines · Noralf Trønnes
There is also an aux mini uart that shares interrupt with spi1/2. The AUXIRQ register determines the interrupt source. How should this sharing be done? This uart is really only useful on the Compute Module since it's pins overlap the pl011 uart pins on the other boards. This is how the mini uart is used/setup downstream:
https://github.com/raspberrypi/linux/pull/1008
Quoted 3 lines
Linux supports shared interrupts perfectly fine, though it sounds like this is actually a cascaded interrupt (the demux is another interrupt controller) which we also support just fine.
Mark, could you give us a hint how to best go about this shared IRQ? I failed to find any generic interrupt controller. I imagine there should be some fake irqchip we can instantiate from DT giving it a irq line and a memory address and it should provide us with 32(bit) demuxed irqs based on status of bits in specified memory location. Does this sound reasonable? Does such fake irqchip driver exist? --
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Jakub Kiciński
Quoted 3 lines · Mark Brown
Linux supports shared interrupts perfectly fine, though it sounds like this is actually a cascaded interrupt (the demux is another interrupt controller) which we also support just fine.
Mark, could you give us a hint how to best go about this shared IRQ? I failed to find any generic interrupt controller. I imagine there
drivers/irqchip...
Quoted 4 lines
should be some fake irqchip we can instantiate from DT giving it a irq line and a memory address and it should provide us with 32(bit) demuxed irqs based on status of bits in specified memory location. Does this sound reasonable? Does such fake irqchip driver exist?
IIRC there's some basic MMIO interrupt controller but I don't know off the top of my head where, if not it shouldn't be too hard to implement. It does sound sensible.