diff mbox

[PATCH/RFC,07/10] arm64: dts: r8a7795: enable EthernetAVB on Salvator-X

Message ID 1440667450-3513-8-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State Changes Requested
Delegated to: Simon Horman
Headers show

Commit Message

Simon Horman Aug. 27, 2015, 9:24 a.m. UTC
From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
[horms: updated filename to salvator-x; updated changelog]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 ++++++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  1 +
 2 files changed, 35 insertions(+)

Comments

Sergei Shtylyov Aug. 27, 2015, 10:40 a.m. UTC | #1
Hello.

On 8/27/2015 12:24 PM, Simon Horman wrote:

> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>
> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
> [horms: updated filename to salvator-x; updated changelog]
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>   arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 ++++++++++++++++++++++
>   arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  1 +
>   2 files changed, 35 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> index 88cc34819e6a..e8d940cc831a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
[...]
> @@ -103,3 +108,32 @@
>   &ohci2 {
>   	status = "okay";
>   };
> +
> +&avb {
> +	pinctrl-0 = <&avb_pins>;
> +	pinctrl-names = "default";
> +	renesas,no-ether-link;
> +	renesas,phy = <0>;

    What's that for? :-)

> +	phy-reset-gpio = <&gpio2 10 0>;
> +	phy-handle = <&phy0>;
> +	status = "okay";
> +
> +	phy0: ethernet-phy@0 {
> +		rxc-skew-ps = <900>;
> +		rxdv-skew-ps = <0>;
> +		rxd0-skew-ps = <0>;
> +		rxd1-skew-ps = <0>;
> +		rxd2-skew-ps = <0>;
> +		rxd3-skew-ps = <0>;
> +		txc-skew-ps = <900>;
> +		txen-skew-ps = <0>;
> +		txd0-skew-ps = <0>;
> +		txd1-skew-ps = <0>;
> +		txd2-skew-ps = <0>;
> +		txd3-skew-ps = <0>;

    Hm, and the PHY driver can parse all this?

> +		reg = <0>;
> +		interrupt-parent = <&gpio2>;
> +		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> +	};
> +
> +};
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index 01502f4d2f5f..42c2eaa8167a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -372,4 +372,5 @@
>   			status = "disabled";
>   		};
>   	};
> +
>   };

    Stray newline?

MBR, 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
Geert Uytterhoeven Aug. 27, 2015, 11:14 a.m. UTC | #2
On Thu, Aug 27, 2015 at 12:40 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>> +       phy0: ethernet-phy@0 {
>> +               rxc-skew-ps = <900>;
>> +               rxdv-skew-ps = <0>;
>> +               rxd0-skew-ps = <0>;
>> +               rxd1-skew-ps = <0>;
>> +               rxd2-skew-ps = <0>;
>> +               rxd3-skew-ps = <0>;
>> +               txc-skew-ps = <900>;
>> +               txen-skew-ps = <0>;
>> +               txd0-skew-ps = <0>;
>> +               txd1-skew-ps = <0>;
>> +               txd2-skew-ps = <0>;
>> +               txd3-skew-ps = <0>;
>
>
>    Hm, and the PHY driver can parse all this?

Please see drivers/net/phy/micrel.c:ksz9021_config_init().

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
Sergei Shtylyov Aug. 27, 2015, 12:16 p.m. UTC | #3
On 8/27/2015 2:14 PM, Geert Uytterhoeven wrote:

>>> +       phy0: ethernet-phy@0 {
>>> +               rxc-skew-ps = <900>;
>>> +               rxdv-skew-ps = <0>;
>>> +               rxd0-skew-ps = <0>;
>>> +               rxd1-skew-ps = <0>;
>>> +               rxd2-skew-ps = <0>;
>>> +               rxd3-skew-ps = <0>;
>>> +               txc-skew-ps = <900>;
>>> +               txen-skew-ps = <0>;
>>> +               txd0-skew-ps = <0>;
>>> +               txd1-skew-ps = <0>;
>>> +               txd2-skew-ps = <0>;
>>> +               txd3-skew-ps = <0>;
>>
>>
>>     Hm, and the PHY driver can parse all this?

> Please see drivers/net/phy/micrel.c:ksz9021_config_init().

    OK, but don't we need to specify some kind of "compatible" prop?

> Gr{oetje,eeting}s,
>                          Geert

MBR, 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
Simon Horman Aug. 28, 2015, 5:30 a.m. UTC | #4
On Thu, Aug 27, 2015 at 03:16:43PM +0300, Sergei Shtylyov wrote:
> On 8/27/2015 2:14 PM, Geert Uytterhoeven wrote:
> 
> >>>+       phy0: ethernet-phy@0 {
> >>>+               rxc-skew-ps = <900>;
> >>>+               rxdv-skew-ps = <0>;
> >>>+               rxd0-skew-ps = <0>;
> >>>+               rxd1-skew-ps = <0>;
> >>>+               rxd2-skew-ps = <0>;
> >>>+               rxd3-skew-ps = <0>;
> >>>+               txc-skew-ps = <900>;
> >>>+               txen-skew-ps = <0>;
> >>>+               txd0-skew-ps = <0>;
> >>>+               txd1-skew-ps = <0>;
> >>>+               txd2-skew-ps = <0>;
> >>>+               txd3-skew-ps = <0>;
> >>
> >>
> >>    Hm, and the PHY driver can parse all this?
> 
> >Please see drivers/net/phy/micrel.c:ksz9021_config_init().
> 
>    OK, but don't we need to specify some kind of "compatible" prop?

Not according to my reading of
Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
--
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
Sergei Shtylyov Aug. 28, 2015, 4:50 p.m. UTC | #5
On 08/28/2015 08:30 AM, Simon Horman wrote:

>>>>> +       phy0: ethernet-phy@0 {
>>>>> +               rxc-skew-ps = <900>;
>>>>> +               rxdv-skew-ps = <0>;
>>>>> +               rxd0-skew-ps = <0>;
>>>>> +               rxd1-skew-ps = <0>;
>>>>> +               rxd2-skew-ps = <0>;
>>>>> +               rxd3-skew-ps = <0>;
>>>>> +               txc-skew-ps = <900>;
>>>>> +               txen-skew-ps = <0>;
>>>>> +               txd0-skew-ps = <0>;
>>>>> +               txd1-skew-ps = <0>;
>>>>> +               txd2-skew-ps = <0>;
>>>>> +               txd3-skew-ps = <0>;
>>>>
>>>>
>>>>     Hm, and the PHY driver can parse all this?
>>
>>> Please see drivers/net/phy/micrel.c:ksz9021_config_init().
>>
>>     OK, but don't we need to specify some kind of "compatible" prop?
>
> Not according to my reading of
> Documentation/devicetree/bindings/net/micrel-ksz90x1.txt

    Hm... I wonder why these props have generic names if the registers 
programmed with their values are clearly vendor-unique... These bindings don't 
look good to me... :-/

MBR, 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
Simon Horman Sept. 2, 2015, 2:01 a.m. UTC | #6
On Thu, Aug 27, 2015 at 01:40:01PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 8/27/2015 12:24 PM, Simon Horman wrote:
> 
> >From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
> >
> >Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
> >[horms: updated filename to salvator-x; updated changelog]
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> >  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 ++++++++++++++++++++++
> >  arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  1 +
> >  2 files changed, 35 insertions(+)
> >
> >diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> >index 88cc34819e6a..e8d940cc831a 100644
> >--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> >+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> [...]
> >@@ -103,3 +108,32 @@
> >  &ohci2 {
> >  	status = "okay";
> >  };
> >+
> >+&avb {
> >+	pinctrl-0 = <&avb_pins>;
> >+	pinctrl-names = "default";
> >+	renesas,no-ether-link;
> >+	renesas,phy = <0>;
> 
>    What's that for? :-)

Thanks for spotting that, I'll remove the renesas,phy property
as I can see anything that is using it.

[snip]
--
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/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 88cc34819e6a..e8d940cc831a 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -53,6 +53,11 @@ 
 		renesas,groups = "usb2";
 		renesas,function = "usb2";
 	};
+
+	avb_pins: avb {
+		renesas,groups = "avb_mdc";
+		renesas,function = "avb";
+	};
 };
 
 &scif2 {
@@ -103,3 +108,32 @@ 
 &ohci2 {
 	status = "okay";
 };
+
+&avb {
+	pinctrl-0 = <&avb_pins>;
+	pinctrl-names = "default";
+	renesas,no-ether-link;
+	renesas,phy = <0>;
+	phy-reset-gpio = <&gpio2 10 0>;
+	phy-handle = <&phy0>;
+	status = "okay";
+
+	phy0: ethernet-phy@0 {
+		rxc-skew-ps = <900>;
+		rxdv-skew-ps = <0>;
+		rxd0-skew-ps = <0>;
+		rxd1-skew-ps = <0>;
+		rxd2-skew-ps = <0>;
+		rxd3-skew-ps = <0>;
+		txc-skew-ps = <900>;
+		txen-skew-ps = <0>;
+		txd0-skew-ps = <0>;
+		txd1-skew-ps = <0>;
+		txd2-skew-ps = <0>;
+		txd3-skew-ps = <0>;
+		reg = <0>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+};
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 01502f4d2f5f..42c2eaa8167a 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -372,4 +372,5 @@ 
 			status = "disabled";
 		};
 	};
+
 };