- Fixed PCIe reset - Fixed reset button, WLAN LEDs - Fixed sysupgrade feature - Fixed NVMEM bindings This requires install new custom U-Boot, which can be downloaded at: https://firmware.download.immortalwrt.eu.org/uboot/ramips/mt7621-zte_e8820s-u-boot.bin Or build it manually: git clone https://github.com/DragonBluep/uboot-mt7621 && cd uboot-mt7621 ./customize.sh NAND '2176k(Bootloader),1280k(config),1280k(factory),-(firmware)' \ '0x4a0000' '18' '16' '880' '1200' 'DDR3-512MiB' 'false' '115200' Flash instructions for existing users: 1. Run the following commands on device: opkg install kmod-mtd-rw insmod mtd-rw i_want_a_brick=1 mtd write mt7621-zte_e8820s-u-boot.bin u-boot 2. Cut off the power and re-engage, enter 192.168.1.1 to upload initramfs.bin. 3. After ImmortalWrt has booted, perform sysupgrade. Flash instructions for new users: 1. Rename the U-Boot file to `ZTE_img.bin` 2. Set static IP on your PC: IP 192.168.1.2/24, GW 192.168.1.254 3. Serve the U-Boot file using TFTP server. 4. Cut off the power, keep pressing `reset` button then engage the power. 5. Wait for U-Boot download to complete, enter 192.168.1.1 to upload initramfs.bin. 6. After ImmortalWrt has booted, perform sysupgrade. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
212 lines
3.4 KiB
Plaintext
212 lines
3.4 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
|
|
#include "mt7621.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
/ {
|
|
compatible = "zte,e8820s", "mediatek,mt7621-soc";
|
|
model = "ZTE E8820S";
|
|
|
|
aliases {
|
|
led-boot = &power_led;
|
|
led-failsafe = &system_led;
|
|
led-running = &system_led;
|
|
led-upgrade = &system_led;
|
|
label-mac-device = &gmac0;
|
|
};
|
|
|
|
chosen {
|
|
bootargs = "console=ttyS0,115200";
|
|
};
|
|
|
|
gpio-leds {
|
|
compatible = "gpio-leds";
|
|
|
|
power_led: led-power {
|
|
label = "white:power";
|
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
system_led: led-system {
|
|
label = "white:system";
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
|
|
gpio-keys {
|
|
compatible = "gpio-keys";
|
|
|
|
button-reset {
|
|
label = "reset";
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RESTART>;
|
|
};
|
|
|
|
button-wifi {
|
|
label = "wifi";
|
|
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RFKILL>;
|
|
};
|
|
|
|
button-wps {
|
|
label = "wps";
|
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_WPS_BUTTON>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&gmac0 {
|
|
nvmem-cells = <&macaddr_config_12 0>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&gmac1 {
|
|
status = "okay";
|
|
label = "wan";
|
|
phy-handle = <ðphy4>;
|
|
|
|
nvmem-cells = <&macaddr_config_12 0>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&mdio {
|
|
ethphy4: ethernet-phy@4 {
|
|
reg = <4>;
|
|
};
|
|
};
|
|
|
|
&nand {
|
|
status = "okay";
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "Bootloader";
|
|
reg = <0x0 0x220000>;
|
|
read-only;
|
|
};
|
|
|
|
partition@80000 {
|
|
compatible = "nvmem-cells";
|
|
label = "config";
|
|
reg = <0x220000 0x140000>;
|
|
read-only;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
macaddr_config_12: macaddr@12 {
|
|
compatible = "mac-base";
|
|
reg = <0x12 0x6>;
|
|
#nvmem-cell-cells = <1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
factory: partition@360000 {
|
|
compatible = "nvmem-cells";
|
|
label = "factory";
|
|
reg = <0x360000 0x140000>;
|
|
read-only;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
eeprom_factory_f000: eeprom@f000 {
|
|
reg = <0xf000 0x400>;
|
|
};
|
|
|
|
eeprom_factory_f800: eeprom@f800 {
|
|
reg = <0xf800 0x200>;
|
|
};
|
|
};
|
|
};
|
|
|
|
partition@4a0000 {
|
|
label = "kernel";
|
|
reg = <0x4a0000 0x400000>;
|
|
};
|
|
|
|
partition@8a0000 {
|
|
label = "ubi";
|
|
reg = <0x8a0000 0x76e0000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&pcie {
|
|
reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
|
|
<&gpio 4 GPIO_ACTIVE_LOW>;
|
|
status = "okay";
|
|
};
|
|
|
|
&pcie0 {
|
|
wifi@0,0 {
|
|
compatible = "pci14c3,7603";
|
|
reg = <0x0000 0 0 0 0>;
|
|
nvmem-cells = <&eeprom_factory_f000>, <&macaddr_config_12 0>;
|
|
nvmem-cell-names = "eeprom", "mac-address";
|
|
ieee80211-freq-limit = <2400000 2500000>;
|
|
|
|
led {
|
|
led-active-low;
|
|
};
|
|
};
|
|
};
|
|
|
|
&pcie1 {
|
|
wifi@0,0 {
|
|
compatible = "pci14c3,7662";
|
|
reg = <0x0000 0 0 0 0>;
|
|
nvmem-cells = <&eeprom_factory_f800>, <&macaddr_config_12 1>;
|
|
nvmem-cell-names = "eeprom", "mac-address";
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
|
|
|
led {
|
|
led-active-low;
|
|
led-sources = <2>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&switch0 {
|
|
ports {
|
|
port@0 {
|
|
status = "okay";
|
|
label = "lan1";
|
|
};
|
|
|
|
port@1 {
|
|
status = "okay";
|
|
label = "lan2";
|
|
};
|
|
|
|
port@2 {
|
|
status = "okay";
|
|
label = "lan3";
|
|
};
|
|
|
|
port@3 {
|
|
status = "okay";
|
|
label = "lan4";
|
|
};
|
|
};
|
|
};
|
|
|
|
&state_default {
|
|
gpio {
|
|
groups = "jtag", "uart2", "uart3", "wdt";
|
|
function = "gpio";
|
|
};
|
|
};
|