ARM: bcm2835: dt: Add the ethernet to the device trees
authorLubomir Rintel <lkundrak@v3.sk>
Mon, 2 May 2016 07:06:51 +0000 (09:06 +0200)
committerEric Anholt <eric@anholt.net>
Tue, 31 May 2016 17:32:34 +0000 (10:32 -0700)
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.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
arch/arm/boot/dts/bcm2835-rpi-b.dts
arch/arm/boot/dts/bcm2836-rpi-2-b.dts
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi [new file with mode: 0644]
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi [new file with mode: 0644]
arch/arm/boot/dts/bcm283x.dtsi

index 57d313b6afaf6baeea75ff9894ff700d47ff038d..d5fdb8e761a39ef4ac063c916e9f889342b525e7 100644 (file)
@@ -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";
index cf2774ec0834167bd6345e6023cdfbcb698fef08..bfc4bd9b7733f41b05c40238be120bcc96c157f7 100644 (file)
@@ -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";
index 8b15f9c356438a36f62cf130496a7f7b6ba1933a..0371bb7374b88c63db7acc17300f07d4a96996b2 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
+#include "bcm283x-rpi-smsc9512.dtsi"
 
 / {
        compatible = "raspberrypi,model-b", "brcm,bcm2835";
index c4743f42237be14b0526bbe77b2724bff09ab963..29e1cfe8eb142bd1af81e5b1869b8c406c46ad0b 100644 (file)
@@ -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";
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
new file mode 100644 (file)
index 0000000..12c981e
--- /dev/null
@@ -0,0 +1,19 @@
+/ {
+       aliases {
+               ethernet = &ethernet;
+       };
+};
+
+&usb {
+       usb1@1 {
+               compatible = "usb424,9512";
+               reg = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethernet: usbether@1 {
+                       compatible = "usb424,ec00";
+                       reg = <1>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
new file mode 100644 (file)
index 0000000..3f0a56e
--- /dev/null
@@ -0,0 +1,19 @@
+/ {
+       aliases {
+               ethernet = &ethernet;
+       };
+};
+
+&usb {
+       usb1@1 {
+               compatible = "usb424,9514";
+               reg = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethernet: usbether@1 {
+                       compatible = "usb424,ec00";
+                       reg = <1>;
+               };
+       };
+};
index 10b27b912bac74b8193ac65c8397bd679624f8e4..b98252232d200ab476c2e8eaf8dc07e637ffc62f 100644 (file)
                        compatible = "brcm,bcm2835-usb";
                        reg = <0x7e980000 0x10000>;
                        interrupts = <1 9>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                };
 
                v3d: v3d@7ec00000 {