From 461364a4f42d796ec98743ecf8b0f5788ae0d29c Mon Sep 17 00:00:00 2001 From: libriunk Date: Fri, 21 Feb 2025 23:10:08 +0800 Subject: [PATCH] mediatek: fixes gpio for netcore n60 pro --- .../mediatek/dts/mt7986a-netcore-n60-pro.dts | 50 +++++++++++-------- .../filogic/base-files/etc/board.d/01_leds | 3 ++ 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts index f87f3e626..becd1e61a 100644 --- a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts +++ b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts @@ -13,10 +13,10 @@ aliases { serial0 = &uart0; label-mac-device = &gmac0; - led-boot = &led_status_red; - led-failsafe = &led_status_red; - led-running = &led_status_blue; - led-upgrade = &led_status_blue; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; chosen { @@ -46,17 +46,27 @@ leds { compatible = "gpio-leds"; - led_status_red: status_red { - label = "red:status"; + led_power: power { + label = "blue:power"; gpios = <&pio 29 GPIO_ACTIVE_LOW>; }; - led_status_blue: status_blue { - label = "blue:status"; + usb { + label = "blue:usb"; + gpios = <&pio 30 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "blue:wps"; + gpios = <&pio 31 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "blue:wan"; gpios = <&pio 32 GPIO_ACTIVE_LOW>; }; }; - + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; @@ -122,13 +132,11 @@ phy5: phy@5 { compatible = "ethernet-phy-ieee802.3-c45"; reg = <5>; - mxl,led-config = <0x0 0x0 0x0 0x3f0>; }; phy6: phy@6 { compatible = "ethernet-phy-ieee802.3-c45"; reg = <6>; - mxl,led-config = <0x0 0x0 0x0 0x3f0>; }; switch: switch@0 { @@ -275,6 +283,12 @@ }; }; +&ssusb { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_5v>; + status = "okay"; +}; + &trng { status = "okay"; }; @@ -283,6 +297,10 @@ status = "okay"; }; +&usb_phy { + status = "okay"; +}; + &watchdog { status = "okay"; }; @@ -308,13 +326,3 @@ reg = <0x1fef26 0x6>; }; }; - -&ssusb { - vusb33-supply = <®_3p3v>; - vbus-supply = <®_5v>; - status = "okay"; -}; - -&usb_phy { - status = "okay"; -}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 83e1d00e4..942756c70 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -45,6 +45,9 @@ nokia,ea0326gmp) ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ;; +netcore,n60-pro) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" "link tx rx" + ;; openembed,som7981) ucidef_set_led_netdev "lanact" "LANACT" "amber:lan" "eth1" "rx tx" ucidef_set_led_netdev "lanlink" "LANLINK" "green:lan" "eth1" "link"