diff mbox

[v2,08/15] ARM: shmobile: r8a7778, bockw: add internal ethernet controller to DT

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

Commit Message

Ulrich Hecht Feb. 9, 2015, 4:02 p.m. UTC
Internal 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 | 10 ++++++++++
 arch/arm/boot/dts/r8a7778.dtsi      | 11 +++++++++++
 2 files changed, 21 insertions(+)

Comments

Laurent Pinchart Feb. 11, 2015, 3:54 a.m. UTC | #1
Hi Ulrich,

Thank you for the patch.

On Monday 09 February 2015 17:02:36 Ulrich Hecht wrote:
> Internal Ethernet controller DT entry with pin control and clock
> information.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

I believe Simon would prefer this to be split in two patches.

> ---
>  arch/arm/boot/dts/r8a7778-bockw.dts | 10 ++++++++++
>  arch/arm/boot/dts/r8a7778.dtsi      | 11 +++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts
> b/arch/arm/boot/dts/r8a7778-bockw.dts index 280a922..f28ccbc 100644
> --- a/arch/arm/boot/dts/r8a7778-bockw.dts
> +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
> @@ -59,6 +59,11 @@
>  	};
>  };
> 
> +&ether {
> +	pinctrl-0 = <&ether_pins>;
> +	pinctrl-names = "default";

The internal ethernet controller isn't used on the BockW board, its pins are 
used for display. I thus wouldn't add it to r8a7778-bockw.dts.

> +};
> +
>  &i2c0 {
>  	status = "okay";
> 
> @@ -103,6 +108,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";
> diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
> index 2ddfaa3e..98ad685 100644
> --- a/arch/arm/boot/dts/r8a7778.dtsi
> +++ b/arch/arm/boot/dts/r8a7778.dtsi
> @@ -41,6 +41,17 @@
>  		spi2 = &hspi2;
>  	};
> 
> +	ether: ethernet@fde00000 {
> +		compatible = "renesas,ether-r8a7778";
> +		reg = <0xfde00000 0x400>;
> +		interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
> +		phy-mode = "rmii";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		status = "disabled";
> +	};
> +
>  	gic: interrupt-controller@fe438000 {
>  		compatible = "arm,cortex-a9-gic";
>  		#interrupt-cells = <3>;
Geert Uytterhoeven Feb. 11, 2015, 7:48 a.m. UTC | #2
Hi Laurent,

On Wed, Feb 11, 2015 at 4:54 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- a/arch/arm/boot/dts/r8a7778-bockw.dts
>> +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
>> @@ -59,6 +59,11 @@
>>       };
>>  };
>>
>> +&ether {
>> +     pinctrl-0 = <&ether_pins>;
>> +     pinctrl-names = "default";
>
> The internal ethernet controller isn't used on the BockW board, its pins are
> used for display. I thus wouldn't add it to r8a7778-bockw.dts.

Depending on SW62 (and parts of SW84/85)...

>> +};

There's no 'status = "okay";', so it is still disabled.

What about adding a comment about the switches?

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
Laurent Pinchart Feb. 12, 2015, 4 p.m. UTC | #3
Hi Geert,

On Wednesday 11 February 2015 08:48:23 Geert Uytterhoeven wrote:
> On Wed, Feb 11, 2015 at 4:54 AM, Laurent Pinchart wrote:
> >> --- a/arch/arm/boot/dts/r8a7778-bockw.dts
> >> +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
> >> @@ -59,6 +59,11 @@
> >>       };
> >>  };
> >> 
> >> +&ether {
> >> +     pinctrl-0 = <&ether_pins>;
> >> +     pinctrl-names = "default";
> > 
> > The internal ethernet controller isn't used on the BockW board, its pins
> > are used for display. I thus wouldn't add it to r8a7778-bockw.dts.
> 
> Depending on SW62 (and parts of SW84/85)...
> 
> >> +};
> 
> There's no 'status = "okay";', so it is still disabled.
> 
> What about adding a comment about the switches?

How about a device tree overlay instead ? That would avoid populating DT with 
needless nodes.
Geert Uytterhoeven Feb. 12, 2015, 5:09 p.m. UTC | #4
Hi Laurent,

On Thu, Feb 12, 2015 at 5:00 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wednesday 11 February 2015 08:48:23 Geert Uytterhoeven wrote:
>> On Wed, Feb 11, 2015 at 4:54 AM, Laurent Pinchart wrote:
>> >> --- a/arch/arm/boot/dts/r8a7778-bockw.dts
>> >> +++ b/arch/arm/boot/dts/r8a7778-bockw.dts
>> >> @@ -59,6 +59,11 @@
>> >>       };
>> >>  };
>> >>
>> >> +&ether {
>> >> +     pinctrl-0 = <&ether_pins>;
>> >> +     pinctrl-names = "default";
>> >
>> > The internal ethernet controller isn't used on the BockW board, its pins
>> > are used for display. I thus wouldn't add it to r8a7778-bockw.dts.
>>
>> Depending on SW62 (and parts of SW84/85)...
>>
>> >> +};
>>
>> There's no 'status = "okay";', so it is still disabled.
>>
>> What about adding a comment about the switches?
>
> How about a device tree overlay instead ? That would avoid populating DT with
> needless nodes.

Even better!

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..f28ccbc 100644
--- a/arch/arm/boot/dts/r8a7778-bockw.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw.dts
@@ -59,6 +59,11 @@ 
 	};
 };
 
+&ether {
+	pinctrl-0 = <&ether_pins>;
+	pinctrl-names = "default";
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -103,6 +108,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";
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index 2ddfaa3e..98ad685 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -41,6 +41,17 @@ 
 		spi2 = &hspi2;
 	};
 
+	ether: ethernet@fde00000 {
+		compatible = "renesas,ether-r8a7778";
+		reg = <0xfde00000 0x400>;
+		interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
+		phy-mode = "rmii";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	gic: interrupt-controller@fe438000 {
 		compatible = "arm,cortex-a9-gic";
 		#interrupt-cells = <3>;