[source] lantiq: DGN3500: make switch LEDs blink on activity

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 25 10:30:34 PDT 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/42120bd7f323ff7170b32a5fd4674babd8b184bc

commit 42120bd7f323ff7170b32a5fd4674babd8b184bc
Author: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
AuthorDate: Thu Apr 20 19:14:57 2017 +0100

    lantiq: DGN3500: make switch LEDs blink on activity
    
    Make switch port LEDs blink on activity as they do with stock firmware.
    
    The u-boot loader sets suitable values in the LED control register that
    unfortunately get blown away by the linux switch driver init.  Restore
    that value by using driver 'initvals'.  0x0431 is the led control
    register, the value 0x0960. Each nybble represents each LED's mode
    (LED3,2,1,0) in this case OFF, 1000LINK+Activity, 100/10LINK+Activity,
    OFF.  Only LED1&2 are physically present.
    
    Enabling the blinkenlights exposed the fact that an RRCP packet was
    being emitted by the switch on all ports every second.  Further initvals
    copied from stock firmware's u-boot driver disabled this 'feature'.
    
    Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
 target/linux/lantiq/dts/DGN3500.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/target/linux/lantiq/dts/DGN3500.dtsi b/target/linux/lantiq/dts/DGN3500.dtsi
index 890b49f..d58d717 100644
--- a/target/linux/lantiq/dts/DGN3500.dtsi
+++ b/target/linux/lantiq/dts/DGN3500.dtsi
@@ -75,8 +75,23 @@
 		compatible = "realtek,rtl8366rb";
 		gpio-sda = <&gpio 35 GPIO_ACTIVE_HIGH>;
 		gpio-sck = <&gpio 37 GPIO_ACTIVE_HIGH>;
+
+		realtek,initvals = <
+			0x0000 0x0830
+			0x0400 0x8130
+			0x000A 0x83ED
+			0x0F51 0x0017
+			0x02F5 0x0048
+			0x02FA 0xFFDF
+			0x02FB 0xFFE0
+			0x0450 0x0000
+			0x0401 0x0000
+			0x0431 0x0960
+		>;
 	};
 
+
+
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;



More information about the lede-commits mailing list