Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325630

Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree

From Lubomir Rintel <lkundrak@v3.sk>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree
Date 2016-02-03 17:40 +0100
Message-ID <qY8Dg-4ol-15@gated-at.bofh.it> (permalink)
References <qY7ea-3y7-19@gated-at.bofh.it> <qY7ea-3y7-27@gated-at.bofh.it> <qY8jU-4ft-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2016-02-03 at 09:11 -0700, Stephen Warren wrote:
> On 02/03/2016 08:02 AM, Lubomir Rintel wrote:
> > The hub and the ethernet in its port 1 are hardwired on the board.
> > 
> > Compared to the adapters that can be plugged into the USB ports,
> > this
> > one has no serial EEPROM to store its MAC. Nevertheless, the
> > Raspberry Pi
> > has the MAC address for this adapter in its ROM, accessible from
> > its
> > firmware.
> > 
> > U-Boot can read out the address and set the local-mac-address
> > property of the
> > node with "ethernet" alias. Let's add the node so that U-Boot can
> > do its
> > business.
> 
> Good to see we're getting a standard for this.
> 
> Have you talked to the RPi Foundation about updating their binary 
> bootloader to follow this protocol?

Not really. Adding Dom Cobley to the Cc list now.

They seem to be passing the MAC address on command line now and even
evaluating it before attempting a read out from the EEPROM. That sounds
like it would break if someone plugged another smsc95xx adapter into
one of the USB ports.

> I'll certainly ack changes to make 
> this work for U-Boot, provided the USB core patch this relies upon
> is 
> accepted.

Dom, if the changes mentioned in [1] get merged, you may want to add
the Ethernet device to your device trees too and drop the cmdline hack.

[1] http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003207.html

> 
> > diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> > b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> 
> > +&usb {
> > +	usb1@01 {
> > +		compatible = "usb1d6b,0002";
> > +		reg = <01>;
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		ethernet: usbether@01 {
> > +			compatible = "usb0424,9514";
> > +			reg = <01>;
> 
> Ib both unit addresses and both reg properties, I would expect "1"
> not 
> "01" since there's usually no leading 0 fill for those.

Okay, will fix.

> I'm curious why the VID values for the hub and Ethernet device don't 
> match since those are part of the same combo chip. Is there a typo 
> there, or did SMSC really do something odd in HW?

Hm, I think I just did a sysfs walk to see how things are connected.
The ethernet USB id is certainly wrong though.

The 1d6d:2 id is of the root hub. There I either messed up the commit
message or the topology. I can't recheck now, but I'll give it another
look before I send and updated version.

Thanks,
Lubo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Set the Raspberry Pi Ethernet MAC address Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 16:10 +0100
  [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 16:10 +0100
    Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device  tree Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 16:20 +0100
    Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree Stephen Warren <swarren@wwwdotorg.org> - 2016-02-03 17:20 +0100
      Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device  tree Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 17:40 +0100
    Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree Olivier Blin <dev@blino.org> - 2016-02-04 00:50 +0100
      Re: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device  tree Lubomir Rintel <lkundrak@v3.sk> - 2016-02-04 08:20 +0100
      RE: [PATCH 2/2] ARM: bcm2835: dt: Add the ethernet to the device tree Peter Chen <peter.chen@nxp.com> - 2016-02-04 09:10 +0100

csiph-web