ramips: improve support for Xiaomi Miwifi Nano

This commit is contained in:
CN_SZTL 2019-09-07 16:52:45 +08:00
parent eec53489e4
commit fccc3217fb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 19 additions and 12 deletions

View File

@ -1,12 +1,12 @@
#!/bin/sh /etc/rc.common
START=99
start() {
. /lib/functions.sh
local board=$(board_name)
if [ $board = "sk-wb8" ]; then
boot() {
case $(board_name) in
samknows,whitebox-v8)
fw_setenv bootcount 0
fi
;;
xiaomi,miwifi-nano)
fw_setenv flag_boot_success 1
;;
esac
}

View File

@ -57,12 +57,20 @@
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "refclk", "wled_an", "gpio";
ralink,group = "gpio", "refclk", "wdt", "wled_an";
ralink,function = "gpio";
};
};
};
&ehci {
status = "disabled";
};
&ohci {
status = "disabled";
};
&wmac {
status = "okay";
ralink,mtd-eeprom = <&factory 0x4>;
@ -78,7 +86,7 @@
m25p80@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
spi-max-frequency = <40000000>;
m25p,chunked-io = <32>;
partitions {
@ -89,7 +97,6 @@
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {

View File

@ -97,7 +97,7 @@ define Device/miwifi-nano
DTS := MIWIFI-NANO
IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Xiaomi MiWiFi Nano
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
DEVICE_PACKAGES := uboot-envtools
endef
TARGET_DEVICES += miwifi-nano