Skip to content

Commit 826521f

Browse files
committed
qualcommax: ipq807x: add support for Sagemcom Fast 5866t
Signed-off-by: YiZhen Choo <yizhen.c02@gmail.com>
1 parent 1831966 commit 826521f

File tree

6 files changed

+369
-1
lines changed

6 files changed

+369
-1
lines changed

package/firmware/ipq-wifi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ALLWIFIBOARDS:= \
7070
qihoo_360v6 \
7171
qnap_301w \
7272
redmi_ax6 \
73+
sagemcom_fast-5866t \
7374
skspruce_wia3300-20 \
7475
spectrum_sax1v1k \
7576
tplink_deco-x80-5g \
@@ -236,6 +237,7 @@ $(eval $(call generate-ipq-wifi-package,qihoo_360v6,Qihoo 360V6))
236237
$(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
237238
$(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
238239
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
240+
$(eval $(call generate-ipq-wifi-package,sagemcom_fast-5866t,Sagemcom Fast 5866T))
239241
$(eval $(call generate-ipq-wifi-package,skspruce_wia3300-20,SKSpruce WIA3300-20))
240242
$(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
241243
$(eval $(call generate-ipq-wifi-package,tplink_deco-x80-5g,TP-Link Deco X80-5G))
Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
/* Copyright (c) 2023, Chukun Pan <amadeus@jmu.edu.cn> */
3+
4+
/dts-v1/;
5+
6+
#include "ipq8074.dtsi"
7+
#include "ipq8074-hk-cpu.dtsi"
8+
#include "ipq8074-ess.dtsi"
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/input/input.h>
11+
#include <dt-bindings/leds/common.h>
12+
13+
/ {
14+
model = "Sagemcom Fast 5866T";
15+
compatible = "sagemcom,5866t", "qcom,ipq8074";
16+
17+
aliases {
18+
led-boot = &led_power_green;
19+
led-failsafe = &led_power_red;
20+
led-running = &led_power_green;
21+
led-upgrade = &led_power_red;
22+
serial0 = &blsp1_uart5;
23+
/*
24+
* Aliases as required by u-boot
25+
* to patch MAC addresses
26+
*/
27+
ethernet3 = &dp4;
28+
ethernet4 = &dp5;
29+
ethernet5 = &dp6;
30+
label-mac-device = &dp4;
31+
};
32+
33+
chosen {
34+
stdout-path = "serial0:115200n8";
35+
bootargs-append = " swiotlb=1 coherent_pool=2M";
36+
};
37+
38+
gpio-export {
39+
compatible = "gpio-export";
40+
41+
lte-power {
42+
gpio-export,name = "lte_power";
43+
gpio-export,output = <1>;
44+
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
45+
};
46+
47+
lte-power-on {
48+
gpio-export,name = "lte_power_on";
49+
gpio-export,output = <1>;
50+
gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
51+
};
52+
53+
lte-reset {
54+
gpio-export,name = "lte_reset";
55+
gpio-export,output = <0>;
56+
gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
57+
};
58+
59+
ble-power {
60+
gpio-export,name = "ble_power";
61+
gpio-export,output = <1>;
62+
gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
63+
};
64+
};
65+
66+
keys {
67+
compatible = "gpio-keys";
68+
69+
wps {
70+
label = "wps";
71+
linux,code = <KEY_WPS_BUTTON>;
72+
gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
73+
};
74+
75+
reset {
76+
label = "reset";
77+
linux,code = <KEY_RESTART>;
78+
gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
79+
};
80+
};
81+
82+
leds {
83+
compatible = "gpio-leds";
84+
85+
led_power_green: power_green {
86+
function = LED_FUNCTION_POWER;
87+
color = <LED_COLOR_ID_GREEN>;
88+
gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
89+
};
90+
91+
led_power_red: power_red {
92+
function = LED_FUNCTION_POWER;
93+
color = <LED_COLOR_ID_RED>;
94+
gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
95+
};
96+
97+
led_wlan_green: wlan_green {
98+
function = LED_FUNCTION_WLAN;
99+
color = <LED_COLOR_ID_GREEN>;
100+
gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
101+
};
102+
103+
led_led1_red: led1_red {
104+
function = "status";
105+
color = <LED_COLOR_ID_RED>;
106+
gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>; // LED1_R
107+
};
108+
109+
led_led1_orange: led1_orange {
110+
function = "status";
111+
color = <LED_COLOR_ID_ORANGE>;
112+
gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>; // LED1_O
113+
};
114+
115+
led_led2_yellow: led2_yellow {
116+
function = "status";
117+
color = <LED_COLOR_ID_YELLOW>;
118+
gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>; // LED2_Y
119+
};
120+
121+
led_led2_green: led2_green {
122+
function = "status";
123+
color = <LED_COLOR_ID_GREEN>;
124+
gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>; // LED2_G
125+
};
126+
127+
led_led3_green: led3_green {
128+
function = "status";
129+
color = <LED_COLOR_ID_GREEN>;
130+
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>; // LED3_G
131+
};
132+
133+
led_led3_yellow: led3_yellow {
134+
function = "status";
135+
color = <LED_COLOR_ID_YELLOW>;
136+
gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; // LED3_Y
137+
};
138+
139+
led_led4_green: led4_green {
140+
function = "status";
141+
color = <LED_COLOR_ID_GREEN>;
142+
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; // LED4_G
143+
};
144+
145+
led_led4_yellow: led4_yellow {
146+
function = "status";
147+
color = <LED_COLOR_ID_YELLOW>;
148+
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; // LED4_Y
149+
};
150+
151+
led_led5_green: led5_green {
152+
function = "status";
153+
color = <LED_COLOR_ID_GREEN>;
154+
gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; // LED5_G
155+
};
156+
157+
led_led5_yellow: led5_yellow {
158+
function = "status";
159+
color = <LED_COLOR_ID_YELLOW>;
160+
gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>; // LED5_Y
161+
};
162+
};
163+
164+
usb_vbus: regulator-usb-vbus {
165+
compatible = "regulator-fixed";
166+
regulator-name = "usb_vbus";
167+
regulator-min-microvolt = <5000000>;
168+
regulator-max-microvolt = <5000000>;
169+
gpio = <&tlmm 9 GPIO_ACTIVE_HIGH>;
170+
regulator-boot-on;
171+
};
172+
};
173+
174+
&tlmm {
175+
mdio_pins: mdio-pins {
176+
mdc {
177+
pins = "gpio68";
178+
function = "mdc";
179+
drive-strength = <8>;
180+
bias-pull-up;
181+
};
182+
183+
mdio {
184+
pins = "gpio69";
185+
function = "mdio";
186+
drive-strength = <8>;
187+
bias-pull-up;
188+
};
189+
};
190+
};
191+
192+
&blsp1_uart5 {
193+
status = "okay";
194+
};
195+
196+
&cryptobam {
197+
status = "okay";
198+
};
199+
200+
&crypto {
201+
status = "okay";
202+
};
203+
204+
&prng {
205+
status = "okay";
206+
};
207+
208+
&qpic_bam {
209+
status = "okay";
210+
};
211+
212+
&sdhc_1 {
213+
/* Following same rule as QNAP 301W
214+
* the emmc has a problem with the hs400 > hs200 speed switch.
215+
* Therefore remove the mmc-hs400-1_8v property
216+
*/
217+
/delete-property/ mmc-hs400-1_8v;
218+
mmc-hs200-1_8v;
219+
mmc-ddr-1_8v;
220+
vqmmc-supply = <&l11>;
221+
status = "okay";
222+
};
223+
224+
&qusb_phy_0 {
225+
status = "okay";
226+
227+
vdd-supply = <&usb_vbus>;
228+
};
229+
230+
&qusb_phy_1 {
231+
status = "okay";
232+
233+
vdd-supply = <&usb_vbus>;
234+
};
235+
236+
&ssphy_0 {
237+
status = "okay";
238+
};
239+
240+
&ssphy_1 {
241+
status = "okay";
242+
};
243+
244+
&usb_0 {
245+
status = "okay";
246+
};
247+
248+
&usb_1 {
249+
status = "okay";
250+
};
251+
252+
&mdio {
253+
status = "okay";
254+
255+
pinctrl-0 = <&mdio_pins>;
256+
pinctrl-names = "default";
257+
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
258+
259+
ethernet-phy-package@0 {
260+
compatible = "qcom,qca8075-package";
261+
#address-cells = <1>;
262+
#size-cells = <0>;
263+
reg = <0>;
264+
265+
qcom,package-mode = "qsgmii";
266+
267+
qca8075_3: ethernet-phy@3 {
268+
compatible = "ethernet-phy-ieee802.3-c22";
269+
reg = <3>;
270+
};
271+
272+
qca8075_4: ethernet-phy@4 {
273+
compatible = "ethernet-phy-ieee802.3-c22";
274+
reg = <4>;
275+
};
276+
};
277+
278+
qca8081: ethernet-phy@24 {
279+
compatible = "ethernet-phy-id004d.d101";
280+
reg = <24>;
281+
reset-deassert-us = <10000>;
282+
};
283+
};
284+
285+
&switch {
286+
status = "okay";
287+
288+
switch_lan_bmp = <(ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
289+
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
290+
switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
291+
292+
qcom,port_phyinfo {
293+
port@1 {
294+
port_id = <1>;
295+
phy_address = <3>;
296+
};
297+
port@2 {
298+
port_id = <2>;
299+
phy_address = <4>;
300+
};
301+
port@6 {
302+
port_id = <6>;
303+
phy_address = <24>;
304+
port_mac_sel = "QGMAC_PORT";
305+
};
306+
};
307+
};
308+
309+
&edma {
310+
status = "okay";
311+
};
312+
313+
&dp4 {
314+
status = "okay";
315+
phy-mode = "qsgmii";
316+
phy-handle = <&qca8075_3>;
317+
label = "lan1";
318+
};
319+
320+
&dp5 {
321+
status = "okay";
322+
phy-mode = "qsgmii";
323+
phy-handle = <&qca8075_4>;
324+
label = "wan";
325+
};
326+
327+
&dp6_syn {
328+
status = "okay";
329+
phy-handle = <&qca8081>;
330+
label = "lan2";
331+
};
332+
333+
&wifi {
334+
status = "okay";
335+
336+
qcom,ath11k-calibration-variant = "Sagemcom_5866T";
337+
};

target/linux/qualcommax/image/ipq807x.mk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,23 @@ define Device/redmi_ax6
380380
endef
381381
TARGET_DEVICES += redmi_ax6
382382

383+
define Device/sagemcom_5866t
384+
$(call Device/FitImage)
385+
$(call Device/EmmcImage)
386+
DEVICE_VENDOR := Sagemcom
387+
DEVICE_MODEL := 5866T
388+
DEVICE_DTS_CONFIG := config@hk01.c6
389+
SOC := ipq8072
390+
SOC := ipq8072
391+
KERNEL_SIZE := 12288k
392+
IMAGES := sysupgrade.bin factory.bin kernel.bin
393+
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
394+
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | append-metadata
395+
IMAGE/kernel.bin := append-kernel
396+
DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools
397+
endef
398+
TARGET_DEVICES += sagemcom_5866t
399+
383400
define Device/spectrum_sax1v1k
384401
$(call Device/FitImage)
385402
$(call Device/EmmcImage)

0 commit comments

Comments
 (0)