From 680d0c08cbe5f1593186d0b1e459149c91b0ef3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20F=C3=B6rster?= <nemesis@chemnitz.freifunk.net>
Date: Sun, 13 Mar 2022 14:02:46 +0100
Subject: [PATCH] ramips-mt76x8: add support for TP-Link RE305 v1

Specification:

SoC: MediaTek MT7628AN
RAM: 64MiB
Flash: 8MiB
Wifi:
  - 2.4GHz: MT7628AN
  - 5GHz: MT7612EN
LAN: 1x 10/100 Mbps

Flash instructions:
Flash factory image through stock firmware WEB UI.
Back to stock is possible by using TFTP and stripping down the Firmware
provided by TP-Link to a initramfs.

The flash space between 0x650000 and 0x7f0000
is blank in the stock firmware so I left it out as well.
---
 docs/user/supported_devices.rst | 1 +
 targets/ramips-mt76x8           | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst
index 5e36946ef..5b19d21a0 100644
--- a/docs/user/supported_devices.rst
+++ b/docs/user/supported_devices.rst
@@ -391,6 +391,7 @@ ramips-mt76x8
   - Archer C50 (v3)
   - Archer C50 (v4)
   - RE200 (v2)
+  - RE305 (v1) [#device-class-tiny]
   - TL-MR3020 (v3)
   - TL-MR3420 (v5)
   - TL-WA801ND (v5)
diff --git a/targets/ramips-mt76x8 b/targets/ramips-mt76x8
index e23d3cad3..241354376 100644
--- a/targets/ramips-mt76x8
+++ b/targets/ramips-mt76x8
@@ -60,6 +60,10 @@ device('tp-link-archer-c50-v4', 'tplink_archer-c50-v4', {
 
 device('tp-link-re200-v2', 'tplink_re200-v2')
 
+device('tp-link-re305', 'tplink_re305-v1', {
+	class = 'tiny', -- Only 6M of usable Firmware space
+})
+
 device('tp-link-tl-mr3020-v3', 'tplink_tl-mr3020-v3', {
 	factory = false,
 	extra_images = {
-- 
GitLab