ARM: bcm2835: dt: Add the ethernet to the device trees
Subsystems (3)
PATCH v5 1/1 ARM: bcm2835: dt: Add the ethernet to the device trees
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 Peter Chen. Original Model B is a blind shot, though very likely correct.
---
Changes since v4:
- A whitespace fix
Changes since v3:
- Include the ethernet alias in 9514 dtsi too
Changes since v2:
- Removed leading zeroes in vendor name and reg
- Split the common files in separate includes per model
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 | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/bcm283x.dtsi | 2 ++ 7 files changed, 44 insertions(+) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9514.dtsi" / { compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9512.dtsi" / { compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9512.dtsi" / { compatible = "raspberrypi,model-b", "brcm,bcm2835";
arch/arm/boot/dts/bcm2836-rpi-2-b.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2836.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9514.dtsi" / { compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi new file +19 -0
@@ -0,0 +1,19 @@ +/ { + aliases { + ethernet = ðernet; + }; +}; + +&usb { + usb1 at 1 { + compatible = "usb424,9512"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether at 1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; +};
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi new file +19 -0
@@ -0,0 +1,19 @@ +/ { + aliases { + ethernet = ðernet; + }; +}; + +&usb { + usb1 at 1 { + compatible = "usb424,9514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether at 1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; +};
arch/arm/boot/dts/bcm283x.dtsi +2 -0
@@ -230,6 +230,8 @@ compatible = "brcm,bcm2835-usb"; reg = <0x7e980000 0x10000>; interrupts = <1 9>; + #address-cells = <1>; + #size-cells = <0>; }; };
Signature · 1 line
2.7.4
PATCH v5 1/1 ARM: bcm2835: dt: Add the ethernet to the device trees
Quoted 11 lines · Lubomir Rintel
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.
Quoted 7 lines
Model B rev2 and Model B+ entries were verified by me, the hierarchy and pid/vid pair for the Version 2 was provided by Peter Chen. Original Model B is a blind shot, though very likely correct.
Signed-off-by Lubomir Rintel <[email protected]>Acked-by Stephen Warren <[email protected]>---
Applied to bcm2835-dt-next locally. We've already sent out pull requests for 4.7, so I'll push it once 4.7-rc1 happens.
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160502/5a998f3f/attachment-0001.sig>
PATCH v5 1/1 ARM: bcm2835: dt: Add the ethernet to the device trees
In reply to Lubomir RintelQuoted 11 lines · Lubomir Rintel
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.
Quoted 6 lines
Model B rev2 and Model B+ entries were verified by me, the hierarchy and pid/vid pair for the Version 2 was provided by Peter Chen. Original Model B is a blind shot, though very likely correct.
Signed-off-by Lubomir Rintel <[email protected]>Acked-by Stephen Warren <[email protected]>
Though, I still need the following patch for this DT patch to be useful:
net/smscx5xx: use the device tree for mac address
Thanks for the update Lubomir
Signature · 1 line
Olivier Blin - blino