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

2019-08-13 Thread Chongjun . Luo
Hi,

Thanks for your advice. I will fix these problems and resubmit the patch

Best regards
Luochongjun
 
From: Chuanhong Guo
Date: 2019-08-13 14:38
To: Luochongjun
CC: openwrt-devel
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750
Hi! Sorry for the late reply.
Here are 3 more nitpickings below:
 
On Fri, Jul 26, 2019 at 11:14 AM Luochongjun  wrote:
>
> This patch supports gl-ar750, which was previously supported by ar71xx.
>
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
 
A proper VLAN setup for the two LAN ports should be added in
target/linux/ath79/base-files/etc/board.d/02_network.
 
> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
>
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
>
> Signed-off-by: Luochongjun 
> ---
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
>  target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 149 
> +
>  target/linux/ath79/image/generic.mk|  10 ++
>  3 files changed, 160 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
>
> diff --git 
> a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 4118685..5c9fa2f 100644
> --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -117,6 +117,7 @@ case "$FIRMWARE" in
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(cat 
> /sys/class/net/eth0/address) +1)
> ;;
> +   glinet,gl-ar750|\
> glinet,gl-ar750s)
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) 
> +1)
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts 
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> new file mode 100644
> index 000..b8f9735
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> +   compatible = "glinet,gl-ar750", "qca,qca9531";
> +   model = "GL.iNet GL-AR750";
> +
> +   keys {
> +   compatible = "gpio-keys";
> +
> +   pinctrl-names = "default";
> +   pinctrl-0 = <_disable_pins>;
> +
> +   reset {
> +   label = "reset";
> +   linux,code = ;
> +   gpios = < 3 GPIO_ACTIVE_LOW>;
> +   };
> +
> +   mode {
> +   label = "mode";
> +   linux,code = ;
> +   gpios = < 0 GPIO_ACTIVE_LOW>;
> +   };
> +   };
> +
> +   leds {
> +   compatible = "gpio-leds";
> +
> +   power {
> +   label = "gl-ar750:white:power";
> +   gpios = < 12 GPIO_ACTIVE_LOW>;
> +   default-state = "on";
> +   };
> +
> +   wlan2g {
> +   label = "gl-ar750:white:wlan2g";
> +   gpios = < 14 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy1tpt";
> +   };
> +
> +   wlan5g {
> +   label = "gl-ar750:white:wlan5g";
> +   gpios = < 13 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy0tpt";
> +   };
> +
> +   };
> +
> +   i2c {
> +   compatible = "i2c-gpio";
> +
> +   sda-gpios = < 17 GPIO_ACTIVE_LOW>;
> +   scl-gpios = < 16 GPIO_ACTIVE_LOW>;
> +   };
> +
> +
> +};
> +
> + {
> +   status = "okay";
> +
> +   wifi@0,0 {
> +   compatible = "qcom,ath10k";
> +   reg = <0 0 0 0 0>;
> +   device_type = "pci";
> +   };
> +};
> +
> + {
> +   status = "okay";
> +};
> +
> + 

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

2019-08-13 Thread Chuanhong Guo
Hi! Sorry for the late reply.
Here are 3 more nitpickings below:

On Fri, Jul 26, 2019 at 11:14 AM Luochongjun  wrote:
>
> This patch supports gl-ar750, which was previously supported by ar71xx.
>
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN

A proper VLAN setup for the two LAN ports should be added in
target/linux/ath79/base-files/etc/board.d/02_network.

> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
>
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
>
> Signed-off-by: Luochongjun 
> ---
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
>  target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 149 
> +
>  target/linux/ath79/image/generic.mk|  10 ++
>  3 files changed, 160 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
>
> diff --git 
> a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 4118685..5c9fa2f 100644
> --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -117,6 +117,7 @@ case "$FIRMWARE" in
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(cat 
> /sys/class/net/eth0/address) +1)
> ;;
> +   glinet,gl-ar750|\
> glinet,gl-ar750s)
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) 
> +1)
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts 
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> new file mode 100644
> index 000..b8f9735
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> +   compatible = "glinet,gl-ar750", "qca,qca9531";
> +   model = "GL.iNet GL-AR750";
> +
> +   keys {
> +   compatible = "gpio-keys";
> +
> +   pinctrl-names = "default";
> +   pinctrl-0 = <_disable_pins>;
> +
> +   reset {
> +   label = "reset";
> +   linux,code = ;
> +   gpios = < 3 GPIO_ACTIVE_LOW>;
> +   };
> +
> +   mode {
> +   label = "mode";
> +   linux,code = ;
> +   gpios = < 0 GPIO_ACTIVE_LOW>;
> +   };
> +   };
> +
> +   leds {
> +   compatible = "gpio-leds";
> +
> +   power {
> +   label = "gl-ar750:white:power";
> +   gpios = < 12 GPIO_ACTIVE_LOW>;
> +   default-state = "on";
> +   };
> +
> +   wlan2g {
> +   label = "gl-ar750:white:wlan2g";
> +   gpios = < 14 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy1tpt";
> +   };
> +
> +   wlan5g {
> +   label = "gl-ar750:white:wlan5g";
> +   gpios = < 13 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy0tpt";
> +   };
> +
> +   };
> +
> +   i2c {
> +   compatible = "i2c-gpio";
> +
> +   sda-gpios = < 17 GPIO_ACTIVE_LOW>;
> +   scl-gpios = < 16 GPIO_ACTIVE_LOW>;
> +   };
> +
> +
> +};
> +
> + {
> +   status = "okay";
> +
> +   wifi@0,0 {
> +   compatible = "qcom,ath10k";
> +   reg = <0 0 0 0 0>;
> +   device_type = "pci";
> +   };
> +};
> +
> + {
> +   status = "okay";
> +};
> +
> + {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   status = "okay";
> +
> +   hub_port: port@1 {
> +   reg = <1>;
> +   #trigger-source-cells = <0>;
> +   };

This hub_port node is only used for a usb-port LED trigger. It can be
dropped if you don't have a USB LED.

> +};
> +
> +_phy {
> +   status = "okay";
> +};
> +
> + {
> +   status = "okay";
> +   num-cs = <0>;
> +
> +   flash@0 {
> +   compatible = "jedec,spi-nor";
> +   reg = <0>;
> +   spi-max-frequency = <2500>;
> +
> +   partitions {
> +   compatible = "fixed-partitions";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +
> +   partition@0 {
> +   label = "u-boot";
> +   reg = <0x00 

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

2019-07-23 Thread Chongjun.Luo
Hi,Adrian


The MAC address is the MAC address on the label


Best regards
Luochongjun

--原始邮件--
发件人:"Adrian Schmutzler ";
发送时间:2019年7月23日(星期二) 晚上7:41
收件人:"'Luochongjun'" ;"openwrt-devel" 
;
主题:RE: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750
---

 Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
> Behalf Of Luochongjun
> Sent: Dienstag, 23. Juli 2019 09:45
> To: openwrt-devel@lists.openwrt.org
> Cc: Luochongjun 
> Subject: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750
> 
> This patch supports gl-ar750, which was previously supported by ar71xx.
> 

...

> + {
> + status = "okay";
> + mtd-mac-address = < 0x0>;

Is this the MAC address on the device's label/case/box?

Best

Adrian___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2019-07-23 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
> Behalf Of Luochongjun
> Sent: Dienstag, 23. Juli 2019 09:45
> To: openwrt-devel@lists.openwrt.org
> Cc: Luochongjun 
> Subject: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750
> 
> This patch supports gl-ar750, which was previously supported by ar71xx.
> 

...

> + {
> + status = "okay";
> + mtd-mac-address = < 0x0>;

Is this the MAC address on the device's label/case/box?

Best

Adrian


pgpWzrKY7P1R_.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2019-07-23 Thread Chongjun . Luo
My local openwrt tree has not been updated to the latest, so DEVICE_VENDOR and 
DEVICE_MODEL are not yet used

Date: Tue, 23 Jul 2019 12:27:03 +0200
From: Moritz Warning 
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750
Message-ID: <47ab81c8-bd2b-a4f0-f94c-0aa68a7c5...@web.de>
Content-Type: text/plain; charset=utf-8
 
It would be a good idea to rewrite
 
DEVICE_TITLE := GL.iNet GL-AR750
 
to
 
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-AR750
 
See https://github.com/openwrt/openwrt/pull/2124
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2019-07-23 Thread Moritz Warning
It would be a good idea to rewrite

DEVICE_TITLE := GL.iNet GL-AR750

to

DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-AR750

See https://github.com/openwrt/openwrt/pull/2124

On 7/23/19 9:45 AM, Luochongjun wrote:
> This patch supports gl-ar750, which was previously supported by ar71xx.
>
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
>
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
>
> Signed-off-by: Luochongjun 
> ---
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
>  target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 149 
> +
>  target/linux/ath79/image/generic.mk|   9 ++
>  3 files changed, 159 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
>
> diff --git 
> a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 8f0ea1d..6a9cb1c 100644
> --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -116,6 +116,7 @@ case "$FIRMWARE" in
>   ath10kcal_extract "art" 20480 2116
>   ath10kcal_patch_mac $(macaddr_add $(cat 
> /sys/class/net/eth0/address) +1)
>   ;;
> + glinet,gl-ar750|\
>   glinet,gl-ar750s)
>   ath10kcal_extract "art" 20480 2116
>   ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) 
> +1)
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts 
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> new file mode 100644
> index 000..b8f9735
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> + compatible = "glinet,gl-ar750", "qca,qca9531";
> + model = "GL.iNet GL-AR750";
> +
> + keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <_disable_pins>;
> +
> + reset {
> + label = "reset";
> + linux,code = ;
> + gpios = < 3 GPIO_ACTIVE_LOW>;
> + };
> +
> + mode {
> + label = "mode";
> + linux,code = ;
> + gpios = < 0 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + power {
> + label = "gl-ar750:white:power";
> + gpios = < 12 GPIO_ACTIVE_LOW>;
> + default-state = "on";
> + };
> +
> + wlan2g {
> + label = "gl-ar750:white:wlan2g";
> + gpios = < 14 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy1tpt";
> + };
> +
> + wlan5g {
> + label = "gl-ar750:white:wlan5g";
> + gpios = < 13 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy0tpt";
> + };
> +
> + };
> +
> + i2c {
> + compatible = "i2c-gpio";
> +
> + sda-gpios = < 17 GPIO_ACTIVE_LOW>;
> + scl-gpios = < 16 GPIO_ACTIVE_LOW>;
> + };
> +
> +
> +};
> +
> + {
> + status = "okay";
> +
> + wifi@0,0 {
> + compatible = "qcom,ath10k";
> + reg = <0 0 0 0 0>;
> + device_type = "pci";
> + };
> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "okay";
> +
> + hub_port: port@1 {
> + reg = <1>;
> + #trigger-source-cells = <0>;
> + };
> +};
> +
> +_phy {
> + status = "okay";
> +};
> +
> + {
> + status = "okay";
> + num-cs = <0>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <2500>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x00 0x04>;
> + read-only;
> + };
> +
> + partition@4 {
> + label = "u-boot-env";
> + reg = <0x04 0x01>;
> + read-only;
> +   

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

2019-07-13 Thread Rafał Miłecki
On Wed, 26 Jun 2019 at 12:27, Luochongjun  wrote:
> This patch supports gl-ar750, which was previously supported by ar71xx.
>
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
>
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
>
> Signed-off-by: luochongjun 

Isn't your name misspelled there (a missing space)?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2019-07-13 Thread Chuanhong Guo
Hi!

Some comments inline:

On Wed, Jun 26, 2019 at 6:27 PM Luochongjun  wrote:
>
> This patch supports gl-ar750, which was previously supported by ar71xx.
>
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
>
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
>
> Signed-off-by: luochongjun 
> ---
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
>  target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 151 
> +
>  target/linux/ath79/image/generic.mk|   8 ++
>  3 files changed, 160 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
>
> diff --git 
> a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 8f0ea1d..6a9cb1c 100644
> --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -116,6 +116,7 @@ case "$FIRMWARE" in
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(cat 
> /sys/class/net/eth0/address) +1)
> ;;
> +   glinet,gl-ar750|\
> glinet,gl-ar750s)
> ath10kcal_extract "art" 20480 2116
> ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) 
> +1)
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts 
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> new file mode 100644
> index 000..c20cdf5
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> @@ -0,0 +1,151 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> +   compatible = "glinet,gl-ar750", "qca,qca9531";
> +   model = "GL.iNet GL-AR750";
> +
> +   keys {
> +   compatible = "gpio-keys";
> +
> +   poll-interval = <20>;

"poll-interval" is for "gpio-keys-polled" and it specifies how often
it should check whether gpio value changed. You don't need this for
interrupt-based "gpio-keys" driver.

> +   pinctrl-names = "default";
> +   pinctrl-0 = <_disable_pins>;
> +
> +   reset {
> +   label = "reset";
> +   linux,code = ;
> +   gpios = < 3 GPIO_ACTIVE_LOW>;
> +   };
> +
> +   mode {
> +   label = "mode";
> +   linux,code = ;
> +   gpios = < 0 GPIO_ACTIVE_LOW>;
> +   };
> +   };
> +
> +   leds {
> +   compatible = "gpio-leds";
> +
> +   power {
> +   label = "gl-ar750:white:power";
> +   gpios = < 12 GPIO_ACTIVE_LOW>;
> +   default-state = "on";
> +   };
> +
> +   wlan2g {
> +   label = "gl-ar750:white:wlan2g";
> +   gpios = < 14 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy1tpt";
> +   };
> +
> +   wlan5g {
> +   label = "gl-ar750:white:wlan5g";
> +   gpios = < 13 GPIO_ACTIVE_LOW>;
> +   linux,default-trigger = "phy0tpt";
> +   };
> +
> +   };
> +
> +   i2c {
> +   compatible = "i2c-gpio";
> +
> +   sda-gpios = < 17 GPIO_ACTIVE_LOW>;
> +   scl-gpios = < 16 GPIO_ACTIVE_LOW>;
> +   };
> +
> +
> +};
> +
> + {
> +   status = "okay";
> +
> +   wifi@0,0 {
> +   compatible = "qcom,ath10k";
> +   reg = <0 0 0 0 0>;
> +   device_type = "pci";
> +   };
> +};
> +
> + {
> +   status = "okay";
> +};
> +
> + {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   status = "okay";
> +
> +   hub_port: port@1 {
> +   reg = <1>;
> +   #trigger-source-cells = <0>;
> +   };
> +};
> +
> +_phy {
> +   status = "okay";
> +};
> +
> + {
> +   status = "okay";
> +   num-cs = <0>;
> +
> +   flash@0 {
> +   compatible = "jedec,spi-nor";
> +   reg = <0>;
> +   spi-max-frequency = <2500>;
> +
> +   partitions {
> +   compatible = "fixed-partitions";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +
> +   partition@0 {
> +   label = "u-boot";
> +   reg = <0x00 0x04>;
> +   read-only;

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

2019-06-27 Thread Sven Roederer
Am Mittwoch, 26. Juni 2019, 12:02:23 CEST schrieb Luochongjun:
> This patch supports gl-ar750, which was previously supported by ar71xx.
> 
> Specification:
> - SOC: QCA9531 (650MHz)
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR2
> - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
> - Wireless: 2.4GHz (bgn) and 5GHz (ac)
> - USB: 1x USB 2.0 port
> - Switch: 1x switch
> - Button: 1x reset button
> - LED: 3x LEDS (white)
> 
> Flash instruction:
> Support for sysupgrade directive upgrades, as well as luci upgrades.
> 

Thanks for porting this device. Based on your previous patch I built an image 
and flashed it.
Two thing to mention:
* probalby you can add a line "SUPPORTED_DEVICES += gl-ar750" to the Makefile, 
to make sysupgrade accept the image without "-F" switch on ar71xx
* the device has "printed MAC-address from case" + 1 for the LAN-ports. Not 
sure what is used with vendor FW.

Sven



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2019-06-24 Thread Christian Lamparter
On Monday, June 24, 2019 10:41:37 AM CEST Luochongjun wrote:
> This patch support gl-ar750 on ath79.

I'm looking at this previous patch for the GL-X750.


And I think you can do better than this gl-ar750 post.

Can you please take the time and amend your patch with the
specification and a short description on how the flash the
initial image. Thanks.

More comments down below.

> 
> Signed-off-by: Luo chongjun 
Please make sure your Name matches exactly (as in bit-for-bit) that of
your E-Mail Client address. Otherwise this needs to be fixed by the
commiter since the openwrt infrastructure does a checks that.

> ---
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   1 +
>  target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 149 
> +
>  target/linux/ath79/image/generic.mk|   8 ++
>  3 files changed, 158 insertions(+)
>  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> 
> diff --git 
> a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 8f0ea1d..6a9cb1c 100644
> --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -116,6 +116,7 @@ case "$FIRMWARE" in
>   ath10kcal_extract "art" 20480 2116
>   ath10kcal_patch_mac $(macaddr_add $(cat 
> /sys/class/net/eth0/address) +1)
>   ;;
> + glinet,gl-ar750|\
>   glinet,gl-ar750s)
>   ath10kcal_extract "art" 20480 2116
>   ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) 
> +1)
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts 
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> new file mode 100644
> index 000..c173f0d
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include 
> +#include 
> +
> +#include "qca953x.dtsi"
> +
> +/ {
> + compatible = "glinet,gl-ar750", "qca,qca9531";
> + model = "GL.iNet GL-AR750";
> +
> + keys {
> + compatible = "gpio-keys-polled";
ath79 should support "gpio-keys".

> +
> + poll-interval = <20>;
> + pinctrl-names = "default";
> + pinctrl-0 = <_disable_pins>;
> +
> + reset {
> + label = "reset";
> + linux,code = ;
> + gpios = < 3 GPIO_ACTIVE_LOW>;
> + };
> +
> + mode {
> +label = "mode";
> +linux,code = ;
> +gpios = < 0 GPIO_ACTIVE_LOW>;
> +};
Please use tabs instead of space for indent.
(scripts/checkpatch.pl can help you find these cases).
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + power {
> + label = "gl-ar750:green:power";
> + gpios = < 12 GPIO_ACTIVE_LOW>;
> + default-state = "on";
> + };
> +
> + wlan2g {
> + label = "gl-ar750:green:wlan2g";
> + gpios = < 14 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy1tpt";
> + };
> +
> + wlan5g {
> + label = "gl-ar750:green:wlan5g";
> + gpios = < 13 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy0tpt";
> + };
> +
> + };
> +
> +   i2c {
> +compatible = "i2c-gpio";
> +
> +sda-gpios = < 17 GPIO_ACTIVE_LOW>;
> +scl-gpios = < 16 GPIO_ACTIVE_LOW>;
> +
> +/* can be removed on 4.19 */
> +gpios = < 17 GPIO_ACTIVE_LOW>,
> +< 16 GPIO_ACTIVE_LOW>;
Hm, ath79 switched to 4.19. So they can be removed right now ;)
> +
> +};
> +
> +
> +};
> +
> + {
> + status = "okay";
Please add a proper sub node with the right ath10k compatible
(see qcom,ath10k.txt) for the attached pcie chip here.

> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "okay";
> +
> + hub_port: port@1 {
> + reg = <1>;
> + #trigger-source-cells = <0>;
> + };
> +};
> +
> +_phy {
> + status = "okay";
> +};
> +
> + {
> + status = "okay";
> + num-cs = <0>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <2500>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> +