forked from male-puppies/openwrt-openwrt-puppies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ramips: add support for C-Life XG1 [WIFI6] (openwrt#10057)
CPU: MediaTek MT7621AT Flash: Micron MT29F2G08ABAGAWP 128M RAM: 256 M WiFi: MT7915 2.4/5 GHz 2T2R Ethernet: 10/100/1000 Mbps x3 LED: Status (red / blue / white / green / purple / cyan) USB: 2.0 x 1 ZigBee/BlueTooth USB Audio: iec958 x 1 Button: Reset Power: DC 12V,1.5A 开启ssh方法: 打开网页:192.168.10.1,用户路由器底面标注的用户名密码完成登陆。 然后打开网页:http://192.168.10.1/cgi-bin/luci/admin/mtk/console,在命令行中输入以下命令: echo -en "root\nroot\n" | passwd 然后打开网页:http://192.168.10.1/cgi-bin/luci/pti/ssh_open 即可ssh登陆192.168.10.1,用户名root,密码root 刷入openwrt: 开启ssh后,上传breed-mt7621-xiaomi-r3g.bin到路由器/tmp目录。 然后使用下面命令刷入breed: mtd -r write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader 等待机器重启,等1分钟断开电源。 按住C-Life XG1机身正面的圆形IoT按钮(gpio 18),通电就能进入breed刷机.
- Loading branch information
Showing
6 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
#include "mt7621.dtsi" | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/input/input.h> | ||
|
||
/ { | ||
compatible = "c-life,xg1", "mediatek,mt7621-soc"; | ||
model = "C-Life XG1"; | ||
|
||
aliases { | ||
led-boot = &led_status_red; | ||
led-failsafe = &led_status_red; | ||
led-running = &led_status_blue; | ||
led-upgrade = &led_status_blue; | ||
label-mac-device = &gmac0; | ||
}; | ||
|
||
chosen { | ||
bootargs = "console=ttyS0,115200"; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_status_red: status_red { | ||
label = "red:status"; | ||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led_status_blue: status_blue { | ||
label = "blue:status"; | ||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
keys { | ||
compatible = "gpio-keys"; | ||
|
||
reset { | ||
label = "reset"; | ||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
|
||
wps { | ||
label = "wps"; | ||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_WPS_BUTTON>; | ||
}; | ||
}; | ||
}; | ||
|
||
&nand { | ||
status = "okay"; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
label = "Bootloader"; | ||
reg = <0x0 0x80000>; | ||
}; | ||
|
||
partition@80000 { | ||
label = "Nvram"; | ||
reg = <0x80000 0x40000>; | ||
read-only; | ||
}; | ||
|
||
partition@c0000 { | ||
label = "Bdata"; | ||
reg = <0xc0000 0x40000>; | ||
read-only; | ||
}; | ||
|
||
factory: partition@100000 { | ||
label = "Factory"; | ||
reg = <0x100000 0x80000>; | ||
read-only; | ||
}; | ||
|
||
partition@180000 { | ||
label = "crash"; | ||
reg = <0x180000 0x40000>; | ||
read-only; | ||
}; | ||
|
||
partition@1c0000 { | ||
label = "crash_log"; | ||
reg = <0x1c0000 0x40000>; | ||
read-only; | ||
}; | ||
|
||
partition@200000 { | ||
label = "kernel"; | ||
reg = <0x200000 0x400000>; | ||
}; | ||
|
||
partition@600000 { | ||
label = "ubi"; | ||
reg = <0x600000 0x7980000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&pcie { | ||
status = "okay"; | ||
}; | ||
|
||
&pcie1 { | ||
wifi@0,0 { | ||
compatible = "mediatek,mt76"; | ||
reg = <0x0000 0 0 0 0>; | ||
mediatek,mtd-eeprom = <&factory 0x0>; | ||
}; | ||
}; | ||
|
||
&gmac0 { | ||
mtd-mac-address = <&factory 0x04>; | ||
}; | ||
|
||
&gmac1 { | ||
mtd-mac-address = <&factory 0x0a>; | ||
phy-mode = "rgmii"; | ||
status = "okay"; | ||
|
||
fixed-link { | ||
speed = <1000>; | ||
full-duplex; | ||
pause; | ||
}; | ||
}; | ||
|
||
&gsw { | ||
mediatek,portmap = "llllw"; | ||
status = "okay"; | ||
}; | ||
|
||
&hnat { | ||
mtketh-wan = "eth1"; | ||
mtketh-ppd = "eth0"; | ||
mtketh-lan = "eth0"; | ||
mtketh-max-gmac = <2>; | ||
/delete-property/ mtkdsa-wan-port; | ||
}; | ||
|
||
&switch0 { | ||
status = "disabled"; | ||
}; | ||
|
||
&state_default { | ||
gpio { | ||
groups = "jtag", "wdt"; | ||
function = "gpio"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters