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

2016-04-28 Thread Lubomir Rintel
On Thu, 2016-04-28 at 18:26 +0200, Stefan Wahren wrote:
> Hi Olivier
> 
> Am 28.04.2016 um 14:52 schrieb Olivier Blin:
> > 
> > Stephen Warren  writes:
> > 
> > > 
> > > 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 
> > > 
> > > A few nits though...
> > [...]
> > 
> > Is this still being queued in some tree?
> > Or does it need more fixes and a resubmit?
> Yes, a V3 should address the comments from Peter and Stephen.

I'll follow up with an updated patch set.

Sorry for the delay.

> 
> Regards
> Stefan
> 
> > 
> > 
> > Without this, Raspberry Pi devices boot with a random MAC address.
> > 
> 


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

2016-04-28 Thread Lubomir Rintel
On Thu, 2016-04-28 at 18:26 +0200, Stefan Wahren wrote:
> Hi Olivier
> 
> Am 28.04.2016 um 14:52 schrieb Olivier Blin:
> > 
> > Stephen Warren  writes:
> > 
> > > 
> > > 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 
> > > 
> > > A few nits though...
> > [...]
> > 
> > Is this still being queued in some tree?
> > Or does it need more fixes and a resubmit?
> Yes, a V3 should address the comments from Peter and Stephen.

I'll follow up with an updated patch set.

Sorry for the delay.

> 
> Regards
> Stefan
> 
> > 
> > 
> > Without this, Raspberry Pi devices boot with a random MAC address.
> > 
> 


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

2016-04-28 Thread Stefan Wahren
Hi Olivier

Am 28.04.2016 um 14:52 schrieb Olivier Blin:
> Stephen Warren  writes:
>
>> 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 
>>
>> A few nits though...
> [...]
>
> Is this still being queued in some tree?
> Or does it need more fixes and a resubmit?

Yes, a V3 should address the comments from Peter and Stephen.

Regards
Stefan

>
> Without this, Raspberry Pi devices boot with a random MAC address.
>




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

2016-04-28 Thread Stefan Wahren
Hi Olivier

Am 28.04.2016 um 14:52 schrieb Olivier Blin:
> Stephen Warren  writes:
>
>> 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 
>>
>> A few nits though...
> [...]
>
> Is this still being queued in some tree?
> Or does it need more fixes and a resubmit?

Yes, a V3 should address the comments from Peter and Stephen.

Regards
Stefan

>
> Without this, Raspberry Pi devices boot with a random MAC address.
>




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

2016-04-28 Thread Olivier Blin
Stephen Warren  writes:

> 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 
>
> A few nits though...
[...]

Is this still being queued in some tree?
Or does it need more fixes and a resubmit?

Without this, Raspberry Pi devices boot with a random MAC address.

-- 
Olivier Blin - blino


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

2016-04-28 Thread Olivier Blin
Stephen Warren  writes:

> 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 
>
> A few nits though...
[...]

Is this still being queued in some tree?
Or does it need more fixes and a resubmit?

Without this, Raspberry Pi devices boot with a random MAC address.

-- 
Olivier Blin - blino


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

2016-02-05 Thread Stephen Warren
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 

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

> + {
> + 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

> + {
> + 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



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

2016-02-05 Thread Olivier Blin
Lubomir Rintel  writes:

>> Though, I am not really DT-literate, but shouldn't the ethernet block
>> use the PID from the ethernet device?
>> The usbether device is 9514 on RPi2, while ec00 is the hub.
>
> Are you sure? I didn't check on RPi2, but I check the Models B and B+
> and the ethernet device was 0xec00 on both. The driver attaches to that
> product ID:
>
> [lkundrak@odvarok linux]$ modinfo smsc95xx |grep EC
> alias:  usb:v0424pEC00d*dc*dsc*dp*ic*isc*ip*in*
> [lkundrak@odvarok linux]$ modinfo smsc95xx |grep 9514
> [lkundrak@odvarok linux]$

My mistake, I am not sure how I mixed that.
Sorry for the noise.

Tested-by: Olivier Blin 

Thanks

-- 
Olivier Blin - blino


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

2016-02-05 Thread Lubomir Rintel
Hi Olivier,

On Fri, 2016-02-05 at 15:25 +0100, Olivier Blin wrote:
> Lubomir Rintel  writes:
> 
> > diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> > b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> [...]
> > @@ -33,3 +37,17 @@
> >     brcm,function = ;
> >     };
> >  };
> > +
> > + {
> > +   usb1@1 {
> > +   compatible = "usb0424,9514";
> > +   reg = <01>;
> > +   #address-cells = <1>;
> > +   #size-cells = <0>;
> > +
> > +   ethernet: usbether@1 {
> > +   compatible = "usb0424,ec00";
> > +   reg = <01>;
> > +   };
> > +   };
> > +};
> 
> Hi,
> 
> This works for me, after making sure that your u-boot patch gets a
> chance to be run (unset usbethaddr from u-boot).

Thanks for that.

> Though, I am not really DT-literate, but shouldn't the ethernet block
> use the PID from the ethernet device?
> The usbether device is 9514 on RPi2, while ec00 is the hub.

Are you sure? I didn't check on RPi2, but I check the Models B and B+
and the ethernet device was 0xec00 on both. The driver attaches to that
product ID:

[lkundrak@odvarok linux]$ modinfo smsc95xx |grep EC
alias:  usb:v0424pEC00d*dc*dsc*dp*ic*isc*ip*in*
[lkundrak@odvarok linux]$ modinfo smsc95xx |grep 9514
[lkundrak@odvarok linux]$

> Your patch works, but this works as well after swapping the PIDs.
> 
> Thanks

Take care
Lubo


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

2016-02-05 Thread Olivier Blin
Lubomir Rintel  writes:

> diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts 
> b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
[...]
> @@ -33,3 +37,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9514";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};

Hi,

This works for me, after making sure that your u-boot patch gets a
chance to be run (unset usbethaddr from u-boot).

Though, I am not really DT-literate, but shouldn't the ethernet block
use the PID from the ethernet device?
The usbether device is 9514 on RPi2, while ec00 is the hub.

Your patch works, but this works as well after swapping the PIDs.

Thanks

-- 
Olivier Blin - blino


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

2016-02-05 Thread Lubomir Rintel
Hi Olivier,

On Fri, 2016-02-05 at 15:25 +0100, Olivier Blin wrote:
> Lubomir Rintel  writes:
> 
> > diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> > b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> [...]
> > @@ -33,3 +37,17 @@
> >     brcm,function = ;
> >     };
> >  };
> > +
> > + {
> > +   usb1@1 {
> > +   compatible = "usb0424,9514";
> > +   reg = <01>;
> > +   #address-cells = <1>;
> > +   #size-cells = <0>;
> > +
> > +   ethernet: usbether@1 {
> > +   compatible = "usb0424,ec00";
> > +   reg = <01>;
> > +   };
> > +   };
> > +};
> 
> Hi,
> 
> This works for me, after making sure that your u-boot patch gets a
> chance to be run (unset usbethaddr from u-boot).

Thanks for that.

> Though, I am not really DT-literate, but shouldn't the ethernet block
> use the PID from the ethernet device?
> The usbether device is 9514 on RPi2, while ec00 is the hub.

Are you sure? I didn't check on RPi2, but I check the Models B and B+
and the ethernet device was 0xec00 on both. The driver attaches to that
product ID:

[lkundrak@odvarok linux]$ modinfo smsc95xx |grep EC
alias:  usb:v0424pEC00d*dc*dsc*dp*ic*isc*ip*in*
[lkundrak@odvarok linux]$ modinfo smsc95xx |grep 9514
[lkundrak@odvarok linux]$

> Your patch works, but this works as well after swapping the PIDs.
> 
> Thanks

Take care
Lubo


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

2016-02-05 Thread Olivier Blin
Lubomir Rintel  writes:

>> Though, I am not really DT-literate, but shouldn't the ethernet block
>> use the PID from the ethernet device?
>> The usbether device is 9514 on RPi2, while ec00 is the hub.
>
> Are you sure? I didn't check on RPi2, but I check the Models B and B+
> and the ethernet device was 0xec00 on both. The driver attaches to that
> product ID:
>
> [lkundrak@odvarok linux]$ modinfo smsc95xx |grep EC
> alias:  usb:v0424pEC00d*dc*dsc*dp*ic*isc*ip*in*
> [lkundrak@odvarok linux]$ modinfo smsc95xx |grep 9514
> [lkundrak@odvarok linux]$

My mistake, I am not sure how I mixed that.
Sorry for the noise.

Tested-by: Olivier Blin 

Thanks

-- 
Olivier Blin - blino


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

2016-02-05 Thread Olivier Blin
Lubomir Rintel  writes:

> diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts 
> b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
[...]
> @@ -33,3 +37,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9514";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};

Hi,

This works for me, after making sure that your u-boot patch gets a
chance to be run (unset usbethaddr from u-boot).

Though, I am not really DT-literate, but shouldn't the ethernet block
use the PID from the ethernet device?
The usbether device is 9514 on RPi2, while ec00 is the hub.

Your patch works, but this works as well after swapping the PIDs.

Thanks

-- 
Olivier Blin - blino


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

2016-02-05 Thread Stephen Warren
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 

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

> + {
> + 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

> + {
> + 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



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

2016-02-04 Thread Peter Chen
 
> 
> 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.
> 
> Signed-off-by: Lubomir Rintel 
> ---
> Changes since v1:
>   - s/@01/@1/ for ethernet and the hub
>   - Corrected the vid/pid pairs for hub and ethernet
>   - Added Model B rev2 and version 2 board changes
>   - Fixed a missing semicolon typo
> 
>  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 +++-
>  5 files changed, 75 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> index ef54050..983353f 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
>   model = "Raspberry Pi Model B+";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 47 0>;
> @@ -29,3 +33,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9514";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;

According to binding-doc [1], the value of reg should be
" lower case hexadecimal with leading zeroes suppressed", I have
updated it at linux binding-doc in my patch.

Besides, you may have a dtsi for common parts for board and its derived
board, in that case, you only need to change one file next time, surely,
it is not related to this patch.

[1] http://www.firmware.org/1275/bindings/usb/usb-1_0.ps

Peter

> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> index 86f1f2f..4b695a0 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
>   model = "Raspberry Pi Model B rev2";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 16 1>;
> @@ -22,3 +26,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9512";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> index 4859e9d..749648e 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b", "brcm,bcm2835";
>   model = "Raspberry Pi Model B";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 16 1>;
> @@ -16,3 +20,17 @@
>   {
>   pinctrl-0 = <  >;
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9512";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> index ff94666..2bc1a96 100644
> --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> @@ -10,6 +10,10 @@
>   reg = <0 0x4000>;
>   };
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 47 0>;
> @@ -33,3 +37,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = 

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

2016-02-04 Thread Peter Chen
 
> 
> 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.
> 
> Signed-off-by: Lubomir Rintel 
> ---
> Changes since v1:
>   - s/@01/@1/ for ethernet and the hub
>   - Corrected the vid/pid pairs for hub and ethernet
>   - Added Model B rev2 and version 2 board changes
>   - Fixed a missing semicolon typo
> 
>  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 +++-
>  5 files changed, 75 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> index ef54050..983353f 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
>   model = "Raspberry Pi Model B+";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 47 0>;
> @@ -29,3 +33,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9514";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;

According to binding-doc [1], the value of reg should be
" lower case hexadecimal with leading zeroes suppressed", I have
updated it at linux binding-doc in my patch.

Besides, you may have a dtsi for common parts for board and its derived
board, in that case, you only need to change one file next time, surely,
it is not related to this patch.

[1] http://www.firmware.org/1275/bindings/usb/usb-1_0.ps

Peter

> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> index 86f1f2f..4b695a0 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
>   model = "Raspberry Pi Model B rev2";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 16 1>;
> @@ -22,3 +26,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9512";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> index 4859e9d..749648e 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> @@ -6,6 +6,10 @@
>   compatible = "raspberrypi,model-b", "brcm,bcm2835";
>   model = "Raspberry Pi Model B";
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 16 1>;
> @@ -16,3 +20,17 @@
>   {
>   pinctrl-0 = <  >;
>  };
> +
> + {
> + usb1@1 {
> + compatible = "usb0424,9512";
> + reg = <01>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet: usbether@1 {
> + compatible = "usb0424,ec00";
> + reg = <01>;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> index ff94666..2bc1a96 100644
> --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
> @@ -10,6 +10,10 @@
>   reg = <0 0x4000>;
>   };
> 
> + aliases {
> + ethernet = 
> + };
> +
>   leds {
>   act {
>   gpios = < 47 0>;
> @@ -33,3 +37,17 @@
>   brcm,function = ;
>   };
>  };
> +
> + {
> + usb1@1 {
> +