[OpenWrt-Devel] [PATCH] ath79: add support for gl-e750

Luochongjun luochongjun at gl-inet.com
Wed Apr 29 00:38:26 EDT 2020


The gl-e750 is a portable travel router that gives you safe access to
the internet while traveling.

Specifications:
 - SoC: Qualcomm Atheros AR9531 (650MHz)
 - RAM: 128 MB DDR2
 - Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND (GD5F1GQ4UFYIG)
 - Ethernet: 10/100: 1xLAN
 - Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac)
 - USB: 1x USB 2.0 port
 - Switch: 1x switch
 - Button: 1x reset button
 - OLED Screen: 128*64 px

Flash instruction:
Support for sysupgrade directive upgrades, as well as luci upgrades.

OLED screen control:
OLED controller is connected to QCA9531 through serial port, and can send
instructions to OLED controller directly through serial port.
Refer to the links below for a list of supported instructions:
https://github.com/gl-inet/GL-E750-MCU-instruction

Signed-off-by: Luochongjun <luochongjun at gl-inet.com>
---
 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts  | 146 +++++++++++++++++++++
 .../generic/base-files/etc/board.d/02_network      |   3 +
 target/linux/ath79/image/nand.mk                   |  21 +++
 3 files changed, 170 insertions(+)
 create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts

diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
new file mode 100644
index 0000000..36ba376
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca953x.dtsi"
+
+/ {
+	compatible = "glinet,gl-e750", "qca,qca9531";
+	model = "GL.iNet GL-E750";
+
+	keys {
+		compatible = "gpio-keys-polled";
+
+		poll-interval = <20>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		button0 {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+		};
+
+		button1 {
+			label = "right";
+			linux,code = <BTN_0>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+        gpio-export {
+                compatible = "gpio-export";
+                #size-cells = <0>;
+
+                gpio_lte_power {
+                        gpio-export,name = "4G POWER";
+                        gpio-export,output = <1>;
+                        gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+                };
+        };
+
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&uart {
+	status = "okay";
+};
+
+&usb0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+	num-cs = <2>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x000000 0x040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x040000 0x010000>;
+			};
+
+			art: partition at 50000 {
+				label = "art";
+				reg = <0x050000 0x010000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "kernel";
+				reg = <0x060000 0x400000>;
+			};
+
+			partition at 460000 {
+				label = "reserved";
+				reg = <0x460000 0xba0000>;
+			};
+
+		};
+	};
+
+	flash at 1 {
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "ubi";
+				reg = <0x000000 0x8000000>;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+	mtd-mac-address = <&art 0x0>;
+	phy-handle = <&swphy4>;
+};
+
+&eth1 {
+	mtd-mac-address = <&art 0x0>;
+	mtd-mac-address-increment = <1>;
+};
+
+&wmac {
+	status = "okay";
+	mtd-cal-data = <&art 0x1000>;
+	mtd-mac-address = <&art 0x1002>;
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index d7f7eed..1e80c68 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -63,6 +63,9 @@ ath79_setup_interfaces()
 	winchannel,wb2000)
 		ucidef_set_interface_lan "eth0"
 		;;
+	glinet,gl-e750)
+		ucidef_set_interface_lan "eth1"
+		;;
 	avm,fritz4020|\
 	pcs,cr3000|\
 	tplink,archer-c58-v1|\
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 3ccd199..6518f99 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -130,6 +130,27 @@ define Device/glinet_gl-ar750s-nor
 endef
 TARGET_DEVICES += glinet_gl-ar750s-nor
 
+define Device/glinet_gl-e750
+  SOC := qca9531
+  DEVICE_VENDOR := GL.iNet
+  DEVICE_MODEL := GL-E750
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct kmod-usb2 \
+	kmod-usb-storage block-mount
+  KERNEL_SIZE := 2048k
+  IMAGE_SIZE := 16000k
+  PAGESIZE := 2048
+  VID_HDR_OFFSET := 2048
+  DEVICE_VARIANT := NOR/NAND
+  BLOCKSIZE := 128k
+  GL_UBOOT_UBI_OFFSET := 2048k
+  IMAGES += factory.img
+  IMAGE/factory.img := append-kernel | pad-to $$$$(GL_UBOOT_UBI_OFFSET) | \
+	append-ubi | check-kernel-size $$$$(GL_UBOOT_UBI_OFFSET)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  SUPPORTED_DEVICES += glinet,gl-e750
+endef
+TARGET_DEVICES += glinet_gl-e750
+
 # fake rootfs is mandatory, pad-offset 129 equals (2 * uimage_header + 0xff)
 define Device/netgear_ath79_nand
   DEVICE_VENDOR := NETGEAR
-- 
2.7.4




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list