mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
ramips: mt7621: fix Xiaomi Router 3G/Pro LEDs
The PHY name has been changed to "mt7530-0" since IRQ support
was added to MT7530 driver.
Fixes: f9cfe7af1f
("kernel: backport MT7530 IRQ support")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
(node names, added color, function+function-enumerator properties)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
parent
d728d05c6c
commit
09d0643c18
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "xiaomi,mi-router-3-pro", "mediatek,mt7621-soc";
|
compatible = "xiaomi,mi-router-3-pro", "mediatek,mt7621-soc";
|
||||||
@ -24,43 +25,60 @@
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
led_status_red: status_red {
|
led_status_red: led-0 {
|
||||||
label = "red:status";
|
label = "red:status";
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
led_status_blue: status_blue {
|
led_status_blue: led-1 {
|
||||||
label = "blue:status";
|
label = "blue:status";
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
led_status_yellow: status_yellow {
|
led_status_yellow: led-2 {
|
||||||
label = "yellow:status";
|
label = "yellow:status";
|
||||||
|
color = <LED_COLOR_ID_YELLOW>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
wan_amber {
|
led-3 {
|
||||||
label = "amber:wan";
|
label = "amber:wan";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:04:1Gbps";
|
linux,default-trigger = "mt7530-0:04:1Gbps";
|
||||||
};
|
};
|
||||||
|
|
||||||
lan3_amber {
|
led-4 {
|
||||||
label = "amber:lan3";
|
label = "amber:lan3";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <3>;
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:03:1Gbps";
|
linux,default-trigger = "mt7530-0:03:1Gbps";
|
||||||
};
|
};
|
||||||
|
|
||||||
lan2_amber {
|
led-5 {
|
||||||
label = "amber:lan2";
|
label = "amber:lan2";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:02:1Gbps";
|
linux,default-trigger = "mt7530-0:02:1Gbps";
|
||||||
};
|
};
|
||||||
|
|
||||||
lan1_amber {
|
led-6 {
|
||||||
label = "amber:lan1";
|
label = "amber:lan1";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <1>;
|
||||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:01:1Gbps";
|
linux,default-trigger = "mt7530-0:01:1Gbps";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "mt7621_xiaomi_nand_128m.dtsi"
|
#include "mt7621_xiaomi_nand_128m.dtsi"
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "xiaomi,mi-router-3g", "mediatek,mt7621-soc";
|
compatible = "xiaomi,mi-router-3g", "mediatek,mt7621-soc";
|
||||||
@ -15,37 +16,51 @@
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
led_status_red: status_red {
|
led_status_red: led-0 {
|
||||||
label = "red:status";
|
label = "red:status";
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
led_status_blue: status_blue {
|
led_status_blue: led-1 {
|
||||||
label = "blue:status";
|
label = "blue:status";
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
led_status_yellow: status_yellow {
|
led_status_yellow: led-2 {
|
||||||
label = "yellow:status";
|
label = "yellow:status";
|
||||||
|
color = <LED_COLOR_ID_YELLOW>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
wan_amber {
|
led-3 {
|
||||||
label = "amber:wan";
|
label = "amber:wan";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:01:1Gbps";
|
linux,default-trigger = "mt7530-0:01:1Gbps";
|
||||||
};
|
};
|
||||||
|
|
||||||
lan1_amber {
|
led-4 {
|
||||||
label = "amber:lan1";
|
label = "amber:lan1";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <1>;
|
||||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:03:1Gbps";
|
linux,default-trigger = "mt7530-0:03:1Gbps";
|
||||||
};
|
};
|
||||||
|
|
||||||
lan2_amber {
|
led-5 {
|
||||||
label = "amber:lan2";
|
label = "amber:lan2";
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
linux,default-trigger = "dsa-0.0:02:1Gbps";
|
linux,default-trigger = "mt7530-0:02:1Gbps";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user