summaryrefslogtreecommitdiff
path: root/24.10/nexx-wt3020-openwrt24.10-16m-32m.patch
blob: b4d337fe1ea6b28388483f1dc50de7503f4f346f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020-16m.dts b/target/linux/ramips/dts/mt7620n_nexx_wt3020-16m.dts
new file mode 100644
index 0000000000..15e7734c67
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020-16m.dts
@@ -0,0 +1,18 @@
+#include "mt7620n_nexx_wt3020.dtsi"
+
+/ {
+	compatible = "nexx,wt3020-16m", "nexx,wt3020", "ralink,mt7620n-soc";
+	model = "Nexx WT3020 (16M)";
+};
+
+&firmware {
+	reg = <0x50000 0xfb0000>;
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020-32m.dts b/target/linux/ramips/dts/mt7620n_nexx_wt3020-32m.dts
new file mode 100644
index 0000000000..1e66aff57d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020-32m.dts
@@ -0,0 +1,18 @@
+#include "mt7620n_nexx_wt3020.dtsi"
+
+/ {
+	compatible = "nexx,wt3020-32m", "nexx,wt3020", "ralink,mt7620n-soc";
+	model = "Nexx WT3020 (32M)";
+};
+
+&firmware {
+	reg = <0x50000 0x1fb0000>;
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 2ae329e096..99bb6544b7 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -968,6 +968,34 @@ define Device/nexx_wt3020-8m
 endef
 TARGET_DEVICES += nexx_wt3020-8m
 
+define Device/nexx_wt3020-16m
+  SOC := mt7620n
+  IMAGE_SIZE := 16064k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
+	poray-header -B WT3020 -F 16M
+  DEVICE_VENDOR := Nexx
+  DEVICE_MODEL := WT3020
+  DEVICE_VARIANT := 16M
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
+  SUPPORTED_DEVICES += wt3020 wt3020-16M
+endef
+TARGET_DEVICES += nexx_wt3020-16m
+
+define Device/nexx_wt3020-32m
+  SOC := mt7620n
+  IMAGE_SIZE := 32448k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
+	poray-header -B WT3020 -F 32M
+  DEVICE_VENDOR := Nexx
+  DEVICE_MODEL := WT3020
+  DEVICE_VARIANT := 32M
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
+  SUPPORTED_DEVICES += wt3020 wt3020-32M
+endef
+TARGET_DEVICES += nexx_wt3020-32m
+
 define Device/ohyeah_oy-0001
   SOC := mt7620a
   IMAGE_SIZE := 16064k
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index f07ce73e82..b67797c5dc 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -218,7 +218,9 @@ ramips_setup_interfaces()
 		;;
 	netgear,pr2000|\
 	nexx,wt3020-4m|\
-	nexx,wt3020-8m)
+	nexx,wt3020-8m|\
+	nexx,wt3020-16m|\
+	nexx,wt3020-32m)
 		ucidef_add_switch "switch0" \
 			"4:lan" "0:wan" "6@eth0"
 		;;
@@ -309,6 +311,8 @@ ramips_setup_macs()
 	netgear,jwnr2010-v5|\
 	nexx,wt3020-4m|\
 	nexx,wt3020-8m|\
+	nexx,wt3020-16m|\
+	nexx,wt3020-32m|\
 	phicomm,psg1208|\
 	planex,db-wrt01|\
 	planex,mzk-750dhp|\
diff --git a/tools/firmware-utils/patches/openwrt24.04-mkporayfw-nexx-wt3020-16m-32m.patch b/tools/firmware-utils/patches/openwrt24.04-mkporayfw-nexx-wt3020-16m-32m.patch
new file mode 100644
index 0000000000..6d3b9fbd90
--- /dev/null
+++ b/tools/firmware-utils/patches/openwrt24.04-mkporayfw-nexx-wt3020-16m-32m.patch
@@ -0,0 +1,36 @@
+diff --git a/src/mkporayfw.c b/src/mkporayfw.c
+index 43c8885..f845b3f 100644
+--- a/src/mkporayfw.c
++++ b/src/mkporayfw.c
+@@ -132,6 +132,12 @@ static struct flash_layout layouts[] = {
+ 	}, {
+ 		.id		= "8M",
+ 		.fw_max_len	= 0x7c0000,
++	}, {
++		.id		= "16M",
++		.fw_max_len	= 0xfc0000,
++	}, {
++		.id		= "32M",
++		.fw_max_len	= 0x1fc0000,
+ 	}, {
+ 		/* terminating entry */
+ 	}
+@@ -229,8 +235,16 @@ static struct board_info boards[] = {
+                 .layout_id      = "8M",
+                 .key            = KEY_NEXX_2,
+         }, {
+-
+-
++                .id             = "WT3020",
++                .hw_id          = HWID_NEXX_WT3020,
++                .layout_id      = "16M",
++                .key            = KEY_NEXX_2,
++        }, {
++                .id             = "WT3020",
++                .hw_id          = HWID_NEXX_WT3020,
++                .layout_id      = "32M",
++                .key            = KEY_NEXX_2,
++        }, {
+ 
+ 
+ 		/* terminating entry */