All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP
@ 2015-11-17 15:53 Thomas Petazzoni
  2015-11-17 15:57 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-11-17 15:53 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds some comments to the Armada 385 AP Device Tree
description to indicate which Ethernet interface matches which
physical connector on the board.

This is especially useful on this board, since the mapping between the
logical interface names and the physical ports is not very
straightforward. It also doesn't match the numbering of the interfaces
done by U-Boot:

 U-Boot interface | Linux interface | Physical port
 -----------------+-----------------+--------------
   egiga0         |     eth2        |   CON4
   egiga1         |     eth0        |   CON2
   egiga2         |     eth1        |   CON3
 -----------------+-----------------+--------------

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boot/dts/armada-385-db-ap.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 4047621..408b813 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -132,18 +132,21 @@
 				};
 			};
 
+			/* CON3 */
 			ethernet at 30000 {
 				status = "okay";
 				phy = <&phy2>;
 				phy-mode = "sgmii";
 			};
 
+			/* CON2 */
 			ethernet at 34000 {
 				status = "okay";
 				phy = <&phy1>;
 				phy-mode = "sgmii";
 			};
 
+			/* CON4 */
 			ethernet at 70000 {
 				pinctrl-names = "default";
 
-- 
2.6.3

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

* [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP
  2015-11-17 15:53 [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP Thomas Petazzoni
@ 2015-11-17 15:57 ` Arnd Bergmann
  2015-11-17 16:21   ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-11-17 15:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 17 November 2015 16:53:40 Thomas Petazzoni wrote:
> This commit adds some comments to the Armada 385 AP Device Tree
> description to indicate which Ethernet interface matches which
> physical connector on the board.
> 
> This is especially useful on this board, since the mapping between the
> logical interface names and the physical ports is not very
> straightforward. It also doesn't match the numbering of the interfaces
> done by U-Boot:
> 
>  U-Boot interface | Linux interface | Physical port
>  -----------------+-----------------+--------------
>    egiga0         |     eth2        |   CON4
>    egiga1         |     eth0        |   CON2
>    egiga2         |     eth1        |   CON3
>  -----------------+-----------------+--------------
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> 

Would it be possible to use entries in /aliases to fix the order of the
interfaces and make them match the physical ports?

	Arnd

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

* [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP
  2015-11-17 15:57 ` Arnd Bergmann
@ 2015-11-17 16:21   ` Russell King - ARM Linux
  2015-11-17 16:37     ` Marcin Wojtas
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2015-11-17 16:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 17, 2015 at 04:57:20PM +0100, Arnd Bergmann wrote:
> On Tuesday 17 November 2015 16:53:40 Thomas Petazzoni wrote:
> > This commit adds some comments to the Armada 385 AP Device Tree
> > description to indicate which Ethernet interface matches which
> > physical connector on the board.
> > 
> > This is especially useful on this board, since the mapping between the
> > logical interface names and the physical ports is not very
> > straightforward. It also doesn't match the numbering of the interfaces
> > done by U-Boot:
> > 
> >  U-Boot interface | Linux interface | Physical port
> >  -----------------+-----------------+--------------
> >    egiga0         |     eth2        |   CON4
> >    egiga1         |     eth0        |   CON2
> >    egiga2         |     eth1        |   CON3
> >  -----------------+-----------------+--------------
> > 
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> > 
> 
> Would it be possible to use entries in /aliases to fix the order of the
> interfaces and make them match the physical ports?

Unfortunately not, and I believe davem is averse to "fixing" this problem
in the kernel.  It's really problematical, especially if you are running
a debian based distro and want to be able to say "I want egiga0 configured
like _this_".  You're entirely at the mercy of the ordering that the DT
compiler decides to place the nodes, and the ordering which the kernel
decides to probe the interfaces, etc.

Yes, there's always the ethernet MAC which can be used to identify them,
but debian at least doesn't have a way to identify interfaces in its
/etc/network/interfaces file by ethernet MAC.

So, use the modern network-manager daemon... umm no, not if you want to
use bridging or any of the other such facilities.

This whole area is really very annoying.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

* [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP
  2015-11-17 16:21   ` Russell King - ARM Linux
@ 2015-11-17 16:37     ` Marcin Wojtas
  2015-11-23 18:17       ` Gregory CLEMENT
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Wojtas @ 2015-11-17 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

How about swapping the ethernet@ entries in the board DT files to gain
following order:
ethernet at 70000
...
ethernet at 30000
...
ethernet at 34000

I know this would introduce deviation from epapr rules, but it always
worked for me.

Best regards,
Marcin

2015-11-17 17:21 GMT+01:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Tue, Nov 17, 2015 at 04:57:20PM +0100, Arnd Bergmann wrote:
>> On Tuesday 17 November 2015 16:53:40 Thomas Petazzoni wrote:
>> > This commit adds some comments to the Armada 385 AP Device Tree
>> > description to indicate which Ethernet interface matches which
>> > physical connector on the board.
>> >
>> > This is especially useful on this board, since the mapping between the
>> > logical interface names and the physical ports is not very
>> > straightforward. It also doesn't match the numbering of the interfaces
>> > done by U-Boot:
>> >
>> >  U-Boot interface | Linux interface | Physical port
>> >  -----------------+-----------------+--------------
>> >    egiga0         |     eth2        |   CON4
>> >    egiga1         |     eth0        |   CON2
>> >    egiga2         |     eth1        |   CON3
>> >  -----------------+-----------------+--------------
>> >
>> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
>> >
>>
>> Would it be possible to use entries in /aliases to fix the order of the
>> interfaces and make them match the physical ports?
>
> Unfortunately not, and I believe davem is averse to "fixing" this problem
> in the kernel.  It's really problematical, especially if you are running
> a debian based distro and want to be able to say "I want egiga0 configured
> like _this_".  You're entirely at the mercy of the ordering that the DT
> compiler decides to place the nodes, and the ordering which the kernel
> decides to probe the interfaces, etc.
>
> Yes, there's always the ethernet MAC which can be used to identify them,
> but debian at least doesn't have a way to identify interfaces in its
> /etc/network/interfaces file by ethernet MAC.
>
> So, use the modern network-manager daemon... umm no, not if you want to
> use bridging or any of the other such facilities.
>
> This whole area is really very annoying.
>
> --
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP
  2015-11-17 16:37     ` Marcin Wojtas
@ 2015-11-23 18:17       ` Gregory CLEMENT
  0 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2015-11-23 18:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marcin,
 
 On mar., nov. 17 2015, Marcin Wojtas <mw@semihalf.com> wrote:

> Hi,
>
> How about swapping the ethernet@ entries in the board DT files to gain
> following order:
> ethernet at 70000
> ...
> ethernet at 30000
> ...
> ethernet at 34000
>
> I know this would introduce deviation from epapr rules, but it always
> worked for me.

Given there is no other solution, for my side I would agree on such
change with the accurate comments inside the dts at the place we should
fine the node.

Gregory

>
> Best regards,
> Marcin
>
> 2015-11-17 17:21 GMT+01:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
>> On Tue, Nov 17, 2015 at 04:57:20PM +0100, Arnd Bergmann wrote:
>>> On Tuesday 17 November 2015 16:53:40 Thomas Petazzoni wrote:
>>> > This commit adds some comments to the Armada 385 AP Device Tree
>>> > description to indicate which Ethernet interface matches which
>>> > physical connector on the board.
>>> >
>>> > This is especially useful on this board, since the mapping between the
>>> > logical interface names and the physical ports is not very
>>> > straightforward. It also doesn't match the numbering of the interfaces
>>> > done by U-Boot:
>>> >
>>> >  U-Boot interface | Linux interface | Physical port
>>> >  -----------------+-----------------+--------------
>>> >    egiga0         |     eth2        |   CON4
>>> >    egiga1         |     eth0        |   CON2
>>> >    egiga2         |     eth1        |   CON3
>>> >  -----------------+-----------------+--------------
>>> >
>>> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
>>> >
>>>
>>> Would it be possible to use entries in /aliases to fix the order of the
>>> interfaces and make them match the physical ports?
>>
>> Unfortunately not, and I believe davem is averse to "fixing" this problem
>> in the kernel.  It's really problematical, especially if you are running
>> a debian based distro and want to be able to say "I want egiga0 configured
>> like _this_".  You're entirely at the mercy of the ordering that the DT
>> compiler decides to place the nodes, and the ordering which the kernel
>> decides to probe the interfaces, etc.
>>
>> Yes, there's always the ethernet MAC which can be used to identify them,
>> but debian at least doesn't have a way to identify interfaces in its
>> /etc/network/interfaces file by ethernet MAC.
>>
>> So, use the modern network-manager daemon... umm no, not if you want to
>> use bridging or any of the other such facilities.
>>
>> This whole area is really very annoying.
>>
>> --
>> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
>> according to speedtest.net.
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2015-11-23 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 15:53 [PATCH] ARM: mvebu: add reference to ETH connectors for A385-AP Thomas Petazzoni
2015-11-17 15:57 ` Arnd Bergmann
2015-11-17 16:21   ` Russell King - ARM Linux
2015-11-17 16:37     ` Marcin Wojtas
2015-11-23 18:17       ` Gregory CLEMENT

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.