Re: [OpenWrt-Devel] [PATCH] [ramips] Adjust image size limit for the D-Link DIR-860L B1
According to https://dev.openwrt.org/changeset/49129 The patch is applied with the git conflict remains and it breaks MT7621 target. 2016-04-09 20:10 GMT+08:00 Kristian Evensen: > Hi, > > On Thu, Mar 31, 2016 at 12:47 AM, Daniel Engberg > wrote: >> Currently the maximum image size defaults to 8Mbyte even though this model >> has 16Mbyte of flash memory. > > Something has gone wrong when merging this patch (look at the Makefile > in the upstream commit), causing building mt7621 to break. > > -Kristian > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [v5] ramips: add initial support for MQmaker WiTi board
Hello! 2015-12-03 20:08 GMT+08:00 Sebastian Careba: > The board is based on mt7621AT cpu, and has 16mb nor flash, 256mb of ram, 2 > sata ports, microsd card slot, 1 USB 3.0 port and at least one 2.4 and one 5 > ghz antenna. I think you forgot to enable the XHCI support in the dts file. > This is the 5th submission that reverts Patch v2 and introduces the use of > 'jedec,spi-nor' to detect the flash chip ID. > Patch v1 added initial support for MQmaker WiTi board. The device tree is > based on PBR-M1. > Patch v2 changed the flash chip ID (w25q256 to gd25q128). > Patch v3 fixed the left-out entry for WiTi in 02_network. > Patch v4 fixed the naming scheme for MQmaker WiTi board. > > Signed-off-by: Sebastian Careba > --- > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/etc/diag.sh | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 3 + > .../ramips/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ramips/dts/WITI.dts | 142 > + > target/linux/ramips/image/Makefile | 7 +- > target/linux/ramips/mt7621/profiles/mqmaker.mk | 20 +++ > 7 files changed, 174 insertions(+), 1 deletion(-) > create mode 100644 target/linux/ramips/dts/WITI.dts > create mode 100644 target/linux/ramips/mt7621/profiles/mqmaker.mk > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 7e51229..0cdecb0 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -81,6 +81,7 @@ ramips_setup_interfaces() > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > + witi|\ > wsr-1166|\ > wsr-600|\ > wt1520|\ > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index ff5fbf2..41e3a34 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -137,6 +137,7 @@ get_status_led() { > ;; > pbr-m1|\ > w306r-v20|\ > + witi|\ > zbt-wr8305rt) > status_led="$board:green:sys" > ;; > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 92e13c0..c002b97 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -391,6 +391,9 @@ ramips_board_detect() { > *"WHR-G300N") > name="whr-g300n" > ;; > + *"WiTi") > +name="witi" > + ;; > *"WIZARD 8800") > name="wizard8800" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 073593a..4ec3008 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -113,6 +113,7 @@ platform_check_image() { > whr-300hp2|\ > whr-600d|\ > whr-g300n|\ > + witi|\ > wizfi630a|\ > wl-330n|\ > wl-330n3g|\ > diff --git a/target/linux/ramips/dts/WITI.dts > b/target/linux/ramips/dts/WITI.dts > new file mode 100644 > index 000..cd6c7df > --- /dev/null > +++ b/target/linux/ramips/dts/WITI.dts > @@ -0,0 +1,142 @@ > +/dts-v1/; > + > +/include/ "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "MQmaker WiTi"; > + > + memory@0 { > + device_type = "memory"; > + reg = <0x0 0x1000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + sdhci@1013 { > + status = "okay"; > + }; > + > + palmbus@1E00 { > + spi@b00 { > + status = "okay"; > + > + m25p80@0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <1000>; > + > + partition@0 { > + label = "u-boot"; > + reg = <0x0 0x3>; > + read-only; > + }; > + > + partition@3 { > + label = "u-boot-env"; > + reg = <0x3 0x1>; > +
Re: [OpenWrt-Devel] [PATCH] ramips:Fix support for PBR-M1 board
The early demo board was only kept by the manufacturer. They made less than 10 pieces and they are not using it now. I'll fix the style problems and send another patch these days. 2015-11-29 19:10 GMT+08:00 Piotr Dymacz <pep...@gmail.com>: > Hello, > > See my comments inline, below. > > Cheers, > Piotr > > 2015-11-29 3:52 GMT+01:00 GuoGuo <gch981...@gmail.com>: >> The PBR-M1 support in current OpenWrt is for the early demo board and it >> doesn't work on the final board.This patch fixes the support for it. > > What with users with "early demo board"? > As I understand, this patch simply breaks support for their board version? > >> The LED called pbr-m1:buzzer is a beeper connected to GPIO26 so I used >> gpio-beeper instead of gpio-leds. >> But as I said in another mail,the beeper starts beeping after the ethernet >> driver is loaded and I can't control it unless I disable the ethernet driver >> in dts.I'm not sure if there is something wrong with my dts file. >> >> Signed-off-by: 郭传鈜 <gch981...@gmail.com> >> --- >> target/linux/ramips/base-files/etc/board.d/01_leds | 6 +- >> target/linux/ramips/base-files/etc/diag.sh | 4 +- >> target/linux/ramips/dts/PBR-M1.dts | 65 >> +- >> 3 files changed, 57 insertions(+), 18 deletions(-) >> >> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >> b/target/linux/ramips/base-files/etc/board.d/01_leds >> index 8cb0e48..40a5244 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/01_leds >> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >> @@ -200,9 +200,9 @@ oy-0001) >> set_wifi_led "$board:green:wifi" >> ;; >> pbr-m1) >> - ucidef_set_led_netdev "internet" "internet" "$board:green:internet" >> "eth0.2" >> - ucidef_set_led_default "power" "power" "$board:green:power" "1" >> - ucidef_set_led_default "sys" "sys" "$board:green:sys" "1" >> + ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" >> "eth0.2" >> + ucidef_set_led_default "power" "power" "$board:blue:power" "1" >> + ucidef_set_led_default "sys" "sys" "$board:blue:sys" "1" >> ;; >> px-4885) >> set_wifi_led "$board:orange:wifi" >> diff --git a/target/linux/ramips/base-files/etc/diag.sh >> b/target/linux/ramips/base-files/etc/diag.sh >> index ff5fbf2..b67e45b 100644 >> --- a/target/linux/ramips/base-files/etc/diag.sh >> +++ b/target/linux/ramips/base-files/etc/diag.sh >> @@ -135,7 +135,9 @@ get_status_led() { >> sl-r7205) >> status_led="$board:green:wifi" >> ;; >> - pbr-m1|\ >> + pbr-m1) >> + status_led="$board:blue:sys" >> + ;; > > This breaks alphabetical order. > Please, take a look how boards are ordered in this file and follow the > convention. > >> w306r-v20|\ >> zbt-wr8305rt) >> status_led="$board:green:sys" >> diff --git a/target/linux/ramips/dts/PBR-M1.dts >> b/target/linux/ramips/dts/PBR-M1.dts >> index 7702d9c..f866a4f 100644 >> --- a/target/linux/ramips/dts/PBR-M1.dts >> +++ b/target/linux/ramips/dts/PBR-M1.dts >> @@ -17,6 +17,12 @@ >> >> sdhci@1013 { >> status = "okay"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <_pins>; >> + }; >> + >> + xhci@1E1C { >> + status = "okay"; >> }; >> >> palmbus@1E00 { >> @@ -81,7 +87,7 @@ >> mt76@0,0 { >> reg = <0x 0 0 0 0>; >> device_type = "pci"; >> - mediatek,mtd-eeprom = < 0x>; >> + mediatek,mtd-eeprom = < 0x8000>; >> mediatek,2ghz = <0>; >> }; >> }; >> @@ -90,7 +96,7 @@ >> mt76@1,0 { >> reg = <0x 0 0 0 0>; >> device_type = "pci"; &
Re: [OpenWrt-Devel] pinctrl for rgmii2 doesn't work on MT7621?
Sorry I didn't type the whole mail before send it. 2015-11-29 9:07 GMT+08:00 郭传鈜 <gch981...@gmail.com>: > Hi! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] pinctrl for rgmii2 doesn't work on MT7621?
Hi! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] pinctrl for rgmii2 doesn't work on MT7621?
Hi! I got a PBR-M1 board these days and i'm trying to fix the dts file for it.There is a beeper connected to GPIO26 which share the same pin with rgmii2.I found that the beeper started beeping after the ethernet driver was loaded and I can't control it by setting the value of GPIO26 unless I disable the ethernet driver in the dts file by adding the following: ethernet@1e10 { status = "disabled"; }; I think there may be something wrong with the ethernet driver but I have no idea about how to fix it. Any ideas? Regards, Guo Chuanhong ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: enable external amplifier for Xiaomi MiWiFi Mini
Hi! I remember that there is no external PA on Miwifi Mini so this patch may be useless :-( BTW There is no external PA and external LNA support in current rt2x00 driver. 2015-09-01 0:11 GMT+08:00 D. Andrei Măceș: > Attempt to boost the 2.4 GHz signal, currently very low. > > Signed-off-by: D. Andrei Măceș > --- > target/linux/ramips/dts/MIWIFI-MINI.dts | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts > b/target/linux/ramips/dts/MIWIFI-MINI.dts > index fa9846c..dad99c3 100644 > --- a/target/linux/ramips/dts/MIWIFI-MINI.dts > +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts > @@ -113,6 +113,11 @@ > ralink,group = "i2c", "rgmii1"; > ralink,function = "gpio"; > }; > + > + pa { > + ralink,group = "pa"; > + ralink,function = "pa"; > + }; > }; > }; > > -- > 2.1.4 > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups
Hi! I just wonder why you chose to use the board name in LED names?Sometimes we can use the same dts file for different boards.For example, in ar71xx wr841nd-v3 wr941nd-v2 and wr941nd-v3 shares mach-tl-wr941nd-v2.c(I haven't found such examples in ramips target.)I think the LED name will be a bit strange in this situation:-( 2015-08-17 19:24 GMT+08:00 Piotr Dymacz pep...@gmail.com: 2015-08-17 8:28 GMT+02:00 John Crispin blo...@openwrt.org: Hi, just merged the whole lot. thanks a lot. what do you want to do next lantiq or ar71xx ? :) personally i would prefer ar71xx ;) [...] Hello John, It seems that there are some people who don't like the changes (see below), but they don't have enough courage to use their real name and post their comments on the list. I will back with answers for your and Michael Heimpold (I'm sorry, I didn't spot your e-mail before!) questions in few days. Now I'm really busy with other things. Cheers, Piotr Dymacz --- 2015-08-17 13:05 GMT+02:00 West Fuck deutch...@anonmail.de: https://dev.openwrt.org/changeset/46617 of all the bugs on related system you have choosen to change board and led names? why do you stick your nose into something that is not relevant? is it because your'e stupid fucking excuse for human being? you couldn't even make your uboot work without errors on some boards so why don't you stick to your own crap instead of acting like your're doing something ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: fix TP-LINK TL-WR941ND v6 support
In fact there is a model called TL-WR941N v6 which sells in China.It uses AR9344 SoC and AR9381 for 450M wireless.It's just a mistake made by the patch submitter to call it wr941nd-v6.I think you should rename the old profile and create a new one:D 2015-08-06 8:40 GMT+08:00 Matthias Schiffer mschif...@universe-factory.net: The images currently generated for the TL-WR941ND v6 try to treat it like a TL-WDR3500, which doesn't make any sense and causes the kernel to panic in early boot. I don't think this has ever worked (the TL-WR941ND v6 has a different SoC, uses another MDIO bus, has only one WMAC and no USB...). Fix this by adding proper support for the device. Signed-off-by: Matthias Schiffer mschif...@universe-factory.net --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 151 + target/linux/ar71xx/image/Makefile | 2 +- .../700-MIPS-ath79-openwrt-machines.patch | 23 +++- 9 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 561c5da..46b83fc 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -277,7 +277,8 @@ get_status_led() { tl-wdr4300 | \ tl-wr703n | \ tl-wr710n | \ - tl-wr720n-v3) + tl-wr720n-v3 | \ + tl-wr941nd-v6) status_led=tp-link:blue:system ;; tl-wr841n-v9) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 2aced37..3344d97 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -474,6 +474,15 @@ tl-wr941nd-v5) ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt ;; +tl-wr941nd-v6) + ucidef_set_led_netdev wan WAN tp-link:blue:wan eth0 + ucidef_set_led_switch lan1 LAN1 tp-link:blue:lan1 switch0 0x10 + ucidef_set_led_switch lan2 LAN2 tp-link:blue:lan2 switch0 0x08 + ucidef_set_led_switch lan3 LAN3 tp-link:blue:lan3 switch0 0x04 + ucidef_set_led_switch lan4 LAN4 tp-link:blue:lan4 switch0 0x02 + ucidef_set_led_wlan wlan WLAN tp-link:blue:wlan phy0tpt + ;; + tl-wa830re-v2) ucidef_set_led_netdev lan LAN tp-link:green:lan eth0 ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 2893e62..a6507db 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -227,6 +227,7 @@ tl-mr3420-v2 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ tl-wr941nd-v5 |\ +tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 256bd10..5d27538 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -793,6 +793,9 @@ ar71xx_board_detect() { *TL-WR941N/ND v5) name=tl-wr941nd-v5 ;; + *TL-WR941N/ND v6) + name=tl-wr941nd-v6 + ;; *TL-WR703N v1) name=tl-wr703n ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 76d8c5b..55ff568 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -353,6 +353,7 @@ platform_check_image() { tl-wr842n-v2 | \ tl-wr941nd | \ tl-wr941nd-v5 | \ + tl-wr941nd-v6 | \ tl-wr1041n-v2 | \ tl-wr1043nd | \ tl-wr1043nd-v2 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 1e31a01..ecaf454 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -134,6 +134,7 @@ CONFIG_ATH79_MACH_TL_WR841N_V1=y CONFIG_ATH79_MACH_TL_WR841N_V8=y CONFIG_ATH79_MACH_TL_WR841N_V9=y CONFIG_ATH79_MACH_TL_WR941ND=y +CONFIG_ATH79_MACH_TL_WR941ND_V6=y CONFIG_ATH79_MACH_TUBE2H=y CONFIG_ATH79_MACH_UBNT=y CONFIG_ATH79_MACH_UBNT_XM=y diff --git
Re: [OpenWrt-Devel] [PATCH] [ramips] HiWiFi HC5661 Support for Openwrt
Oh...I'm planning to send support for HiWiFi HC5761 and I was dealing with the MAC address problem last week.. You should read the MAC address from bdinfo partition which is described by Yousong.(This can be done with a simple script.) I'll send the support for HC5761 now and you can have a look:-) 2015-04-18 21:47 GMT+08:00 Yousong Zhou yszhou4t...@gmail.com: Hi, Yunhao The patch is not in plaintext format and is whitespace broken. You can work around this by generating a patch with git-format-patch, then send it with git-send-email. On 18 April 2015 at 19:39, 田韵豪 tianyh2...@163.com wrote: HiWiFi HC5661 (Ji 1s) support. Signed-off-by: B Tian tianyh2...@163.com Real name is more preferable :) --- diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 56ba3b7..292859d 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -237,6 +237,11 @@ case $board in set_usb_led lenovo:blue:usb set_wifi_led lenovo:blue:wifi ;; + hc5661) + ucidef_set_led_default power power hiwifi:blue:power 1 + set_wifi_led hiwifi:blue:wifi + ucidef_set_led_interface br-lan hiwifi:blue:network hiwifi:blue:network should be better named as hiwifi:blue:wan and the interface name should be wan. + ;; zte-q7) set_wifi_led zte:blue:status ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 24e1ba8..505f7d9 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -229,6 +229,14 @@ ramips_setup_interfaces() ucidef_add_switch_vlan switch0 1 1 2 3 4 5 6t ucidef_add_switch_vlan switch0 2 0 6t ;; + + hc5661) + ucidef_set_interfaces_lan_wan eth0.1 eth0.2 + ucidef_add_switch switch0 1 1 + ucidef_add_switch_vlan switch0 1 1 2 3 4 6t + ucidef_add_switch_vlan switch0 2 0 6t + ;; + d105 | \ na930 | \ omni-emb-hpm|\ @@ -310,6 +318,7 @@ ramips_setup_macs() dir-320-b1 | \ psr-680w |\ sl-r7205 |\ + hc5661 |\ y1 |\ y1s) lan_mac=$(cat /sys/class/net/eth0/address) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 5301593..02b3ee0 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -224,6 +224,9 @@ get_status_led() { y1s) status_led=lenovo:blue:power ;; + hc5661) + status_led=hiwifi:blue:power + ;; zte-q7) status_led=zte:red:status ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 616f4a1..8311a5f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -391,6 +391,9 @@ ramips_board_detect() { *Lenovo Y1S) name=y1s ;; + *HiWiFi HC5661) + name=hc5661 We already have hiwifi-hc6361 as the board name for HiWiFi HC6361 in ar71xx target, so it's better we stick to that naming convention and use hiwifi-hc5661 here. + ;; *Mediatek MT7621 evaluation board) name=mt7621 ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 17b456b..a913c41 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -115,6 +115,7 @@ platform_check_image() { xiaomi-miwifi-mini |\ y1 |\ y1s |\ + hc5661 |\ zte-q7 |\ zbt-wa05) [ $magic != 27051956 ] { diff --git a/target/linux/ramips/dts/HC5661.dts b/target/linux/ramips/dts/HC5661.dts new file mode 100644 index 000..873b83c --- /dev/null +++ b/target/linux/ramips/dts/HC5661.dts @@ -0,0 +1,137 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = hiwifi,HC5661, ralink,mt7620a-soc; The first compatible string is better be HiWiFi-HC5661. + model = HiWiFi HC5661; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + sysc@0 { + ralink,gpiomux = i2c, jtag; + ralink,uartmux = gpio; + ralink,wdtmux = 1; + }; + + gpio0: gpio@600 { + status = okay; + }; + + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + + spi@b00 { + status = okay; + + m25p80@0 { +#address-cells = 1; +#size-cells = 1; +compatible = w25q128; +reg = 0 0; +linux,modalias = m25p80, w25q128; +spi-max-frequency = 1000; + +partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; +}; + +partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only; +}; This area is named 'hw_panic' in OEM firmware. + +factory: partition@4 { + label = factory;
[OpenWrt-Devel] [PATCH][RFC] ramips:Add support for HiWiFi HC5761.
Hi,all! I'm trying to add support for HiWiFi HC5761 router,This patch works fine.Because the mac address is not saved in factory partition and I think my way to deal with this problem is not so good,I hope I could get some suggestions for this patch. HiWiFi HC5761 is a dual band router with mt7620a SoC.It has 3 network interface,SD card and USB. There is an MT7610E for 5G wireless but there is no open-source driver to support this.I enabled the PCI-E interface so that I could use the proprietary driver from MTK. MAC address is not in factory partition.It is defined in bdinfo partition in ascii format. With 'strings' command we could see such a line:Vfac_mac = XX:XX:XX:XX:XX:XX There is a space between 'Vfac_mac' and '=' so 'mtd_get_mac_ascii' function in /lib/functions/system.sh doesn't work.I copied the function and added a space in the sed command. Because of the mac address,the calibration data for wireless should't be read from mtd partition directly.I used the hotplug script to generate the calibration data for the wireless driver. I think I added too much code for the MAC address:-( I wonder if there is a better way to do this. Best regards. Guo Chuanhong Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 5 + .../linux/ramips/base-files/etc/board.d/02_network | 20 +++ target/linux/ramips/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/firmware/10-rt2x00-eeprom| 39 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/HiWiFi-HC5761.dts | 155 + target/linux/ramips/image/Makefile | 3 + 8 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/HiWiFi-HC5761.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 56ba3b7..e20732d 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -222,6 +222,11 @@ case $board in set_usb_led wr8305rt:usb set_wifi_led wr8305rt:wifi ;; + hiwifi-hc5761) + ucidef_set_led_default system system hiwifi:blue:system 1 + ucidef_set_led_netdev internet internet hiwifi:blue:internet eth0.2 + set_wifi_led hiwifi:blue:wlan-2p4 + ;; wt1520) set_wifi_led rt2800pci-phy0::radio ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 24e1ba8..615baa4 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -223,6 +223,7 @@ ramips_setup_interfaces() ucidef_add_switch_vlan switch0 2 4 6t ;; + hiwifi-hc5761 | \ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 @@ -288,6 +289,25 @@ ramips_setup_macs() wan_mac=$(macaddr_add $lan_mac 4) ;; + hiwifi-hc5761) + local part + local mac_dirty + + part=$(find_mtd_part bdinfo) + if [ -z $part ]; then + echo hiwifi_get_mac: partition bdinfo not found! 2 + return + fi + + mac_dirty=$(strings $part | sed -n 's/^'Vfac_mac '=//p') + + # canonicalize mac + [ -n $mac_dirty ] { + lan_mac=$(macaddr_canonicalize $mac_dirty) + } + wan_mac=$(macaddr_add $lan_mac 1) + ;; + m3 |\ m4 |\ x5 |\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 5301593..e66336f 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -220,6 +220,9 @@ get_status_led() { na930) status_led=na930:blue:power ;; + hiwifi-hc5761) + status_led=hiwifi:blue:system + ;; y1 | \ y1s) status_led=lenovo:blue:power diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 0cd95a5..ce7171c 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -21,6 +21,37 @@ rt2x00_eeprom_extract() { rt2x00_eeprom_die failed to extract from $mtd } +hiwifi_eeprom_extract() { + local part=$1 + local offset=$2 + local mac_addr=$3 + local mtd + + . /lib
Re: [OpenWrt-Devel] [PATCH][RFC] ramips:Add support for HiWiFi HC5761.
Sorry...The EEPROM script is not working correctly because I forgot to include /lib/functions/system.sh... But I still want some suggestions about the script:-) 2015-04-19 0:02 GMT+08:00 郭传鈜 gch981...@gmail.com: Hi,all! I'm trying to add support for HiWiFi HC5761 router,This patch works fine.Because the mac address is not saved in factory partition and I think my way to deal with this problem is not so good,I hope I could get some suggestions for this patch. HiWiFi HC5761 is a dual band router with mt7620a SoC.It has 3 network interface,SD card and USB. There is an MT7610E for 5G wireless but there is no open-source driver to support this.I enabled the PCI-E interface so that I could use the proprietary driver from MTK. MAC address is not in factory partition.It is defined in bdinfo partition in ascii format. With 'strings' command we could see such a line:Vfac_mac = XX:XX:XX:XX:XX:XX There is a space between 'Vfac_mac' and '=' so 'mtd_get_mac_ascii' function in /lib/functions/system.sh doesn't work.I copied the function and added a space in the sed command. Because of the mac address,the calibration data for wireless should't be read from mtd partition directly.I used the hotplug script to generate the calibration data for the wireless driver. I think I added too much code for the MAC address:-( I wonder if there is a better way to do this. Best regards. Guo Chuanhong Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 5 + .../linux/ramips/base-files/etc/board.d/02_network | 20 +++ target/linux/ramips/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/firmware/10-rt2x00-eeprom| 39 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/HiWiFi-HC5761.dts | 155 + target/linux/ramips/image/Makefile | 3 + 8 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/HiWiFi-HC5761.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 56ba3b7..e20732d 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -222,6 +222,11 @@ case $board in set_usb_led wr8305rt:usb set_wifi_led wr8305rt:wifi ;; + hiwifi-hc5761) + ucidef_set_led_default system system hiwifi:blue:system 1 + ucidef_set_led_netdev internet internet hiwifi:blue:internet eth0.2 + set_wifi_led hiwifi:blue:wlan-2p4 + ;; wt1520) set_wifi_led rt2800pci-phy0::radio ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 24e1ba8..615baa4 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -223,6 +223,7 @@ ramips_setup_interfaces() ucidef_add_switch_vlan switch0 2 4 6t ;; + hiwifi-hc5761 | \ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 @@ -288,6 +289,25 @@ ramips_setup_macs() wan_mac=$(macaddr_add $lan_mac 4) ;; + hiwifi-hc5761) + local part + local mac_dirty + + part=$(find_mtd_part bdinfo) + if [ -z $part ]; then + echo hiwifi_get_mac: partition bdinfo not found! 2 + return + fi + + mac_dirty=$(strings $part | sed -n 's/^'Vfac_mac '=//p') + + # canonicalize mac + [ -n $mac_dirty ] { + lan_mac=$(macaddr_canonicalize $mac_dirty) + } + wan_mac=$(macaddr_add $lan_mac 1) + ;; + m3 |\ m4 |\ x5 |\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 5301593..e66336f 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -220,6 +220,9 @@ get_status_led() { na930) status_led=na930:blue:power ;; + hiwifi-hc5761) + status_led=hiwifi:blue:system + ;; y1 | \ y1s) status_led=lenovo:blue:power diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 0cd95a5..ce7171c 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
Re: [OpenWrt-Devel] [PATCH][V3] ramips:Add support for Microduino MicroWRT
Hi! I'm sorry for the crazy mistake in the previous patch.This time I've asked Jason to test the firmware before giving me the patch.Everything works fine now :-) I wonder if this patch could be accepted because I'm planning to send another patch for a new device and I don't know if the new patch should be based on the source with this patch applied or not. Best regards. Guo Chuanhong 2015-04-06 17:13 GMT+08:00 郭传鈜 gch981...@gmail.com: From: 盛凯 shengka...@gmail.com Sorry,Sheng Kai told me that the flash layout is wrong in his previous patch-_-!! From: 盛凯 shengka...@gmail.com v3:fix flash layout and change model name v2:fix space issues MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengka...@gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 3 + target/linux/ramips/mt7620/profiles/microwrt.mk| 9 ++ 6 files changed, 124 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..24e1ba8 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..dffa832 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; + *Microduino MicroWRT) + name=microwrt + ;; *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..17b456b 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ + microwrt | \ mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..9500b14 --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = Microduino MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x2; + read-only; + }; + + partition@2 { + label = u-boot-env; + reg = 0x2 0x1; + read-only; + }; + + factory: partition@3 { + label = factory; + reg = 0x3 0x1
[OpenWrt-Devel] [PATCH][V3] ramips:Add support for Microduino MicroWRT
From: 盛凯 shengka...@gmail.com Sorry,Sheng Kai told me that the flash layout is wrong in his previous patch-_-!! From: 盛凯 shengka...@gmail.com v3:fix flash layout and change model name v2:fix space issues MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengka...@gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 3 + target/linux/ramips/mt7620/profiles/microwrt.mk| 9 ++ 6 files changed, 124 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..24e1ba8 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..dffa832 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; + *Microduino MicroWRT) + name=microwrt + ;; *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..17b456b 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ + microwrt | \ mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..9500b14 --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = Microduino MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x2; + read-only; + }; + + partition@2 { + label = u-boot-env; + reg = 0x2 0x1; + read-only; + }; + + factory: partition@3 { + label = factory; + reg = 0x3 0x1; + read-only; + }; + + partition@4 { + label = firmware; + reg = 0x4 0xfc; + }; + }; + }; + }; + + ehci@101c { + status = okay; + }; + + ohci@101c1000 { + status = okay; + }; + + pcie@1014 { + status = okay; + }; + +
Re: [OpenWrt-Devel] [PATCH] ramips:Add support for MakerModule MicroWRT
Sorry please don't accept the v2 patch because Sheng Kai told me that the flash layout in his patch is totally wrong :-( 2015-04-06 14:53 GMT+08:00 John Crispin blo...@openwrt.org: Hi, comments inline On 06/04/2015 02:15, 郭传鈜 wrote: First of all,this patch is not created by me.I just help him to send this patch:-D MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengkai81 at gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 2 + target/linux/ramips/mt7620/profiles/microwrt.mk| 12 +++ 6 files changed, 126 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..2035ab0 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ there is a space here w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..d115b4f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; +*MakerModule MicroWRT) +name=microwrt +;; spaces here aswell, use tabs please *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..57a339e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ +microwrt | \ spaces here aswell, use tabs please the rest looks good. John mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..8088ccb --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = MakerModule MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only; + }; + + factory: partition@4 { + label = factory; + reg = 0x4 0x1; + read-only; + }; + + partition@5
[OpenWrt-Devel] [PATCH][V2] ramips:Add support for MakerModule MicroWRT
From: 盛凯 shengka...@gmail.com From: 盛凯 shengka...@gmail.com v2:fix space issues MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengka...@gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 2 + target/linux/ramips/mt7620/profiles/microwrt.mk| 9 ++ 6 files changed, 123 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..24e1ba8 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..dffa832 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; + *MakerModule MicroWRT) + name=microwrt + ;; *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..17b456b 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ + microwrt | \ mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..a3b5cd1 --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = MakerModule MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only; + }; + + factory: partition@4 { + label = factory; + reg = 0x4 0x1; + read-only; + }; + + partition@5 { + label = firmware; + reg = 0x5 0xfb; + }; + }; + }; + }; + + ehci@101c { + status = okay; + }; + + ohci@101c1000 { + status = okay; + }; + + pcie@1014 { + status = okay; + }; + + ethernet@1010 { + pinctrl-names = default; + pinctrl-0 = ephy_pins; +
[OpenWrt-Devel] [PATCH] ramips:Add support for MakerModule MicroWRT
First of all,this patch is not created by me.I just help him to send this patch:-D MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengkai81 at gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 2 + target/linux/ramips/mt7620/profiles/microwrt.mk| 12 +++ 6 files changed, 126 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..2035ab0 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..d115b4f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; +*MakerModule MicroWRT) +name=microwrt +;; *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..57a339e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ +microwrt | \ mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..8088ccb --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = MakerModule MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only; + }; + + factory: partition@4 { + label = factory; + reg = 0x4 0x1; + read-only; + }; + + partition@5 { + label = firmware; + reg = 0x5 0xfb; + }; + }; + }; + }; + + ehci@101c { + status = okay; + }; + + ohci@101c1000 { + status = okay; + }; + + pcie@1014 { + status = okay; + }; + + ethernet@1010 { + pinctrl-names = default; +
Re: [OpenWrt-Devel] [PATCH] ramips:Add support for MakerModule MicroWRT
Ah I forgot to add ' From: 盛凯 shengka...@gmail.com ' in the patch. I think I needn't submit this patch again.but please let me know if I have to do this:-D 2015-04-06 8:15 GMT+08:00 郭传鈜 gch981...@gmail.com: First of all,this patch is not created by me.I just help him to send this patch:-D MicroWRT is an wireless router with 2 USB,1 ethernet port. It has a 16M flash and 64M DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. The detailed information, please refer to https://www.microduino.cc/wiki/index.php?title=Main_Page This patch adds support for it. Because there is only one port,so disabled VLAN and use eth0 as lan port. and only a power LED control by power pin. Signed-off-by: 盛凯 shengkai81 at gmail.com --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MicroWRT.dts | 107 + target/linux/ramips/image/Makefile | 2 + target/linux/ramips/mt7620/profiles/microwrt.mk| 12 +++ 6 files changed, 126 insertions(+) create mode 100644 target/linux/ramips/dts/MicroWRT.dts create mode 100644 target/linux/ramips/mt7620/profiles/microwrt.mk diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d4ec19d..2035ab0 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -45,6 +45,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ + microwrt | \ w150m | \ zte-q7 | \ all0256n | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index fc6eb37..d115b4f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -202,6 +202,9 @@ ramips_board_detect() { *Planex MZK-750DHP) name=mzk-750dhp ;; +*MakerModule MicroWRT) +name=microwrt +;; *NBG-419N) name=nbg-419n ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a5773b5..57a339e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -60,6 +60,7 @@ platform_check_image() { m2m | \ m3 | \ m4 | \ +microwrt | \ mlw221 | \ mlwg2 | \ mofi3500-3gn | \ diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts new file mode 100644 index 000..8088ccb --- /dev/null +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -0,0 +1,107 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = microwrt, ralink,mt7620a-soc; + model = MakerModule MicroWRT; + + chosen { + bootargs = console=ttyS0,115200; + }; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = w25q128; + reg = 0 0; + linux,modalias = m25p80, w25q128; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only; + }; + + factory: partition@4 { + label = factory; + reg = 0x4 0x1; + read-only; + }; + + partition@5 { + label = firmware; + reg = 0x5 0xfb
[OpenWrt-Devel] [PATCH] Add support for ZTE Q7
ZTE Q7 is a wireless router with SD Card,USB,1 ethernet port and a battery. I can,t find any information about this router on ZTE's website. But I found this : http://en.cctairmobi.com/plus/list.php?tid=40 This router is the same as ZTE Q7 and later I found that both routers are made by the same company:-D This patch adds support for it. Because there is only one port,I disabled VLAN and use eth0 as lan port. I could only create a sysupgrade firmware because I don't know how the orignal webpage check the uploaded image:-( Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/ZTE-Q7.dts | 111 + target/linux/ramips/image/Makefile | 2 + 7 files changed, 124 insertions(+) create mode 100644 target/linux/ramips/dts/ZTE-Q7.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index bfe1c0c..56ba3b7 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -237,6 +237,9 @@ case $board in set_usb_led lenovo:blue:usb set_wifi_led lenovo:blue:wifi ;; + zte-q7) + set_wifi_led zte:blue:status + ;; esac board_config_flush diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 89d1681..d4ec19d 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ w150m | \ + zte-q7 | \ all0256n | \ all5002 | \ all5003 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 50b6ff2..5301593 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -224,6 +224,9 @@ get_status_led() { y1s) status_led=lenovo:blue:power ;; + zte-q7) + status_led=zte:red:status + ;; esac } diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4527414..fc6eb37 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -379,6 +379,9 @@ ramips_board_detect() { *ZBT WR8305RT) name=wr8305rt ;; + *ZTE Q7) + name=zte-q7 + ;; *Lenovo Y1) name=y1 ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index fffbe72..a5773b5 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -114,6 +114,7 @@ platform_check_image() { xiaomi-miwifi-mini |\ y1 |\ y1s |\ + zte-q7 |\ zbt-wa05) [ $magic != 27051956 ] { echo Invalid image type. diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts new file mode 100644 index 000..9efc35e --- /dev/null +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -0,0 +1,111 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = ZTE-Q7, ralink,mt7620a-soc; + model = ZTE Q7; + + palmbus@1000 { + + gpio0: gpio@600 { + status = okay; + }; + + gpio1: gpio@638 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1; + read-only
[OpenWrt-Devel] [PATCH] ramips:Add support for ZTE Q7
Sorry I resend this patch just because of the title... ZTE Q7 is a wireless router with SD Card,USB,1 ethernet port and a battery.It used MT7620a SoC. I can,t find any information about this router on ZTE's website. But I found this : http://en.cctairmobi.com/plus/list.php?tid=40 This router is the same as ZTE Q7 and later I found that both routers are made by the same company:-D This patch adds support for it. Because there is only one port,I disabled VLAN and use eth0 as lan port. I could only create a sysupgrade firmware because I don't know how the orignal webpage check the uploaded image:-( Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/ZTE-Q7.dts | 111 + target/linux/ramips/image/Makefile | 2 + 7 files changed, 124 insertions(+) create mode 100644 target/linux/ramips/dts/ZTE-Q7.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index bfe1c0c..56ba3b7 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -237,6 +237,9 @@ case $board in set_usb_led lenovo:blue:usb set_wifi_led lenovo:blue:wifi ;; + zte-q7) + set_wifi_led zte:blue:status + ;; esac board_config_flush diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 89d1681..d4ec19d 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ w150m | \ + zte-q7 | \ all0256n | \ all5002 | \ all5003 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 50b6ff2..5301593 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -224,6 +224,9 @@ get_status_led() { y1s) status_led=lenovo:blue:power ;; + zte-q7) + status_led=zte:red:status + ;; esac } diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4527414..fc6eb37 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -379,6 +379,9 @@ ramips_board_detect() { *ZBT WR8305RT) name=wr8305rt ;; + *ZTE Q7) + name=zte-q7 + ;; *Lenovo Y1) name=y1 ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index fffbe72..a5773b5 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -114,6 +114,7 @@ platform_check_image() { xiaomi-miwifi-mini |\ y1 |\ y1s |\ + zte-q7 |\ zbt-wa05) [ $magic != 27051956 ] { echo Invalid image type. diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts new file mode 100644 index 000..9efc35e --- /dev/null +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -0,0 +1,111 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = ZTE-Q7, ralink,mt7620a-soc; + model = ZTE Q7; + + palmbus@1000 { + + gpio0: gpio@600 { + status = okay; + }; + + gpio1: gpio@638 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only; + }; + + partition@3 { + label = u-boot-env; + reg = 0x3 0x1
Re: [OpenWrt-Devel] [PATCH] Add support for ZTE Q7
Sorry I forgot to edit the title.This is a router with MT7620a SoC so it belongs to ramips target. 2015-03-31 19:38 GMT+08:00 郭传鈜 gch981...@gmail.com: ZTE Q7 is a wireless router with SD Card,USB,1 ethernet port and a battery. I can,t find any information about this router on ZTE's website. But I found this : http://en.cctairmobi.com/plus/list.php?tid=40 This router is the same as ZTE Q7 and later I found that both routers are made by the same company:-D This patch adds support for it. Because there is only one port,I disabled VLAN and use eth0 as lan port. I could only create a sysupgrade firmware because I don't know how the orignal webpage check the uploaded image:-( Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/ZTE-Q7.dts | 111 + target/linux/ramips/image/Makefile | 2 + 7 files changed, 124 insertions(+) create mode 100644 target/linux/ramips/dts/ZTE-Q7.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index bfe1c0c..56ba3b7 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -237,6 +237,9 @@ case $board in set_usb_led lenovo:blue:usb set_wifi_led lenovo:blue:wifi ;; + zte-q7) + set_wifi_led zte:blue:status + ;; esac board_config_flush diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 89d1681..d4ec19d 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ramips_setup_interfaces() 3g150b | \ 3g300m | \ w150m | \ + zte-q7 | \ all0256n | \ all5002 | \ all5003 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 50b6ff2..5301593 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -224,6 +224,9 @@ get_status_led() { y1s) status_led=lenovo:blue:power ;; + zte-q7) + status_led=zte:red:status + ;; esac } diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4527414..fc6eb37 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -379,6 +379,9 @@ ramips_board_detect() { *ZBT WR8305RT) name=wr8305rt ;; + *ZTE Q7) + name=zte-q7 + ;; *Lenovo Y1) name=y1 ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index fffbe72..a5773b5 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -114,6 +114,7 @@ platform_check_image() { xiaomi-miwifi-mini |\ y1 |\ y1s |\ + zte-q7 |\ zbt-wa05) [ $magic != 27051956 ] { echo Invalid image type. diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts new file mode 100644 index 000..9efc35e --- /dev/null +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -0,0 +1,111 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = ZTE-Q7, ralink,mt7620a-soc; + model = ZTE Q7; + + palmbus@1000 { + + gpio0: gpio@600 { + status = okay; + }; + + gpio1: gpio@638 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x3; + read-only
Re: [OpenWrt-Devel] What should I do if I want to use the RGMII interface on Ralink RT3052?
Sorry , I'll confirm this and reply you later:-) 2015-02-19 16:39 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: On 19 Feb 2015, at 10:32, 郭传鈜 gch981...@gmail.com wrote: I've just changed the fpa2 value to 0x25502f28 (Port 5 is force enabled now) so swconfig shows the port as Link down. Yes, there's also POC0 register used to disable ports. It's default value is set by bootloader. Swconfig should show an option disabled or similiar under each port. What does it show? RTL8211CL isn't a switch.It's just a gigabit PHY and other 4 ports of this router is connected to the intergated switch:-) 2015-02-19 16:01 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: On 19 Feb 2015, at 09:45, 郭传鈜 gch981...@gmail.com wrote: Portmap?This value is only for the default VLAN config of the switch right? But the problem I'm facing is that the link status of port 5 is always link down even if I plugged in the network cable:-( Actually no, the switch has like two logical switches and it doesn't forward packets between those two (LAN/WAN). Does swconfig show the port as disabled? 2015-02-19 15:24 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: Hi! On 19 Feb 2015, at 04:14, 郭传鈜 gch981...@gmail.com wrote: Hello,everyone! There is a kind of Huawei HG255D which has an RTL8211CL Gigabit PHY and We are trying to add support for it. But I can't find anything about the RGMII and mdio-bus in any dts file of rt305x-based devices:-( The only device I found which used the interface is WL-351 with an RTL8366 switch but it doesn't use the MDIO interface to control it. I tried to copy the fpa2 and fct2 value from WL-351.dts but ,of course, it doesn't work. Then I tried to do the following: https://github.com/981213/openwrt/commit/47fa84df4dcc9b8bfe49ed2211d463ed014e2df2 Yes, there's that and then you need to configure registers for gdma2 in the ethernet driver... Register a second netdev and map packets, to the corresponding netdev/gdma (in/out) interface, by dma descriptors. OR In the dst file under the esw, change the value of portmap to 3f. XD but it doesn't work too. Could someone please tell me what should I do in the dts file and how can I reset the PHY? Sorry for my bad English:-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] What should I do if I want to use the RGMII interface on Ralink RT3052?
Port 5: disable: 0 doubletag: 0 untag: 1 led: ??? lan: 1 recv_bad: 0 recv_good: 0 tr_bad: ??? tr_good: ??? pvid: 5 link: port:5 link:down 2015-02-19 17:04 GMT+08:00 郭传鈜 gch981...@gmail.com: Sorry , I'll confirm this and reply you later:-) 2015-02-19 16:39 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: On 19 Feb 2015, at 10:32, 郭传鈜 gch981...@gmail.com wrote: I've just changed the fpa2 value to 0x25502f28 (Port 5 is force enabled now) so swconfig shows the port as Link down. Yes, there's also POC0 register used to disable ports. It's default value is set by bootloader. Swconfig should show an option disabled or similiar under each port. What does it show? RTL8211CL isn't a switch.It's just a gigabit PHY and other 4 ports of this router is connected to the intergated switch:-) 2015-02-19 16:01 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: On 19 Feb 2015, at 09:45, 郭传鈜 gch981...@gmail.com wrote: Portmap?This value is only for the default VLAN config of the switch right? But the problem I'm facing is that the link status of port 5 is always link down even if I plugged in the network cable:-( Actually no, the switch has like two logical switches and it doesn't forward packets between those two (LAN/WAN). Does swconfig show the port as disabled? 2015-02-19 15:24 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: Hi! On 19 Feb 2015, at 04:14, 郭传鈜 gch981...@gmail.com wrote: Hello,everyone! There is a kind of Huawei HG255D which has an RTL8211CL Gigabit PHY and We are trying to add support for it. But I can't find anything about the RGMII and mdio-bus in any dts file of rt305x-based devices:-( The only device I found which used the interface is WL-351 with an RTL8366 switch but it doesn't use the MDIO interface to control it. I tried to copy the fpa2 and fct2 value from WL-351.dts but ,of course, it doesn't work. Then I tried to do the following: https://github.com/981213/openwrt/commit/47fa84df4dcc9b8bfe49ed2211d463ed014e2df2 Yes, there's that and then you need to configure registers for gdma2 in the ethernet driver... Register a second netdev and map packets, to the corresponding netdev/gdma (in/out) interface, by dma descriptors. OR In the dst file under the esw, change the value of portmap to 3f. XD but it doesn't work too. Could someone please tell me what should I do in the dts file and how can I reset the PHY? Sorry for my bad English:-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] What should I do if I want to use the RGMII interface on Ralink RT3052?
I've just changed the fpa2 value to 0x25502f28 (Port 5 is force enabled now) so swconfig shows the port as Link down. RTL8211CL isn't a switch.It's just a gigabit PHY and other 4 ports of this router is connected to the intergated switch:-) 2015-02-19 16:01 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: On 19 Feb 2015, at 09:45, 郭传鈜 gch981...@gmail.com wrote: Portmap?This value is only for the default VLAN config of the switch right? But the problem I'm facing is that the link status of port 5 is always link down even if I plugged in the network cable:-( Actually no, the switch has like two logical switches and it doesn't forward packets between those two (LAN/WAN). Does swconfig show the port as disabled? 2015-02-19 15:24 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: Hi! On 19 Feb 2015, at 04:14, 郭传鈜 gch981...@gmail.com wrote: Hello,everyone! There is a kind of Huawei HG255D which has an RTL8211CL Gigabit PHY and We are trying to add support for it. But I can't find anything about the RGMII and mdio-bus in any dts file of rt305x-based devices:-( The only device I found which used the interface is WL-351 with an RTL8366 switch but it doesn't use the MDIO interface to control it. I tried to copy the fpa2 and fct2 value from WL-351.dts but ,of course, it doesn't work. Then I tried to do the following: https://github.com/981213/openwrt/commit/47fa84df4dcc9b8bfe49ed2211d463ed014e2df2 Yes, there's that and then you need to configure registers for gdma2 in the ethernet driver... Register a second netdev and map packets, to the corresponding netdev/gdma (in/out) interface, by dma descriptors. OR In the dst file under the esw, change the value of portmap to 3f. XD but it doesn't work too. Could someone please tell me what should I do in the dts file and how can I reset the PHY? Sorry for my bad English:-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] What should I do if I want to use the RGMII interface on Ralink RT3052?
Portmap?This value is only for the default VLAN config of the switch right? But the problem I'm facing is that the link status of port 5 is always link down even if I plugged in the network cable:-( 2015-02-19 15:24 GMT+08:00 Mikko Hissa mikko.hi...@werzek.com: Hi! On 19 Feb 2015, at 04:14, 郭传鈜 gch981...@gmail.com wrote: Hello,everyone! There is a kind of Huawei HG255D which has an RTL8211CL Gigabit PHY and We are trying to add support for it. But I can't find anything about the RGMII and mdio-bus in any dts file of rt305x-based devices:-( The only device I found which used the interface is WL-351 with an RTL8366 switch but it doesn't use the MDIO interface to control it. I tried to copy the fpa2 and fct2 value from WL-351.dts but ,of course, it doesn't work. Then I tried to do the following: https://github.com/981213/openwrt/commit/47fa84df4dcc9b8bfe49ed2211d463ed014e2df2 Yes, there's that and then you need to configure registers for gdma2 in the ethernet driver... Register a second netdev and map packets, to the corresponding netdev/gdma (in/out) interface, by dma descriptors. OR In the dst file under the esw, change the value of portmap to 3f. XD but it doesn't work too. Could someone please tell me what should I do in the dts file and how can I reset the PHY? Sorry for my bad English:-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] What should I do if I want to use the RGMII interface on Ralink RT3052?
Hello,everyone! There is a kind of Huawei HG255D which has an RTL8211CL Gigabit PHY and We are trying to add support for it. But I can't find anything about the RGMII and mdio-bus in any dts file of rt305x-based devices:-( The only device I found which used the interface is WL-351 with an RTL8366 switch but it doesn't use the MDIO interface to control it. I tried to copy the fpa2 and fct2 value from WL-351.dts but ,of course, it doesn't work. Then I tried to do the following: https://github.com/981213/openwrt/commit/47fa84df4dcc9b8bfe49ed2211d463ed014e2df2 but it doesn't work too. Could someone please tell me what should I do in the dts file and how can I reset the PHY? Sorry for my bad English:-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for TP-Link MR12U v1 board
This patch is useless now.We don't need to change mktplinkfw.c .The flash layout is defined in target/linux/ar71xx/image/Makefile :-D 2015-02-11 22:49 GMT+08:00 Daniel Petre daniel.pe...@gmail.com: This patch adds support for the TL-MR12U board. Signed-off-by: Daniel Petre daniel.pe...@gmail.com Index: trunk/tools/firmware-utils/src/mktplinkfw.c === --- trunk/tools/firmware-utils/src/mktplinkfw.c (revision 44381) +++ trunk/tools/firmware-utils/src/mktplinkfw.c (working copy) @@ -33,6 +33,7 @@ #define HWID_GL_INET_V10x0801 #define HWID_GS_OOLITE_V1 0x3C000101 #define HWID_TL_MR10U_V1 0x00100101 +#define HWID_TL_MR12U_V1 0x00120101 #define HWID_TL_MR13U_V1 0x00130101 #define HWID_TL_MR3020_V1 0x3021 #define HWID_TL_MR3220_V1 0x3221 @@ -220,6 +221,11 @@ .hw_rev = 1, .layout_id = 4Mlzma, }, { + .id = TL-MR12Uv1, + .hw_id = HWID_TL_MR12U_V1, + .hw_rev = 1, + .layout_id = 4Mlzma, + }, { .id = TL-MR13Uv1, .hw_id = HWID_TL_MR13U_V1, .hw_rev = 1, ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] trying to add support for tp-link mr12u in trunk.
You don't need to copy the mach file and kernel patch again if the firmware of mr13u works fine on mr12u. Just use the following line in target/linux/ar71xx/image/Makefile: $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR12U,tl-mr12u-v1,TL-MR13U,ttyATH0,115200,0x00120101,1,4Mlzma)) 2015-02-11 21:17 GMT+08:00 Daniel Petre daniel.pe...@gmail.com: Hello awesome hackers, i am trying to patch support for tp-link mr12u in trunk by duplicating mr13u files with the proper changes specific to mr12u but i am failing at kernel patching with: make[3]: Entering directory '/home/dani/chaos_calmer/target/linux' make[4]: Entering directory '/home/dani/chaos_calmer/target/linux/ar71xx' if [ -s /home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32/patches/series ]; then (cd /home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32; if quilt --quiltrc=- next /dev/null 21; then quilt --quiltrc=- push -a; else quilt --quiltrc=- top /dev/null 21; fi ); fi Applying patch platform/610-MIPS-ath79-openwrt-machines.patch patching file arch/mips/ath79/machtypes.h patch: malformed patch at line 192: #endif /* _ATH79_MACHTYPE_H */ Patch platform/610-MIPS-ath79-openwrt-machines.patch does not apply (enforce with -f) Makefile:24: recipe for target '/home/dani/chaos_calmer/ build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_ generic/linux-3.14.32/.quilt_checked' failed make[4]: *** [/home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32/.quilt_checked] Error 1 make[4]: Leaving directory '/home/dani/chaos_calmer/target/linux/ar71xx' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/home/dani/chaos_calmer/target/linux' target/Makefile:21: recipe for target 'target/linux/compile' failed make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory '/home/dani/chaos_calmer' target/Makefile:16: recipe for target '/home/dani/chaos_calmer/ staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.target_compile' failed make[1]: *** [/home/dani/chaos_calmer/staging_dir/target-mips_34kc_ uClibc-0.9.33.2/stamp/.target_compile] Error 2 make[1]: Leaving directory '/home/dani/chaos_calmer' /home/dani/chaos_calmer/include/toplevel.mk:179: recipe for target 'world' failed make: *** [world] Error 2 May i ask for review of my ugly hacked patches please? They are at: http://codepad.org/vQbjmyrk Thanks! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] trying to add support for tp-link mr12u in trunk.
But if you really need to add a new mach file,you'd better create another patch instead of modifying 610-MIPS-ath79-openwrt-machines.patch BTW,You didn't modify the patch correctly.I think you should search for the format of a patch.Sorry, I can't describe it here because of my bad English:-D 2015-02-11 21:32 GMT+08:00 郭传鈜 gch981...@gmail.com: You don't need to copy the mach file and kernel patch again if the firmware of mr13u works fine on mr12u. Just use the following line in target/linux/ar71xx/image/Makefile: $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR12U,tl-mr12u-v1,TL-MR13U,ttyATH0,115200,0x00120101,1,4Mlzma)) 2015-02-11 21:17 GMT+08:00 Daniel Petre daniel.pe...@gmail.com: Hello awesome hackers, i am trying to patch support for tp-link mr12u in trunk by duplicating mr13u files with the proper changes specific to mr12u but i am failing at kernel patching with: make[3]: Entering directory '/home/dani/chaos_calmer/target/linux' make[4]: Entering directory '/home/dani/chaos_calmer/target/linux/ar71xx' if [ -s /home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32/patches/series ]; then (cd /home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32; if quilt --quiltrc=- next /dev/null 21; then quilt --quiltrc=- push -a; else quilt --quiltrc=- top /dev/null 21; fi ); fi Applying patch platform/610-MIPS-ath79-openwrt-machines.patch patching file arch/mips/ath79/machtypes.h patch: malformed patch at line 192: #endif /* _ATH79_MACHTYPE_H */ Patch platform/610-MIPS-ath79-openwrt-machines.patch does not apply (enforce with -f) Makefile:24: recipe for target '/home/dani/chaos_calmer/ build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_ generic/linux-3.14.32/.quilt_checked' failed make[4]: *** [/home/dani/chaos_calmer/build_dir/target-mips_34kc_ uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.14.32/.quilt_checked] Error 1 make[4]: Leaving directory '/home/dani/chaos_calmer/target/linux/ar71xx' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/home/dani/chaos_calmer/target/linux' target/Makefile:21: recipe for target 'target/linux/compile' failed make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory '/home/dani/chaos_calmer' target/Makefile:16: recipe for target '/home/dani/chaos_calmer/ staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.target_compile' failed make[1]: *** [/home/dani/chaos_calmer/staging_dir/target-mips_34kc_ uClibc-0.9.33.2/stamp/.target_compile] Error 2 make[1]: Leaving directory '/home/dani/chaos_calmer' /home/dani/chaos_calmer/include/toplevel.mk:179: recipe for target 'world' failed make: *** [world] Error 2 May i ask for review of my ugly hacked patches please? They are at: http://codepad.org/vQbjmyrk Thanks! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for MERCURY MAC1200R
Ah…Someone added an LED trigger for ath10k serveral days ago…So phy0tpt is able to use now:D 2015年2月8日 下午10:25于 roger.pu...@guifi.net写道: From: Roger Pueyo Centelles roger.pu...@guifi.net This patch adds support for MERCURY MAC1200R, a dual band 802.11bgn + 802.11ac router based on the AR9344, with QCA988x ath10k radio and 5 Fast Ethernet ports Signed-off-by: Roger Pueyo Centelles roger.pu...@guifi.net --- target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.14| 1 + .../files/arch/mips/ath79/mach-mc-mac1200r.c | 155 + target/linux/ar71xx/generic/profiles/mercury.mk| 17 +++ target/linux/ar71xx/image/Makefile | 1 + .../736-MIPS-ath79-add-MC-MAC1200R-support.patch | 39 ++ 10 files changed, 229 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c create mode 100644 target/linux/ar71xx/generic/profiles/mercury.mk create mode 100644 target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 03ca864..47d99fa 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -105,6 +105,9 @@ get_status_led() { ls-sr71) status_led=ubnt:green:d22 ;; + mc-mac1200r) + status_led=mercury:green:system + ;; mr600) status_led=mr600:orange:power ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 61d0314..4d7a4a3 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -171,6 +171,11 @@ hornet-ub) ucidef_set_led_usbdev usb USB alfa:blue:usb 1-1 ;; +mc-mac1200r) + ucidef_set_led_wlan wlan2g WLAN2G mercury:green:wlan2g phy1tpt + ucidef_set_led_netdev wlan5g WLAN5G mercury:green:wlan5g wlan0 + ;; + mr600) ucidef_set_led_wlan wlan58 WLAN58 mr600:green:wlan58 phy0tpt ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 144fd28..706cb7f 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -367,6 +367,7 @@ dir-615-e1 |\ dir-615-e4 |\ hiwifi-hc6361 |\ ja76pf |\ +mc-mac1200r|\ mynet-n600 |\ oolite |\ qihoo-c301 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b5224ae..99e4467 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -97,6 +97,9 @@ tplink_board_detect() { 015300*) model=EasyLink EL-MINI ;; + 12*) + model=MERCURY MAC1200R + ;; 3C0001*) model=OOLITE ;; @@ -435,6 +438,9 @@ ar71xx_board_detect() { *LS-SR71) name=ls-sr71 ;; + *MAC1200R) + name=mc-mac1200r + ;; *MR600v2) name=mr600v2 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 576ce56..d2a7d8e 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -297,6 +297,7 @@ platform_check_image() { el-m150 | \ el-mini | \ gl-inet | \ + mc-mac1200r | \ oolite | \ smart-300 | \ tl-mr10u | \ diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14 index 82b2d13..b78d4d2 100644 --- a/target/linux/ar71xx/config-3.14 +++ b/target/linux/ar71xx/config-3.14 @@ -64,6 +64,7 @@ CONFIG_ATH79_MACH_HIWIFI_HC6361=y CONFIG_ATH79_MACH_HORNET_UB=y CONFIG_ATH79_MACH_JA76PF=y CONFIG_ATH79_MACH_JWAP003=y +CONFIG_ATH79_MACH_MC_MAC1200R=y CONFIG_ATH79_MACH_MR600=y CONFIG_ATH79_MACH_MR900=y CONFIG_ATH79_MACH_MYNET_N600=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c new file mode 100644 index 000..70051cf --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c @@ -0,0 +1,155 @@ +/* + * MERCURY MAC1200R board
[OpenWrt-Devel] [PATCH, v2, RESEND] ramips:Fix mt7612 support for Xiaomi Mini.
I resent this just because I used the same title of my previus patch Sorry,I forgot another simple mistake of this device tree in the previus patch. The pcie0 part in pcie@1014 should be defined as pcie-bridge. Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts index fda3325..6f57f39 100644 --- a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts @@ -97,11 +97,12 @@ pcie@1014 { status = okay; - pcie0 { + pcie-bridge { mt76@0,0 { reg = 0x 0 0 0 0; device_type = pci; - mediatek,mtd-eeprom = factory 0x8000; + mediatek,mtd-eeprom = factory 32768; + mediatek,2ghz = 0; }; }; }; -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
Sorry I forget another thing. It should be : pcie-bridge { mt76@0,0 { instead of: pcie0 { mt76@0,0 { I'll send another patch later 2015-02-06 20:22 GMT+08:00 Roger Pueyo Centelles rogerpu...@rogerpueyo.com : Hi, I added some prints to the eeprom.c file and saw that in function: static int mt76_get_of_eeprom(struct mt76_dev *dev, int len) { int ret = -ENOENT; #ifdef CONFIG_OF struct device_node *np = dev-dev-of_node; struct mtd_info *mtd; const __be32 *list; const char *part; phandle phandle; int offset = 0; int size; size_t retlen; dev_printk(KERN_INFO, dev-dev, mt76_get_of_eeprom. Step 0 (before !np)); if (!np) return -ENOENT; dev_printk(KERN_INFO, dev-dev, mt76_get_of_eeprom. Step 0 (after !np)); [...] if does not go further than ( if (!np) ). Any ideas? 2015-02-04 23:13 GMT+01:00 John Crispin blo...@openwrt.org: On 04/02/2015 22:11, Roger Pueyo Centelles wrote: root@OpenWrt:/# hexdump -C /dev/mtd2 20 76 05 01 64 09 80 01 66 5d ff ff ff ff ff ff | v..d...f]..| 0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || 0020 ff ff ff ff ff ff ff ff 64 09 80 01 66 5c 00 d0 |d...f\..| 0030 59 60 00 04 22 0c 04 04 ff ff 15 01 55 77 a8 aa |Y`.Uw..| 0040 8c 88 ff ff 0d 00 00 00 00 00 00 00 00 00 ff ff || 0050 ff ff 10 10 10 10 10 10 11 11 11 11 11 11 12 12 || 0060 12 12 12 12 12 12 13 13 13 14 14 14 15 15 80 ff || 0070 ff ff 80 ff ff ff 00 f4 ff ff ff ff ff ff ff ff || 0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 00d0 1e 00 ff ff ff ff ff ff ff ff ff ff ff ff 08 08 || 00e0 06 06 04 00 06 06 04 00 06 06 04 00 06 06 04 00 || 00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 8000 62 76 00 00 64 09 80 01 66 5e 62 76 c3 14 00 00 ^^ that is the mac at 0x8004 |bv..d...f^bv| 8010 00 00 62 76 c3 14 00 00 00 00 ff ff ff ff ff ff |..bv| 8020 ff ff 37 d8 9d 00 60 7f fd 9b ff ff ff ff ff ff |..7...`.| 8030 ff ff ff ff 22 ff 00 20 ff ff 9b 01 00 00 00 00 |.. | 8040 00 00 ff df 00 82 00 00 00 81 00 00 00 00 e0 01 || 8050 00 00 00 00 00 00 84 0a 1a 00 00 00 83 0b 1a 00 || 8060 00 00 7a 06 22 82 82 7a 06 22 82 82 78 08 22 82 |..z...z...x..| 8070 82 7e 02 22 82 82 76 16 22 82 82 75 1c 22 82 82 |.~...v...u...| 8080 79 0a 22 82 82 79 0a 22 82 82 7b 06 22 82 82 77 |y...y...{...w| 8090 14 22 82 82 7e 05 22 82 82 79 11 22 82 82 00 1b |...~...y.| 80a0 c3 c3 c3 c3 00 00 c4 c4 c2 82 c4 c4 c2 82 00 00 || 80b0 00 00 c4 c4 c2 00 00 00 00 00 c2 c2 82 82 86 00 || 80c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 80f0 ff ff ff ff ff ff ff ff 22 ff ff ff ff ff ff ff |...| 8100 0f ca 74 c5 e8 07 30 3d 01 b0 08 26 00 0e 04 15 |..t...0=...| 8110 00 8a 00 40 00 00 00 08 00 9d 08 00 12 c0 00 00 |...@| 8120 08 20 04 2a 90 00 00 24 01 04 54 08 d0 a0 28 20 |. .*...$..T...( | 8130 ff ff ff ff ff ff ff 08 ff ff ff ff ff ff 00 00 || 8140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 81e0 c0 81 82 c3 04 45 46 07 08 09 ff ff ff ff ff ff |.EF.| 81f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 0001 The MACs are there, at 0x4, 0x28 and 0x8004. 2015-02-04 20:29 GMT+01:00 John Crispin blo...@openwrt.org mailto:blo...@openwrt.org: On 04/02/2015 20:18, Roger Pueyo Centelles wrote: Hi, I tried with 0x8004 and I also got a random IP address. Actually, I changed this block in in eeprom.c (line 571) [1]: can you do a hexdump -C /dev/mtd2 and paste the output please ? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
Sorry,I forgot another simple problem of this device tree in the previus patch. The pcie0 part in pcie@1014 should be defined as pcie-bridge. And 2ghz should be disabled on this router. I think the problem should be fixed now.Roger,Please test this patch:D Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts index fda3325..6f57f39 100644 --- a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts @@ -97,11 +97,12 @@ pcie@1014 { status = okay; - pcie0 { + pcie-bridge { mt76@0,0 { reg = 0x 0 0 0 0; device_type = pci; - mediatek,mtd-eeprom = factory 0x8000; + mediatek,mtd-eeprom = factory 32768; + mediatek,2ghz = 0; }; }; }; -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
The title should be [PATCH,v2] right...Shall I send it again? 2015-02-06 21:21 GMT+08:00 郭传鈜 gch981...@gmail.com: Sorry,I forgot another simple problem of this device tree in the previus patch. The pcie0 part in pcie@1014 should be defined as pcie-bridge. And 2ghz should be disabled on this router. I think the problem should be fixed now.Roger,Please test this patch:D Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts index fda3325..6f57f39 100644 --- a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts @@ -97,11 +97,12 @@ pcie@1014 { status = okay; - pcie0 { + pcie-bridge { mt76@0,0 { reg = 0x 0 0 0 0; device_type = pci; - mediatek,mtd-eeprom = factory 0x8000; + mediatek,mtd-eeprom = factory 32768; + mediatek,2ghz = 0; }; }; }; -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
Actually, you only need to run make target/linux/clean :D 2015-02-05 22:40 GMT+08:00 Roger Pueyo Centelles rogerpu...@rogerpueyo.com : Hi 郭传鈜, I did a make clean and then recompiled. Let me try with a completely new build, I will tell you in an hour or so. Thanks! 2015-02-05 13:56 GMT+01:00 郭传鈜 gch981...@gmail.com: I've asked someone to test this patch and he told me that the mt7612 got a correct MAC address... Why not try to print the EEPROM partition name and offest in eeprom.c? Line 72: part = of_get_property(np, label, NULL); Line 83: offset = be32_to_cpup(list); I'm not sure if 0x8000 could be passed correctly here. BTW, have you recompiled the dts file after modifying it? 2015-02-05 3:18 GMT+08:00 Roger Pueyo Centelles rogerpu...@rogerpueyo.com: Hi, I tried with 0x8004 and I also got a random IP address. Actually, I changed this block in in eeprom.c (line 571) [1]: if (!is_valid_ether_addr(dev-macaddr)) { eth_random_addr(dev-macaddr); dev_printk(KERN_INFO, dev-dev, Invalid MAC address, using random address %pM\n, dev-macaddr); } to: if (!is_valid_ether_addr(dev-macaddr)) { dev_printk(KERN_INFO, dev-dev, Invalid MAC address %pM\n, dev-macaddr); eth_random_addr(dev-macaddr); dev_printk(KERN_INFO, dev-dev, Using random address %pM\n, dev-macaddr); } and I see this message: [ 15.00] ASIC revision: 76120044 [ 15.00] mt76pci :01:00.0: Invalid MAC address ff:ff:ff:ff:ff:ff [ 15.00] mt76pci :01:00.0: Using random address ca:a8:87:d8:65:45 [ 15.32] ROM patch already applied [ 15.33] Firmware Version: 0.0.00 [ 15.33] Build: 1 [ 15.33] Build Time: 201406241830 [ 15.36] Firmware running! [ 15.37] pci device driver attached [1] https://github.com/openwrt/mt76/blob/master/eeprom.c 2015-02-04 17:56 GMT+01:00 John Crispin blo...@openwrt.org: On 04/02/2015 17:08, Roger Pueyo Centelles wrote: Hi, 2015-02-04 12:44 GMT+01:00 Chuanhong Guo gch981...@gmail.com mailto:gch981...@gmail.com: From: 郭传鈜 gch981...@gmail.com mailto:gch981...@gmail.com 2ghz should be disabled on this router. You're right. This should be patched. And I think 'mediatek,mtd-eeprom' should be defined asfactory 32768 instead of factory 0x8000 according to WHR-1166D.dts Actually I didn't have this router.But I think this is the reason that the MT7612E radio always gets a random MAC address on this router. Both definitions are the same, since 0x8000 hex == 32768 dec. try 0x8004 as 0x8000 holds the chip id and right after that is where the mac is located BTW,Roger,could you please test if this patch can fix the MAC address problem you told in your mail? I tried both, with equal results. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
Ah.Sorry,I mean 2.4GHz support for MT7612E should be disabled. 2015-02-04 19:53 GMT+08:00 Gioacchino Mazzurco g...@eigenlab.org: On Wednesday, February 04, 2015 06:44:44 AM Chuanhong Guo wrote: 2ghz should be disabled on this router. It doesn't have 2ghz wireless interface, or it is that we are not capable of supporting it at moment? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
This is a router with mt7620a soc for 2.4GHz wireless and mt7612e for 5.8GHz wireless. 2015-02-04 19:53 GMT+08:00 Gioacchino Mazzurco g...@eigenlab.org: On Wednesday, February 04, 2015 06:44:44 AM Chuanhong Guo wrote: 2ghz should be disabled on this router. It doesn't have 2ghz wireless interface, or it is that we are not capable of supporting it at moment? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini (.dts file)
Someone have posted a good patch for that device: http://www.right.com.cn/forum/thread-157588-1-1.html The dts above works fine. After applying the patch above,you need to edit the following: reset { label = reset; gpios = gpio1 6 0; linux,code = 0x198; }; change 0x198 to 0x100 and add the mt76 section in pcie@1014 { status = okay; }; BTW ,the mac address is defined here: ethernet@1010 { pinctrl-names = default; pinctrl-0 = ephy_pins; mtd-mac-address = factory 0x4; -- ralink,port-map = w; }; 2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles open...@rogerpueyo.com: Hi, Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the vendor provides). I started with this initial patch [2] and I got the firmware running, but a couple of things are missing. I need some help with the .dts file (attached). The current status is: Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade Partially working: MT7612E 802.11ac Not working: LEDs and button The problem with the 802.11ac radio is that I can not read the MAC from the flash. I always get this message at boot time (with different MACs, of course): [ 14.56] mt76pci :01:00.0: Invalid MAC address, using random address 96:a3:a5:fa:a9:2b So far I've tried this: pcie0 { mt76@0,0 { reg = 0x 0 0 0 0; device_type = pci; mediatek,mtd-eeprom = factory 0x8000; }; }; and also factory 0x but the result is the same. I would say the location is correct, because I see three consecutive MAC addresses in the factory partition: 0x0004: 64:09:80:01:66:5D 0x0028: 64:09:80:01:66:5C 0x8004: 64:09:80:01:66:5E that correspond respectively to SoC_radio, Ethernet and pcie_radio. The question is, what is the way to make the mt76 driver use the MAC address written in the flash? Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3, exporting all the gpio numbers, setting the direction to out in all of them and switching the values between 0, 1 and 255, but I can not control any of the three leds (which are always on). The same problem for the reset button, I can not find it anywhere. What else should I try? Thank you very much! Roger [1] http://wiki.openwrt.org/toh/xiaomi/mini [2] https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini (.dts file)
Sorry I haven't read your mail correctly.I pointed to the ethernet MAC address. 2015-01-29 7:42 GMT+08:00, 郭传鈜 gch981...@gmail.com: Someone have posted a good patch for that device: http://www.right.com.cn/forum/thread-157588-1-1.html The dts above works fine. After applying the patch above,you need to edit the following: reset { label = reset; gpios = gpio1 6 0; linux,code = 0x198; }; change 0x198 to 0x100 and add the mt76 section in pcie@1014 { status = okay; }; BTW ,the mac address is defined here: ethernet@1010 { pinctrl-names = default; pinctrl-0 = ephy_pins; mtd-mac-address = factory 0x4; -- ralink,port-map = w; }; 2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles open...@rogerpueyo.com: Hi, Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the vendor provides). I started with this initial patch [2] and I got the firmware running, but a couple of things are missing. I need some help with the .dts file (attached). The current status is: Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade Partially working: MT7612E 802.11ac Not working: LEDs and button The problem with the 802.11ac radio is that I can not read the MAC from the flash. I always get this message at boot time (with different MACs, of course): [ 14.56] mt76pci :01:00.0: Invalid MAC address, using random address 96:a3:a5:fa:a9:2b So far I've tried this: pcie0 { mt76@0,0 { reg = 0x 0 0 0 0; device_type = pci; mediatek,mtd-eeprom = factory 0x8000; }; }; and also factory 0x but the result is the same. I would say the location is correct, because I see three consecutive MAC addresses in the factory partition: 0x0004: 64:09:80:01:66:5D 0x0028: 64:09:80:01:66:5C 0x8004: 64:09:80:01:66:5E that correspond respectively to SoC_radio, Ethernet and pcie_radio. The question is, what is the way to make the mt76 driver use the MAC address written in the flash? Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3, exporting all the gpio numbers, setting the direction to out in all of them and switching the values between 0, 1 and 255, but I can not control any of the three leds (which are always on). The same problem for the reset button, I can not find it anywhere. What else should I try? Thank you very much! Roger [1] http://wiki.openwrt.org/toh/xiaomi/mini [2] https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY MAC1200R
2015-01-27 1:10 GMT+08:00 Roger Pueyo Centelles rogerpu...@rogerpueyo.com: Hi, Thank you both for your comments. @郭传鈜: + ucidef_set_led_wlan wlan2g WLAN2G mercury:green:wlan2g phy1tpt I think the following line is incorrect: + ucidef_set_led_wlan wlan5g WLAN5G mercury:green:wlan5g phy0tpt There is no LED trigger called 'phy0tpt' so I think we should use netdev trigger like this: ucidef_set_led_netdev wlan5g WLAN5G mercury:green:wlan5g wlan0 Ok! +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = { + { + .desc = WPS button, + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL, + .gpio = MAC1200R_GPIO_BTN_WPS, + .active_low = 1, + }, +}; Although the key is called WPS/RESET , I think a reset button is more important than a WPS button.That's just my personal opinion :) I think you are right. + ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac); What? I think this function is only able to load CALDATA for ath9k devices.Maybe I'm wrong:) The router has two radios, one ath9k and one ath10k. Isn't it needed for the ath9k calibration data? Or this radio is already covered by ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac); ...? Acoording to mach-archer-c7.c ,I think we should use ath79_register_pci(); here and use /lib/preinit/81_load_ath10k_board_bin to load calibration data for ath10k. +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x1201,1,8Mlzma)) The factory image is broken since TP-LINK started to use a new firmware format with RSA signature in China.This should be introduced in the TOH wiki I think:) Done! @John: Sorry. Do you mean a description for the patch? I am not aware of what SoB means. Thanks! Roger ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY MAC1200R
2015-01-11 19:48 GMT+08:00 open...@rogerpueyo.com: From: Roger Pueyo Centelles roger.pu...@guifi.net --- target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.14| 1 + .../files/arch/mips/ath79/mach-mc-mac1200r.c | 157 + target/linux/ar71xx/generic/profiles/mercury.mk| 17 +++ target/linux/ar71xx/image/Makefile | 1 + .../736-MIPS-ath79-add-MC-MAC1200R-support.patch | 39 + 10 files changed, 231 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c create mode 100644 target/linux/ar71xx/generic/profiles/mercury.mk create mode 100644 target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 06b96a3..388727f 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -105,6 +105,9 @@ get_status_led() { ls-sr71) status_led=ubnt:green:d22 ;; + mc-mac1200r) + status_led=mercury:green:system + ;; mr600) status_led=mr600:orange:power ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 296ea57..dc5dfa1 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -166,6 +166,11 @@ hornet-ub) ucidef_set_led_usbdev usb USB alfa:blue:usb 1-1 ;; +mc-mac1200r) + ucidef_set_led_wlan wlan2g WLAN2G mercury:green:wlan2g phy1tpt I think the following line is incorrect: + ucidef_set_led_wlan wlan5g WLAN5G mercury:green:wlan5g phy0tpt There is no LED trigger called 'phy0tpt' so I think we should use netdev trigger like this: ucidef_set_led_netdev wlan5g WLAN5G mercury:green:wlan5g wlan0 + ;; + mr600) ucidef_set_led_wlan wlan58 WLAN58 mr600:green:wlan58 phy0tpt ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index b4b6cb3..8151470 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -367,6 +367,7 @@ dir-615-e1 |\ dir-615-e4 |\ hiwifi-hc6361 |\ ja76pf |\ +mc-mac1200r|\ mynet-n600 |\ oolite |\ qihoo-c301 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 9b056e9..3ce63aa 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -97,6 +97,9 @@ tplink_board_detect() { 015300*) model=EasyLink EL-MINI ;; + 12*) + model=MERCURY MAC1200R + ;; 3C0001*) model=OOLITE ;; @@ -432,6 +435,9 @@ ar71xx_board_detect() { *LS-SR71) name=ls-sr71 ;; + *MAC1200R) + name=mc-mac1200r + ;; *MR600v2) name=mr600v2 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 6dabf4e..7153614 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -297,6 +297,7 @@ platform_check_image() { el-m150 | \ el-mini | \ gl-inet | \ + mc-mac1200r | \ oolite | \ smart-300 | \ tl-mr10u | \ diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14 index b6fa4ab..a99c082 100644 --- a/target/linux/ar71xx/config-3.14 +++ b/target/linux/ar71xx/config-3.14 @@ -64,6 +64,7 @@ CONFIG_ATH79_MACH_HIWIFI_HC6361=y CONFIG_ATH79_MACH_HORNET_UB=y CONFIG_ATH79_MACH_JA76PF=y CONFIG_ATH79_MACH_JWAP003=y +CONFIG_ATH79_MACH_MC_MAC1200R=y CONFIG_ATH79_MACH_MR600=y CONFIG_ATH79_MACH_MR900=y CONFIG_ATH79_MACH_MYNET_N600=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c new file mode 100644 index 000..6b92b9c --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c @@ -0,0 +1,157 @@ +/* + * MERCURY MAC1200R board support + * + * Copyright (C) 2012 Gabor Juhos juh...@openwrt.org + * Copyright (C) 2013 Gui Iribarren
Re: [OpenWrt-Devel] [PATCH] ramips:Add support for Aigale Ai-BR100
2014-12-13 15:04 GMT+08:00 Yousong Zhou yszhou4t...@gmail.com: Hi, gch On 13 December 2014 at 10:41, 郭传鈜 gch981...@gmail.com wrote: Aigale Ai-BR100 is a router with mt7620a soc. There are only 2 lights on the board (WAN and WLAN) so I used the wlan light as the status led. IIRC, there are 3 LEDs, but one of them is for power supply indication and cannot be controlled with software :) Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/AIBR100.dts| 106 + target/linux/ramips/image/Makefile | 3 + target/linux/ramips/mt7620/profiles/aigale.mk | 20 8 files changed, 141 insertions(+) create mode 100644 target/linux/ramips/dts/AIBR100.dts create mode 100644 target/linux/ramips/mt7620/profiles/aigale.mk snip diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index e0eb8c2..c5478ce 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -770,6 +770,8 @@ Image/Build/Profile/MT7620a=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a,MT7 Image/Build/Profile/MT7620a_MT7610e=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7610e,MT7620a_MT7610e) Image/Build/Profile/MT7620a_MT7530=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7530,MT7620a_MT7530) Image/Build/Profile/MT7620a_V22SG=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_v22sg,MT7620a_V22SG) +br100_mtd_size=8126464 +Image/Build/Profile/AIBR100=$(call BuildFirmware/CustomFlash/$(1),$(1),ai-br100,AIBR100,$(br100_mtd_size),Ai-BR) Hmm, I remembered that I had to use an initramfs image for OEM installation since boa HTTP server of the OEM firmware uses file size of uploaded firmware instead of ih_size in the uimage header to do CRC checksum. Sorry,I don't know how the image is checked :-( Image/Build/Profile/RP-N53=$(call BuildFirmware/Default8M/$(1),$(1),rp_n53,RP-N53) whr_300hp2_mtd_size=7012352 Image/Build/Profile/WHR300HP2=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-300hp2,WHR-300HP2,$(whr_300hp2_mtd_size)) @@ -799,6 +801,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MT7620a_MT7610e,$(1)) $(call Image/Build/Profile/MT7620a_MT7530,$(1)) $(call Image/Build/Profile/MT7620a_V22SG,$(1)) + $(call Image/Build/Profile/AIBR100,$(1)) $(call Image/Build/Profile/RP-N53,$(1)) $(call Image/Build/Profile/DIR-810L,$(1)) $(call Image/Build/Profile/WHR300HP2,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/aigale.mk b/target/linux/ramips/mt7620/profiles/aigale.mk new file mode 100644 index 000..e58ac43 --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/aigale.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/AIBR100 + NAME:=Aigale Ai-BR100 + PACKAGES:=\ + kmod-usb-core \ + kmod-usb-ohci \ + kmod-ledtrig-usbdev \ + kmod-usb2 +endef kmod-ledtrig-usbdev should be optional. yousong ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lenovo Y1/S port mapping
Y1S has 2 Gigabit LAN. So I used the following: y1 |\ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 5 6t 7 ucidef_add_switch_vlan switch0 2 4 6t ;; Tested on Y1. But I don't have a Y1S so I can't test if this is the correct config. AhSorry for my bad English:-) 2014-12-12 3:44 GMT+08:00, John Crispin blo...@openwrt.org: Hi, any lenovo Y1S users around ? while looking into this ticket - https://dev.openwrt.org/ticket/18528 i found this site - http://show.smzdm.com/detail/94937 looking at the picture i think the port mapping is totally broken. we currently have y1 |\ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 1 2 3 4 5 6t ucidef_add_switch_vlan switch0 2 0 6t wan on Y1 should be port 4 and wan on Y1S should be port 5 (gmac1) i think it should be y1) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 6t ucidef_add_switch_vlan switch0 2 4 6t y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 4 6t ucidef_add_switch_vlan switch0 2 5 6t could someone tell me if the case has WAN written on any of the ports ? John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lenovo Y1/S port mapping
Actually I don't know what port 7 is. Port 5 is not required for Y1. 2014-12-12 22:20 GMT+08:00 John Crispin blo...@openwrt.org: On 12/12/2014 12:21, 郭传鈜 wrote: Y1S has 2 Gigabit LAN. So I used the following: y1 |\ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 5 6t 7 is port 5 and 7 required ? port 7 is HW_NAT port i think John ucidef_add_switch_vlan switch0 2 4 6t ;; Tested on Y1. But I don't have a Y1S so I can't test if this is the correct config. AhSorry for my bad English:-) 2014-12-12 3:44 GMT+08:00, John Crispin blo...@openwrt.org: Hi, any lenovo Y1S users around ? while looking into this ticket - https://dev.openwrt.org/ticket/18528 i found this site - http://show.smzdm.com/detail/94937 looking at the picture i think the port mapping is totally broken. we currently have y1 |\ y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 1 2 3 4 5 6t ucidef_add_switch_vlan switch0 2 0 6t wan on Y1 should be port 4 and wan on Y1S should be port 5 (gmac1) i think it should be y1) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 6t ucidef_add_switch_vlan switch0 2 4 6t y1s) ucidef_set_interfaces_lan_wan eth0.1 eth0.2 ucidef_add_switch switch0 1 1 ucidef_add_switch_vlan switch0 1 0 1 2 3 4 6t ucidef_add_switch_vlan switch0 2 5 6t could someone tell me if the case has WAN written on any of the ports ? John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips:Add support for Aigale Ai-BR100
Aigale Ai-BR100 is a router with mt7620a soc. There are only 2 lights on the board (WAN and WLAN) so I used the wlan light as the status led. Signed-off-by: 郭传鈜 gch981...@gmail.com --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/AIBR100.dts| 106 + target/linux/ramips/image/Makefile | 3 + target/linux/ramips/mt7620/profiles/aigale.mk | 20 8 files changed, 141 insertions(+) create mode 100644 target/linux/ramips/dts/AIBR100.dts create mode 100644 target/linux/ramips/mt7620/profiles/aigale.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index bd8c779..9c49c5c 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -27,6 +27,10 @@ case $board in 3g300m) set_usb_led tenda:blue:3g ;; + ai-br100) + ucidef_set_led_netdev wan wan aigale:blue:wan eth0.2 + set_wifi_led aigale:blue:wlan + ;; a5-v11) ucidef_set_led_default power POWER a5-v11:red:power 1 ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index b519cfd..80b5449 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -110,6 +110,7 @@ ramips_setup_interfaces() ;; 3g-6200n | \ + ai-br100 | \ dir-610-a1 | \ dir-300-b7 | \ dir-320-b1 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index dfa5468..f50ae1f 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -12,6 +12,9 @@ get_status_led() { 3g300m | w150m) status_led=tenda:blue:ap ;; + ai-br100) + status_led=aigale:blue:wlan + ;; ar670w) status_led=ar670w:green:power ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index ff5044c..b4e5d91 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -28,6 +28,9 @@ ramips_board_detect() { *A5-V11) name=a5-v11 ;; + *Aigale Ai-BR100) + name=ai-br100 + ;; *Airlink101 AR670W) name=ar670w ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 4962b8b..991d3b5 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -19,6 +19,7 @@ platform_check_image() { 3g300m | \ a5-v11 | \ air3gii | \ + ai-br100 |\ all0239-3g | \ all0256n | \ all5002 | \ diff --git a/target/linux/ramips/dts/AIBR100.dts b/target/linux/ramips/dts/AIBR100.dts new file mode 100644 index 000..90f3a1e --- /dev/null +++ b/target/linux/ramips/dts/AIBR100.dts @@ -0,0 +1,106 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = AIBR100, ralink,mt7620a-soc; + model = Aigale Ai-BR100; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x2; + read-only; + }; + + partition@2 { + label = u-boot-env; + reg = 0x2 0x1; + read-only; + }; + + factory: partition@3 { + label
Re: [OpenWrt-Devel] 答复: [PATCH] [ar71xx] stops qihoo 360 c301 booting into backup firmware
I think it's because of the following 2 lines: static void qihoo_c301_get_mac(const char *name, char *mac) @@ -98,6 +101,7 @@ static void __init qihoo_c301_setup(void) u8 tmpmac[ETH_ALEN]; ath79_register_m25p80_multi(flash); + qihoo_c301_board = 1; BTW,I think it's easier to use a preinit script to erase the partition than erasing the partition in mach-qihoo-c301.c. I'll submit mine later. 2014-09-20 5:00 GMT+08:00 swigger swig...@gmail.com: Where? I don't think it's whitespace broken. Spaces are spaces and tabs are tabs. -邮件原件- 发件人: Weijie Gao [mailto:hackpas...@gmail.com] 发送时间: 2014年9月20日 1:11 收件人: swigger; openwrt-devel@lists.openwrt.org 主题: Re: [OpenWrt-Devel] [PATCH] [ar71xx] stops qihoo 360 c301 booting into backup firmware Hi, It's great. I hope this can be applied. However, your patch seems to be whitespace broken. Please fix it and resend. Weijie Gao On 2014/9/20 0:50, swigger wrote: Openwrt recently adds Qihoo [NYSE:QIHU] C301 router support. However, this router has a backup firmware in the second flash and the current trunk can only boot 3 times before u-boot boots into that backup firmware. This is a stratgy for unbricking. This patch makes u-boot happy. Signed-off-by: Xungneg li swigger at gmail.com === diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c index 08a602f..774356f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c @@ -14,6 +14,8 @@ #include linux/gpio.h #include linux/platform_device.h #include linux/ath9k_platform.h +#include linux/crc32.h +#include linux/mtd/mtd.h #include asm/mach-ath79/ar71xx_regs.h @@ -79,6 +81,7 @@ static struct gpio_keys_button qihoo_c301_gpio_keys[] __initdata = { }, }; +static int qihoo_c301_board = 0; struct flash_platform_data flash __initdata = {NULL, NULL, 0}; static void qihoo_c301_get_mac(const char *name, char *mac) @@ -98,6 +101,7 @@ static void __init qihoo_c301_setup(void) u8 tmpmac[ETH_ALEN]; ath79_register_m25p80_multi(flash); + qihoo_c301_board = 1; ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); @@ -164,3 +168,86 @@ static void __init qihoo_c301_setup(void) MIPS_MACHINE(ATH79_MACH_QIHOO_C301, QIHOO-C301, Qihoo 360 C301, qihoo_c301_setup); + + +//the following code stops qihoo's uboot booting into the backup system. +static void erase_callback(struct erase_info *erase) { + char * buf = (char*) erase-priv; + int ret; + size_t nb=0; + + if (erase-state == MTD_ERASE_DONE) + { + ret = mtd_write(erase-mtd, 0, 0x1, nb, buf); + } + kfree(erase); + kfree(buf); +} + +static int qihoo_reset_trynum(void) +{ + size_t nb = 0; + char *buf=0, *p; + const char * match = image1trynum=; + size_t matchlen = strlen(match); + struct erase_info *erase; + struct mtd_info * mtd; + unsigned int newcrc; + int ret; + + if (! qihoo_c301_board) + return 0; + + mtd = get_mtd_device_nm(action_image_config); + if (IS_ERR(mtd)) + { + return PTR_ERR(mtd); + } + if (mtd-size!=0x1) + { + return -1; + } + buf = kzalloc(0x1+4, GFP_KERNEL); + ret = mtd_read(mtd, 0, 0x1, nb, buf); + if (nb != 0x1) + { + kfree(buf); + return -1; + } + for (p=buf+4; *p; p+=strlen(p)+1) + { + if (strncmp(p, match, matchlen)==0) + { + p += matchlen; + while (*p) + *p++ = '0'; + break; + } + } + + newcrc = crc32(~0, buf+4, 0xfffc)^0x; + memcpy(buf, newcrc, 4); + + erase = kzalloc(sizeof(struct erase_info), GFP_KERNEL); + if (!erase) + { + kfree(buf); + return -1; + } + erase-mtd = mtd; + erase-callback = erase_callback; + erase-addr = 0; + erase-len = 0x1; + erase-priv = (u_long) buf; + ret = mtd_erase(mtd, erase); + + if (ret) { + kfree(buf); + kfree(erase); + return ret; + } + + return 0; +} +late_initcall(qihoo_reset_trynum); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org
Re: [OpenWrt-Devel] 答复: [PATCH] [ar71xx] stops qihoo 360 c301 booting into backup firmware
Sorry,I haven't read the whole patch.What you've done is not erasing the partition. this patch is great,I think. 2014-09-20 5:00 GMT+08:00 swigger swig...@gmail.com: Where? I don't think it's whitespace broken. Spaces are spaces and tabs are tabs. -邮件原件- 发件人: Weijie Gao [mailto:hackpas...@gmail.com] 发送时间: 2014年9月20日 1:11 收件人: swigger; openwrt-devel@lists.openwrt.org 主题: Re: [OpenWrt-Devel] [PATCH] [ar71xx] stops qihoo 360 c301 booting into backup firmware Hi, It's great. I hope this can be applied. However, your patch seems to be whitespace broken. Please fix it and resend. Weijie Gao On 2014/9/20 0:50, swigger wrote: Openwrt recently adds Qihoo [NYSE:QIHU] C301 router support. However, this router has a backup firmware in the second flash and the current trunk can only boot 3 times before u-boot boots into that backup firmware. This is a stratgy for unbricking. This patch makes u-boot happy. Signed-off-by: Xungneg li swigger at gmail.com === diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c index 08a602f..774356f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-qihoo-c301.c @@ -14,6 +14,8 @@ #include linux/gpio.h #include linux/platform_device.h #include linux/ath9k_platform.h +#include linux/crc32.h +#include linux/mtd/mtd.h #include asm/mach-ath79/ar71xx_regs.h @@ -79,6 +81,7 @@ static struct gpio_keys_button qihoo_c301_gpio_keys[] __initdata = { }, }; +static int qihoo_c301_board = 0; struct flash_platform_data flash __initdata = {NULL, NULL, 0}; static void qihoo_c301_get_mac(const char *name, char *mac) @@ -98,6 +101,7 @@ static void __init qihoo_c301_setup(void) u8 tmpmac[ETH_ALEN]; ath79_register_m25p80_multi(flash); + qihoo_c301_board = 1; ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); @@ -164,3 +168,86 @@ static void __init qihoo_c301_setup(void) MIPS_MACHINE(ATH79_MACH_QIHOO_C301, QIHOO-C301, Qihoo 360 C301, qihoo_c301_setup); + + +//the following code stops qihoo's uboot booting into the backup system. +static void erase_callback(struct erase_info *erase) { + char * buf = (char*) erase-priv; + int ret; + size_t nb=0; + + if (erase-state == MTD_ERASE_DONE) + { + ret = mtd_write(erase-mtd, 0, 0x1, nb, buf); + } + kfree(erase); + kfree(buf); +} + +static int qihoo_reset_trynum(void) +{ + size_t nb = 0; + char *buf=0, *p; + const char * match = image1trynum=; + size_t matchlen = strlen(match); + struct erase_info *erase; + struct mtd_info * mtd; + unsigned int newcrc; + int ret; + + if (! qihoo_c301_board) + return 0; + + mtd = get_mtd_device_nm(action_image_config); + if (IS_ERR(mtd)) + { + return PTR_ERR(mtd); + } + if (mtd-size!=0x1) + { + return -1; + } + buf = kzalloc(0x1+4, GFP_KERNEL); + ret = mtd_read(mtd, 0, 0x1, nb, buf); + if (nb != 0x1) + { + kfree(buf); + return -1; + } + for (p=buf+4; *p; p+=strlen(p)+1) + { + if (strncmp(p, match, matchlen)==0) + { + p += matchlen; + while (*p) + *p++ = '0'; + break; + } + } + + newcrc = crc32(~0, buf+4, 0xfffc)^0x; + memcpy(buf, newcrc, 4); + + erase = kzalloc(sizeof(struct erase_info), GFP_KERNEL); + if (!erase) + { + kfree(buf); + return -1; + } + erase-mtd = mtd; + erase-callback = erase_callback; + erase-addr = 0; + erase-len = 0x1; + erase-priv = (u_long) buf; + ret = mtd_erase(mtd, erase); + + if (ret) { + kfree(buf); + kfree(erase); + return ret; + } + + return 0; +} +late_initcall(qihoo_reset_trynum); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH][ramips]Add support for Aigale Ai-BR100
Ai-BR100 is a router with mt7620a chip.Maybe it's only sold in China. There are only 2 lights on the board (WAN and WLAN) so I used the wlan light as the status led. USB is not working normally (only usb2.0 devices can be recognized when I select kmod-usb2 and kmod-usb-ohci) I don't know if it is caused by my dts file:-( Signed-off-by: Chuanhong Guo gch981...@gmail.com diff -ruN a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh --- a/target/linux/ramips/base-files/etc/diag.sh 2014-07-02 23:06:16.196364942 +0800 +++ b/target/linux/ramips/base-files/etc/diag.sh 2014-07-02 17:50:24.925880926 +0800 @@ -179,6 +179,9 @@ na930) status_led=na930:blue:power ;; + ai-br100) + status_led=aigale:blue:wlan + ;; esac } diff -ruN a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 2014-07-02 23:06:16.197364943 +0800 +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 2014-07-02 17:50:24.926880924 +0800 @@ -121,6 +121,7 @@ wr512-3gn | \ wr6202 | \ wrtnode | \ + ai-br100 | \ mzk-w300nh2 | \ ur-326n4g | \ ur-336un | \ diff -ruN a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds --- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 2014-07-02 23:06:16.197364943 +0800 +++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds 2014-07-02 17:50:24.926880924 +0800 @@ -153,6 +153,10 @@ set_usb_led alfa:blue:usb set_wifi_led rt2800pci-phy0::radio ;; + ai-br100) + ucidef_set_led_netdev wan wan aigale:blue:wan eth0.2 + set_wifi_led aigale:blue:wlan + ;; wcr-150gn) set_usb_led wcr150gn:amber:user ;; diff -ruN a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh --- a/target/linux/ramips/base-files/lib/ramips.sh 2014-07-02 23:06:16.198364946 +0800 +++ b/target/linux/ramips/base-files/lib/ramips.sh 2014-07-02 17:50:24.926880924 +0800 @@ -304,6 +304,9 @@ *Wansview NCS601W) name=ncs601w ;; + *Aigale Ai-BR100) + name=ai-br100 + ;; *Sercomm NA930) name=na930 ;; diff -ruN a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh 2014-07-02 23:06:16.199364951 +0800 +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh 2014-07-02 17:50:24.927880922 +0800 @@ -90,6 +90,7 @@ wr512-3gn |\ wmr300 |\ wrtnode |\ + ai-br100 |\ x5 |\ x8) [ $magic != 27051956 ] { diff -ruN a/target/linux/ramips/dts/AIBR100.dts b/target/linux/ramips/dts/AIBR100.dts --- a/target/linux/ramips/dts/AIBR100.dts 1970-01-01 08:00:00.0 +0800 +++ b/target/linux/ramips/dts/AIBR100.dts 2014-07-02 17:47:58.887491883 +0800 @@ -0,0 +1,100 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = AIBR100, ralink,mt7620a-soc; + model = Aigale Ai-BR100; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x2; + read-only; + }; + + partition@2 { + label = u-boot-env; + reg = 0x2 0x1; + read-only; + }; + + factory: partition@3 { + label = factory; + reg = 0x3 0x1; + read-only; + }; + + partition@4 { + label = firmware; + reg = 0x4 0x7c; + }; + }; + }; + }; + + ehci@101c { + status = okay; + }; + + ohci@101c1000 { + status = okay; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = i2c, uartf, rgmii1, rgmii2, ephy, wled, nd_sd; + ralink,function = gpio; + }; + }; + }; + + ethernet@1010 { + mtd-mac-address = factory 0x4; + ralink,port-map = w; + }; + + gpio-leds { + compatible = gpio-leds; + wan { + label = aigale:blue:wan; + gpios = gpio2 4 1; + }; + wlan { + label = aigale:blue:wlan; + gpios = gpio3 0 1; + }; + }; + + gpio-keys-polled { + compatible = gpio-keys-polled; + #address-cells = 1; + #size-cells = 0; + poll-interval = 20; + reset { + label = reset; + gpios = gpio0 12 1; + linux,code = 0x198; + }; + }; +}; diff -ruN a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile --- a/target/linux/ramips/image/Makefile 2014-07-02 23:06:16.214364992 +0800 +++ b/target/linux/ramips/image/Makefile 2014-07-02 17:50:24.928880926 +0800 @@ -714,6 +714,8 @@ Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) +br100_mtd_size=8126464 +Image/Build/Profile/AIBR100=$(call
[OpenWrt-Devel] [PATCH][ramips][resend]Add support for Aigale Ai-BR100
Sorry. I resent this because of the text format :-( I don't know why my patch isn't displayed normally in the patchwork page.What should I do? I also uploaded my patch file here: http://php-gch981213.rhcloud.com/wp-content/uploads/2014/07/br100patch.txt Ai-BR100 is a router with mt7620a chip.Maybe it's only sold in China. There are only 2 lights on the board (WAN and WLAN) so I used the wlan light as the status led. USB is not working normally (only usb2.0 devices can be recognized when I select kmod-usb2 and kmod-usb-ohci) I don't know if it is caused by my dts file:-( Signed-off-by: Chuanhong Guo gch981...@gmail.com diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 14d630e..2d34172 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -179,6 +179,9 @@ get_status_led() { na930) status_led=na930:blue:power ;; + ai-br100) + status_led=aigale:blue:wlan + ;; esac } diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index b56fb63..64ae008 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -121,6 +121,7 @@ case $FIRMWARE in wr512-3gn | \ wr6202 | \ wrtnode | \ + ai-br100 | \ mzk-w300nh2 | \ ur-326n4g | \ ur-336un | \ diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds index c2f768b..1c99acc 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds @@ -153,6 +153,10 @@ case $board in set_usb_led alfa:blue:usb set_wifi_led rt2800pci-phy0::radio ;; + ai-br100) + ucidef_set_led_netdev wan wan aigale:blue:wan eth0.2 + set_wifi_led aigale:blue:wlan + ;; wcr-150gn) set_usb_led wcr150gn:amber:user ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index ca339b3..a46b09d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -304,6 +304,9 @@ ramips_board_detect() { *Wansview NCS601W) name=ncs601w ;; + *Aigale Ai-BR100) + name=ai-br100 + ;; *Sercomm NA930) name=na930 ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index a39c433..524fc11 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -90,6 +90,7 @@ platform_check_image() { wr512-3gn |\ wmr300 |\ wrtnode |\ + ai-br100 |\ x5 |\ x8) [ $magic != 27051956 ] { diff --git a/target/linux/ramips/dts/AIBR100.dts b/target/linux/ramips/dts/AIBR100.dts index e69de29..62361ce 100644 --- a/target/linux/ramips/dts/AIBR100.dts +++ b/target/linux/ramips/dts/AIBR100.dts @@ -0,0 +1,100 @@ +/dts-v1/; + +/include/ mt7620a.dtsi + +/ { + compatible = AIBR100, ralink,mt7620a-soc; + model = Aigale Ai-BR100; + + palmbus@1000 { + gpio2: gpio@660 { + status = okay; + }; + + gpio3: gpio@688 { + status = okay; + }; + + spi@b00 { + status = okay; + + m25p80@0 { + #address-cells = 1; + #size-cells = 1; + compatible = en25q64; + reg = 0 0; + linux,modalias = m25p80, en25q64; + spi-max-frequency = 1000; + + partition@0 { + label = u-boot; + reg = 0x0 0x2; + read-only; + }; + + partition@2 { + label = u-boot-env; + reg = 0x2 0x1; + read-only; + }; + + factory: partition@3 { + label = factory; + reg = 0x3 0x1; + read-only; + }; + + partition@4 { + label = firmware; + reg = 0x4 0x7c; + }; + }; + }; + }; + + ehci@101c { + status = okay; + }; + + ohci@101c1000 { + status = okay; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = i2c, uartf, rgmii1, rgmii2, ephy, wled, nd_sd; + ralink,function = gpio; + }; + }; + }; + + ethernet@1010 { + mtd-mac-address = factory 0x4; + ralink,port-map = w; + }; + + gpio-leds { + compatible = gpio-leds; + wan { + label = aigale:blue:wan; + gpios = gpio2 4 1; + }; + wlan { + label = aigale:blue:wlan; + gpios = gpio3 0 1; + }; + }; + + gpio-keys-polled { + compatible = gpio-keys-polled; + #address-cells = 1; + #size-cells = 0; + poll-interval = 20; + reset { + label = reset; + gpios = gpio0 12 1; + linux,code = 0x198; + }; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 5b23035..567d9d9 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -714,6 +714,8 @@ dlink810l_mtd_size=6881280 Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call