Re: [PATCH 1/2] spi: bcm2835: add spi-bcm2835aux driver for the auxiliar spi1 and spi2

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

 




Den 01.07.2015 21:39, skrev Martin Sperl:
On 30.06.2015, at 19:42, Mark Brown <broonie@xxxxxxxxxx> wrote:

This looks relevant:

On 22.06.2015, at 16:55, Jakub Kiciński <moorray3@xxxxx> wrote:
As mentioned by Noralf UART1 is quite commonly used on Compute Modules.
Proper driver - perhaps modelled as a bus - seems like a prerequisite
for this work.  You are also not using IRQ mux in DT binding example
which is very misleading.

[...]

Finally asking for a recommendation with regards to using a bus
to arbitrate access to the enable register there was no feedback
how this could be get implemented...

Maybe you can use drivers/mfd/syscon.c to enable shared access to the
aux enable register. Then the spi driver could get the regmap with:
aux_regmap = syscon_regmap_lookup_by_phandle(np, "syscon");

aux_syscon: aux_syscon@7e215000 {
  compatible = "syscon";
  reg = <0x7e215000 0x08>;
};

spi2@7e2150c0 {
  compatible = "brcm,bcm2835-aux-spi";
  reg = <0x7e2150c0 0x40>;
  syscon = <&aux_syscon>;
};

So if someone later will add a Pi extension to the 8250 serial driver or
enable the mini uart by some other means, they can use the syscon regmap.


About sharing the aux interrupt, could this be implemented in irq-bcm2835
as a Bank 3?

spi1@7e215080 {
 compatible = "brcm,bcm2835-aux-spi";
 reg = <0x7e215080 0x40>, <0x7e215000 0x08>;
 interrupts = <3 1>;
};

spi2@7e2150c0 {
 compatible = "brcm,bcm2835-aux-spi";
 reg = <0x7e2150c0 0x40>, <0x7e215000 0x08>;
 interrupts = <3 2>;
};

These are just a suggestions, I don't know if it is "the correct" way to do it.

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux