diff options
Diffstat (limited to 'target/linux/ramips')
-rw-r--r-- | target/linux/ramips/dts/mt7621_edimax_re23s.dts | 163 | ||||
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 18 | ||||
-rwxr-xr-x | target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 19 |
3 files changed, 191 insertions, 9 deletions
diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts new file mode 100644 index 0000000000..79733152f0 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -0,0 +1,163 @@ +// 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,re23s", "mediatek,mt7621-soc"; + model = "Edimax RE23S"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_wifi_red; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "re23s:green:power"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + wifi_green { + label = "re23s:green:wifi"; + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + + wifi_amber { + label = "re23s:amber:wifi"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + }; + + led_wifi_red: wifi_red { + label = "re23s:red:wifi"; + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wps { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + }; + }; +}; + +&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 = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "cimage"; + reg = <0x50000 0x20000>; + read-only; + }; + + partition@70000 { + compatible = "edimax,uimage"; + label = "firmware"; + reg = <0x70000 0xf50000>; + }; + + partition@fc0000 { + label = "freespace"; + reg = <0xfc0000 0x40000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0x8004>; +}; + +&switch0 { + ports { + port@4 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&state_default { + gpio { + groups = "uart3", "uart2", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index d7a4b9fa7c..728b2efb24 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -261,6 +261,24 @@ define Device/edimax_ra21s endef TARGET_DEVICES += edimax_ra21s +define Device/edimax_re23s + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 15680k + DEVICE_VENDOR := Edimax + DEVICE_MODEL := RE23S + DEVICE_ALT0_VENDOR := Edimax + DEVICE_ALT0_MODEL := Gemini RE23S + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ + edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ + append-metadata | check-size + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | append-rootfs | \ + edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ + check-size + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic +endef +TARGET_DEVICES += edimax_re23s + define Device/edimax_rg21s IMAGE_SIZE := 16064k DEVICE_VENDOR := Edimax diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index a276d082e9..9665993297 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -19,6 +19,16 @@ ramips_setup_interfaces() xiaomi,mir3g-v2) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; + edimax,re23s|\ + mikrotik,routerboard-m11g|\ + netgear,ex6150|\ + thunder,timecloud|\ + tplink,re350-v1|\ + tplink,re500-v1|\ + tplink,re650-v1|\ + ubnt,unifi-nanohd) + ucidef_set_interface_lan "lan" + ;; gehua,ghl-r-001|\ hiwifi,hc5962|\ xiaomi,mir3p|\ @@ -33,15 +43,6 @@ ramips_setup_interfaces() netgear,wac104) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; - mikrotik,routerboard-m11g|\ - netgear,ex6150|\ - thunder,timecloud|\ - tplink,re350-v1|\ - tplink,re500-v1|\ - tplink,re650-v1|\ - ubnt,unifi-nanohd) - ucidef_set_interface_lan "lan" - ;; mikrotik,routerboard-750gr3) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan" ;; |