diff mbox

[07/11] ARM: shmobile: bockw: add pins and clock to ethernet controller in DT

Message ID 1421857262-16607-8-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Ulrich Hecht Jan. 21, 2015, 4:20 p.m. UTC
Completes the Ethernet controller DT entry with pin control and clock
information.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm/boot/dts/r8a7778-bockw.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Sergei Shtylyov Jan. 21, 2015, 4:51 p.m. UTC | #1
Hello.

On 01/21/2015 07:20 PM, Ulrich Hecht wrote:

> Completes the Ethernet controller DT entry with pin control and clock
> information.

> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>   arch/arm/boot/dts/r8a7778-bockw.dts | 9 +++++++++
>   1 file changed, 9 insertions(+)

> diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts
> index 280a922..52086fe 100644
> --- a/arch/arm/boot/dts/r8a7778-bockw.dts
> +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
> @@ -47,8 +47,12 @@
>   	};
>
>   	ethernet@18300000 {
> +		pinctrl-0 = <&ether_pins>;
> +		pinctrl-names = "default";
> +

    What Ether pins? This is an external LAN controller!

>   		compatible = "smsc,lan9220", "smsc,lan9115";

    See this "compatible"?

>   		reg = <0x18300000 0x1000>;
> +		clocks = <&mstp1_clks R8A7778_CLK_ETHER>;

    What, again?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 21, 2015, 11:57 p.m. UTC | #2
Hi Ulrich,

On Wednesday 21 January 2015 19:51:16 Sergei Shtylyov wrote:
> On 01/21/2015 07:20 PM, Ulrich Hecht wrote:
> > Completes the Ethernet controller DT entry with pin control and clock
> > information.
> > 
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > ---
> > 
> >   arch/arm/boot/dts/r8a7778-bockw.dts | 9 +++++++++
> >   1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts
> > b/arch/arm/boot/dts/r8a7778-bockw.dts index 280a922..52086fe 100644
> > --- a/arch/arm/boot/dts/r8a7778-bockw.dts
> > +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
> > @@ -47,8 +47,12 @@
> >   	};
> >   	
> >   	ethernet@18300000 {
> > +		pinctrl-0 = <&ether_pins>;
> > +		pinctrl-names = "default";
> > +
> 
> What Ether pins? This is an external LAN controller!

The external LAN9220 is connected to the LBSC bus controller. You should thus 
add a DT node for the bus controller, and move the ethernet controller node as 
a child of that node. See Geert's "[PATCH 5/9] ARM: shmobile: r8a73a4 dtsi: 
Add Bus State Controller node" and "[PATCH 6/9] ARM: shmobile: ape6evm dts: 
Move Ethernet node to BSC".

> >   		compatible = "smsc,lan9220", "smsc,lan9115";
> 
> See this "compatible"?
> 
> >   		reg = <0x18300000 0x1000>;
> > 
> > +		clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
> 
> What, again?

At least it's consistent ;-)
Geert Uytterhoeven Jan. 22, 2015, 12:05 p.m. UTC | #3
On Thu, Jan 22, 2015 at 12:57 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> > --- a/arch/arm/boot/dts/r8a7778-bockw.dts
>> > +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
>> > @@ -47,8 +47,12 @@
>> >     };
>> >
>> >     ethernet@18300000 {
>> > +           pinctrl-0 = <&ether_pins>;
>> > +           pinctrl-names = "default";
>> > +
>>
>> What Ether pins? This is an external LAN controller!
>
> The external LAN9220 is connected to the LBSC bus controller. You should thus
> add a DT node for the bus controller, and move the ethernet controller node as
> a child of that node. See Geert's "[PATCH 5/9] ARM: shmobile: r8a73a4 dtsi:
> Add Bus State Controller node" and "[PATCH 6/9] ARM: shmobile: ape6evm dts:
> Move Ethernet node to BSC".

According to the datasheet, the LBSC clock is the CLKOUT clock, which cannot
be turned off. So a "simple-bus" compatible property should be sufficient.

>> >             compatible = "smsc,lan9220", "smsc,lan9115";

The Bock-W schematic diagrams say it's an "smsc,lan89218", so please
add that entry, too.

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-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts
index 280a922..52086fe 100644
--- a/arch/arm/boot/dts/r8a7778-bockw.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw.dts
@@ -47,8 +47,12 @@ 
 	};
 
 	ethernet@18300000 {
+		pinctrl-0 = <&ether_pins>;
+		pinctrl-names = "default";
+
 		compatible = "smsc,lan9220", "smsc,lan9115";
 		reg = <0x18300000 0x1000>;
+		clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
 
 		phy-mode = "mii";
 		interrupt-parent = <&irqpin>;
@@ -103,6 +107,11 @@ 
 };
 
 &pfc {
+	ether_pins: ether {
+		renesas,groups = "ether_rmii";
+		renesas,function = "ether";
+	};
+
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
 		renesas,function = "scif0";