ARC: axs10x - add Ethernet PHY description in .dts
Subsystems (6)
PATCH v2 1/1 ARC: axs10x - add Ethernet PHY description in .dts
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 PHYstmmac_open: Cannot attach to PHY (error: -19) --------------------------->8------------------------
Simplest solution is to add PHY description in board's .dts. And so we do here.
---
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(+)
arch/arc/boot/dts/axs10x_mb.dtsi +8 -0
@@ -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 at 1 { + reg = <1>; + }; + }; }; ehci at 0x40000 {
Signature · 1 line
2.5.0
Quoted 2 lines · Alexey Brodkin
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
Quoted 10 lines · Sergei Shtylyov
Quoted 2 lines · Alexey Brodkin
Quoted 2 lines
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763Note that
scripts/checkpatch.plnow 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
Hi Sergei,
Quoted 7 lines · Sergei Shtylyov
Quoted 3 lines · Alexey Brodkin
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.plnow 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
Quoted 12 lines · Alexey Brodkin
Hi Sergei,
Quoted 6 lines · Sergei Shtylyov
Quoted 2 lines · Alexey Brodkin
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763Note that
scripts/checkpatch.plnow 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.
Quoted 6 lines
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
Sergei, do you mind providing a Ack/Reviewed-by on the patch below
-------->
Quoted 1 line
From
67216d835d8c2a5748ba1631c8bfc19da4fb87faMon Sep 17 00:00:00 2001
From: Alexey Brodkin <[email protected]>
Date: Thu, 17 Mar 2016 12:41:52 +0300
Subject: [PATCH] ARC: axs10x - add Ethernet PHY description in .dts
Commit e34d65696d2e ("stmmac: create of compatible mdio bus for stmmac driver") broke DW GMAC functionality on ARC AXS10x boards:
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.
--- arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arc/boot/dts/axs10x_mb.dtsi +8 -0
@@ -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 at 1 { + reg = <1>; + }; + }; }; ehci at 0x40000 {
Signature · 1 line
2.5.0
Sergei Shtylyov
Reviewed-byHello.
Quoted 5 lines · Vineet Gupta
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763Note that
scripts/checkpatch.plnow enforces certain format for citing
commits: commit <12-digit SHA1> ("<commit summary>").
Quoted 8 lines
Quoted 8 lines
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!
Sorry for not reporting everything on the 1st review.
Quoted 4 lines
Quoted 1 line
-Alexey
Sergei, do you mind providing a Ack/Reviewed-by on the patch below
The patch here is white space damaged however: tabs were converted to
spaces. :-(
MBR, Sergei
Hi Sergei,
Quoted 27 lines · Sergei Shtylyov
Hello.
Quoted 11 lines · Vineet Gupta
Quoted 11 lines
Quoted 9 lines
Quoted 7 lines
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461e
d763?????Note that
scripts/checkpatch.plnow enforces certain format for citing
commits: commit <12-digit SHA1> ("<commit summary>").Quoted 8 lines
Quoted 8 lines
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!
????Sorry for not reporting everything on the 1st review.
Quoted 2 lines
Quoted 2 lines
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
-Alexey
Sergei, do you mind providing a Ack/Reviewed-by on the patch below
?>
Reviewed-by Sergei Shtylyov <sergei.shtylyov at cogentembedded.com>????The patch here is white space damaged however: tabs were converted to? spaces. :-(
Well, I'm not really sure why that substitution happened because my local patch is indeed with tabs.
That's an output of checkpatch:
------------------------>8------------------------./scripts/checkpatch.pl 0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch? [1]+??Done????????????????????gedit 0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:?
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit e34d65696d2e ("stmmac: create of compatible mdio bus for stmmac driver")'
#7:?
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
total: 1 errors, 1 warnings, 14 lines checked
0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch has style problems, please review. ------------------------>8------------------------
If there were spaces we would see tons of:
------------------------>8------------------------
ERROR: code indent should use tabs where possible #43: FILE: arch/arc/boot/dts/axs10x_mb.dtsi:50:
+????????????????????????mdio0 {$ ------------------------>8------------------------ which I didn't see.
-Alexey
Quoted 16 lines · Sergei Shtylyov
Hello.
Quoted 4 lines · Vineet Gupta
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763Note that
scripts/checkpatch.plnow enforces certain format for citing
commits: commit <12-digit SHA1> ("<commit summary>").Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
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!
Quoted 8 lines
Sorry for not reporting everything on the 1st review.
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
-Alexey
Sergei, do you mind providing a Ack/Reviewed-by on the patch below
Reviewed-by Sergei Shtylyov <sergei.shtylyov at cogentembedded.com>
Thx.
Quoted 4 lines
The patch here is white space damaged however: tabs were converted to
spaces. :-(MBR, Sergei
That was just because of copy-paste into mailer before switching to plain-text. Don't ask - corporate email !
I added it just to give u an idea of what fixup i did.
Tx,
-Vineet
Hi,
Quoted 38 lines · Alexey Brodkin
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763That's what happens on eth0 up:
--------------------------->8------------------------
libphy: PHY stmmac-0:ffffffff not found
eth0: Could not attach to PHYstmmac_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 at synopsys.com>Cc Rob Herring <robh at kernel.org>Cc Phil Reid <preid at electromag.com.au>Cc David S. Miller <davem at davemloft.net>Cc linux-kernel at vger.kernel.orgCc netdev at vger.kernel.orgCc stable at vger.kernel.org # 4.5.xCc Sergei Shtylyov <sergei.shtylyov at 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(+)arch/arc/boot/dts/axs10x_mb.dtsi +1
-0@@ -47,6 +47,14 @@ clocks = <&apbclk>; clock-names = "stmmaceth"; max-speed = <100>; + mdio0 {
arch/arc/boot/dts/axs10x_mb.dtsi line 60
Quoted 10 lines
arch/arc/boot/dts/axs10x_mb.dtsi +7
-0+ #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy1: ethernet-phy at 1 { + reg = <1>; + }; + }; }; ehci at 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 PHYstmmac_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
Quoted 62 lines · Vineet Gupta
Hi,
Quoted 38 lines · Alexey Brodkin
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763That's what happens on eth0 up:
--------------------------->8------------------------
libphy: PHY stmmac-0:ffffffff not found
eth0: Could not attach to PHYstmmac_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 at synopsys.com>Cc Rob Herring <robh at kernel.org>Cc Phil Reid <preid at electromag.com.au>Cc David S. Miller <davem at davemloft.net>Cc linux-kernel at vger.kernel.orgCc netdev at vger.kernel.orgCc stable at vger.kernel.org # 4.5.xCc Sergei Shtylyov <sergei.shtylyov at 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(+)arch/arc/boot/dts/axs10x_mb.dtsi +1
-0@@ -47,6 +47,14 @@ clocks = <&apbclk>; clock-names = "stmmaceth"; max-speed = <100>; + mdio0 {arch/arc/boot/dts/axs10x_mb.dtsi line 60
Quoted 10 lines
arch/arc/boot/dts/axs10x_mb.dtsi +7
-0+ #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + phy1: ethernet-phy at 1 { + reg = <1>; + }; + }; }; ehci at 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 PHYstmmac_open: Cannot attach to PHY (error: -19)
---------->8-------------
Quoted 5 lines
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
Quoted 5 lines
TIA,
-Vineet