mediatek: configure TUF-AX4200 LAN LEDs
authorDavid Bauer <mail@david-bauer.net>
Thu, 27 Apr 2023 23:59:25 +0000 (01:59 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 11 May 2023 21:09:04 +0000 (23:09 +0200)
As we can now configure the switch LED configuration, write the switch
LED configuration values from the vendor firmware to the switch-IC.

Previously, the switch-LEDs did not show any acitvity or link-status
whatsoever.

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts

index 0a2f1d1d5960f0658aecae338f7ab2d1df72516e..ccbabc4feabc6b43909f331d98d715595df0f1e0 100644 (file)
                        };
                };
        };
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               phy@1 {
+                       reg = <1>;
+
+                       mediatek,led-config = <
+                               0x21 0x8009 /* BASIC_CTRL */
+                               0x22 0x0c00 /* ON_DURATION */
+                               0x23 0x1400 /* BLINK_DURATION */
+                               0x24 0x8000 /* LED0_ON_CTRL */
+                               0x25 0x0000 /* LED0_BLINK_CTRL */
+                               0x26 0xc007 /* LED1_ON_CTRL */
+                               0x27 0x003f /* LED1_BLINK_CTRL */
+                       >;
+               };
+
+               phy@2 {
+                       reg = <2>;
+
+                       mediatek,led-config = <
+                               0x21 0x8009 /* BASIC_CTRL */
+                               0x22 0x0c00 /* ON_DURATION */
+                               0x23 0x1400 /* BLINK_DURATION */
+                               0x24 0x8000 /* LED0_ON_CTRL */
+                               0x25 0x0000 /* LED0_BLINK_CTRL */
+                               0x26 0xc007 /* LED1_ON_CTRL */
+                               0x27 0x003f /* LED1_BLINK_CTRL */
+                       >;
+               };
+
+               phy@3 {
+                       reg = <3>;
+
+                       mediatek,led-config = <
+                               0x21 0x8009 /* BASIC_CTRL */
+                               0x22 0x0c00 /* ON_DURATION */
+                               0x23 0x1400 /* BLINK_DURATION */
+                               0x24 0x8000 /* LED0_ON_CTRL */
+                               0x25 0x0000 /* LED0_BLINK_CTRL */
+                               0x26 0xc007 /* LED1_ON_CTRL */
+                               0x27 0x003f /* LED1_BLINK_CTRL */
+                       >;
+               };
+
+               phy@4 {
+                       reg = <4>;
+
+                       mediatek,led-config = <
+                               0x21 0x8009 /* BASIC_CTRL */
+                               0x22 0x0c00 /* ON_DURATION */
+                               0x23 0x1400 /* BLINK_DURATION */
+                               0x24 0x8000 /* LED0_ON_CTRL */
+                               0x25 0x0000 /* LED0_BLINK_CTRL */
+                               0x26 0xc007 /* LED1_ON_CTRL */
+                               0x27 0x003f /* LED1_BLINK_CTRL */
+                       >;
+               };
+       };
 };
 
 &wmac {