Message ID | 1480528685-26259-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > connected to port 2 of the OMAP EHCI controller. The board however has > no EEPROM to store the ethernet MAC address, which is programmed by the > boot loader. > > To allow Linux to use the same MAC address as the boot loader (or for > that matter any fixed MAC address), we need a node in the device tree > for the ethernet controller that the boot loader can update at runtime > with a local-mac-address property. Add it, along with an alias for the > ethernet controller to let the boot loader locate it easily. Does not seem to work here.. Do I need to set something in u-boot? I'm using U-Boot 2016.09-00004-g26bb688. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 01, 2016 at 01:12:34PM -0800, Tony Lindgren wrote: > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > connected to port 2 of the OMAP EHCI controller. The board however has > > no EEPROM to store the ethernet MAC address, which is programmed by the > > boot loader. > > > > To allow Linux to use the same MAC address as the boot loader (or for > > that matter any fixed MAC address), we need a node in the device tree > > for the ethernet controller that the boot loader can update at runtime > > with a local-mac-address property. Add it, along with an alias for the > > ethernet controller to let the boot loader locate it easily. > > Does not seem to work here.. Do I need to set something in u-boot? > I'm using U-Boot 2016.09-00004-g26bb688. Yes, it seems like something else must be going on as well as "usbethaddr" which U-Boot will populate with a MAC based on the OMAP DIE ID doesn't get populated into the DT only ethaddr. And the follow-up is that it would be nice if someone would go and patch the last driver in U-Boot that uses usbethaddr to use ethaddr like all of the rest do.
* Tony Lindgren <tony@atomide.com> [161201 13:14]: > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > connected to port 2 of the OMAP EHCI controller. The board however has > > no EEPROM to store the ethernet MAC address, which is programmed by the > > boot loader. > > > > To allow Linux to use the same MAC address as the boot loader (or for > > that matter any fixed MAC address), we need a node in the device tree > > for the ethernet controller that the boot loader can update at runtime > > with a local-mac-address property. Add it, along with an alias for the > > ethernet controller to let the boot loader locate it easily. > > Does not seem to work here.. Do I need to set something in u-boot? > I'm using U-Boot 2016.09-00004-g26bb688. Looks like my u-boot only has usbethaddr in the environment. After doing setenv ethaddr it's now working :) Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Tony, On Thursday 01 Dec 2016 13:12:34 Tony Lindgren wrote: > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > connected to port 2 of the OMAP EHCI controller. The board however has > > no EEPROM to store the ethernet MAC address, which is programmed by the > > boot loader. > > > > To allow Linux to use the same MAC address as the boot loader (or for > > that matter any fixed MAC address), we need a node in the device tree > > for the ethernet controller that the boot loader can update at runtime > > with a local-mac-address property. Add it, along with an alias for the > > ethernet controller to let the boot loader locate it easily. > > Does not seem to work here.. Do I need to set something in u-boot? > I'm using U-Boot 2016.09-00004-g26bb688. Some versions (possibly forked by vendors) might set the MAC address automatically in DT, but in my case I have the following in my boot script: tftp 0x80800000 beagle/omap3-beagle-xm.dtb fdt addr ${fileaddr} ${filesize} fdt resize fdt set /ocp@68000000/usbhshost@48064000/ehci@48064800/usb2@2/usbether@1 local-mac-address "[7a d2 a0 00 d1 f0]"
On Thursday 01 Dec 2016 13:35:16 Tony Lindgren wrote: > * Tony Lindgren <tony@atomide.com> [161201 13:14]: > > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > > connected to port 2 of the OMAP EHCI controller. The board however has > > > no EEPROM to store the ethernet MAC address, which is programmed by the > > > boot loader. > > > > > > To allow Linux to use the same MAC address as the boot loader (or for > > > that matter any fixed MAC address), we need a node in the device tree > > > for the ethernet controller that the boot loader can update at runtime > > > with a local-mac-address property. Add it, along with an alias for the > > > ethernet controller to let the boot loader locate it easily. > > > > Does not seem to work here.. Do I need to set something in u-boot? > > I'm using U-Boot 2016.09-00004-g26bb688. > > Looks like my u-boot only has usbethaddr in the environment. After doing > setenv ethaddr it's now working :) Nice to know, thanks for the tip :-)
On Thu, Dec 01, 2016 at 11:37:53PM +0200, Laurent Pinchart wrote: > On Thursday 01 Dec 2016 13:35:16 Tony Lindgren wrote: > > * Tony Lindgren <tony@atomide.com> [161201 13:14]: > > > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > > > connected to port 2 of the OMAP EHCI controller. The board however has > > > > no EEPROM to store the ethernet MAC address, which is programmed by the > > > > boot loader. > > > > > > > > To allow Linux to use the same MAC address as the boot loader (or for > > > > that matter any fixed MAC address), we need a node in the device tree > > > > for the ethernet controller that the boot loader can update at runtime > > > > with a local-mac-address property. Add it, along with an alias for the > > > > ethernet controller to let the boot loader locate it easily. > > > > > > Does not seem to work here.. Do I need to set something in u-boot? > > > I'm using U-Boot 2016.09-00004-g26bb688. > > > > Looks like my u-boot only has usbethaddr in the environment. After doing > > setenv ethaddr it's now working :) > > Nice to know, thanks for the tip :-) To tag onto my other email, it should be just a little work to get this to work for everyone out of the box :)
* Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161201 13:37]: > Hi Tony, > > On Thursday 01 Dec 2016 13:12:34 Tony Lindgren wrote: > > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > > The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, > > > connected to port 2 of the OMAP EHCI controller. The board however has > > > no EEPROM to store the ethernet MAC address, which is programmed by the > > > boot loader. > > > > > > To allow Linux to use the same MAC address as the boot loader (or for > > > that matter any fixed MAC address), we need a node in the device tree > > > for the ethernet controller that the boot loader can update at runtime > > > with a local-mac-address property. Add it, along with an alias for the > > > ethernet controller to let the boot loader locate it easily. > > > > Does not seem to work here.. Do I need to set something in u-boot? > > I'm using U-Boot 2016.09-00004-g26bb688. > > Some versions (possibly forked by vendors) might set the MAC address > automatically in DT, but in my case I have the following in my boot script: > > tftp 0x80800000 beagle/omap3-beagle-xm.dtb > fdt addr ${fileaddr} ${filesize} > fdt resize > fdt set /ocp@68000000/usbhshost@48064000/ehci@48064800/usb2@2/usbether@1 local-mac-address "[7a d2 a0 00 d1 f0]" OK. I just added setenv ethaddr ${usbethaddr} to my bootcmd.. Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
* Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > &usbhsehci { > phys = <0 &hsusb2_phy>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + usb2@2 { I think this should be usb1@2 instead of usb2@2? That's because it's at /sys/bus/usb/devices/1-2 and not at /sys/bus/usb/devices/2-2? Or what's the naming standard here? Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Tony, On Thursday 01 Dec 2016 17:18:08 Tony Lindgren wrote: > * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [161130 09:58]: > > &usbhsehci { > > > > phys = <0 &hsusb2_phy>; > > > > + > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + usb2@2 { > > I think this should be usb1@2 instead of usb2@2? That's because it's > at /sys/bus/usb/devices/1-2 and not at /sys/bus/usb/devices/2-2? > > Or what's the naming standard here? Good question. As far as I know, the node name is irrelevant, only the reg value is important. Maybe we should call it hub@2 ?
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 85e297ed0ea1..75ac56cdf954 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts @@ -27,6 +27,7 @@ aliases { display0 = &dvi0; display1 = &tv0; + ethernet = ðernet; }; leds { @@ -348,6 +349,21 @@ &usbhsehci { phys = <0 &hsusb2_phy>; + + #address-cells = <1>; + #size-cells = <0>; + + usb2@2 { + compatible = "usb424,9514"; + reg = <2>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; }; &vaux2 {
The Beagleboard-xM has a LAN9514 USB hub and ethernet controller, connected to port 2 of the OMAP EHCI controller. The board however has no EEPROM to store the ethernet MAC address, which is programmed by the boot loader. To allow Linux to use the same MAC address as the boot loader (or for that matter any fixed MAC address), we need a node in the device tree for the ethernet controller that the boot loader can update at runtime with a local-mac-address property. Add it, along with an alias for the ethernet controller to let the boot loader locate it easily. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- arch/arm/boot/dts/omap3-beagle-xm.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)