devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet
@ 2014-10-21  8:53 Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 6/9] ARM: berlin: Add BG2 ethernet DT nodes Sebastian Hesselbarth
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21  8:53 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: devicetree, Florian Fainelli, Eric Miao, netdev,
	Antoine Ténart, linux-kernel, Haojian Zhuang,
	David S. Miller, linux-arm-kernel

This patch series deals with a removing a IP feature that can be found
on all currently supported Marvell Ethernet IP (pxa168_eth, mv643xx_eth,
mvneta). The MAC IP allows to automatically perform PHY auto-negotiation
without software interaction.

However, this feature (a) fundamentally clashes with the way libphy works
and (b) is unable to deal with quirky PHYs that require special treatment.
In this series, pxa168_eth driver is rewritten to completely disable that
feature and properly deal with libphy provided PHYs.

This is the real patch set after an RFT sent earlier. Unfortunately, there
was no testing from MMP/gplug but there was for BG2Q. However, it still
would be great to get a Tested-by on gplug. Also, this patch set is now
rebased on v3.18-rc1. As usual, a branch on top of v3.18-rc1 can be found at

git://git.infradead.org/users/hesselba/linux-berlin.git devel/bg2-bg2cd-eth-v1

Patches 1-5 should go through David's net tree, I'll pick up the DT patches
6-9.

Compared to the RFT, there have been some changes:
- added phy-connection-type property to BG2Q PHY DT node
- bail out from pxa168_eth_adjust_link when there is no change in
  PHY parameters. Also, add a call to phy_print_status.

Patch 1 adds support for Marvell 88E3016 FastEthernet PHY that is also
integrated in Marvell Berlin BG2/BG2CD SoCs.

Patch 2 allows to pass phy_interface_t on pxa168_eth platform_data that
is only used by mach-mmp/gplug. From the board setup, I guessed gplug's
PHY is connected via RMII. The patch still isn't even compile tested.

Patches 3-5 prepare proper libphy handling and finally remove all in-driver
PHY mangling related to the feature explained above.

Patches 6-9 add corresponding ethernet DT nodes to BG2, BG2CD, add a
phy-connection-type property to BG2Q and enable ethernet on BG2-based Sony
NSZ-GS7. I have tested all this on GS7 successfully with ip=dhcp on 100M FD.

Antoine Ténart (1):
  ARM: berlin: Add phy-connection-type to BG2Q PHY

Sebastian Hesselbarth (8):
  phy: marvell: Add support for 88E3016 FastEthernet PHY
  net: pxa168_eth: Provide phy_interface mode on platform_data
  net: pxa168_eth: Prepare proper libphy handling
  net: pxa168_eth: Remove HW auto-negotiaion
  net: pxa168_eth: Remove in-driver PHY mangling
  ARM: berlin: Add BG2 ethernet DT nodes
  ARM: berlin: Add BG2CD ethernet DT nodes
  ARM: berlin: Enable ethernet on Sony NSZ-GS7

 arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts |   2 +
 arch/arm/boot/dts/berlin2.dtsi             |  36 +++++
 arch/arm/boot/dts/berlin2cd.dtsi           |  36 +++++
 arch/arm/boot/dts/berlin2q.dtsi            |   1 +
 arch/arm/mach-mmp/gplugd.c                 |   2 +
 drivers/net/ethernet/marvell/pxa168_eth.c  | 248 ++++++++++++-----------------
 drivers/net/phy/marvell.c                  |  46 ++++++
 include/linux/marvell_phy.h                |   1 +
 include/linux/pxa168_eth.h                 |   1 +
 9 files changed, 225 insertions(+), 148 deletions(-)

---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
-- 
2.1.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 6/9] ARM: berlin: Add BG2 ethernet DT nodes
  2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
@ 2014-10-21  8:53 ` Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 7/9] ARM: berlin: Add BG2CD " Sebastian Hesselbarth
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21  8:53 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: David S. Miller, Antoine Ténart, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

Marvell BG2 has two fast ethernet controllers with internal PHY,
add the corresponding nodes to SoC dtsi.

Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/berlin2.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/berlin2.dtsi b/arch/arm/boot/dts/berlin2.dtsi
index 9d7c810ebd0b..31d5922263d7 100644
--- a/arch/arm/boot/dts/berlin2.dtsi
+++ b/arch/arm/boot/dts/berlin2.dtsi
@@ -79,11 +79,47 @@
 			clocks = <&chip CLKID_TWD>;
 		};
 
+		eth1: ethernet@b90000 {
+			compatible = "marvell,pxa168-eth";
+			reg = <0xb90000 0x10000>;
+			clocks = <&chip CLKID_GETH1>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			/* set by bootloader */
+			local-mac-address = [00 00 00 00 00 00];
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy-handle = <&ethphy1>;
+			status = "disabled";
+
+			ethphy1: ethernet-phy@0 {
+				phy-connection-type = "mii";
+				reg = <0>;
+			};
+		};
+
 		cpu-ctrl@dd0000 {
 			compatible = "marvell,berlin-cpu-ctrl";
 			reg = <0xdd0000 0x10000>;
 		};
 
+		eth0: ethernet@e50000 {
+			compatible = "marvell,pxa168-eth";
+			reg = <0xe50000 0x10000>;
+			clocks = <&chip CLKID_GETH0>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			/* set by bootloader */
+			local-mac-address = [00 00 00 00 00 00];
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy-handle = <&ethphy0>;
+			status = "disabled";
+
+			ethphy0: ethernet-phy@0 {
+				phy-connection-type = "mii";
+				reg = <0>;
+			};
+		};
+
 		apb@e80000 {
 			compatible = "simple-bus";
 			#address-cells = <1>;
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/9] ARM: berlin: Add BG2CD ethernet DT nodes
  2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 6/9] ARM: berlin: Add BG2 ethernet DT nodes Sebastian Hesselbarth
@ 2014-10-21  8:53 ` Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY Sebastian Hesselbarth
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21  8:53 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: David S. Miller, Antoine Ténart, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

Marvell BG2CD has two fast ethernet controllers with internal PHY,
add the corresponding nodes to SoC dtsi.

Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/berlin2cd.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/berlin2cd.dtsi b/arch/arm/boot/dts/berlin2cd.dtsi
index cc1df65da504..8ce73a0a23a3 100644
--- a/arch/arm/boot/dts/berlin2cd.dtsi
+++ b/arch/arm/boot/dts/berlin2cd.dtsi
@@ -66,6 +66,42 @@
 			clocks = <&chip CLKID_TWD>;
 		};
 
+		eth1: ethernet@b90000 {
+			compatible = "marvell,pxa168-eth";
+			reg = <0xb90000 0x10000>;
+			clocks = <&chip CLKID_GETH1>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			/* set by bootloader */
+			local-mac-address = [00 00 00 00 00 00];
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy-handle = <&ethphy1>;
+			status = "disabled";
+
+			ethphy1: ethernet-phy@0 {
+				phy-connection-type = "mii";
+				reg = <0>;
+			};
+		};
+
+		eth0: ethernet@e50000 {
+			compatible = "marvell,pxa168-eth";
+			reg = <0xe50000 0x10000>;
+			clocks = <&chip CLKID_GETH0>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			/* set by bootloader */
+			local-mac-address = [00 00 00 00 00 00];
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy-handle = <&ethphy0>;
+			status = "disabled";
+
+			ethphy0: ethernet-phy@0 {
+				phy-connection-type = "mii";
+				reg = <0>;
+			};
+		};
+
 		apb@e80000 {
 			compatible = "simple-bus";
 			#address-cells = <1>;
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY
  2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 6/9] ARM: berlin: Add BG2 ethernet DT nodes Sebastian Hesselbarth
  2014-10-21  8:53 ` [PATCH 7/9] ARM: berlin: Add BG2CD " Sebastian Hesselbarth
@ 2014-10-21  8:53 ` Sebastian Hesselbarth
  2014-10-21 11:31   ` Sergei Shtylyov
  2014-10-21  8:53 ` [PATCH 9/9] ARM: berlin: Enable ethernet on Sony NSZ-GS7 Sebastian Hesselbarth
  2014-10-21 22:03 ` [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Florian Fainelli
  4 siblings, 1 reply; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21  8:53 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Antoine Ténart, David S. Miller, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

From: Antoine Ténart <antoine.tenart@free-electrons.com>

Internal FastEthernet PHY on BG2Q is connected via MII, add a
corresponding phy-connection-type property.

Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/berlin2q.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index 891d56b03922..6dbc520bddc1 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -127,6 +127,7 @@
 			status = "disabled";
 
 			ethphy0: ethernet-phy@0 {
+				phy-connection-type = "mii";
 				reg = <0>;
 			};
 		};
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 9/9] ARM: berlin: Enable ethernet on Sony NSZ-GS7
  2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
                   ` (2 preceding siblings ...)
  2014-10-21  8:53 ` [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY Sebastian Hesselbarth
@ 2014-10-21  8:53 ` Sebastian Hesselbarth
  2014-10-21 22:03 ` [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Florian Fainelli
  4 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21  8:53 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: devicetree, Florian Fainelli, Eric Miao, netdev,
	Antoine Ténart, linux-kernel, Haojian Zhuang,
	David S. Miller, linux-arm-kernel

Marvell Berlin BG2 based Sony NSZ-GS7 has one ethernet controller
connected to rear RJ45 jack. Enable it by default.

Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts b/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts
index c72bfd468d10..27f2f0ad7562 100644
--- a/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts
+++ b/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts
@@ -26,4 +26,6 @@
 	};
 };
 
+&eth1 { status = "okay"; };
+
 &uart0 { status = "okay"; };
-- 
2.1.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY
  2014-10-21  8:53 ` [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY Sebastian Hesselbarth
@ 2014-10-21 11:31   ` Sergei Shtylyov
  2014-10-21 11:46     ` Sebastian Hesselbarth
  0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2014-10-21 11:31 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Antoine Ténart, David S. Miller, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

Hello.

On 10/21/2014 12:53 PM, Sebastian Hesselbarth wrote:

> From: Antoine Ténart <antoine.tenart@free-electrons.com>

> Internal FastEthernet PHY on BG2Q is connected via MII, add a
> corresponding phy-connection-type property.

> Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: netdev@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   arch/arm/boot/dts/berlin2q.dtsi | 1 +
>   1 file changed, 1 insertion(+)

> diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
> index 891d56b03922..6dbc520bddc1 100644
> --- a/arch/arm/boot/dts/berlin2q.dtsi
> +++ b/arch/arm/boot/dts/berlin2q.dtsi
> @@ -127,6 +127,7 @@
>   			status = "disabled";
>
>   			ethphy0: ethernet-phy@0 {
> +				phy-connection-type = "mii";

    You're adding this prop to the PHY node? That's very weird... normally, 
it's a property of a MDIO bus node.

[...]

WBR, Sergei

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY
  2014-10-21 11:31   ` Sergei Shtylyov
@ 2014-10-21 11:46     ` Sebastian Hesselbarth
  2014-10-21 12:08       ` Sergei Shtylyov
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-10-21 11:46 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Antoine Ténart, David S. Miller, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

On 21.10.2014 13:31, Sergei Shtylyov wrote:
> Hello.
>
> On 10/21/2014 12:53 PM, Sebastian Hesselbarth wrote:
>
>> From: Antoine Ténart <antoine.tenart@free-electrons.com>
>
>> Internal FastEthernet PHY on BG2Q is connected via MII, add a
>> corresponding phy-connection-type property.
>
>> Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>> ---
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>> Cc: Eric Miao <eric.y.miao@gmail.com>
>> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: netdev@vger.kernel.org
>> Cc: devicetree@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>>   arch/arm/boot/dts/berlin2q.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>
>> diff --git a/arch/arm/boot/dts/berlin2q.dtsi
>> b/arch/arm/boot/dts/berlin2q.dtsi
>> index 891d56b03922..6dbc520bddc1 100644
>> --- a/arch/arm/boot/dts/berlin2q.dtsi
>> +++ b/arch/arm/boot/dts/berlin2q.dtsi
>> @@ -127,6 +127,7 @@
>>               status = "disabled";
>>
>>               ethphy0: ethernet-phy@0 {
>> +                phy-connection-type = "mii";
>
>     You're adding this prop to the PHY node? That's very weird...
> normally, it's a property of a MDIO bus node.

Sergei,

How can this be a property of the MDIO bus node? Just think of an MDIO
bus with two PHYs where one is connected via GMII and the other via
RGMII? How should this work?

But you are right that the property should not be part of the PHY node
but the controller node instead. I'll rework and send an update, thanks
for the hint.

Sebastian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY
  2014-10-21 11:46     ` Sebastian Hesselbarth
@ 2014-10-21 12:08       ` Sergei Shtylyov
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Shtylyov @ 2014-10-21 12:08 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Antoine Ténart, David S. Miller, Florian Fainelli, Eric Miao,
	Haojian Zhuang, linux-arm-kernel, netdev, devicetree,
	linux-kernel

On 10/21/2014 3:46 PM, Sebastian Hesselbarth wrote:

>>> From: Antoine Ténart <antoine.tenart@free-electrons.com>

>>> Internal FastEthernet PHY on BG2Q is connected via MII, add a
>>> corresponding phy-connection-type property.

>>> Tested-by: Antoine Ténart <antoine.tenart@free-electrons.com>
>>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>>> ---
>>> Cc: "David S. Miller" <davem@davemloft.net>
>>> Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
>>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>>> Cc: Eric Miao <eric.y.miao@gmail.com>
>>> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
>>> Cc: linux-arm-kernel@lists.infradead.org
>>> Cc: netdev@vger.kernel.org
>>> Cc: devicetree@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org
>>> ---
>>>   arch/arm/boot/dts/berlin2q.dtsi | 1 +
>>>   1 file changed, 1 insertion(+)

>>> diff --git a/arch/arm/boot/dts/berlin2q.dtsi
>>> b/arch/arm/boot/dts/berlin2q.dtsi
>>> index 891d56b03922..6dbc520bddc1 100644
>>> --- a/arch/arm/boot/dts/berlin2q.dtsi
>>> +++ b/arch/arm/boot/dts/berlin2q.dtsi
>>> @@ -127,6 +127,7 @@
>>>               status = "disabled";
>>>
>>>               ethphy0: ethernet-phy@0 {
>>> +                phy-connection-type = "mii";

>>     You're adding this prop to the PHY node? That's very weird...
>> normally, it's a property of a MDIO bus node.

> Sergei,

> How can this be a property of the MDIO bus node? Just think of an MDIO
> bus with two PHYs where one is connected via GMII and the other via
> RGMII? How should this work?

    Hm, this is an unexpected case...

> But you are right that the property should not be part of the PHY node
> but the controller node instead. I'll rework and send an update, thanks
> for the hint.

    Oh, not at all. :-)

> Sebastian

WBR, Sergei

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet
  2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
                   ` (3 preceding siblings ...)
  2014-10-21  8:53 ` [PATCH 9/9] ARM: berlin: Enable ethernet on Sony NSZ-GS7 Sebastian Hesselbarth
@ 2014-10-21 22:03 ` Florian Fainelli
  4 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2014-10-21 22:03 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: David S. Miller, Antoine Ténart, Eric Miao, Haojian Zhuang,
	linux-arm-kernel, netdev, devicetree, linux-kernel

Hi Sebastian,

On 10/21/2014 01:53 AM, Sebastian Hesselbarth wrote:
> This patch series deals with a removing a IP feature that can be found
> on all currently supported Marvell Ethernet IP (pxa168_eth, mv643xx_eth,
> mvneta). The MAC IP allows to automatically perform PHY auto-negotiation
> without software interaction.
> 
> However, this feature (a) fundamentally clashes with the way libphy works
> and (b) is unable to deal with quirky PHYs that require special treatment.
> In this series, pxa168_eth driver is rewritten to completely disable that
> feature and properly deal with libphy provided PHYs.
> 
> This is the real patch set after an RFT sent earlier. Unfortunately, there
> was no testing from MMP/gplug but there was for BG2Q. However, it still
> would be great to get a Tested-by on gplug. Also, this patch set is now
> rebased on v3.18-rc1. As usual, a branch on top of v3.18-rc1 can be found at
> 
> git://git.infradead.org/users/hesselba/linux-berlin.git devel/bg2-bg2cd-eth-v1
> 
> Patches 1-5 should go through David's net tree, I'll pick up the DT patches
> 6-9.
> 
> Compared to the RFT, there have been some changes:
> - added phy-connection-type property to BG2Q PHY DT node
> - bail out from pxa168_eth_adjust_link when there is no change in
>   PHY parameters. Also, add a call to phy_print_status.
> 
> Patch 1 adds support for Marvell 88E3016 FastEthernet PHY that is also
> integrated in Marvell Berlin BG2/BG2CD SoCs.
> 
> Patch 2 allows to pass phy_interface_t on pxa168_eth platform_data that
> is only used by mach-mmp/gplug. From the board setup, I guessed gplug's
> PHY is connected via RMII. The patch still isn't even compile tested.
> 
> Patches 3-5 prepare proper libphy handling and finally remove all in-driver
> PHY mangling related to the feature explained above.
> 
> Patches 6-9 add corresponding ethernet DT nodes to BG2, BG2CD, add a
> phy-connection-type property to BG2Q and enable ethernet on BG2-based Sony
> NSZ-GS7. I have tested all this on GS7 successfully with ip=dhcp on 100M FD.

Besides the misplacement of the 'phy-connection-type' as reported by
Sergei, this looks good to me:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks!

> 
> Antoine Ténart (1):
>   ARM: berlin: Add phy-connection-type to BG2Q PHY
> 
> Sebastian Hesselbarth (8):
>   phy: marvell: Add support for 88E3016 FastEthernet PHY
>   net: pxa168_eth: Provide phy_interface mode on platform_data
>   net: pxa168_eth: Prepare proper libphy handling
>   net: pxa168_eth: Remove HW auto-negotiaion
>   net: pxa168_eth: Remove in-driver PHY mangling
>   ARM: berlin: Add BG2 ethernet DT nodes
>   ARM: berlin: Add BG2CD ethernet DT nodes
>   ARM: berlin: Enable ethernet on Sony NSZ-GS7
> 
>  arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts |   2 +
>  arch/arm/boot/dts/berlin2.dtsi             |  36 +++++
>  arch/arm/boot/dts/berlin2cd.dtsi           |  36 +++++
>  arch/arm/boot/dts/berlin2q.dtsi            |   1 +
>  arch/arm/mach-mmp/gplugd.c                 |   2 +
>  drivers/net/ethernet/marvell/pxa168_eth.c  | 248 ++++++++++++-----------------
>  drivers/net/phy/marvell.c                  |  46 ++++++
>  include/linux/marvell_phy.h                |   1 +
>  include/linux/pxa168_eth.h                 |   1 +
>  9 files changed, 225 insertions(+), 148 deletions(-)
> 
> ---
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: netdev@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-21 22:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21  8:53 [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Sebastian Hesselbarth
2014-10-21  8:53 ` [PATCH 6/9] ARM: berlin: Add BG2 ethernet DT nodes Sebastian Hesselbarth
2014-10-21  8:53 ` [PATCH 7/9] ARM: berlin: Add BG2CD " Sebastian Hesselbarth
2014-10-21  8:53 ` [PATCH 8/9] ARM: berlin: Add phy-connection-type to BG2Q PHY Sebastian Hesselbarth
2014-10-21 11:31   ` Sergei Shtylyov
2014-10-21 11:46     ` Sebastian Hesselbarth
2014-10-21 12:08       ` Sergei Shtylyov
2014-10-21  8:53 ` [PATCH 9/9] ARM: berlin: Enable ethernet on Sony NSZ-GS7 Sebastian Hesselbarth
2014-10-21 22:03 ` [PATCH 0/9] Marvell PXA168 libphy handling and Berlin Ethernet Florian Fainelli

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).