diff mbox

[v2] ARC: axs10x - add Ethernet PHY description in .dts

Message ID 1458207712-29435-1-git-send-email-abrodkin@synopsys.com
State Accepted
Headers show

Commit Message

Alexey Brodkin March 17, 2016, 9:41 a.m. UTC
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

That's what happens on eth0 up:
--------------------------->8------------------------
libphy: PHY stmmac-0:ffffffff not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
--------------------------->8------------------------

Simplest solution is to add PHY description in board's .dts.
And so we do here.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Phil Reid <preid@electromag.com.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org # 4.5.x
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---

Changes v1 -> v2:
 * PHY node name changed to match real PHY number being used (Sergei)

 arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Sergei Shtylyov March 17, 2016, 10:58 a.m. UTC | #1
On 3/17/2016 12:41 PM, Alexey Brodkin wrote:

> Following commit broke DW GMAC functionality on AXS10x boards:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

    Note that scripts/checkpatch.pl now enforces certain format for citing 
commits: commit <12-digit SHA1> ("<commit summary>").

[...]

MBR, Sergei
Vineet Gupta March 17, 2016, 11:13 a.m. UTC | #2
On Thursday 17 March 2016 04:28 PM, Sergei Shtylyov wrote:
> On 3/17/2016 12:41 PM, Alexey Brodkin wrote:
>
>> > Following commit broke DW GMAC functionality on AXS10x boards:
>> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
>     Note that scripts/checkpatch.pl now enforces certain format for citing 
> commits: commit <12-digit SHA1> ("<commit summary>").
>
> [...]
>
> MBR, Sergei

Indeed - I've fixed this up and added to arc for-curr !

-Vineet
Alexey Brodkin March 17, 2016, 11:37 a.m. UTC | #3
Hi Sergei,

On Thu, 2016-03-17 at 13:58 +0300, Sergei Shtylyov wrote:
> On 3/17/2016 12:41 PM, Alexey Brodkin wrote:
> 
> > 
> > Following commit broke DW GMAC functionality on AXS10x boards:
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
>     Note that scripts/checkpatch.pl now enforces certain format for citing 
> commits: commit <12-digit SHA1> ("<commit summary>").

Frankly I haven't run that patch through checkpatch due to patch
simplicity.

But I'll try to not do any assumptions from now on and will try to
use checkpatch for each and every thing I send :)

Thanks for spotting all his!

-Alexey
Vineet Gupta April 6, 2016, 9:12 a.m. UTC | #4
Hi,

On Thursday 17 March 2016 03:11 PM, Alexey Brodkin wrote:
> Following commit broke DW GMAC functionality on AXS10x boards:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
> 
> That's what happens on eth0 up:
> --------------------------->8------------------------
> libphy: PHY stmmac-0:ffffffff not found
> eth0: Could not attach to PHY
> stmmac_open: Cannot attach to PHY (error: -19)
> --------------------------->8------------------------
> 
> Simplest solution is to add PHY description in board's .dts.
> And so we do here.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Phil Reid <preid@electromag.com.au>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: linux-kernel@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: stable@vger.kernel.org # 4.5.x
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> ---
> 
> Changes v1 -> v2:
>  * PHY node name changed to match real PHY number being used (Sergei)
> 
>  arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
> index 44a578c..ab5d570 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -47,6 +47,14 @@
>  			clocks = <&apbclk>;
>  			clock-names = "stmmaceth";
>  			max-speed = <100>;
> +			mdio0 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				compatible = "snps,dwmac-mdio";
> +				phy1: ethernet-phy@1 {
> +					reg = <1>;
> +				};
> +			};
>  		};
>  
>  		ehci@0x40000 {


So above DT fix for ARC went into 4.6-rc1 and ethernet was still broken on axs103
board.

---------->8-------------
libphy: PHY stmmac-0:ffffffff not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
---------->8-------------

On 4.6-rc2 if I revert the DT change, ethernet works again.

@Giuseppe, @Phil, @Gabriel, I see you have made changes in that area. I presume
that above revert is the right/sufficient thing or do we need to do something else
as well.

TIA,
-Vineet
Giuseppe CAVALLARO April 6, 2016, 2:56 p.m. UTC | #5
On 4/6/2016 11:12 AM, Vineet Gupta wrote:
> Hi,
>
> On Thursday 17 March 2016 03:11 PM, Alexey Brodkin wrote:
>> Following commit broke DW GMAC functionality on AXS10x boards:
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
>>
>> That's what happens on eth0 up:
>> --------------------------->8------------------------
>> libphy: PHY stmmac-0:ffffffff not found
>> eth0: Could not attach to PHY
>> stmmac_open: Cannot attach to PHY (error: -19)
>> --------------------------->8------------------------
>>
>> Simplest solution is to add PHY description in board's .dts.
>> And so we do here.
>>
>> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Phil Reid <preid@electromag.com.au>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: linux-kernel@vger.kernel.org
>> Cc: netdev@vger.kernel.org
>> Cc: stable@vger.kernel.org # 4.5.x
>> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> ---
>>
>> Changes v1 -> v2:
>>   * PHY node name changed to match real PHY number being used (Sergei)
>>
>>   arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
>> index 44a578c..ab5d570 100644
>> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
>> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
>> @@ -47,6 +47,14 @@
>>   			clocks = <&apbclk>;
>>   			clock-names = "stmmaceth";
>>   			max-speed = <100>;
>> +			mdio0 {
>> +				#address-cells = <1>;
>> +				#size-cells = <0>;
>> +				compatible = "snps,dwmac-mdio";
>> +				phy1: ethernet-phy@1 {
>> +					reg = <1>;
>> +				};
>> +			};
>>   		};
>>
>>   		ehci@0x40000 {
>
>
> So above DT fix for ARC went into 4.6-rc1 and ethernet was still broken on axs103
> board.
>
> ---------->8-------------
> libphy: PHY stmmac-0:ffffffff not found
> eth0: Could not attach to PHY
> stmmac_open: Cannot attach to PHY (error: -19)
> ---------->8-------------
>
> On 4.6-rc2 if I revert the DT change, ethernet works again.
>
> @Giuseppe, @Phil, @Gabriel, I see you have made changes in that area. I presume
> that above revert is the right/sufficient thing or do we need to do something else
> as well.

hmm I think so, we pushed all the changes in net-next to fix the MDIO
initialization according to the different DT parameter settings. So
unless there is some other case to cover, I think that the best
approach is to do the revert.

pls, let me know

peppe

>
> TIA,
> -Vineet
>
>
diff mbox

Patch

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 44a578c..ab5d570 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -47,6 +47,14 @@ 
 			clocks = <&apbclk>;
 			clock-names = "stmmaceth";
 			max-speed = <100>;
+			mdio0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "snps,dwmac-mdio";
+				phy1: ethernet-phy@1 {
+					reg = <1>;
+				};
+			};
 		};
 
 		ehci@0x40000 {