mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
mediatek: add support for Ruijie RG-X30E and Ruijie RG-X30E Pro (#289)
Signed-off-by: Ashley Lee <code@emtips.net>
This commit is contained in:
parent
82f852cda1
commit
8706569797
@ -39,6 +39,18 @@ CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-112m=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-112m=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-stock=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-stock=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e-stock=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mt7981_DEVICE_ruijie-rg-x30e-stock=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e-firmware2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_ruijie-rg-x30e-firmware2=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_ruijie-rg-x30e=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e-pro-stock=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mt7981_DEVICE_ruijie-rg-x30e-pro-stock=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e-pro-firmware2=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_ruijie-rg-x30e-pro-firmware2=""
|
||||
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_ruijie-rg-x30e-pro=y
|
||||
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_ruijie-rg-x30e-pro=""
|
||||
CONFIG_DEVEL=y
|
||||
CONFIG_TOOLCHAINOPTS=y
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
|
@ -20,6 +20,7 @@ jdcloud,re-cp-03)
|
||||
[ -n "$env_dev" ] && ubootenv_add_uci_config "$env_dev" "0" "0x80000"
|
||||
;;
|
||||
*360,t7* |\
|
||||
ruijie,rg-x30e* |\
|
||||
livinet,zr-3020*)
|
||||
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
|
@ -737,7 +737,7 @@ setup_model()
|
||||
bananapi,bpi-r3mini* |\
|
||||
netcore,n60 |\
|
||||
glinet,gl-mt6000|\
|
||||
ruijie,rg-x60-pro |\
|
||||
ruijie,rg-x60-pro* |\
|
||||
jdcloud,re-cp-03 |\
|
||||
tplink,tl-xdr608* |\
|
||||
*7986*)
|
||||
@ -759,6 +759,7 @@ setup_model()
|
||||
konka,komi-a31 |\
|
||||
*nokia,ea0326gmp* |\
|
||||
nradio,wt9103 |\
|
||||
ruijie,rg-x30e* |\
|
||||
*7981*)
|
||||
MT7981_whnat $num_of_wifi $usbnet
|
||||
;;
|
||||
|
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E (firmware2 layout)";
|
||||
compatible = "ruijie,rg-x30e-firmware2", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi1";
|
||||
reg = <0x880000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@2b00000 {
|
||||
label = "ubi";
|
||||
reg = <0x2B00000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@4d80000 {
|
||||
label = "backup";
|
||||
reg = <0x4D80000 0x2A80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e-pro.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E Pro (firmware2 layout)";
|
||||
compatible = "ruijie,rg-x30e-pro-firmware2", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi1";
|
||||
reg = <0x880000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@2b00000 {
|
||||
label = "ubi";
|
||||
reg = <0x2B00000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@4d80000 {
|
||||
label = "backup";
|
||||
reg = <0x4D80000 0x2A80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e-pro.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E Pro (stock layout)";
|
||||
compatible = "ruijie,rg-x30e-pro-stock", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi";
|
||||
reg = <0x880000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@2b00000 {
|
||||
label = "ubi2";
|
||||
reg = <0x2B00000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@4d80000 {
|
||||
label = "backup";
|
||||
reg = <0x4D80000 0x2A80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e-pro.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E Pro";
|
||||
compatible = "ruijie,rg-x30e-pro", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi";
|
||||
reg = <0x880000 0x6F80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,259 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2023 Tianling Shen <cnsztl@immortalwrt.org>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "mt7981.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &sysled_red;
|
||||
led-failsafe = &sysled_red;
|
||||
led-running = &sysled_green;
|
||||
led-upgrade = &sysled_red;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0 0x40000000 0 0x10000000>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds-gpio {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
mesh_led: led-0 {
|
||||
label = "green:mesh";
|
||||
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sysled_red: led-1 {
|
||||
label = "red:status";
|
||||
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sysled_green: led-2 {
|
||||
label = "green:status";
|
||||
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
nmbm_spim_nand: nmbm_spim_nand {
|
||||
compatible = "generic,nmbm";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
lower-mtd-device = <&spi_nand>;
|
||||
forced-create;
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
switch: switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hnat {
|
||||
mtketh-wan = "wan";
|
||||
mtketh-lan = "lan";
|
||||
mtketh-max-gmac = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
spi_nand: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
|
||||
spi-cal-enable;
|
||||
spi-cal-mode = "read-data";
|
||||
spi-cal-datalen = <7>;
|
||||
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
|
||||
spi-cal-addrlen = <5>;
|
||||
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
spi-tx-bus-width = <4>;
|
||||
spi-rx-bus-width = <4>;
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
};
|
||||
};
|
||||
|
||||
&nmbm_spim_nand {
|
||||
partitions: partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "BL2";
|
||||
reg = <0x00 0x100000>;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x100000 0x80000>;
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
label = "Factory";
|
||||
reg = <0x180000 0x200000>;
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
label = "FIP";
|
||||
reg = <0x380000 0x200000>;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "FIP2";
|
||||
reg = <0x580000 0x200000>;
|
||||
};
|
||||
|
||||
partition@780000 {
|
||||
label = "product_info";
|
||||
reg = <0x780000 0x80000>;
|
||||
};
|
||||
|
||||
partition@800000 {
|
||||
label = "kdump";
|
||||
reg = <0x800000 0x80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi0_flash_pins: spi0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E (stock layout)";
|
||||
compatible = "ruijie,rg-x30e-stock", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi";
|
||||
reg = <0x880000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@2b00000 {
|
||||
label = "ubi2";
|
||||
reg = <0x2B00000 0x2280000>;
|
||||
};
|
||||
|
||||
partition@4d80000 {
|
||||
label = "backup";
|
||||
reg = <0x4D80000 0x2A80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-ruijie-rg-x30e.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-X30E";
|
||||
compatible = "ruijie,rg-x30e", "mediatek,mt7981";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@880000 {
|
||||
label = "ubi";
|
||||
reg = <0x880000 0x6F80000>;
|
||||
};
|
||||
};
|
@ -0,0 +1,259 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (C) 2023 Tianling Shen <cnsztl@immortalwrt.org>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "mt7981.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &sysled_red;
|
||||
led-failsafe = &sysled_red;
|
||||
led-running = &sysled_green;
|
||||
led-upgrade = &sysled_red;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0 0x40000000 0 0x10000000>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds-gpio {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
mesh_led: led-0 {
|
||||
label = "green:mesh";
|
||||
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sysled_red: led-1 {
|
||||
label = "red:status";
|
||||
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sysled_green: led-2 {
|
||||
label = "green:status";
|
||||
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
nmbm_spim_nand: nmbm_spim_nand {
|
||||
compatible = "generic,nmbm";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
lower-mtd-device = <&spi_nand>;
|
||||
forced-create;
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
switch: switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hnat {
|
||||
mtketh-wan = "wan";
|
||||
mtketh-lan = "lan";
|
||||
mtketh-max-gmac = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
spi_nand: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
|
||||
spi-cal-enable;
|
||||
spi-cal-mode = "read-data";
|
||||
spi-cal-datalen = <7>;
|
||||
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
|
||||
spi-cal-addrlen = <5>;
|
||||
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
spi-tx-bus-width = <4>;
|
||||
spi-rx-bus-width = <4>;
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
};
|
||||
};
|
||||
|
||||
&nmbm_spim_nand {
|
||||
partitions: partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "BL2";
|
||||
reg = <0x00 0x100000>;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x100000 0x80000>;
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
label = "Factory";
|
||||
reg = <0x180000 0x200000>;
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
label = "FIP";
|
||||
reg = <0x380000 0x200000>;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "FIP2";
|
||||
reg = <0x580000 0x200000>;
|
||||
};
|
||||
|
||||
partition@780000 {
|
||||
label = "product_info";
|
||||
reg = <0x780000 0x80000>;
|
||||
};
|
||||
|
||||
partition@800000 {
|
||||
label = "kdump";
|
||||
reg = <0x800000 0x80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi0_flash_pins: spi0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
@ -279,6 +279,102 @@ define Device/mt7981-clt-r30b1-112M
|
||||
endef
|
||||
TARGET_DEVICES += mt7981-clt-r30b1-112M
|
||||
|
||||
define Device/ruijie_rg-x30e-stock
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E (stock layout)
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e-stock
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e-stock
|
||||
|
||||
define Device/ruijie_rg-x30e-firmware2
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E (firmware2 layout)
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e-firmware2
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e-firmware2
|
||||
|
||||
define Device/ruijie_rg-x30e
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e
|
||||
|
||||
define Device/ruijie_rg-x30e-pro-stock
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E Pro (stock layout)
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e-pro-stock
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e-pro-stock
|
||||
|
||||
define Device/ruijie_rg-x30e-pro-firmware2
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E Pro (firmware2 layout)
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e-pro-firmware2
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e-pro-firmware2
|
||||
|
||||
define Device/ruijie_rg-x30e-pro
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := Ruijie RG-X30E Pro
|
||||
DEVICE_DTS := mt7981-ruijie-rg-x30e-pro
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x30e-pro
|
||||
|
||||
define Device/xiaomi_mi-router-wr30u-stock
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Mi Router WR30U (stock layout)
|
||||
|
@ -82,6 +82,9 @@ mediatek_setup_interfaces()
|
||||
nradio,wt9103)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
|
||||
;;
|
||||
ruijie,rg-x30e*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
|
||||
;;
|
||||
@ -238,6 +241,21 @@ mediatek_setup_macs()
|
||||
label_mac=$wan_mac
|
||||
local wifi_mac="$(mtd_get_mac_binary $part_name 0x04)"
|
||||
;;
|
||||
ruijie,rg-x30e*)
|
||||
label_mac=$(mtd_get_mac_ascii product_info ethaddr)
|
||||
wan_mac=$label_mac
|
||||
lan_mac=$(macaddr_add "$label_mac" 1)
|
||||
local b0dat="$(l1dat if2dat ra0)"
|
||||
local b1dat="$(l1dat if2dat rax0)"
|
||||
if [ -f ${b0dat} ] && ! grep -q "MacAddress=" ${b0dat}; then
|
||||
local b0mac="$(macaddr_add $label_mac 2)"
|
||||
echo "MacAddress=$b0mac" >> ${b0dat}
|
||||
fi
|
||||
if [ -f ${b1dat} ] && ! grep -q "MacAddress=" ${b1dat}; then
|
||||
local b1mac="$(macaddr_add $label_mac 3)"
|
||||
echo "MacAddress=$b1mac" >> ${b1dat}
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
wan_mac=$(mtd_get_mac_binary $part_name $wan_mac_offset)
|
||||
lan_mac=$(mtd_get_mac_binary $part_name $lan_mac_offset)
|
||||
|
@ -16,7 +16,8 @@ caldata_validate() {
|
||||
|
||||
do_extract_caldata() {
|
||||
case $(board_name) in
|
||||
cmcc,rax3000m-emmc)
|
||||
cmcc,rax3000m-emmc |\
|
||||
ruijie,rg-x30e*)
|
||||
FIRMWARE=MT7981_iPAiLNA_EEPROM.bin
|
||||
caldata_validate && exit 0
|
||||
caldata_extract_mmc "factory" 0x0 0x1000
|
||||
|
@ -195,6 +195,7 @@ platform_do_upgrade() {
|
||||
*mt2500* |\
|
||||
*zr-3020* |\
|
||||
*360,t7* |\
|
||||
ruijie,rg-x30e* |\
|
||||
*abt,asr3000* |\
|
||||
*cetron,ct3003* |\
|
||||
*clt,r30b1* |\
|
||||
@ -240,6 +241,7 @@ platform_check_image() {
|
||||
*mt2500* |\
|
||||
*zr-3020* |\
|
||||
*360,t7* |\
|
||||
ruijie,rg-x30e* |\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,mi-router-wr30u-112m|\
|
||||
xiaomi,mi-router-ax3000t* |\
|
||||
|
Loading…
x
Reference in New Issue
Block a user