aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0445-BCM270X_DT-Add-new-Ethernet-DT-parameters.patch
blob: 94d8e09b15dabe909f699a517516514e344e9c81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From d4539512edd83737f51377e3e87512040133628a Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 27 Nov 2018 16:56:50 +0000
Subject: [PATCH 445/454] BCM270X_DT: Add new Ethernet DT parameters

Add "eth_downshift_after" DT parameter to allow the delay before the
downshift to be specified. The default is 2 auto-negotiation cycles,
and legal values are 2, 3, 4, 5 and 0 (disabled).

Add "eth_max_speed" DT parameter as a way of prohibiting 1000Mbps
links. This can be used to avoid the delay until the downshift mechanism
activates. Legal values are 10, 100 and 1000, where the default is
unlimited (effectively 1000Mbps).

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 2 ++
 arch/arm/boot/dts/overlays/README          | 9 +++++++++
 2 files changed, 11 insertions(+)

--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
@@ -48,5 +48,7 @@
 		tx_lpi_timer = <&ethernet>,"microchip,tx-lpi-timer:0";
 		eth_led0 = <&ethernet>,"microchip,led-modes:0";
 		eth_led1 = <&ethernet>,"microchip,led-modes:4";
+		eth_downshift_after = <&eth_phy>,"microchip,downshift-after:0";
+		eth_max_speed = <&eth_phy>,"max-speed:0";
 	};
 };
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -98,6 +98,11 @@ Params:
                                 compatible devices (default "on"). See also
                                 "tx_lpi_timer".
 
+        eth_downshift_after     Set the number of auto-negotiation failures
+                                after which the 1000Mbps modes are disabled.
+                                Legal values are 2, 3, 4, 5 and 0, where
+                                0 means never downshift (default 2).
+
         eth_led0                Set mode of LED0 (usually orange) (default
                                 "1"). The legal values are:
                                 0=link/activity          1=link1000/activity
@@ -108,6 +113,10 @@ Params:
         eth_led1                Set mode of LED1 (usually green) (default
                                 "6"). See eth_led0 for legal values.
 
+        eth_max_speed           Set the maximum speed a link is allowed
+                                to negotiate. Legal values are 10, 100 and
+                                1000 (default 1000).
+
         i2c_arm                 Set to "on" to enable the ARM's i2c interface
                                 (default "off")