mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 17:15:08 +00:00
211 lines
6.9 KiB
Diff
211 lines
6.9 KiB
Diff
From 19b1dfb78c50442878cd1926d49b00e5ea8829b6 Mon Sep 17 00:00:00 2001
|
|
From: Kaifeng Wei <kaifeng.wei@gl-inet.com>
|
|
Date: Sun, 26 Sep 2021 04:58:09 -0700
|
|
Subject: [PATCH] add support gl ar750 ar750s
|
|
|
|
---
|
|
target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 26 ++++++++++++++++++---
|
|
.../linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi | 27 +++++++++++++++++++---
|
|
target/linux/ath79/image/generic.mk | 2 +-
|
|
target/linux/ath79/image/nand.mk | 7 +++++-
|
|
.../ath79/nand/base-files/etc/board.d/01_leds | 4 ++++
|
|
.../ath79/nand/base-files/etc/board.d/02_network | 6 +++++
|
|
.../etc/hotplug.d/firmware/11-ath10k-caldata | 2 ++
|
|
7 files changed, 66 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
|
|
index 24dc8aa..5ab0340 100644
|
|
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
|
|
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
|
|
@@ -9,6 +9,26 @@
|
|
compatible = "glinet,gl-ar750", "qca,qca9531";
|
|
model = "GL.iNet GL-AR750";
|
|
|
|
+ gl_hw {
|
|
+ compatible = "gl-hw-info";
|
|
+
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ model = "ar750";
|
|
+ wan = "eth0";
|
|
+ lan = "eth1.1";
|
|
+ switch-button = "gpio-0";
|
|
+ reset-button = "gpio-3";
|
|
+ usb-port = "1-1.2";
|
|
+ factory_data {
|
|
+ device_mac = "art";
|
|
+ device_ddns = "art", "0x10";
|
|
+ device_sn_bak = "art", "0x20";
|
|
+ device_sn = "art", "0x30";
|
|
+ country_code = "art", "0x88";
|
|
+ };
|
|
+ };
|
|
+
|
|
aliases {
|
|
led-boot = &led_power;
|
|
led-failsafe = &led_power;
|
|
@@ -40,19 +60,19 @@
|
|
compatible = "gpio-leds";
|
|
|
|
led_power: power {
|
|
- label = "white:power";
|
|
+ label = "gl-ar750:white:power";
|
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
default-state = "on";
|
|
};
|
|
|
|
wlan2g {
|
|
- label = "white:wlan2g";
|
|
+ label = "gl-ar750:white:wlan2g";
|
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "phy1tpt";
|
|
};
|
|
|
|
wlan5g {
|
|
- label = "white:wlan5g";
|
|
+ label = "gl-ar750:white:wlan5g";
|
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "phy0tpt";
|
|
};
|
|
diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
index 9226d37..d46b5ba 100644
|
|
--- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
+++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
@@ -9,6 +9,27 @@
|
|
compatible = "glinet,gl-ar750s", "qca,qca9563";
|
|
model = "GL.iNet GL-AR750S";
|
|
|
|
+ gl_hw {
|
|
+ compatible = "gl-hw-info";
|
|
+
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ model = "ar750s";
|
|
+ wan = "eth0.2";
|
|
+ lan = "eth0.1";
|
|
+ switch-button = "gpio-8";
|
|
+ reset-button = "gpio-2";
|
|
+ usb-port = "1-1";
|
|
+ nand;
|
|
+ factory_data {
|
|
+ device_mac = "art";
|
|
+ device_ddns = "art", "0x10";
|
|
+ device_sn_bak = "art", "0x20";
|
|
+ device_sn = "art", "0x30";
|
|
+ country_code = "art", "0x88";
|
|
+ };
|
|
+ };
|
|
+
|
|
aliases {
|
|
led-boot = &led_power;
|
|
led-failsafe = &led_power;
|
|
@@ -41,19 +62,19 @@
|
|
compatible = "gpio-leds";
|
|
|
|
led_power: power {
|
|
- label = "green:power";
|
|
+ label = "gl-ar750s:green:power";
|
|
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
|
default-state = "keep";
|
|
};
|
|
|
|
led_wlan2g: wlan2g {
|
|
- label = "green:wlan2g";
|
|
+ label = "gl-ar750s:green:wlan2g";
|
|
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "phy1tpt";
|
|
};
|
|
|
|
led_wlan5g: wlan5g {
|
|
- label = "green:wlan5g";
|
|
+ label = "gl-ar750s:green:wlan5g";
|
|
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
|
linux,default-trigger = "phy0tpt";
|
|
};
|
|
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
|
|
index cf3fce3..d178f43 100644
|
|
--- a/target/linux/ath79/image/generic.mk
|
|
+++ b/target/linux/ath79/image/generic.mk
|
|
@@ -1163,7 +1163,7 @@ define Device/glinet_gl-ar750
|
|
DEVICE_MODEL := GL-AR750
|
|
DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
|
|
IMAGE_SIZE := 16000k
|
|
- SUPPORTED_DEVICES += gl-ar750
|
|
+ SUPPORTED_DEVICES += gl-ar750 glinet,gl-ar750
|
|
endef
|
|
TARGET_DEVICES += glinet_gl-ar750
|
|
|
|
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
|
|
index 83ca331..9dd7a5b 100644
|
|
--- a/target/linux/ath79/image/nand.mk
|
|
+++ b/target/linux/ath79/image/nand.mk
|
|
@@ -215,7 +215,12 @@ define Device/glinet_gl-ar750s-nor-nand
|
|
$(Device/glinet_gl-ar750s-common)
|
|
DEVICE_VARIANT := NOR/NAND
|
|
KERNEL_SIZE := 4096k
|
|
- IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
+ BLOCKSIZE := 128k
|
|
+ PAGESIZE := 2048
|
|
+ VID_HDR_OFFSET := 2048
|
|
+ IMAGES := factory.img sysupgrade.tar
|
|
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-gl-metadata
|
|
+ IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | append-gl-metadata
|
|
SUPPORTED_DEVICES += glinet,gl-ar750s-nor
|
|
endef
|
|
TARGET_DEVICES += glinet_gl-ar750s-nor-nand
|
|
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
|
|
index 24f03a0..9369f15 100755
|
|
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
|
|
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
|
|
@@ -37,6 +37,10 @@ glinet,gl-xe300-nor-nand)
|
|
ucidef_set_led_netdev "wan" "WAN" "gl-xe300:green:wan" "eth1"
|
|
ucidef_set_led_netdev "3gnet" "LTE" "gl-xe300:green:lte" "wwan0"
|
|
;;
|
|
+glinet,gl-ar750)
|
|
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "gl-ar750:white:wlan2g" "phy1tpt"
|
|
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "gl-ar750:white:wlan5g" "phy0tpt"
|
|
+ ;;
|
|
netgear,wndr3700-v4|\
|
|
netgear,wndr4300|\
|
|
netgear,wndr4300sw|\
|
|
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
|
|
index 06b664e..0b5a63d 100755
|
|
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
|
|
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
|
|
@@ -17,6 +17,7 @@ ath79_setup_interfaces()
|
|
ucidef_add_switch "switch0" \
|
|
"0@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1"
|
|
;;
|
|
+ glinet,gl-ar750s|\
|
|
glinet,gl-ar750s-nor|\
|
|
glinet,gl-ar750s-nor-nand)
|
|
ucidef_add_switch "switch0" \
|
|
@@ -35,6 +36,11 @@ ath79_setup_interfaces()
|
|
glinet,gl-xe300-nor-nand)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
;;
|
|
+ glinet,gl-ar750)
|
|
+ ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
|
|
+ ucidef_add_switch "switch0" \
|
|
+ "0@eth1" "1:lan" "2:lan"
|
|
+ ;;
|
|
netgear,wndr3700-v4|\
|
|
netgear,wndr4300|\
|
|
netgear,wndr4300sw|\
|
|
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
index d5fd3db..3226d4f 100644
|
|
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
|
@@ -13,6 +13,8 @@ case "$FIRMWARE" in
|
|
caldata_extract "art" 0x5000 0x844
|
|
ath10k_patch_mac $(mtd_get_mac_binary art 0x12)
|
|
;;
|
|
+ glinet,gl-ar750|\
|
|
+ glinet,gl-ar750s|\
|
|
glinet,gl-ar750s-nor|\
|
|
glinet,gl-ar750s-nor-nand)
|
|
caldata_extract "art" 0x5000 0x844
|
|
--
|
|
2.7.4
|
|
|