[PATCH v3] ramips: add support for Huasifei WS1208V2

2023-02-03 Thread arinc9 . unal
From: Arınç ÜNAL 

The Huasifei WS1208V2 is an AC1200 router featuring 5 Ethernet ports with a
Quectel RM520N-GL cellular modem which supports QMI and MBIM modes.

Specifications:
- MT7621AT, 256 MiB RAM, 16 MiB SPI Flash
- MT7603EN 2.4 GHz & MT7612EN 5 GHz WLAN
- Quectel RM520N-GL Cellular Modem
- 2 WLAN & 4 Cellular Antennas
- 5 Gigabit Ethernet Ports
- 1 USB 2.0 port
- 1 PCI-E Slot
- 1 M.2 slot
- 1 SIM card slot
- 1 SD card slot

Installation:
- Install sysupgrade image via ROOter OS.

TFTP Recovery:
- Connect to serial console.
- Boot initramfs image by choosing option 1 when U-Boot prompts.
- Install sysupgrade image via OpenWrt.

Link: https://www.huasifei.com/a/Products/5G%20CPE/240.html
Signed-off-by: Arınç ÜNAL 
---

v3: Move definitions under factory, and stop removing wpad-basic-wolfssl.
v2: Add recovery information.

---
 .../ramips/dts/mt7621_huasifei_ws1208v2.dts   | 185 ++
 target/linux/ramips/image/mt7621.mk   |  12 ++
 .../mt7621/base-files/etc/board.d/01_leds |   3 +
 3 files changed, 200 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts

diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts 
b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
new file mode 100644
index 00..fe77f65207
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
@@ -0,0 +1,185 @@
+#include "mt7621.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc";
+   model = "Huasifei WS1208V2";
+
+   aliases {
+   led-boot = _status;
+   led-failsafe = _status;
+   led-running = _status;
+   led-upgrade = _status;
+   label-mac-device = 
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   button-reset {
+   label = "Reset";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_status: led-status {
+   label = "green:status";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+
+   led-cellular {
+   label = "green:cellular";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   };
+
+   led-wlan5g {
+   label = "green:wlan5g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy1tpt";
+   };
+
+   led-wlan2g {
+   label = "green:wlan2g";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy0tpt";
+   };
+
+   led-usb {
+   label = "green:usb";
+   gpios = < 11 GPIO_ACTIVE_HIGH>;
+   trigger-sources = <_ehci_port1>;
+   linux,default-trigger = "usbport";
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+
+   compatible = "nvmem-cells";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   macaddr_factory_e000: macaddr@e000 {
+   reg = <0xe000 0x6>;
+   };
+   };
+
+   partition@5 {
+   compatible = "denx,uimage";
+   reg = <0x5 0xfb>;
+   label = "firmware";
+   };
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   wifi@0,0 {
+   compatible = "pci14c3,7603";
+   reg = <0x 0 

[PATCH v2] ramips: add support for Huasifei WS1208V2

2023-01-27 Thread arinc9 . unal
From: Arınç ÜNAL 

The Huasifei WS1208V2 is an AC1200 router featuring 5 Ethernet ports with a
Quectel RM520N-GL cellular modem which supports QMI and MBIM modes.

Specifications:
- MT7621AT, 256 MiB RAM, 16 MiB SPI Flash
- MT7603EN 2.4 GHz & MT7612EN 5 GHz WLAN
- Quectel RM520N-GL Cellular Modem
- 2 WLAN & 4 Cellular Antennas
- 5 Gigabit Ethernet Ports
- 1 USB 2.0 port
- 1 PCI-E Slot
- 1 M.2 slot
- 1 SIM card slot
- 1 SD card slot

Installation:
- Install sysupgrade image via ROOter OS.

TFTP Recovery:
- Connect to serial console.
- Boot initramfs image by choosing option 1 when U-Boot prompts.
- Install sysupgrade image via OpenWrt.

Link: https://www.huasifei.com/a/Products/5G%20CPE/240.html
Signed-off-by: Arınç ÜNAL 
---

v2: Add recovery information.

---
 .../ramips/dts/mt7621_huasifei_ws1208v2.dts   | 187 ++
 target/linux/ramips/image/mt7621.mk   |  12 ++
 .../mt7621/base-files/etc/board.d/01_leds |   3 +
 3 files changed, 202 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts

diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts 
b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
new file mode 100644
index 00..c69f05a0f4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
@@ -0,0 +1,187 @@
+#include "mt7621.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc";
+   model = "Huasifei WS1208V2";
+
+   aliases {
+   led-boot = _status;
+   led-failsafe = _status;
+   led-running = _status;
+   led-upgrade = _status;
+   label-mac-device = 
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   button-reset {
+   label = "Reset";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_status: led-status {
+   label = "green:status";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+
+   led-cellular {
+   label = "green:cellular";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   };
+
+   led-wlan5g {
+   label = "green:wlan5g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy1tpt";
+   };
+
+   led-wlan2g {
+   label = "green:wlan2g";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy0tpt";
+   };
+
+   led-usb {
+   label = "green:usb";
+   gpios = < 11 GPIO_ACTIVE_HIGH>;
+   trigger-sources = <_ehci_port1>;
+   linux,default-trigger = "usbport";
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   firmware: partition@5 {
+   compatible = "denx,uimage";
+   reg = <0x5 0xfb>;
+   label = "firmware";
+   };
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   wifi@0,0 {
+   compatible = "pci14c3,7603";
+   reg = <0x 0 0 0 0>;
+   mediatek,mtd-eeprom = < 0x>;
+   };
+};
+
+ {
+   wifi@0,0 {
+   compatible = "pci14c3,7662";
+   reg = <0x 0 0 0 0>;
+   mediatek,mtd-eeprom = < 0x8000>;
+   ieee80211-freq-limit = <500 600>;
+
+   led {
+   led-sources = <2>;
+   };
+   };
+};
+
+ {
+ 

[PATCH] ramips: mt7621-dts: fix compatible string for mt7530 on TP-Link EAP615-Wall

2023-01-26 Thread arinc9 . unal
From: Arınç ÜNAL 

The correct compatible string for the multi-chip module MT7530 switch in
MT7621AT, MT7621DAT and MT7621ST SoCs is mediatek,mt7621. Remove the
property on TP-Link EAP615-Wall which will default to the said string.

Fixes: a1b8a4d7b3ff ("ramips: support TP-Link EAP615-Wall")
Link: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
Signed-off-by: Arınç ÜNAL 
---
 target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts 
b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
index 594a9e7bb1..36809d48ff 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
@@ -173,7 +173,6 @@
 };
 
  {
-   compatible = "mediatek,mt7530";
ports {
port@1 {
status = "okay";
-- 
2.37.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] ramips: add support for Huasifei WS1208V2

2023-01-26 Thread arinc9 . unal
From: Arınç ÜNAL 

The Huasifei WS1208V2 is an AC1200 router featuring 5 Ethernet ports with a
Quectel RM520N-GL cellular modem which supports QMI and MBIM modes.

Specifications:
- MT7621AT, 256 MiB RAM, 16 MiB SPI Flash
- MT7603EN 2.4 GHz & MT7612EN 5 GHz WLAN
- Quectel RM520N-GL Cellular Modem
- 2 WLAN & 4 Cellular Antennas
- 5 Gigabit Ethernet Ports
- 1 USB 2.0 port
- 1 PCI-E Slot
- 1 M.2 slot
- 1 SIM card slot
- 1 SD card slot

Installation:
- Install sysupgrade image via ROOter OS.

Link: https://www.huasifei.com/a/Products/5G%20CPE/240.html
Signed-off-by: Arınç ÜNAL 
---
 .../ramips/dts/mt7621_huasifei_ws1208v2.dts   | 187 ++
 target/linux/ramips/image/mt7621.mk   |  12 ++
 .../mt7621/base-files/etc/board.d/01_leds |   3 +
 3 files changed, 202 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts

diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts 
b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
new file mode 100644
index 00..c69f05a0f4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
@@ -0,0 +1,187 @@
+#include "mt7621.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc";
+   model = "Huasifei WS1208V2";
+
+   aliases {
+   led-boot = _status;
+   led-failsafe = _status;
+   led-running = _status;
+   led-upgrade = _status;
+   label-mac-device = 
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   button-reset {
+   label = "Reset";
+   gpios = < 18 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   led_status: led-status {
+   label = "green:status";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+
+   led-cellular {
+   label = "green:cellular";
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   };
+
+   led-wlan5g {
+   label = "green:wlan5g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy1tpt";
+   };
+
+   led-wlan2g {
+   label = "green:wlan2g";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "phy0tpt";
+   };
+
+   led-usb {
+   label = "green:usb";
+   gpios = < 11 GPIO_ACTIVE_HIGH>;
+   trigger-sources = <_ehci_port1>;
+   linux,default-trigger = "usbport";
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+
+   flash@0 {
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   firmware: partition@5 {
+   compatible = "denx,uimage";
+   reg = <0x5 0xfb>;
+   label = "firmware";
+   };
+   };
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   wifi@0,0 {
+   compatible = "pci14c3,7603";
+   reg = <0x 0 0 0 0>;
+   mediatek,mtd-eeprom = < 0x>;
+   };
+};
+
+ {
+   wifi@0,0 {
+   compatible = "pci14c3,7662";
+   reg = <0x 0 0 0 0>;
+   mediatek,mtd-eeprom = < 0x8000>;
+   ieee80211-freq-limit = <500 600>;
+
+   led {
+   led-sources = <2>;
+   };
+   };
+};
+
+ {
+   nvmem-cells = <_factory_e000>;
+   nvmem-cell-names = "mac-address";
+};
+
+ {
+   status = "okay";
+   label = "wan";
+   phy-handle = <>;
+
+   nvmem-cells =