Re: [OpenWrt-Devel] [PATCH v3] ipq40xx: Add support for IPQ4019 ap-dk07.1-c1

2018-09-19 Thread Christian Lamparter
On Friday, September 14, 2018 5:35:56 PM CEST Ram Chandra Jangir wrote:
>  * SoC: QCA IPQ4019
>  * RAM: 512 MiB
>  * Flash: 32 MiB of SPI NOR and 128 MiB NAND
>  * Wireless: 2.4-GHz 802.11ng, and two 5-GHz 802.11ac
>  * IoT :
>   CSR8811 radio [ supports BT classic and BLE ]
>   SiLabs EFR32MG radio [ supports 802.15.4 ZigBee ]
> 
>Tested on IPQ ap-dk07.1-c1 Board:
>   1) NOR boot and NAND boot
>   2) Tested USB and PCIe interfaces
>   3) WDOG test
>   4) cpu frequency scaling
>   5) ethernet, 2G and 5G WiFi
>   6) ubi sysupgrade
> 
> The ap-dk07.1-c1 board is already available in upstream
> linux v4.17
> 
> Signed-off-by: Ram Chandra Jangir 

I'm sorry, but the issues in 
'qcom-ipq4019-ap.dk07.1-c1.dts' and 'qcom-ipq4019-ap.dk07.1.dtsi'
have not been addressed in this patch. You have my notes in the
v2 reply.

Thanks,
Christian

> ---
> Changes since v2:
>  * Dropped rootfs conflict patch 904-Fix-rootfs-*-mount.patch,
>as it can automount "rootfs" partition by setting bootargs
>as 'ubi.mtd=rootfs'
>  * nand sysupgrade support
>  * Validated with both ath10k and ath10k-ct WiFi
> 
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |  6 +-
>  .../ipq40xx/base-files/lib/upgrade/platform.sh |  3 +-
>  target/linux/ipq40xx/image/Makefile| 12 +++
>  ...ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch | 99 
> ++
>  ...4019-Add-qcom-ipq4019-ap.dk07.1-c1-board-.patch | 99 
> ++
>  ...5-dts-qcom-ipq4019-ap.dk07.1-enable-nodes.patch | 99 
> ++
>  6 files changed, 315 insertions(+), 3 deletions(-)
>  create mode 100644 
> target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
>  create mode 100644 
> target/linux/ipq40xx/patches-4.14/903-ARM-dts-ipq4019-Add-qcom-ipq4019-ap.dk07.1-c1-board-.patch
>  create mode 100644 
> target/linux/ipq40xx/patches-4.14/905-dts-qcom-ipq4019-ap.dk07.1-enable-nodes.patch
> 
> diff --git 
> a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 1d4fd9c..cfbe801 100644
> --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -143,7 +143,8 @@ case "$FIRMWARE" in
>   ;;
>   compex,wpj428 |\
>   openmesh,a42 |\
> - openmesh,a62)
> + openmesh,a62 |\
> + qcom,ipq4019-ap-dk07.1-c1)
>   ath10kcal_extract "0:ART" 4096 12064
>   ;;
>   zyxel,nbg6617 |\
> @@ -179,7 +180,8 @@ case "$FIRMWARE" in
>   ;;
>   compex,wpj428 |\
>   openmesh,a42 |\
> - openmesh,a62)
> + openmesh,a62 |\
> + qcom,ipq4019-ap-dk07.1-c1)
>   ath10kcal_extract "0:ART" 20480 12064
>   ;;
>   zyxel,nbg6617 |\
> diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
> index 610f9bb..b6c6f92 100644
> --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
> @@ -46,7 +46,8 @@ zyxel_do_upgrade() {
>  
>  platform_do_upgrade() {
>   case "$(board_name)" in
> - 8dev,jalapeno)
> + 8dev,jalapeno |\
> + qcom,ipq4019-ap-dk07.1-c1)
>   nand_do_upgrade "$ARGV"
>   ;;
>   asus,rt-ac58u)
> diff --git a/target/linux/ipq40xx/image/Makefile 
> b/target/linux/ipq40xx/image/Makefile
> index 5cd11ca..6d58c41 100644
> --- a/target/linux/ipq40xx/image/Makefile
> +++ b/target/linux/ipq40xx/image/Makefile
> @@ -207,6 +207,18 @@ define Device/qcom_ap-dk04.1-c1
>  endef
>  TARGET_DEVICES += qcom_ap-dk04.1-c1
>  
> +define Device/qcom_ipq4019-ap-dk07.1-c1
> + $(call Device/FitImage)
> + $(call Device/UbiFit)
> + DEVICE_DTS := qcom-ipq4019-ap.dk07.1-c1
> + KERNEL_INSTALL := 1
> + KERNEL_SIZE := 4096k
> + BLOCKSIZE := 128k
> + PAGESIZE := 2048
> + DEVICE_TITLE := QCA AP-DK07.1-C1
> +endef
> +TARGET_DEVICES += qcom_ipq4019-ap-dk07.1-c1
> +
>  define Device/zyxel_nbg6617
>   $(call Device/FitImageLzma)
>   DEVICE_DTS := qcom-ipq4018-nbg6617
> diff --git 
> a/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
>  
> b/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
> new file mode 100644
> index 000..bcc109f
> --- /dev/null
> +++ 
> b/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
> @@ -0,0 +1,99 @@
> +From f97b2aaaf0734a3a6dd6e6ee0aaa0a69cab5 Mon Sep 17 00:00:00 2001
> +From: Sricharan R 
> +Date: Fri, 25 May 2018 11:41:17 +0530
> +Subject: [PATCH] ARM: dts: ipq4019: Add ipq4019-ap.dk07.1 common data
> +
> +Add the common data for all dk07 based boards.
> +
> +Reviewed-by: Abhishek Sahu 
> 

[OpenWrt-Devel] [PATCH v3] ipq40xx: Add support for IPQ4019 ap-dk07.1-c1

2018-09-14 Thread Ram Chandra Jangir
 * SoC: QCA IPQ4019
 * RAM: 512 MiB
 * Flash: 32 MiB of SPI NOR and 128 MiB NAND
 * Wireless: 2.4-GHz 802.11ng, and two 5-GHz 802.11ac
 * IoT :
CSR8811 radio [ supports BT classic and BLE ]
SiLabs EFR32MG radio [ supports 802.15.4 ZigBee ]

   Tested on IPQ ap-dk07.1-c1 Board:
1) NOR boot and NAND boot
2) Tested USB and PCIe interfaces
3) WDOG test
4) cpu frequency scaling
5) ethernet, 2G and 5G WiFi
6) ubi sysupgrade

The ap-dk07.1-c1 board is already available in upstream
linux v4.17

Signed-off-by: Ram Chandra Jangir 
---
Changes since v2:
 * Dropped rootfs conflict patch 904-Fix-rootfs-*-mount.patch,
   as it can automount "rootfs" partition by setting bootargs
   as 'ubi.mtd=rootfs'
 * nand sysupgrade support
 * Validated with both ath10k and ath10k-ct WiFi

 .../etc/hotplug.d/firmware/11-ath10k-caldata   |  6 +-
 .../ipq40xx/base-files/lib/upgrade/platform.sh |  3 +-
 target/linux/ipq40xx/image/Makefile| 12 +++
 ...ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch | 99 ++
 ...4019-Add-qcom-ipq4019-ap.dk07.1-c1-board-.patch | 99 ++
 ...5-dts-qcom-ipq4019-ap.dk07.1-enable-nodes.patch | 99 ++
 6 files changed, 315 insertions(+), 3 deletions(-)
 create mode 100644 
target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
 create mode 100644 
target/linux/ipq40xx/patches-4.14/903-ARM-dts-ipq4019-Add-qcom-ipq4019-ap.dk07.1-c1-board-.patch
 create mode 100644 
target/linux/ipq40xx/patches-4.14/905-dts-qcom-ipq4019-ap.dk07.1-enable-nodes.patch

diff --git 
a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 1d4fd9c..cfbe801 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -143,7 +143,8 @@ case "$FIRMWARE" in
;;
compex,wpj428 |\
openmesh,a42 |\
-   openmesh,a62)
+   openmesh,a62 |\
+   qcom,ipq4019-ap-dk07.1-c1)
ath10kcal_extract "0:ART" 4096 12064
;;
zyxel,nbg6617 |\
@@ -179,7 +180,8 @@ case "$FIRMWARE" in
;;
compex,wpj428 |\
openmesh,a42 |\
-   openmesh,a62)
+   openmesh,a62 |\
+   qcom,ipq4019-ap-dk07.1-c1)
ath10kcal_extract "0:ART" 20480 12064
;;
zyxel,nbg6617 |\
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 610f9bb..b6c6f92 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -46,7 +46,8 @@ zyxel_do_upgrade() {
 
 platform_do_upgrade() {
case "$(board_name)" in
-   8dev,jalapeno)
+   8dev,jalapeno |\
+   qcom,ipq4019-ap-dk07.1-c1)
nand_do_upgrade "$ARGV"
;;
asus,rt-ac58u)
diff --git a/target/linux/ipq40xx/image/Makefile 
b/target/linux/ipq40xx/image/Makefile
index 5cd11ca..6d58c41 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -207,6 +207,18 @@ define Device/qcom_ap-dk04.1-c1
 endef
 TARGET_DEVICES += qcom_ap-dk04.1-c1
 
+define Device/qcom_ipq4019-ap-dk07.1-c1
+   $(call Device/FitImage)
+   $(call Device/UbiFit)
+   DEVICE_DTS := qcom-ipq4019-ap.dk07.1-c1
+   KERNEL_INSTALL := 1
+   KERNEL_SIZE := 4096k
+   BLOCKSIZE := 128k
+   PAGESIZE := 2048
+   DEVICE_TITLE := QCA AP-DK07.1-C1
+endef
+TARGET_DEVICES += qcom_ipq4019-ap-dk07.1-c1
+
 define Device/zyxel_nbg6617
$(call Device/FitImageLzma)
DEVICE_DTS := qcom-ipq4018-nbg6617
diff --git 
a/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
 
b/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
new file mode 100644
index 000..bcc109f
--- /dev/null
+++ 
b/target/linux/ipq40xx/patches-4.14/902-ARM-dts-ipq4019-Add-ipq4019-ap.dk07.1-common-data.patch
@@ -0,0 +1,99 @@
+From f97b2aaaf0734a3a6dd6e6ee0aaa0a69cab5 Mon Sep 17 00:00:00 2001
+From: Sricharan R 
+Date: Fri, 25 May 2018 11:41:17 +0530
+Subject: [PATCH] ARM: dts: ipq4019: Add ipq4019-ap.dk07.1 common data
+
+Add the common data for all dk07 based boards.
+
+Reviewed-by: Abhishek Sahu 
+Signed-off-by: Sricharan R 
+Signed-off-by: Andy Gross 
+---
+ arch/arm/boot/dts/qcom-ipq4019-ap.dk07.1.dtsi | 75 +++
+ 1 file changed, 75 insertions(+)
+ create mode 100644 arch/arm/boot/dts/qcom-ipq4019-ap.dk07.1.dtsi
+
+diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk07.1.dtsi 
b/arch/arm/boot/dts/qcom-ipq4019-ap.dk07.1.dtsi
+new file mode 100644
+index 000..9f1a5a66
+--- /dev/null