From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: ethernet "bus" number in DTS ? Date: Tue, 23 Oct 2018 19:08:54 +0200 Message-ID: <20181023170854.GW26497@lunn.ch> References: <88328977dfeaf667a98d791074b721fe730d285b.camel@infinera.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linuxppc-dev@lists.ozlabs.org" , "netdev@vger.kernel.org" To: Joakim Tjernlund Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:41335 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbeJXBdQ (ORCPT ); Tue, 23 Oct 2018 21:33:16 -0400 Content-Disposition: inline In-Reply-To: <88328977dfeaf667a98d791074b721fe730d285b.camel@infinera.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Oct 23, 2018 at 04:49:59PM +0000, Joakim Tjernlund wrote: > SPI (and others) has a way to define bus number in a aliases: > aliases { > ethernet4 = &enet4; > ethernet0 = &enet0; > ethernet1 = &enet1; > ethernet2 = &enet2; > ethernet3 = &enet3; > spi0 = &spi0 > }; > The 0 in the spi0 alias will translate to bus num 0 so one can control the /dev nodes, like /dev/spidev0 > I am looking for the same for ethernet devices: > ethernet4 = &enet4; /* should become eth4 */ > ethernet0 = &enet0; /* should become eth0 */ > but I cannot find something like that for eth devices. > > Could such functionality be added? Hi Jocke This has been discussed before. Take a look at arch/arm/boot/dts/armada-38x.dtsi /* * As a special exception to the "order by * register address" rule, the eth0 node is * placed here to ensure that it gets * registered as the first interface, since * the network subsystem doesn't allow naming * interfaces using DT aliases. Without this, * the ordering of interfaces is different * from the one used in U-Boot and the * labeling of interfaces on the boards, which * is very confusing for users. */ You should be able to find the discuss about this, and why aliases cannot be used. Andrew