...
 
Commits (4)
  • Birger Koblitz's avatar
    ramips: add support for Edimax RG21S · f285e863
    Birger Koblitz authored
    SoC:	MediaTek MT7621AT dual-core @ 880MHz
    RAM:	256M (Nanya NT5CC128M)
    FLASH:	16MB (Macronix MX25L12835F)
    WiFi:	- 2.4GHz MediaTek MT7615N bgn
    	- 5GHz MediaTek MT7615N nac
    Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
    USB:	No
    BTN:	Reset, WPS
    LED:	4 red LEDs, indistinguishable when casing closed
    UART: 	UART is present as Pads marked J1 on the PCB.
    	3.3V - RX - GND - TX / 57600-8N1
    	3.3V is the square pad
    
    Installation
    ------------
    Update the factory image via the OEM web-interface
    (by default:http://192.168.1.1)
    The sysupgrade image can be installed via TFTP from
    the U-Boot bootloader. Connect ethernet port 2.
    Signed-off-by: default avatarBirger Koblitz <mail@birger-koblitz.de>
    [flash node rename, EDIMAX -> Edimax, complete device model name]
    Signed-off-by: ynezz's avatarPetr Štetiar <ynezz@true.cz>
    f285e863
  • Birger Koblitz's avatar
    ramips: add support for Asus RT-AC85P · fde8e2e0
    Birger Koblitz authored
    SoC:	MediaTek MT7621AT dual-core @ 880MHz
    RAM:	256M (Winbond W632GG6KB-1)
    FLASH:	128MB (Macronix MX30LF1G18AC-TI)
    WiFi:	- 2.4GHz MediaTek MT7615N bgn
    	- 5GHz MediaTek MT7615N nac
    Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
    USB:	1 x USB 3.1 (Gen 1)
    BTN:	Reset, WPS
    LED:	- Power (blue)
    	- 5Ghz (blue)
    	- 2.4GHz (blue)
    	- Internet (blue)
    	- 4x LAN (blue)
    	(LAN/WAN leds are not controllable by GPIOs)
    UART: 	UART is present as Pads marked J4 on the PCB.
    	3.3V - TX - RX - GND / 57600-8N1
    	3.3V is the square pad
    MAC:	The MAC address on the router-label matches the MAC of
    	the 2.4 GHz WiFi.
    	LAN and WAN MAC are identical: MAC_LABEL+4
    	5 GHz WiFi MAC: also MAC_LABEL+4
    
    Installation
    ------------
    Via U-Boot tftpd:
    Switch on device, within 2s press reset button and keep pressed
    until power LED starts blinking slowly.
    Upload factory image via tftp put, the router's ip is 192.168.1.1
    and expects the client on 192.168.1.75.
    
    The images also work on the Asus RT-AC65P models as tested by Gabor.
    Signed-off-by: default avatarBirger Koblitz <mail@birger-koblitz.de>
    Tested-by: default avatarGabor Varga <vargagab@gmail.com>
    [fixed Asus -> ASUS in DTS]
    Signed-off-by: ynezz's avatarPetr Štetiar <ynezz@true.cz>
    fde8e2e0
  • Daniel Danzberger's avatar
    ramips: mt7621: Add new device AsiaRF AP7621-NV1 · 10c5d3dd
    Daniel Danzberger authored
    SoC:    Mediatek MT7621A
    CPU:    4x 880Mhz
    Cache:  32 KB I-Cache and 32 KB D-Cach
            256 KB L2 Cache (shared by Dual-Core)
    RAM:    DDR3 512MB 16bits BUS
    FLASH:  16MB
    Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
    POE:    (1x PD, 2x PSE)
    USB:    1x 3.0
    PCI:    3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
    GPS:    Quectel L70B
    SIM:    2 Slots
    BTN:    Reset
    LED:    - Power
            - Ethernet
            - Wifi
            - USB
    UART:  UART is present as Pads with throughholes on the PCB.
           They are located on left side.
           3.3V - RX - GND - TX / 57600-8N1
           3.3V is the square pad
    
    Installation
    ------------
    The stock image is a modified openwrt and can be overflashed via sysupgrade -F
    Signed-off-by: default avatarDaniel Danzberger <daniel@dd-wrt.com>
    [merge conflict in mt7621.mk]
    Signed-off-by: ynezz's avatarPetr Štetiar <ynezz@true.cz>
    10c5d3dd
  • Nick Briggs's avatar
    ramips: add support for EnGenius ESR600 · 3df3bb0d
    Nick Briggs authored
    The EnGenius ESR600 is a dual band wireless router with a 4-port gigabit
    Ethernet switch, a gigabit Ethernet WAN port and a USB port.
    
    Specification:
    
    - Bootloader:	U-Boot
    - SoC:		MediaTek MT7620A (600 MHz)
    - Flash:	16MB, Macronix MX25L12845E
    - RAM:		64MB, Nanya NT5TU32M16DG-AC
    - Serial:	115200 baud, no header, 3.3V
      		J2: Vcc (arrow), Gnd, Tx, Rx
    - USB:		USB 2, 5V
    - Ethernet:	5 x 1 Gb/s 4 LAN 1 WAN, Atheros AR8327
    - WiFi0:	5 GHz 802.11 b/g/n Ralink RT5592N
      		300 Mb/s, 2T2R
    - WiFi1:	2.4 GHz 802.11 b/g/n integrated
      		300 Mb/s, 2T2R
    - Antennas:	2 per radio, internal
    - LEDs:		1 programmable power (amber)
      		2 programable radio (blue)
    		1 programable WPS-5G (blue)
    		1 non-programable WAN activity (blue)
    		1 unconfigured WPS-2.4G (amber)
    - Buttons:	GPIO: Reset, WPS
    
    Installation:
    
    Use the OEM web interface to install the ...-factory.dlf image.
    Use the OpenWRT ...-sysupgrade.bin image for future upgrades.
    
    The J2 serial port can be accessed either by soldering in a header,
    standard 0.1" spacing, or by using pogo-pins against the back side.
    
    As configured by the OEM, the U-Boot boot delay is short, however quickly
    typing "1" leads to the U-Boot "System load Linux to SDRAM via TFTP"
    prompt.  The TFTP client is configured by default with
         client:   192.168.99.9
         server:   192.168.99.8
         filename: uImageESR600
    It will load an OpenWRT initramfs kernel with this method.
    
    Known issues:
    
    1) Only the ports externally labeled WAN, LAN3 and LAN4 are operational.
    LAN1 and LAN2 do not appear to power up. This issue is also present
    in the Lava LR25G001.
    
    2) The amber WPS-2.4G LED, in the same lightguide as the blue WPS-5G LED,
    is not configured in the Device Tree specification.
    
    3) The blue WAN activity LED is not configured in the Device Tree
    specification as this causes the AR8327 switch to fail to initialize.
    Signed-off-by: default avatarNick Briggs <nicholas.h.briggs@gmail.com>
    [merge conflict in 02_network]
    Signed-off-by: ynezz's avatarPetr Štetiar <ynezz@true.cz>
    3df3bb0d
......@@ -186,6 +186,10 @@ elecom,wrh-300cr)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
;;
engenius,esr600)
ucidef_set_led_netdev "wlan5g" "5.0GHz" "$boardname:blue:wlan5g" "wlan0"
ucidef_set_led_netdev "wlan2g" "2.4GHz" "$boardname:blue:wlan2g" "wlan1"
;;
glinet,gl-mt300a|\
glinet,gl-mt300n|\
glinet,gl-mt750)
......
......@@ -226,10 +226,25 @@ ramips_setup_interfaces()
asiarf,ap7621-001)
ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
;;
asiarf,ap7621-nv1)
ucidef_add_switch "switch0" "0:wan" "2:lan" "3:lan" "6@eth0"
;;
asiarf,awapn2403)
ucidef_add_switch "switch0" \
"0:lan" "1:wan" "6@eth0"
;;
asus,rt-ac85p|\
dlink,dir-860l-b1|\
elecom,wrc-1167ghbk2-s|\
elecom,wrc-1900gst|\
elecom,wrc-2533gst|\
huawei,hg255d|\
iodata,wn-ax1167gr|\
iodata,wn-gx300gr|\
iptime,a604m)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
asus,rt-n15|\
belkin,f9k1109v1|\
sitecom,wl-351)
......@@ -297,17 +312,6 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
;;
dlink,dir-860l-b1|\
elecom,wrc-1167ghbk2-s|\
elecom,wrc-1900gst|\
elecom,wrc-2533gst|\
huawei,hg255d|\
iodata,wn-ax1167gr|\
iodata,wn-gx300gr|\
iptime,a604m)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
dlink,dwr-118-a1)
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
......@@ -329,10 +333,18 @@ ramips_setup_interfaces()
ucidef_add_switch "switch1" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;;
engenius,esr600)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0"
;;
fon,fon2601)
ucidef_add_switch "switch0" \
"0:lan" "4:wan" "6@eth0"
;;
edimax,rg21s)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
gehua,ghl-r-001)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
......@@ -549,6 +561,9 @@ ramips_setup_macs()
zbtlink,zbt-we3526)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
asus,rt-ac85p)
wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr)
;;
asus,rt-n56u)
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
wan_mac=$(mtd_get_mac_binary factory 0x8004)
......@@ -624,6 +639,11 @@ ramips_setup_macs()
netgear,r6850)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
edimax,rg21s|\
engenius,esr600)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
hiwifi,hc5661|\
hiwifi,hc5661a|\
hiwifi,hc5761|\
......
......@@ -18,9 +18,16 @@ platform_do_upgrade() {
mikrotik,rbm33g)
[ -z "$(rootfs_type)" ] && mtd erase firmware
;;
asus,rt-ac85p)
echo "Backing up firmware"
dd if=/dev/mtd4 bs=1024 count=4096 > /tmp/backup_firmware.bin
dd if=/dev/mtd5 bs=1024 count=52224 >> /tmp/backup_firmware.bin
mtd -e firmware2 write /tmp/backup_firmware.bin firmware2
;;
esac
case "$board" in
asus,rt-ac85p|\
hiwifi,hc5962|\
netgear,r6220|\
netgear,r6260|\
......
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "engenius,esr600", "ralink,mt7620a-soc";
model = "EnGenius ESR600";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "esr600:amber:power";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wps2g {
label = "esr600:amber:wps2g";
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "esr600:blue:wlan5g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "esr600:blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
iNIC_rf: partition@50000 {
label = "iNIC_rf";
reg = <0x50000 0x10000>;
read-only;
};
partition@60000 {
label = "firmware";
reg = <0x60000 0xf40000>;
compatible = "denx,uimage";
};
partition@fa0000 {
label = "backup";
reg = <0xfa0000 0x10000>;
read-only;
};
partition@fb0000 {
label = "storage";
reg = <0xfb0000 0x50000>;
read-only;
};
};
};
};
&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mtd-mac-address = <&iNIC_rf 0x4>;
port@5 {
status = "okay";
phy-mode = "rgmii";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
mediatek,mdio-mode;
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x10 0x40000000 /* POWER-ON STRAPPING */
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0 STATUS */
0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
0x94 0x0000007e /* PORT6 STATUS */
>;
};
};
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c", /* gpio0: 1-2 */
"uartf", /* gpio0: 7-14 */
"nd_sd", /* gpio2: 45-59 */
"wled"; /* gpio3: 72 */
ralink,function = "gpio";
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci1814,5592";
reg = <0x0 0 0 0 0>;
ralink,mtd-eeprom = <&factory 0x0>;
};
};
&wmac {
ralink,mtd-eeprom = <&iNIC_rf 0x0>;
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "mt7621_asiarf_ap7621.dtsi"
/ {
compatible = "asiarf,ap7621-001", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-001";
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wlan1 {
label = "ap7621-001:orange:wlan1";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
wlan0 {
label = "ap7621-001:orange:wlan0";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
};
&sdhci {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x2000>;
};
partition@32000 {
label = "2860";
reg = <0x32000 0x4000>;
};
partition@36000 {
label = "rtdev";
reg = <0x36000 0x2000>;
};
partition@38000 {
label = "Reserve";
reg = <0x38000 0x8000>;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xfa0000>;
compatible = "denx,uimage";
};
partition@ff0000 {
label = "nvram";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&pcie {
status = "okay";
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "wdt", "jtag";
ralink,function = "gpio";
};
};
};
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621_asiarf_ap7621.dtsi"
/ {
compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-NV1";
};
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
chosen {
bootargs = "console=ttyS0,57600";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wlan1 {
label = "ap7621-001:orange:wlan1";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
wlan0 {
label = "ap7621-001:orange:wlan0";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
};
&sdhci {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x2000>;
};
partition@32000 {
label = "2860";
reg = <0x32000 0x4000>;
};
partition@36000 {
label = "rtdev";
reg = <0x36000 0x2000>;
};
partition@38000 {
label = "Reserve";
reg = <0x38000 0x8000>;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xfa0000>;
compatible = "denx,uimage";
};
partition@ff0000 {
label = "nvram";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&pcie {
status = "okay";
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "wdt", "jtag";
ralink,function = "gpio";
};
};
};
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "asus,rt-ac85p", "mediatek,mt7621-soc";
model = "ASUS RT-AC85P";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
palmbus: palmbus@1E000000 {
i2c@900 {
status = "okay";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "rt-ac85p:blue:power";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan2g {
label = "rt-ac85p:blue:wlan2g";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan5g {
label = "rt-ac85p:blue:wlan5g";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
};
};
&sdhci {
status = "okay";
};
&nand {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0xe0000>;
read-only;
};
partition@e0000 {
label = "u-boot-env";
reg = <0xe0000 0x100000>;
read-only;
};
factory: partition@1e0000 {
label = "factory";
reg = <0x1e0000 0x100000>;
read-only;
};
factory2: partition@2e0000 {
label = "factory2";
reg = <0x2e0000 0x100000>;
read-only;
};
partition@3e0000 {
label = "kernel";
reg = <0x3e0000 0x400000>;
};
partition@7e0000 {
label = "ubi";
reg = <0x7e0000 0x2e00000>;
};
partition@35e0000 {
label = "firmware2";
reg = <0x35e0000 0x3200000>;
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi0: wifi@0,0 {
compatible = "pci14c3,7615";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
};
};
&pcie1 {
wifi1: wifi@0,0 {
compatible = "pci14c3,7615";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "wllll";
port@5 {
status = "disabled";
};
};
&i2c {
status = "disabled";
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "uart2", "uart3", "i2c";
ralink,function = "gpio";
};
};
};
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "edimax,rg21s", "mediatek,mt7621-soc";
model = "Edimax RG21S";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,57600";
};
palmbus: palmbus@1E000000 {
i2c@900 {
status = "okay";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: led_1 {
label = "rg21s:red:led1";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
};
led_2 {
label = "rg21s:red:led2";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
led_3 {
label = "rg21s:red:led3";
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
};
led_4 {
label = "rg21s:red:led4";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
};
};
};
&sdhci {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi0: wifi@0,0 {
compatible = "pci14c3,7615";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
};
};
&pcie1 {
wifi1: wifi@0,0 {
compatible = "pci14c3,7615";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ethernet {
mediatek,portmap = "wllll";
port@5 {
status = "disabled";
};
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
};
};
};
&xhci {
status = "disabled";
};
......@@ -372,6 +372,19 @@ define Device/elecom_wrh-300cr
endef
TARGET_DEVICES += elecom_wrh-300cr
define Device/engenius_esr600
MTK_SOC := mt7620a
BLOCKSIZE := 64k
IMAGE_SIZE := 15616k
IMAGES += factory.dlf
IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
senao-header -r 0x101 -p 0x57 -t 2
DEVICE_VENDOR := EnGenius
DEVICE_MODEL := ESR600
DEVICE_PACKAGES += kmod-rt2800-pci kmod-usb-core kmod-usb-storage kmod-usb-ohci kmod-usb-ehci
endef
TARGET_DEVICES += engenius_esr600
define Device/fon_fon2601
MTK_SOC := mt7620a
IMAGE_SIZE := 15936k
......
......@@ -30,6 +30,25 @@ define Build/elecom-wrc-factory
mv $@.new $@
endef
define Build/elx-header
$(eval hw_id=$(word 1,$(1)))
$(eval xor_pattern=$(word 2,$(1)))
( \
echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \
dd bs=42 count=1 conv=sync; \
hw_id="$(hw_id)"; \
echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \
dd bs=20 count=1 conv=sync; \
echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
dd bs=8 count=1 conv=sync; \
echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
dd bs=58 count=1 conv=sync; \
) > $(KDIR)/tmp/$(DEVICE_NAME).header
$(call Build/xor-image,-p $(xor_pattern) -x)
cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new
mv $@.new $@
endef
define Build/iodata-factory
$(eval fw_size=$(word 1,$(1)))
$(eval fw_type=$(word 2,$(1)))
......@@ -106,6 +125,16 @@ define Device/asiarf_ap7621-001
endef
TARGET_DEVICES += asiarf_ap7621-001
define Device/asiarf_ap7621-nv1
MTK_SOC := mt7621
IMAGE_SIZE := 16000k
DEVICE_VENDOR := AsiaRF
DEVICE_MODEL := AP7621-NV1
DEVICE_PACKAGES := \
kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
endef
TARGET_DEVICES += asiarf_ap7621-nv1
define Device/asus_rt-ac57u
MTK_SOC := mt7621
DEVICE_VENDOR := ASUS
......@@ -115,6 +144,22 @@ define Device/asus_rt-ac57u
endef
TARGET_DEVICES += asus_rt-ac57u
define Device/asus_rt-ac85p
MTK_SOC := mt7621
DEVICE_VENDOR := ASUS
DEVICE_MODEL := RT-AC85P
IMAGE_SIZE := 51200k
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools
endef
TARGET_DEVICES += asus_rt-ac85p
define Device/buffalo_wsr-1166dhp
MTK_SOC := mt7621
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
......@@ -173,6 +218,20 @@ define Device/d-team_pbr-m1
endef
TARGET_DEVICES += d-team_pbr-m1
define Device/edimax_rg21s
MTK_SOC := mt7621
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Edimax
DEVICE_MODEL := Gemini AC2600 RG21S
IMAGES += factory.bin
IMAGE/factory.bin := \
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
elx-header 02020038 8844A2D168B45A2D
DEVICE_PACKAGES := \
kmod-mt7615e wpad-basic
endef
TARGET_DEVICES += edimax_rg21s
define Device/elecom_wrc-1167ghbk2-s
MTK_SOC := mt7621
IMAGE_SIZE := 15488k
......
......@@ -4256,7 +4256,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif /* __NAND_DEF_H__ */
--- /dev/null
+++ b/drivers/mtd/nand/nand_device_list.h
@@ -0,0 +1,59 @@
@@ -0,0 +1,60 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
......@@ -4308,6 +4308,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ {0xC8DC, 0x909554, 5, 8, 512, 128, 2048, 64, 0x30C77fff, "F59L4G81A", 0},
+ {0xECD3, 0x519558, 5, 8, 1024, 128, 2048, 64, 0x44333, "K9K8G8000", 0},
+ {0xC2F1, 0x801DC2, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G08AA", 0},
+ {0xC2F1, 0x809502, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G18AC", 0},
+ {0x98D3, 0x902676, 5, 8, 1024, 256, 4096, 224, 0x00C25332, "TC58NVG3S0F", 0},
+ {0x01DA, 0x909546, 5, 8, 256, 128, 2048, 128, 0x30C77fff, "S34ML02G200TF", 0},
+ {0x01DC, 0x909556, 5, 8, 512, 128, 2048, 128, 0x30C77fff, "S34ML04G200TF", 0},
......