mediatek: filogic: add support for Cudy RE3000 v1
MT7981B /256MB /16MB SPI (XM25QH128C) AX 2.4Ghz AX 5Ghz 160Mhz wide 1Gbit LAN OEM: root@RE3000:~# ifconfig |grep HWaddr br-lan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 (label) br-wan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 eth0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 ra0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 ra2 Link encap:Ethernet HWaddr 82:XX:XX:28:XX:X0 rax0 Link encap:Ethernet HWaddr 82:XX:XX:38:XX:X0 rax2 Link encap:Ethernet HWaddr 82:XX:XX:58:XX:X0 OpenWrt root@OpenWrt:/# ifconfig |grep HW br-lan Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 eth0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 phy0-ap0 Link encap:Ethernet HWaddr 80:XX:XX:08:XX:X0 phy1-ap0 Link encap:Ethernet HWaddr 82:XX:XX:08:XX:X1 tftp Installation via u-boot: Connect TTL3.3V converter connector is under the radiator Set speed 115200 8 N 1 Interrupt boot process by holding down-arrow key during boot then >> 6. Load image >> 0 - TFTP client (Default) enter IP adresses and initramfs-kernel.bin write to flash via sysupgrade or gui Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
This commit is contained in:
parent
55c7b2cdaf
commit
e8f7597317
7 changed files with 251 additions and 0 deletions
|
@ -9,6 +9,7 @@ set_preinit_iface() {
|
||||||
ip link set eth1 up
|
ip link set eth1 up
|
||||||
ifname=eth1
|
ifname=eth1
|
||||||
;;
|
;;
|
||||||
|
cudy,re3000-v1|\
|
||||||
ubnt,unifi-6-lr|\
|
ubnt,unifi-6-lr|\
|
||||||
zyxel,nwa50ax-pro)
|
zyxel,nwa50ax-pro)
|
||||||
ip link set eth0 up
|
ip link set eth0 up
|
||||||
|
|
221
target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
Normal file
221
target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
#include "mt7981.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Cudy RE3000 v1";
|
||||||
|
compatible = "cudy,re3000-v1", "mediatek,mt7981";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
serial0 = &uart0;
|
||||||
|
label-mac-device = &gmac1;
|
||||||
|
led-boot = &led_status;
|
||||||
|
led-failsafe = &led_status;
|
||||||
|
led-running = &led_status;
|
||||||
|
led-upgrade = &led_status;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_status: led@0 {
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
label = "red:wifi5";
|
||||||
|
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@2 {
|
||||||
|
label = "white:wifi2";
|
||||||
|
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@3 {
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@4 {
|
||||||
|
function = LED_FUNCTION_WPS;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&watchdog {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
ð {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
gmac1: mac@1 {
|
||||||
|
compatible = "mediatek,eth-mac";
|
||||||
|
reg = <1>;
|
||||||
|
phy-mode = "gmii";
|
||||||
|
phy-handle = <&int_gbe_phy>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_bdinfo_de00 0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio_bus {
|
||||||
|
switch: switch@1f {
|
||||||
|
compatible = "mediatek,mt7531";
|
||||||
|
reg = <31>;
|
||||||
|
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&spi2_flash_pins>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
spi-max-frequency = <25000000>;
|
||||||
|
spi-tx-bus-width = <4>;
|
||||||
|
spi-rx-bus-width = <4>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@00000 {
|
||||||
|
label = "BL2";
|
||||||
|
reg = <0x00000 0x40000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x40000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
factory: partition@50000 {
|
||||||
|
label = "Factory";
|
||||||
|
reg = <0x50000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
eeprom_factory_0: eeprom@0 {
|
||||||
|
reg = <0x0 0x1000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bdinfo: partition@60000 {
|
||||||
|
label = "bdinfo";
|
||||||
|
reg = <0x60000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_bdinfo_de00: macaddr@de00 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0xde00 0x6>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@70000 {
|
||||||
|
label = "FIP";
|
||||||
|
reg = <0x70000 0x80000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@f0000 {
|
||||||
|
compatible = "denx,fit";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0xf0000 0xf10000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pio {
|
||||||
|
spi2_flash_pins: spi2-pins {
|
||||||
|
mux {
|
||||||
|
function = "spi";
|
||||||
|
groups = "spi2", "spi2_wp_hold";
|
||||||
|
};
|
||||||
|
|
||||||
|
conf-pu {
|
||||||
|
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||||
|
drive-strength = <8>;
|
||||||
|
bias-pull-up = <103>;
|
||||||
|
};
|
||||||
|
|
||||||
|
conf-pd {
|
||||||
|
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||||
|
drive-strength = <8>;
|
||||||
|
bias-pull-down = <103>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi {
|
||||||
|
status = "okay";
|
||||||
|
nvmem-cells = <&eeprom_factory_0>;
|
||||||
|
nvmem-cell-names = "eeprom";
|
||||||
|
};
|
|
@ -26,6 +26,9 @@ bananapi,bpi-r4)
|
||||||
ucidef_set_led_netdev "lan2" "lan2" "mt7530-0:02:green:lan" "lan2" "link tx rx"
|
ucidef_set_led_netdev "lan2" "lan2" "mt7530-0:02:green:lan" "lan2" "link tx rx"
|
||||||
ucidef_set_led_netdev "lan3" "lan3" "mt7530-0:03:green:lan" "lan3" "link tx rx"
|
ucidef_set_led_netdev "lan3" "lan3" "mt7530-0:03:green:lan" "lan3" "link tx rx"
|
||||||
;;
|
;;
|
||||||
|
cudy,re3000-v1)
|
||||||
|
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" "link tx rx"
|
||||||
|
;;
|
||||||
cudy,wr3000-v1)
|
cudy,wr3000-v1)
|
||||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -70,6 +70,7 @@ mediatek_setup_interfaces()
|
||||||
mercusys,mr90x-v1)
|
mercusys,mr90x-v1)
|
||||||
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2" eth1
|
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2" eth1
|
||||||
;;
|
;;
|
||||||
|
cudy,re3000-v1|\
|
||||||
netgear,wax220|\
|
netgear,wax220|\
|
||||||
ubnt,unifi-6-plus|\
|
ubnt,unifi-6-plus|\
|
||||||
zyxel,nwa50ax-pro)
|
zyxel,nwa50ax-pro)
|
||||||
|
|
|
@ -61,6 +61,11 @@ case "$board" in
|
||||||
addr=$(mtd_get_mac_binary "Factory" 0x8000)
|
addr=$(mtd_get_mac_binary "Factory" 0x8000)
|
||||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
|
[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
|
cudy,re3000-v1)
|
||||||
|
addr=$(mtd_get_mac_binary bdinfo 0xde00)
|
||||||
|
[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
|
||||||
|
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
|
||||||
|
;;
|
||||||
cudy,wr3000-v1)
|
cudy,wr3000-v1)
|
||||||
addr=$(mtd_get_mac_binary bdinfo 0xde00)
|
addr=$(mtd_get_mac_binary bdinfo 0xde00)
|
||||||
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
|
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
|
||||||
|
|
|
@ -113,6 +113,7 @@ platform_do_upgrade() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cudy,re3000-v1|\
|
||||||
cudy,wr3000-v1|\
|
cudy,wr3000-v1|\
|
||||||
yuncore,ax835)
|
yuncore,ax835)
|
||||||
default_do_upgrade "$1"
|
default_do_upgrade "$1"
|
||||||
|
|
|
@ -453,6 +453,25 @@ define Device/confiabits_mt7981
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += confiabits_mt7981
|
TARGET_DEVICES += confiabits_mt7981
|
||||||
|
|
||||||
|
define Device/cudy_re3000-v1
|
||||||
|
DEVICE_VENDOR := Cudy
|
||||||
|
DEVICE_MODEL := RE3000
|
||||||
|
DEVICE_VARIANT := v1
|
||||||
|
DEVICE_DTS := mt7981b-cudy-re3000-v1
|
||||||
|
DEVICE_DTS_DIR := ../dts
|
||||||
|
DEVICE_DTS_LOADADDR := 0x47000000
|
||||||
|
IMAGES := sysupgrade.bin
|
||||||
|
IMAGE_SIZE := 15424k
|
||||||
|
SUPPORTED_DEVICES += R36
|
||||||
|
KERNEL := kernel-bin | lzma | \
|
||||||
|
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||||
|
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||||
|
IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||||
|
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += cudy_re3000-v1
|
||||||
|
|
||||||
define Device/cudy_wr3000-v1
|
define Device/cudy_wr3000-v1
|
||||||
DEVICE_VENDOR := Cudy
|
DEVICE_VENDOR := Cudy
|
||||||
DEVICE_MODEL := WR3000
|
DEVICE_MODEL := WR3000
|
||||||
|
|
Loading…
Reference in a new issue