> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Luochongjun
> Sent: Samstag, 11. Juli 2020 10:59
> To: openwrt-devel@lists.openwrt.org
> Cc: Luochongjun
> Subject: [PATCH v2] ath79: add support for gl-e750
>
> 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
>
> MAC addresses based on vendor firmware:
> LAN *:a0 art 0x0
> 2.4GHz *:a1 art 0x1002
> 5GHz *:a2 art calculated from art 0x0 + 2
>
> Flash firmware:
> Since openwrt's kernel already exceeds 2MB, upgrading from the official
> version of GL-inet (v3.100) using the sysupgrade command will break the
> kernel image. Users who are using version 3.100 can only upgrade via uboot.
> The official guidance for GL-inet is as follows:
> https://docs.gl-inet.com/en/3/troubleshooting/debrick/
>
> In the future, GL-inet will modify the firmware to support the sysupgrade
> command, so users will be able to upgrade directly with the sysupgrade
> command in future releases.
>
> 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
a few nitpicks still below.
>
> Signed-off-by: Luochongjun
> ---
> target/linux/ath79/dts/qca9531_glinet_gl-e750.dts | 140
> +
> target/linux/ath79/image/nand.mk | 18 +++
> .../ath79/nand/base-files/etc/board.d/02_network | 3 +
> .../etc/hotplug.d/ieee80211/10-fix-wifi-mac| 8 ++
> 4 files changed, 169 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 000..aba2087
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
> @@ -0,0 +1,140 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/;
> +
> +#include
> +#include
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> + compatible = "glinet,gl-e750", "qca,qca9531";
> + model = "GL.iNet GL-E750";
> +
> + aliases {
> + label-mac-device = ð0;
> + };
> +
> + keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&jtag_disable_pins>;
> +
> + reset {
> + label = "reset";
> + linux,code = ;
> + gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
> + };
> +
> + switch {
> + label = "switch";
> + linux,code = ;
> + gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> + gpio-export {
> + compatible = "gpio-export";
> + #size-cells = <0>;
I think size-cells can be dropped here, at least this is frequently done.
> +
> + gpio_lte_power {
> + gpio-export,name = "lte_power";
> + gpio-export,output = <1>;
> + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
> + };
> + };
> +};
> +
> +&pcie0 {
> + status = "okay";
> +};
> +
> +&uart {
> + status = "okay";
> +};
> +
> +&usb0 {
> + status = "okay";
> +};
> +
> +&usb_phy {
> + status = "okay";
> +};
> +
> +&spi {
> + status = "okay";
> + num-cs = <2>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <2500>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> +