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


Groups > linux.kernel > #1328221

Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees

From Stephen Warren <swarren@wwwdotorg.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees
Date 2016-02-06 05:20 +0100
Message-ID <qZ2vM-1QJ-11@gated-at.bofh.it> (permalink)
References <qYmGe-5vX-11@gated-at.bofh.it> <qYmGe-5vX-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/04/2016 12:36 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.
> 
> Model B rev2 and Model B+ entries were verified by me, the hierarchy and
> pid/vid pair for the Version 2 was provided by Olivier Blin. Original
> Model B is a blind short, though very likely correct.

The series,
Tested-by: Stephen Warren <swarren@wwwdotorg.org>

A few nits though...

>  arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 18 ++++++++++++++++++
>  arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 18 ++++++++++++++++++
>  arch/arm/boot/dts/bcm2835-rpi-b.dts      | 18 ++++++++++++++++++
>  arch/arm/boot/dts/bcm2836-rpi-2-b.dts    | 18 ++++++++++++++++++
>  arch/arm/boot/dts/bcm283x.dtsi           |  4 +++-

Rather than cut/paste everything, can't we share the duplicate content
using a *.dtsi file? IIRC some dtsi files already exist. Perhaps there
could be a bcm283x-rpi-smsc9512.dtsi and bcm283x-rpi-smsc9514.dtsi, and
even a bcm283x-rpi-smsc-eth.dtsi since 99% of those two are common?
Hopefully that doesn't sound like busy work/bike-shedding too much.

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts

> +&usb {
> +	usb1@1 {
> +		compatible = "usb0424,9514";
> +		reg = <01>;

Here and ...

> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ethernet: usbether@1 {
> +			compatible = "usb0424,ec00";
> +			reg = <01>;

... here, reg should be "1" not "01". Same in all the files.

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts

> +&usb {
> +	usb1@1 {
> +		compatible = "usb0424,9512";

I don't think that ID is correct. On my systems, I have:

RPi B (original, rev 1, 2 USB ports): 9512
RPi B (rev 2 w/ P5, 2 USB ports): 9512
RPi B+ (4 USB ports): 9514
RPi 2 (4 USB ports): 9514

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


Thread

[PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees Lubomir Rintel <lkundrak@v3.sk> - 2016-02-04 08:40 +0100
  RE: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device  trees Peter Chen <peter.chen@nxp.com> - 2016-02-04 09:30 +0100
  Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees Olivier Blin <dev@blino.org> - 2016-02-05 15:30 +0100
    Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device  trees Lubomir Rintel <lkundrak@v3.sk> - 2016-02-05 16:00 +0100
      Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees Olivier Blin <dev@blino.org> - 2016-02-05 16:10 +0100
  Re: [PATCH v2 1/2] ARM: bcm2835: dt: Add the ethernet to the device  trees Stephen Warren <swarren@wwwdotorg.org> - 2016-02-06 05:20 +0100

csiph-web