Bläddra i källkod

ramips: improve support for HiWiFi HC5661A and HC5861B

HC5661A:
- Fix pinctrl
- Fix image size (15808k)
- Use switch trigger for WAN LED

Both:
- Use tpt LED trigger for wireless
- Explicitly disable USB nodes

Signed-off-by: DENG Qingfang <[email protected]>
DENG Qingfang 6 år sedan
förälder
incheckning
9852859e77

+ 6 - 7
target/linux/ramips/base-files/etc/board.d/01_leds

@@ -78,8 +78,7 @@ asus,rt-n14u)
 	ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" eth0.2
 	ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" eth0.2
 	set_wifi_led "$boardname:blue:air"
 	set_wifi_led "$boardname:blue:air"
 	;;
 	;;
-bdcom,wap2100-sk|\
-hiwifi,hc5861b)
+bdcom,wap2100-sk)
 	set_wifi_led "$boardname:green:wlan2g"
 	set_wifi_led "$boardname:green:wlan2g"
 	;;
 	;;
 belkin,f9k1109v1)
 belkin,f9k1109v1)
@@ -204,11 +203,14 @@ gnubee,gb-pc2)
 hauppauge,broadway)
 hauppauge,broadway)
 	set_wifi_led "$boardname:red:wps_active"
 	set_wifi_led "$boardname:red:wps_active"
 	;;
 	;;
-hiwifi,hc5661|\
-hiwifi,hc5661a)
+hiwifi,hc5661)
 	ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
 	ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
 	set_wifi_led "$boardname:blue:wlan2g"
 	set_wifi_led "$boardname:blue:wlan2g"
 	;;
 	;;
+hiwifi,hc5661a|\
+xzwifi,creativebox-v1)
+	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
+	;;
 hiwifi,hc5761|\
 hiwifi,hc5761|\
 hiwifi,hc5861)
 hiwifi,hc5861)
 	ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
 	ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
@@ -426,9 +428,6 @@ xiaomi,mir3p)
 	ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
 	ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
 	ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08"
 	ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08"
 	;;
 	;;
-xzwifi,creativebox-v1)
-	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
-	;;
 youhua,wr1200js)
 youhua,wr1200js)
 	ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01"
 	ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01"
 	;;
 	;;

+ 10 - 1
target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts

@@ -22,6 +22,7 @@
 		wlan2g {
 		wlan2g {
 			label = "hc5661a:blue:wlan2g";
 			label = "hc5661a:blue:wlan2g";
 			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
 			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tpt";
 		};
 		};
 	};
 	};
 };
 };
@@ -29,8 +30,16 @@
 &pinctrl {
 &pinctrl {
 	state_default: pinctrl0 {
 	state_default: pinctrl0 {
 		gpio {
 		gpio {
-			ralink,group = "i2c", "refclk", "wled_an";
+			ralink,group = "i2c", "refclk", "wdt", "wled_an";
 			ralink,function = "gpio";
 			ralink,function = "gpio";
 		};
 		};
 	};
 	};
 };
 };
+
+&ehci {
+	status = "disabled";
+};
+
+&ohci {
+	status = "disabled";
+};

+ 9 - 0
target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts

@@ -17,6 +17,7 @@
 		wlan2g {
 		wlan2g {
 			label = "hc5861b:green:wlan2g";
 			label = "hc5861b:green:wlan2g";
 			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
 			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 		};
 	};
 	};
 };
 };
@@ -30,6 +31,14 @@
 	};
 	};
 };
 };
 
 
+&ehci {
+	status = "disabled";
+};
+
+&ohci {
+	status = "disabled";
+};
+
 &pcie {
 &pcie {
 	status = "okay";
 	status = "okay";
 };
 };