Skip to content

Commit 01d2658

Browse files
Phil Elwelldavem330
authored andcommitted
dt-bindings: Document the DT bindings for lan78xx
The Microchip LAN78XX family of devices are Ethernet controllers with a USB interface. Despite being discoverable devices it can be useful to be able to configure them from Device Tree, particularly in low-cost applications without an EEPROM or programmed OTP. Document the supported properties in a bindings file. Signed-off-by: Phil Elwell <phil@raspberrypi.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1827b06 commit 01d2658

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Microchip LAN78xx Gigabit Ethernet controller
2+
3+
The LAN78XX devices are usually configured by programming their OTP or with
4+
an external EEPROM, but some platforms (e.g. Raspberry Pi 3 B+) have neither.
5+
The Device Tree properties, if present, override the OTP and EEPROM.
6+
7+
Required properties:
8+
- compatible: Should be one of "usb424,7800", "usb424,7801" or "usb424,7850".
9+
10+
Optional properties:
11+
- local-mac-address: see ethernet.txt
12+
- mac-address: see ethernet.txt
13+
14+
Optional properties of the embedded PHY:
15+
- microchip,led-modes: a 0..4 element vector, with each element configuring
16+
the operating mode of an LED. Omitted LEDs are turned off. Allowed values
17+
are defined in "include/dt-bindings/net/microchip-lan78xx.h".
18+
19+
Example:
20+
21+
/* Based on the configuration for a Raspberry Pi 3 B+ */
22+
&usb {
23+
usb-port@1 {
24+
compatible = "usb424,2514";
25+
reg = <1>;
26+
#address-cells = <1>;
27+
#size-cells = <0>;
28+
29+
usb-port@1 {
30+
compatible = "usb424,2514";
31+
reg = <1>;
32+
#address-cells = <1>;
33+
#size-cells = <0>;
34+
35+
ethernet: ethernet@1 {
36+
compatible = "usb424,7800";
37+
reg = <1>;
38+
local-mac-address = [ 00 11 22 33 44 55 ];
39+
40+
mdio {
41+
#address-cells = <0x1>;
42+
#size-cells = <0x0>;
43+
eth_phy: ethernet-phy@1 {
44+
reg = <1>;
45+
microchip,led-modes = <
46+
LAN78XX_LINK_1000_ACTIVITY
47+
LAN78XX_LINK_10_100_ACTIVITY
48+
>;
49+
};
50+
};
51+
};
52+
};
53+
};
54+
};

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14571,6 +14571,7 @@ M: Woojung Huh <woojung.huh@microchip.com>
1457114571
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
1457214572
L: netdev@vger.kernel.org
1457314573
S: Maintained
14574+
F: Documentation/devicetree/bindings/net/microchip,lan78xx.txt
1457414575
F: drivers/net/usb/lan78xx.*
1457514576
F: include/dt-bindings/net/microchip-lan78xx.h
1457614577

0 commit comments

Comments
 (0)