Message ID | 1387886210-3634-7-git-send-email-geert+renesas@linux-m68k.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Hello. On 24-12-2013 15:56, Geert Uytterhoeven wrote: > Add pinctrl and SPI devices for RSPI on Genmai. > On this board, only rspi4 is in use. It's 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 > --- > 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 114510f8bf09..6d99630627e4 100644 > --- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts > +++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts [...] > @@ -85,3 +91,13 @@ > pagesize = <64>; > }; > }; > + > +&spi4 { > + status = "okay"; > + > + codec: wm8978@0 { Do not give chip names to device nodes, please use somewhat generic names instead, like "sound-codec@0". That's to comply with ePAPR spec. > + compatible = "wlf,wm8978"; > + reg = <0>; > + spi-max-frequency = <5000000>; > + }; > +}; WBR, Sergei -- 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
Hi Sergei, On Tue, Dec 24, 2013 at 4:45 PM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: >> + codec: wm8978@0 { > > Do not give chip names to device nodes, please use somewhat generic names > instead, like "sound-codec@0". That's to comply with ePAPR spec. Oh, so the generic codec alias is not sufficient? Last time you gave this comment, the code didn't contain a generic name at all, so I thought this would be OK... Seems like Documentation/devicetree/bindings can use some cleanups, as it's full of examples like "codec: wm8510@1a"... Thanks for your comments! 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
Hi Geert, Thank you for the patch. On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote: > Add pinctrl and SPI devices for RSPI on Genmai. > > On this board, only rspi4 is in use. It's 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 > --- > 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 > 114510f8bf09..6d99630627e4 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>; You should add pinctrl-0 and pinctrl-names properties to the spi4 node instead. Device nodes should reference their pinctrl configuration directly, scif2 and ethernet are exceptions as DT bindings for those devices are not in mainline yet. > 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"; > + }; This node is at the right place and doesn't need to be moved. > }; > > &i2c2 { > @@ -85,3 +91,13 @@ > pagesize = <64>; > }; > }; > + > +&spi4 { > + status = "okay"; > + > + codec: wm8978@0 { > + compatible = "wlf,wm8978"; > + reg = <0>; > + spi-max-frequency = <5000000>; > + }; > +};
On Fri, Dec 27, 2013 at 5:20 PM, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote: >> Add pinctrl and SPI devices for RSPI on Genmai. >> >> On this board, only rspi4 is in use. It's 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 >> --- >> 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 >> 114510f8bf09..6d99630627e4 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>; > > You should add pinctrl-0 and pinctrl-names properties to the spi4 node > instead. Device nodes should reference their pinctrl configuration directly, > scif2 and ethernet are exceptions as DT bindings for those devices are not in > mainline yet. I put it there because the actual driver doesn't use DT yet. Is that OK? 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
Hi Geert, On Friday 27 December 2013 20:08:18 Geert Uytterhoeven wrote: > On Fri, Dec 27, 2013 at 5:20 PM, Laurent Pinchart wrote: > > On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote: > >> Add pinctrl and SPI devices for RSPI on Genmai. > >> > >> On this board, only rspi4 is in use. It's 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 > >> --- > >> > >> 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 > >> 114510f8bf09..6d99630627e4 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>; > > > > You should add pinctrl-0 and pinctrl-names properties to the spi4 node > > instead. Device nodes should reference their pinctrl configuration > > directly, scif2 and ethernet are exceptions as DT bindings for those > > devices are not in mainline yet. > > I put it there because the actual driver doesn't use DT yet. Is that OK? I had missed that. That's fine, but shouldn't you then delay patch 5/6 until the driver gets DT support ? You've already sent a DT bindings proposal (thanks for that !), wouldn't it make sense to implement support in the driver before this patch ? We're pretty close to that from what I can see.
diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts index 114510f8bf09..6d99630627e4 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: wm8978@0 { + compatible = "wlf,wm8978"; + reg = <0>; + spi-max-frequency = <5000000>; + }; +};
Add pinctrl and SPI devices for RSPI on Genmai. On this board, only rspi4 is in use. It's 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 --- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)