Message ID | 1388175362-17132-7-git-send-email-geert@linux-m68k.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
On Fri, Dec 27, 2013 at 09:16:00PM +0100, Geert Uytterhoeven wrote: > From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > Cc: devicetree@vger.kernel.org You've not CCed any maintainers on any of this stuff so I'm assuming you don't want any review or the patches applying. You should in general always CC maintainers, things that only go to the list can easily be missed. However I did take a brief look... > +- num-cs : Number of chip selects Why is this variable and how does this map onto hardware?
On Mon, Dec 30, 2013 at 1:58 PM, Mark Brown <broonie@kernel.org> wrote: > On Fri, Dec 27, 2013 at 09:16:00PM +0100, Geert Uytterhoeven wrote: >> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> >> >> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> >> Cc: devicetree@vger.kernel.org > > You've not CCed any maintainers on any of this stuff so I'm assuming you > don't want any review or the patches applying. You should in general Sorry, this was indeed not meant to be applied yet, hence the [RFC]. Will CC you explicitly next time. > always CC maintainers, things that only go to the list can easily be > missed. However I did take a brief look... Thanks! >> +- num-cs : Number of chip selects > > Why is this variable and how does this map onto hardware? It's my understanding that legacy RSPi on SH7757 has 2 chip selects, while other RSPI implementations have 1 chip select. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Dec 30, 2013 at 02:43:53PM +0100, Geert Uytterhoeven wrote: > On Mon, Dec 30, 2013 at 1:58 PM, Mark Brown <broonie@kernel.org> wrote: > > On Fri, Dec 27, 2013 at 09:16:00PM +0100, Geert Uytterhoeven wrote: > >> +- num-cs : Number of chip selects > > Why is this variable and how does this map onto hardware? > It's my understanding that legacy RSPi on SH7757 has 2 chip selects, > while other RSPI implementations have 1 chip select. So this should be documented in the binding document in a way that allows someone reading the document and looking at the datasheet to figure out how to pick the value (for example, refer to how the chip selects are controlled in the hardware).
diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt new file mode 100644 index 000000000000..504db8917927 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt @@ -0,0 +1,31 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : For Renesas Serial Peripheral Interface: + "renesas,rspi-<soctype>", "renesas,rspi-rz" as fallback. + For Quad Serial Peripheral Interface: + "renesas,qspi-<soctype>", "renesas,qspi-rcar" as fallback. +- reg : address start and address range size of device +- interrupts : 3 interrupts for RSPI (SPEI, SPRI, SPTI), + 1 interrupt for QSPI +- interrupt-parent : the phandle for the interrupt controller that + services interrupts for this device. +- num-cs : Number of chip selects +- #address-cells : must be <1> +- #size-cells : must be <0> + +Pinctrl properties might be needed, too. See there. + +Example: + + spi0: spi@e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&gic>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + };