123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403 |
- diff --git a/target/linux/ramips/dts/mt7621_zte_e8820s.dts b/target/linux/ramips/dts/mt7621_zte_e8820s.dts
- new file mode 100644
- index 000000000000..5a0012441509
- --- /dev/null
- +++ b/target/linux/ramips/dts/mt7621_zte_e8820s.dts
- @@ -0,0 +1,188 @@
- +#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 = &led_sys;
- + led-failsafe = &led_sys;
- + led-running = &led_sys;
- + led-upgrade = &led_sys;
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led_sys: sys {
- + label = "white:sys";
- + gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
- + };
- +
- + };
- +
- + keys {
- + compatible = "gpio-keys";
- +
- + reset {
- + label = "reset";
- + gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_RESTART>;
- + };
- +
- + wps {
- + label = "wps";
- + gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_WPS_BUTTON>;
- + };
- +
- + wifi {
- + label = "wifi";
- + gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_RFKILL>;
- + };
- + };
- +};
- +
- +&nand {
- + status = "okay";
- +
- + partitions {
- + compatible = "fixed-partitions";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + partition@0 {
- + label = "u-boot";
- + reg = <0x0 0x80000>;
- + read-only;
- + };
- +
- + partition@80000 {
- + label = "u-boot-env";
- + reg = <0x80000 0x80000>;
- + read-only;
- + };
- +
- + factory: partition@100000 {
- + label = "factory";
- + reg = <0x100000 0x40000>;
- + read-only;
- + };
- +
- + partition@140000 {
- + label = "kernel";
- + reg = <0x140000 0x400000>;
- + };
- +
- + partition@540000 {
- + label = "ubi";
- + reg = <0x540000 0x7A00000>;
- + };
- + };
- +};
- +
- +&pcie {
- + status = "okay";
- + reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
- + <&gpio 4 GPIO_ACTIVE_LOW>;
- +};
- +
- +&pcie0 {
- + wifi@0,0 {
- + compatible = "mediatek,mt76";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x0000>;
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- +
- + led {
- + led-active-low;
- + };
- + };
- +};
- +
- +&pcie1 {
- + wifi@0,0 {
- + compatible = "mediatek,mt76";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x8000>;
- + nvmem-cells = <&macaddr_factory_e006>;
- + nvmem-cell-names = "mac-address";
- + ieee80211-freq-limit = <5000000 6000000>;
- +
- + led {
- + led-sources = <2>;
- + led-active-low;
- + };
- + };
- +};
- +
- +&gmac0 {
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- +};
- +
- +&gmac1 {
- + status = "okay";
- + label = "wan";
- + phy-handle = <ðphy4>;
- +
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- + mac-address-increment = <1>;
- +};
- +
- +&mdio {
- + ethphy4: ethernet-phy@4 {
- + reg = <4>;
- + };
- +};
- +
- +&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 = "i2c", "jtag", "uart2", "uart3", "wdt";
- + function = "gpio";
- + };
- +};
- +
- +&factory {
- + compatible = "nvmem-cells";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + macaddr_factory_e000: macaddr@e000 {
- + reg = <0xe000 0x6>;
- + };
- +
- + macaddr_factory_e006: macaddr@e006 {
- + reg = <0xe006 0x6>;
- + };
- +};
- diff --git a/target/linux/ramips/dts/mt7621_zte_e8820v2.dts b/target/linux/ramips/dts/mt7621_zte_e8820v2.dts
- new file mode 100644
- index 000000000000..5a0012441509
- --- /dev/null
- +++ b/target/linux/ramips/dts/mt7621_zte_e8820v2.dts
- @@ -0,0 +1,181 @@
- +#include "mt7621.dtsi"
- +
- +#include <dt-bindings/gpio/gpio.h>
- +#include <dt-bindings/input/input.h>
- +
- +/ {
- + compatible = "zte,e8820v2", "mediatek,mt7621-soc";
- + model = "ZTE E8820V2";
- +
- + aliases {
- + led-boot = &led_sys;
- + led-failsafe = &led_sys;
- + led-running = &led_sys;
- + led-upgrade = &led_sys;
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led_sys: sys {
- + label = "white:sys";
- + gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
- + };
- +
- + led_power: power {
- + label = "white:power";
- + gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
- + };
- + };
- +
- + keys {
- + compatible = "gpio-keys";
- +
- + reset {
- + label = "reset";
- + gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_RESTART>;
- + };
- +
- + wps {
- + label = "wps";
- + gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_WPS_BUTTON>;
- + };
- + };
- +};
- +
- +&spi0 {
- + status = "okay";
- +
- + flash@0 {
- + compatible = "jedec,spi-nor";
- + reg = <0>;
- + spi-max-frequency = <10000000>;
- + broken-flash-reset;
- +
- + 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";
- + reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
- + <&gpio 4 GPIO_ACTIVE_LOW>;
- +};
- +
- +&pcie0 {
- + wifi@0,0 {
- + compatible = "mediatek,mt76";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x0000>;
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- +
- + led {
- + led-active-low;
- + };
- + };
- +};
- +
- +&pcie1 {
- + wifi@0,0 {
- + compatible = "mediatek,mt76";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x8000>;
- + nvmem-cells = <&macaddr_factory_e006>;
- + nvmem-cell-names = "mac-address";
- +
- + ieee80211-freq-limit = <5000000 6000000>;
- + led {
- + led-sources = <2>;
- + led-active-low;
- + };
- + };
- +};
- +
- +
- +&gmac0 {
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- +};
- +
- +&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";
- + };
- +
- + port@4 {
- + status = "okay";
- + label = "wan";
- + nvmem-cells = <&macaddr_factory_e006>;
- + nvmem-cell-names = "mac-address";
- + };
- + };
- +};
- +
- +&state_default {
- + gpio {
- + groups = "i2c", "uart2", "uart3", "wdt";
- + function = "gpio";
- + };
- +};
- +
- +&factory {
- + compatible = "nvmem-cells";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + macaddr_factory_e000: macaddr@e000 {
- + reg = <0xe000 0x6>;
- + };
- +
- + macaddr_factory_e006: macaddr@e006 {
- + reg = <0xe006 0x6>;
- + };
- +};
- diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
- index aad2e32b36210..a6a4707fc295d 100644
- --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
- +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
- @@ -157,6 +157,16 @@ zbtlink,zbt-wg1608-16m)
- ucidef_set_led_netdev "lan4" "LAN4" "green:lan-4" "lan4"
- ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
- ;;
- +zte,e8820s)
- + ucidef_set_led_netdev "sys" "SYS_LED" "white:sys" "eth0" "tx rx"
- + ucidef_set_led_timer "power" "POWER_LED" "white:sys" "100" "8000"
- + ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "white:wlan2g" "ra0"
- + ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "white:wlan5g" "rai0"
- + ;;
- +zte,e8820v2)
- + ucidef_set_led_netdev "sys" "SYS_LED" "white:sys" "eth0" "tx rx"
- + ucidef_set_led_timer "power" "POWER_LED" "white:power" "100" "8000"
- + ;;
- esac
-
- board_config_flush
|