From 2c221bac798c752af160eef518e073d054b01533 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20F=C3=B6rster?= <nemesis@chemnitz.freifunk.net>
Date: Tue, 7 Mar 2023 09:56:34 +0100
Subject: [PATCH] ramips-mt7621: add GL.iNet MT1300

The GL-MT1300 is a high-performance new generation pocket-sized router
that offers a powerful hardware and first-class cybersecurity protocol
with unique and modern design.

Specifications:
- SoC: MT7621A, Dual-Core @880MHz
- RAM: 256 MB DDR3
- Flash: 32 MB
- Ethernet: 3 x 10/100/1000: 2 x LAN + 1 x WAN
- Wireless: 1 x MT7615D Dual-Band 2.4GHz(400Mbps) + 5GHz(867Mbps)
- USB: 1 x USB 3.0 port
- Slot: 1 x MicroSD card slot
- Button: 1 x Reset button
- Switch: 1 x Mode switch
- LED: 1 x Blue LED + 1 x White LED

MAC addresses based on vendor firmware:
WAN : factory 0x4000
LAN : Mac from factory 0x4000 + 1
2.4GHz : factory 0x4
5GHz : Mac form factory 0x4 + 1

Flashing instructions:
1.Connect to one of LAN ports.
2.Set the static IP on the PC to 192.168.1.2.
3.Press the Reset button and power the device (do not release the button).
  After waiting for the blue led to flash 5 times, the white led will
  come on and release the button.
4.Browse the 192.168.1.1 web page and update firmware according to web
  tips.
5.The blue led will flash when the firmware is being upgraded.
6.The blue led stops blinking to indicate that the firmware upgrade is
  complete and U-Boot automatically starts the firmware.
---
 docs/user/supported_devices.rst | 4 ++++
 targets/ramips-mt7621           | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst
index 5f5c0aedc..36e822c8e 100644
--- a/docs/user/supported_devices.rst
+++ b/docs/user/supported_devices.rst
@@ -357,6 +357,10 @@ ramips-mt7621
 
   - DIR-860L (B1)
 
+* GL.iNet
+
+  - GL-MT1300
+
 * NETGEAR
 
   - EX6150 (v1)
diff --git a/targets/ramips-mt7621 b/targets/ramips-mt7621
index 4e6e1cff3..7c7fa151f 100644
--- a/targets/ramips-mt7621
+++ b/targets/ramips-mt7621
@@ -17,6 +17,13 @@ device('cudy-wr2100', 'cudy_wr2100', {
 device('d-link-dir-860l-b1', 'dlink_dir-860l-b1')
 
 
+-- GL.iNet
+
+device('gl.inet-gl-mt1300', 'glinet_gl-mt1300', {
+	factory = false,
+})
+
+
 -- Netgear
 
 device('netgear-ex6150', 'netgear_ex6150', {
-- 
GitLab