Re: [PATCH v3] ramips: mt7621: Add Arcadyan WE420223-99 support

2023-01-06 Thread Hauke Mehrtens

On 1/2/23 17:36, Harm Berntsen wrote:

The Arcadyan WE420223-99 is a WiFi AC simultaneous dual-band access
point distributed as Experia WiFi by KPN in the Netherlands. It features
two ethernet ports and 2 internal antennas.

Specifications
--
SOC   : Mediatek MT7621AT
ETH   : Two 1 gigabit ports, built into the SOC
WIFI  : MT7615DN
BUTTON: Reset
BUTTON: WPS
LED   : Power (green+red)
LED   : WiFi (green+blue)
LED   : WPS (green+red)
LED   : Followme (green+red)
Power : 12 VDC, 1A barrel plug

Winbond variant:
RAM   : Winbond W631GG6MB12J, 1GBIT DDR3 SDRAM
Flash : Winbond W25Q256JVFQ, 256Mb SPI
U-Boot: 1.1.3 (Nov 23 2017 - 16:40:17), Ralink 5.0.0.1

Macronix variant:
RAM   : Nanya NT5CC64M16GP-DI, 1GBIT DDR3 SDRAM
Flash : MX25l25635FMI-10G, 256Mb SPI
U-Boot: 1.1.3 (Dec  4 2017 - 11:37:57), Ralink 5.0.0.1

Serial
--
The serial port needs a TTL/RS-232 3V3 level converter! The Serial
setting is 57600-8-N-1. The board has an unpopulated 2.54mm straight pin
header.

The pinout is: VCC (the square), RX, TX, GND.

Installation

See the Wiki page [1] for more details, it comes down to:

1. Open the device, take off the heat sink
2. Connect the SPI flash chip to a flasher, e.g. a Raspberry Pi. Also
connect the RESET pin for stability (thanks @FPSUsername for reporting)
3. Make a backup in case you want to revert to stock later
4. Flash the squashfs-factory.trx file to offset 0x5 of the flash
5. Ensure the bootpartition variable is set to 0 in the U-Boot
environment located at 0x3

Note that the U-Boot is password protected, this can optionally be
removed. See the forum [2] for more details.

MAC Addresses(stock)

+--+--+---+
| use  | address  | example   |
+--+--+---+
| Device   | label| 00:00:00:11:00:00 |
| Ethernet | + 3  | 00:00:00:11:00:03 |
| 2g   | + 0x02f1 | 02:00:00:01:00:01 |
| 5g   | + 1  | 00:00:00:11:00:01 |
+--+--+---+

The label address is stored in ASCII in the board_data partition

Notes
-
- This device has a dual-boot partition scheme, but OpenWRT will claim
   both partitions for more storage space.

Known issues

- 2g MAC address does not match stock due to missing support for that in
   macaddr_add
- Only the power LED is configured by default

References
--
[1] https://openwrt.org/inbox/toh/arcadyan/astoria/we420223-99
[2] 
https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653

Signed-off-by: Harm Berntsen 
---
  package/boot/uboot-envtools/files/ramips  |   3 +
  .../dts/mt7621_arcadyan_we420223-99.dts   | 219 ++
  target/linux/ramips/image/mt7621.mk   |  25 ++
  .../mt7621/base-files/etc/board.d/02_network  |   8 +
  .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |   9 +
  .../mt7621/base-files/lib/upgrade/platform.sh |   1 +
  6 files changed, 265 insertions(+)
  create mode 100644 target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index 372b8a49e2..9dbe2cb181 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -17,6 +17,9 @@ alfa-network,awusfree1|\
  alfa-network,quad-e4g|\
  alfa-network,r36m-e4g|\
  alfa-network,tube-e4g|\
+arcadyan,we420223-99)
+   ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
+   ;;
This changes the ubootenv_add_uci_config also for the alfa-network 
devices I think this is not intended.


Please move your new entry after the "ubootenv_add_uci_config 
"/dev/mtd1" "0x0" "0x1000" "0x1000"" line.




  engenius,esr600h|\
  sitecom,wlr-4100-v1-002)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"





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


Re: [PATCH v3] ramips: mt7621: Add Arcadyan WE420223-99 support

2023-01-02 Thread Arınç ÜNAL

On 2.01.2023 19:36, Harm Berntsen wrote:

The Arcadyan WE420223-99 is a WiFi AC simultaneous dual-band access
point distributed as Experia WiFi by KPN in the Netherlands. It features
two ethernet ports and 2 internal antennas.

Specifications
--
SOC   : Mediatek MT7621AT
ETH   : Two 1 gigabit ports, built into the SOC
WIFI  : MT7615DN
BUTTON: Reset
BUTTON: WPS
LED   : Power (green+red)
LED   : WiFi (green+blue)
LED   : WPS (green+red)
LED   : Followme (green+red)
Power : 12 VDC, 1A barrel plug

Winbond variant:
RAM   : Winbond W631GG6MB12J, 1GBIT DDR3 SDRAM
Flash : Winbond W25Q256JVFQ, 256Mb SPI
U-Boot: 1.1.3 (Nov 23 2017 - 16:40:17), Ralink 5.0.0.1

Macronix variant:
RAM   : Nanya NT5CC64M16GP-DI, 1GBIT DDR3 SDRAM
Flash : MX25l25635FMI-10G, 256Mb SPI
U-Boot: 1.1.3 (Dec  4 2017 - 11:37:57), Ralink 5.0.0.1

Serial
--
The serial port needs a TTL/RS-232 3V3 level converter! The Serial
setting is 57600-8-N-1. The board has an unpopulated 2.54mm straight pin
header.

The pinout is: VCC (the square), RX, TX, GND.

Installation

See the Wiki page [1] for more details, it comes down to:

1. Open the device, take off the heat sink
2. Connect the SPI flash chip to a flasher, e.g. a Raspberry Pi. Also
connect the RESET pin for stability (thanks @FPSUsername for reporting)
3. Make a backup in case you want to revert to stock later
4. Flash the squashfs-factory.trx file to offset 0x5 of the flash
5. Ensure the bootpartition variable is set to 0 in the U-Boot
environment located at 0x3

Note that the U-Boot is password protected, this can optionally be
removed. See the forum [2] for more details.

MAC Addresses(stock)

+--+--+---+
| use  | address  | example   |
+--+--+---+
| Device   | label| 00:00:00:11:00:00 |
| Ethernet | + 3  | 00:00:00:11:00:03 |
| 2g   | + 0x02f1 | 02:00:00:01:00:01 |
| 5g   | + 1  | 00:00:00:11:00:01 |
+--+--+---+

The label address is stored in ASCII in the board_data partition

Notes
-
- This device has a dual-boot partition scheme, but OpenWRT will claim
   both partitions for more storage space.

Known issues

- 2g MAC address does not match stock due to missing support for that in
   macaddr_add
- Only the power LED is configured by default

References
--
[1] https://openwrt.org/inbox/toh/arcadyan/astoria/we420223-99
[2] 
https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653

Signed-off-by: Harm Berntsen 


Acked-by: Arınç ÜNAL 

Arınç

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


[PATCH v3] ramips: mt7621: Add Arcadyan WE420223-99 support

2023-01-02 Thread Harm Berntsen via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
The Arcadyan WE420223-99 is a WiFi AC simultaneous dual-band access
point distributed as Experia WiFi by KPN in the Netherlands. It features
two ethernet ports and 2 internal antennas.

Specifications
--
SOC   : Mediatek MT7621AT
ETH   : Two 1 gigabit ports, built into the SOC
WIFI  : MT7615DN
BUTTON: Reset
BUTTON: WPS
LED   : Power (green+red)
LED   : WiFi (green+blue)
LED   : WPS (green+red)
LED   : Followme (green+red)
Power : 12 VDC, 1A barrel plug

Winbond variant:
RAM   : Winbond W631GG6MB12J, 1GBIT DDR3 SDRAM
Flash : Winbond W25Q256JVFQ, 256Mb SPI
U-Boot: 1.1.3 (Nov 23 2017 - 16:40:17), Ralink 5.0.0.1

Macronix variant:
RAM   : Nanya NT5CC64M16GP-DI, 1GBIT DDR3 SDRAM
Flash : MX25l25635FMI-10G, 256Mb SPI
U-Boot: 1.1.3 (Dec  4 2017 - 11:37:57), Ralink 5.0.0.1

Serial
--
The serial port needs a TTL/RS-232 3V3 level converter! The Serial
setting is 57600-8-N-1. The board has an unpopulated 2.54mm straight pin
header.

The pinout is: VCC (the square), RX, TX, GND.

Installation

See the Wiki page [1] for more details, it comes down to:

1. Open the device, take off the heat sink
2. Connect the SPI flash chip to a flasher, e.g. a Raspberry Pi. Also
   connect the RESET pin for stability (thanks @FPSUsername for reporting)
3. Make a backup in case you want to revert to stock later
4. Flash the squashfs-factory.trx file to offset 0x5 of the flash
5. Ensure the bootpartition variable is set to 0 in the U-Boot
   environment located at 0x3

Note that the U-Boot is password protected, this can optionally be
removed. See the forum [2] for more details.

MAC Addresses(stock)

+--+--+---+
| use  | address  | example   |
+--+--+---+
| Device   | label| 00:00:00:11:00:00 |
| Ethernet | + 3  | 00:00:00:11:00:03 |
| 2g   | + 0x02f1 | 02:00:00:01:00:01 |
| 5g   | + 1  | 00:00:00:11:00:01 |
+--+--+---+

The label address is stored in ASCII in the board_data partition

Notes
-
- This device has a dual-boot partition scheme, but OpenWRT will claim
  both partitions for more storage space.

Known issues

- 2g MAC address does not match stock due to missing support for that in
  macaddr_add
- Only the power LED is configured by default

References
--
[1] https://openwrt.org/inbox/toh/arcadyan/astoria/we420223-99
[2] 
https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653

Signed-off-by: Harm Berntsen 
---
 package/boot/uboot-envtools/files/ramips  |   3 +
 .../dts/mt7621_arcadyan_we420223-99.dts   | 219 ++
 target/linux/ramips/image/mt7621.mk   |  25 ++
 .../mt7621/base-files/etc/board.d/02_network  |   8 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |   9 +
 .../mt7621/base-files/lib/upgrade/platform.sh |   1 +
 6 files changed, 265 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index 372b8a49e2..9dbe2cb181 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -17,6 +17,9 @@ alfa-network,awusfree1|\
 alfa-network,quad-e4g|\
 alfa-network,r36m-e4g|\
 alfa-network,tube-e4g|\
+arcadyan,we420223-99)
+   ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
+   ;;
 engenius,esr600h|\
 sitecom,wlr-4100-v1-002)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts 
b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
new file mode 100644
index 00..99de770707
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include 
+#include 
+#include 
+
+/ {
+   model = "Arcadyan WE420223-99";
+   compatible = "arcadyan,we420223-99", "mediatek,mt7621-soc";
+
+   aliases {
+   led-boot = &led_power_green;
+   led-failsafe = &led_power_red;
+   led-running = &led_power_green;
+   led-upgrade = &led_wps_green;
+   led-wifi = &led_wifi_green;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600 ubi.mtd=5 
root=/dev/ubiblock0_0";
+   };
+
+   keys {
+   compatible = "gpio-keys";
+
+   reset {
+   label = "reset";
+   gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+