* [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings
[not found] <1388175362-17132-1-git-send-email-geert@linux-m68k.org>
@ 2013-12-27 20:16 ` Geert Uytterhoeven
[not found] ` <1388175362-17132-7-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2013-12-27 20:16 ` [PATCH v2 7/8] [RFC] ARM: shmobile: r7s72100 dtsi: Add RSPI nodes Geert Uytterhoeven
2013-12-27 20:16 ` [PATCH v2 8/8] [RFC] ARM: shmobile: genmai reference: " Geert Uytterhoeven
2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2013-12-27 20:16 UTC (permalink / raw)
To: linux-sh; +Cc: linux-arm-kernel, linux-spi, Geert Uytterhoeven, devicetree
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Cc: devicetree@vger.kernel.org
---
v2:
- Clarify RSPI/QSPI
- Add interrupt-parent
- s/should/must/ for #address-cells and #size-cells
Documentation/devicetree/bindings/spi/spi-rspi.txt | 31 ++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-rspi.txt
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>;
+ };
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 7/8] [RFC] ARM: shmobile: r7s72100 dtsi: Add RSPI nodes
[not found] <1388175362-17132-1-git-send-email-geert@linux-m68k.org>
2013-12-27 20:16 ` [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings Geert Uytterhoeven
@ 2013-12-27 20:16 ` Geert Uytterhoeven
2013-12-27 20:16 ` [PATCH v2 8/8] [RFC] ARM: shmobile: genmai reference: " Geert Uytterhoeven
2 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2013-12-27 20:16 UTC (permalink / raw)
To: linux-sh; +Cc: linux-arm-kernel, linux-spi, Geert Uytterhoeven, devicetree
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Cc: devicetree@vger.kernel.org
---
v2: No changes
arch/arm/boot/dts/r7s72100.dtsi | 65 +++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index ff0bd6be454f..42e9b423476c 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -34,6 +34,11 @@
gpio10 = &port10;
gpio11 = &port11;
gpio12 = &jtagport0;
+ spi0 = &spi0;
+ spi1 = &spi1;
+ spi2 = &spi2;
+ spi3 = &spi3;
+ spi4 = &spi4;
};
cpus {
@@ -289,4 +294,64 @@
clock-frequency = <100000>;
status = "disabled";
};
+
+ 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>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi1: spi@e800d000 {
+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
+ reg = <0xe800d000 0x24>;
+ interrupts = <0 241 IRQ_TYPE_LEVEL_HIGH>,
+ <0 242 IRQ_TYPE_LEVEL_HIGH>,
+ <0 243 IRQ_TYPE_LEVEL_HIGH>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi2: spi@e800d800 {
+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
+ reg = <0xe800d800 0x24>;
+ interrupts = <0 244 IRQ_TYPE_LEVEL_HIGH>,
+ <0 245 IRQ_TYPE_LEVEL_HIGH>,
+ <0 246 IRQ_TYPE_LEVEL_HIGH>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi3: spi@e800e000 {
+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
+ reg = <0xe800e000 0x24>;
+ interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>,
+ <0 248 IRQ_TYPE_LEVEL_HIGH>,
+ <0 249 IRQ_TYPE_LEVEL_HIGH>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi4: spi@e800e800 {
+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
+ reg = <0xe800e800 0x24>;
+ interrupts = <0 250 IRQ_TYPE_LEVEL_HIGH>,
+ <0 251 IRQ_TYPE_LEVEL_HIGH>,
+ <0 252 IRQ_TYPE_LEVEL_HIGH>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 8/8] [RFC] ARM: shmobile: genmai reference: Add RSPI nodes
[not found] <1388175362-17132-1-git-send-email-geert@linux-m68k.org>
2013-12-27 20:16 ` [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings Geert Uytterhoeven
2013-12-27 20:16 ` [PATCH v2 7/8] [RFC] ARM: shmobile: r7s72100 dtsi: Add RSPI nodes Geert Uytterhoeven
@ 2013-12-27 20:16 ` Geert Uytterhoeven
2 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2013-12-27 20:16 UTC (permalink / raw)
To: linux-sh; +Cc: linux-arm-kernel, linux-spi, Geert Uytterhoeven, devicetree
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Add pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. Its bus contains a single device
(a wm8978 audio codec), for which no bindings are defined yet.
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Cc: devicetree@vger.kernel.org
---
v2: Use generic "codec" instead of specific "wm8978" node name.
arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
index 367af5c133e0..c2cc4bd5a470 100644
--- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
@@ -43,7 +43,7 @@
};
&pfc {
- pinctrl-0 = <&scif2_pins ðernet_pins>;
+ pinctrl-0 = <&scif2_pins ðernet_pins &rspi4_pins>;
pinctrl-names = "default";
scif2_pins: serial2 {
@@ -73,6 +73,12 @@
"ethernet_int_p1_15";
renesas,function = "ethernet";
};
+
+ rspi4_pins: spi4 {
+ renesas,groups = "rspi4_rspck_p4_0", "rspi4_ssl0_p4_1",
+ "rspi4_mosi_p4_2", "rspi4_miso_p4_3";
+ renesas,function = "rspi4";
+ };
};
&i2c2 {
@@ -85,3 +91,13 @@
pagesize = <64>;
};
};
+
+&spi4 {
+ status = "okay";
+
+ codec: codec@0 {
+ compatible = "wlf,wm8978";
+ reg = <0>;
+ spi-max-frequency = <5000000>;
+ };
+};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings
[not found] ` <1388175362-17132-7-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2013-12-30 12:58 ` Mark Brown
2013-12-30 13:43 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-12-30 12:58 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Fri, Dec 27, 2013 at 09:16:00PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings
2013-12-30 12:58 ` Mark Brown
@ 2013-12-30 13:43 ` Geert Uytterhoeven
2013-12-30 13:50 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2013-12-30 13:43 UTC (permalink / raw)
To: Mark Brown
Cc: Linux-sh list, linux-arm-kernel@lists.infradead.org, linux-spi,
Geert Uytterhoeven, devicetree@vger.kernel.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings
2013-12-30 13:43 ` Geert Uytterhoeven
@ 2013-12-30 13:50 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-12-30 13:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux-sh list, linux-arm-kernel@lists.infradead.org, linux-spi,
Geert Uytterhoeven, devicetree@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 698 bytes --]
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).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-30 13:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1388175362-17132-1-git-send-email-geert@linux-m68k.org>
2013-12-27 20:16 ` [PATCH v2 6/8] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings Geert Uytterhoeven
[not found] ` <1388175362-17132-7-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2013-12-30 12:58 ` Mark Brown
2013-12-30 13:43 ` Geert Uytterhoeven
2013-12-30 13:50 ` Mark Brown
2013-12-27 20:16 ` [PATCH v2 7/8] [RFC] ARM: shmobile: r7s72100 dtsi: Add RSPI nodes Geert Uytterhoeven
2013-12-27 20:16 ` [PATCH v2 8/8] [RFC] ARM: shmobile: genmai reference: " Geert Uytterhoeven
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).