ipq807x: update kernel and ath11k

Pull kernel and ath11k up to the latest release.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2020-08-17 06:28:48 +02:00
parent ba24933f32
commit 381acf5e4e
18 changed files with 1847 additions and 1806 deletions

View File

@@ -0,0 +1,65 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-drv
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-drv
PKG_SOURCE_VERSION:=8076caf87232861fb660ae8df715671b4afd3df6
PKG_SOURCE_DATE:=2020-07-10
NSS_CLIENTS_DIR:=$(TOPDIR)/qca/src/qca-nss-clients
include $(INCLUDE_DIR)/package.mk
define KernelPackage/qca-nss-drv
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-dp
TITLE:=Kernel driver for NSS (core driver)
FILES:=$(PKG_BUILD_DIR)/qca-nss-drv.ko
AUTOLOAD:=$(call AutoLoad,32,qca-nss-drv)
endef
define KernelPackage/qca-nss-drv/install
$(INSTALL_DIR) $(1)/lib/debug
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/sysctl.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/firmware
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/qca-nss-drv.debug $(1)/lib/debug/qca-nss-drv
$(INSTALL_BIN) ./files/qca-nss-drv.init $(1)/etc/init.d/qca-nss-drv
$(INSTALL_BIN) ./files/qca-nss-drv.sysctl $(1)/etc/sysctl.d/qca-nss-drv.conf
$(INSTALL_BIN) ./files/qca-nss-drv.hotplug $(1)/etc/hotplug.d/firmware/10-qca-nss-fw
$(INSTALL_BIN) ./files/qca-nss-drv.conf $(1)/etc/config/nss
endef
define KernelPackage/qca-nss-drv/Description
This package contains a NSS driver for QCA chipset
endef
define Build/InstallDev
mkdir -p $(1)/usr/include/qca-nss-drv
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-drv/
endef
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac -I$(STAGING_DIR)/usr/include/qca-nss-dp
subtarget:=$(SUBTARGET)_64
EXTRA_CFLAGS+= -DNSS_SKB_FIXED_SIZE_2K
define Build/Configure
$(LN) arch/nss_$(subtarget).h $(PKG_BUILD_DIR)/exports/nss_arch.h
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \
modules
endef
$(eval $(call KernelPackage,qca-nss-drv))

View File

@@ -0,0 +1,6 @@
config nss_firmware 'qca_nss_0'
config nss_firmware 'qca_nss_1'
config general
option enable_rps '1'

View File

@@ -0,0 +1,26 @@
#!/bin/sh /sbin/sysdebug
#
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
log cat /sys/kernel/debug/qca-nss-drv/stats/pppoe
log cat /sys/kernel/debug/qca-nss-drv/stats/n2h
log cat /sys/kernel/debug/qca-nss-drv/stats/ipv6
log cat /sys/kernel/debug/qca-nss-drv/stats/ipv4
log cat /sys/kernel/debug/qca-nss-drv/stats/gmac
log cat /sys/kernel/debug/qca-nss-drv/stats/drv
log cat /sys/kernel/debug/qca-nss-drv/stats/wifi
log cat /sys/kernel/debug/qca-nss-drv/stats/wifi_if
log cat /sys/kernel/debug/qca-nss-drv/stats/eth_rx

View File

@@ -0,0 +1,70 @@
#!/bin/sh
#
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
KERNEL=`uname -r`
case "${KERNEL}" in
3.4*)
select_or_load=load_nss_fw
;;
*)
select_or_load=select_nss_fw
;;
esac
load_nss_fw () {
ls -l $1 | awk ' { print $9,$5 } '> /dev/console
echo 1 > /sys/class/firmware/$DEVICENAME/loading
cat $1 > /sys/class/firmware/$DEVICENAME/data
echo 0 > /sys/class/firmware/$DEVICENAME/loading
}
select_nss_fw () {
rm -f /lib/firmware/$DEVICENAME
ln -s $1 /lib/firmware/$DEVICENAME
ls -l /lib/firmware/$DEVICENAME | awk ' { print $9,$5 } '> /dev/console
}
[ "$ACTION" != "add" ] && exit
# dev name for UCI, since it doesn't let you use . or -
SDEVNAME=$(echo ${DEVICENAME} | sed s/[.-]/_/g)
SELECTED_FW=$(uci get nss.${SDEVNAME}.firmware 2>/dev/null)
[ -e "${SELECTED_FW}" ] && {
$select_or_load ${SELECTED_FW}
exit
}
case $DEVICENAME in
qca-nss0* | qca-nss.0*)
if [ -e /lib/firmware/qca-nss0-enterprise.bin ] ; then
$select_or_load /lib/firmware/qca-nss0-enterprise.bin
else
$select_or_load /lib/firmware/qca-nss0-retail.bin
fi
exit
;;
qca-nss1* | qca-nss.1*)
if [ -e /lib/firmware/qca-nss1-enterprise.bin ] ; then
$select_or_load /lib/firmware/qca-nss1-enterprise.bin
else
$select_or_load /lib/firmware/qca-nss1-retail.bin
fi
exit
;;
esac

View File

@@ -0,0 +1,50 @@
#!/bin/sh /etc/rc.common
#
# Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
START=70
enable_rps() {
irq_nss_rps=`grep nss_queue1 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
for entry in $irq_nss_rps
do
echo 2 > /proc/irq/$entry/smp_affinity
done
irq_nss_rps=`grep nss_queue2 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
for entry in $irq_nss_rps
do
echo 4 > /proc/irq/$entry/smp_affinity
done
irq_nss_rps=`grep nss_queue3 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
for entry in $irq_nss_rps
do
echo 8 > /proc/irq/$entry/smp_affinity
done
# Enable NSS RPS
sysctl -w dev.nss.rps.enable=1 >/dev/null 2>/dev/null
}
start() {
local rps_enabled="$(uci_get nss @general[0] enable_rps)"
if [ "$rps_enabled" -eq 1 ]; then
enable_rps
fi
}

View File

@@ -0,0 +1,4 @@
# Default Number of connection configuration
dev.nss.ipv4cfg.ipv4_conn=4096
dev.nss.ipv6cfg.ipv6_conn=4096

View File

@@ -0,0 +1,46 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-fw-hk
PKG_BRANCH:=nss
PKG_VERSION:=5
PKG_RELEASE:=1
PKG_MD5SUM:=skip
NSS_VER:=K.CS
NSS_SOC:=HK
NSS_PROFILE:=E
PKG_SOURCE:=BIN-NSS.$(NSS_SOC).$(NSS_VER)-$(PKG_VERSION)-$(NSS_PROFILE).tar.bz2
PKG_SOURCE_URL:=http://qcaswexport-scl.qualcomm.com/NSS.FW/$(NSS_VER)/$(NSS_SOC)/$(PKG_VERSION)/
PKG_BUILD_DIR:=$(BUILD_DIR)/BIN-NSS.$(NSS_SOC).$(NSS_VER)-$(PKG_VERSION)-$(NSS_PROFILE)
include $(INCLUDE_DIR)/package.mk
define NssFirmware
define Package/$(PKG_NAME)-$(1)
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
DEPENDS:=@TARGET_ipq807x_ipq807x
TITLE:=NSS firmware binaries - $(1)
PROVIDES:=$(PKG_NAME)
MENU:=1
endef
define Package/$(PKG_NAME)-$(1)/description
This package contains the NSS firmwares ($(1)) for QCA chipset
endef
define Package/$(PKG_NAME)-$(1)/install
$(INSTALL_DIR) $$(1)/lib/firmware/qca
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(2)0.bin $$(1)/lib/firmware/qca-nss0-$(1).bin
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(2)1.bin $$(1)/lib/firmware/qca-nss1-$(1).bin
endef
$$(eval $$(call BuildPackage,$(PKG_NAME)-$(1)))
endef
Build/Compile=true
$(eval $(call NssFirmware,enterprise,enterprise_ap))

View File

@@ -11,8 +11,8 @@ QCA_THERMALD_MAKE_OPTS:= \
include $(INCLUDE_DIR)/package.mk
define Package/qca-thermald-10.4
SECTION:=QCA
CATEGORY:=QCA Proprietary software
SECTION:=utils
CATEGORY:=Utilities
URL:=http://www.qca.qualcomm.com
MAINTAINER:=Qualcomm Atheros
DEPENDS:=+libpthread @TARGET_ipq807x

View File

@@ -1,7 +1,7 @@
From 870a82a1790c32de3cc420c3c859631d253767df Mon Sep 17 00:00:00 2001
From 03dadc1c68d71695c205abeb5b08eeeb469e0cea Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 20 Jun 2020 16:28:50 +0200
Subject: [PATCH 1/4] ipq807x: buildsystem patches required by the target
Subject: [PATCH 1/5] ipq807x: buildsystem patches required by the target
The target uses the v4.4 kernel and requires these patches to build
properly.

View File

@@ -1,7 +1,7 @@
From ca136f0cf1f2a779f8f4234e08aab11dd10c50ab Mon Sep 17 00:00:00 2001
From 5f41657d01a87330e2cec313bec0373255c7357c Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 22 Jun 2020 14:32:45 +0200
Subject: [PATCH 2/4] base-files: make sysupgrade work on qcom AX
Subject: [PATCH 2/5] base-files: make sysupgrade work on qcom AX
The qsdk v4.4 ubi layer does not detach the rootfs properly during
sysupgrade. Pull in the ubu force detach patch from owrt-15.05.

View File

@@ -1,73 +0,0 @@
From 263e54289d9994850b348cffeec9d0b6b5715389 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 20 Jun 2020 17:13:28 +0200
Subject: [PATCH 1/4] profiles: add the ipq807x profiles
These will be merged into the primary profiles patch when AX support gets
merged.
Signed-off-by: John Crispin <john@phrozen.org>
---
profiles/cypress.yml | 12 ++++++++++++
profiles/hawkeye.yml | 12 ++++++++++++
profiles/wf188.yml | 10 ++++++++++
3 files changed, 34 insertions(+)
create mode 100644 profiles/cypress.yml
create mode 100644 profiles/hawkeye.yml
create mode 100644 profiles/wf188.yml
diff --git a/profiles/cypress.yml b/profiles/cypress.yml
new file mode 100644
index 0000000000..4f17991607
--- /dev/null
+++ b/profiles/cypress.yml
@@ -0,0 +1,12 @@
+---
+profile: qcom_cp01_c1
+target: ipq807x
+subtarget: ipq60xx
+description: Build image for the QualComm Cypress
+_packages:
+ - opensync-tip
+feeds:
+ - name: ipq807x
+ path: ../../feeds/ipq807x
+
+
diff --git a/profiles/hawkeye.yml b/profiles/hawkeye.yml
new file mode 100644
index 0000000000..926829aaa8
--- /dev/null
+++ b/profiles/hawkeye.yml
@@ -0,0 +1,12 @@
+---
+profile: qcom_hk01
+target: ipq807x
+subtarget: ipq807x
+description: Build image for the QualCom Hawkeye
+_packages:
+ - opensync-tip
+feeds:
+ - name: ipq807x
+ path: ../../feeds/ipq807x
+
+
diff --git a/profiles/wf188.yml b/profiles/wf188.yml
new file mode 100644
index 0000000000..4eb433efd0
--- /dev/null
+++ b/profiles/wf188.yml
@@ -0,0 +1,10 @@
+---
+profile: cig_wf188
+target: ipq807x
+subtarget: ipq60xx
+description: Build image for the Cigtech WF188
+feeds:
+ - name: ipq807x
+ path: ../../feeds/ipq807x
+
+
--
2.25.1

View File

@@ -1,7 +1,7 @@
From 7287eca80fabadf43e6dabaf87460213dc7affe9 Mon Sep 17 00:00:00 2001
From e465150dd238758e3934f4ba161a9c8ef22351d7 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 9 Aug 2020 20:58:52 +0200
Subject: [PATCH] scripts/ubinize-image.sh: allow setting the rootfs name
Subject: [PATCH 4/5] scripts/ubinize-image.sh: allow setting the rootfs name
This patch allows us to use a different rootfs name. Some QCA boards will
require the in ubi rfs to be called ubi_rootfs.

View File

@@ -1,7 +1,7 @@
From 640a39806cecf1fb1b57eb57b1e22370911e1504 Mon Sep 17 00:00:00 2001
From d2ed8c11dbb8921638de0c8d707513cf07533ae3 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 28 Jul 2020 09:21:04 +0200
Subject: [PATCH 6/7] busybox: enable the watchdog tool
Subject: [PATCH 5/5] busybox: enable the watchdog tool
procd can currently only handle the main wdt. Enable the busybox
applet until procd can handle multiple devices.

View File

@@ -1,583 +0,0 @@
From f25969f65baa70fd0f9012723673e78b44704d20 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 27 Jul 2020 16:14:50 +0200
Subject: [PATCH 5/7] ipq60xx: add Cigtech WF188
Signed-off-by: John Crispin <john@phrozen.org>
---
.../ipq807x/base-files/etc/board.d/02_network | 6 +
.../etc/hotplug.d/firmware/10-ath11k-caldata | 1 +
.../linux/ipq807x/base-files/etc/init.d/wdt | 13 +
.../base-files/lib/upgrade/platform.sh | 22 +
target/linux/ipq807x/image/Makefile | 4 +
target/linux/ipq807x/image/ipq60xx.mk | 12 +
target/linux/ipq807x/ipq60xx/config-default | 2 +
.../linux/ipq807x/patches/102-cig-wf188.patch | 431 ++++++++++++++++++
8 files changed, 491 insertions(+)
create mode 100755 target/linux/ipq807x/base-files/etc/init.d/wdt
create mode 100644 target/linux/ipq807x/patches/102-cig-wf188.patch
diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network
index 1749ae75aa..6e299cb746 100755
--- a/target/linux/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq807x/base-files/etc/board.d/02_network
@@ -9,6 +9,12 @@ qcom_setup_interfaces()
local board="$1"
case $board in
+ cig,wf188)
+ ucidef_add_switch "switch0"
+ ucidef_add_switch_attr "switch0" "enable" "false"
+ ucidef_add_switch_attr "switch0" "reset" "false"
+ ucidef_set_interface_lan "eth0"
+ ;;
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01)
ucidef_add_switch "switch0"
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
index ca34f54eb8..1fd9a4fa65 100755
--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
@@ -35,6 +35,7 @@ case "$FIRMWARE" in
;;
"IPQ6018/caldata.bin")
case "$board" in
+ cig,wf188|\
qcom,ipq6018-cp01)
caldata_extract "0:ART" 0x1000 0x20000
;;
diff --git a/target/linux/ipq807x/base-files/etc/init.d/wdt b/target/linux/ipq807x/base-files/etc/init.d/wdt
new file mode 100755
index 0000000000..dc8a71b759
--- /dev/null
+++ b/target/linux/ipq807x/base-files/etc/init.d/wdt
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=10
+
+boot() {
+ . /lib/functions.sh
+
+ case "$(board_name)" in
+ cig,wf188)
+ watchdog -t 5 /dev/watchdog1
+ ;;
+ esac
+}
diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
index 40abca6903..823624c5d0 100755
--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
@@ -1,7 +1,26 @@
+. /lib/functions/system.sh
+
+qca_do_upgrade() {
+ local tar_file="$1"
+
+ local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
+ board_dir=${board_dir%/}
+ local dev=$(find_mtd_chardev "0:HLOS")
+
+ tar Oxf $tar_file ${board_dir}/kernel | mtd write - ${dev}
+
+ if [ -n "$UPGRADE_BACKUP" ]; then
+ tar Oxf $tar_file ${board_dir}/root | mtd -j "$UPGRADE_BACKUP" write - rootfs
+ else
+ tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs
+ fi
+}
+
platform_check_image() {
local magic_long="$(get_magic_long "$1")"
board=$(board_name)
case $board in
+ cig,wf188|\
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01)
[ "$magic_long" = "73797375" ] && return 0
@@ -17,6 +36,9 @@ platform_do_upgrade() {
board=$(board_name)
case $board in
+ cig,wf188)
+ qca_do_upgrade $1
+ ;;
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01)
nand_upgrade_tar "$1"
diff --git a/target/linux/ipq807x/image/ipq60xx.mk b/target/linux/ipq807x/image/ipq60xx.mk
index 867f1552f3..c165663ad1 100644
--- a/target/linux/ipq807x/image/ipq60xx.mk
+++ b/target/linux/ipq807x/image/ipq60xx.mk
@@ -1,5 +1,17 @@
KERNEL_LOADADDR := 0x41080000
+define Device/cig_wf188
+ DEVICE_TITLE := Cigtech WF-188
+ DEVICE_DTS := qcom-ipq6018-cig-wf188
+ DEVICE_DTS_DIR := $(DTS_DIR)/qcom
+ DEVICE_DTS_CONFIG := config@cp03-c1
+ SUPPORTED_DEVICES := cig,wf188
+ IMAGES := sysupgrade.tar
+ IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
+ DEVICE_PACKAGES := ath11k-wifi-cig-wf188 uboot-env
+endef
+TARGET_DEVICES += cig_wf188
+
define Device/qcom_cp01_c1
DEVICE_TITLE := Qualcomm Cypress C1
DEVICE_DTS := qcom-ipq6018-cp01-c1
diff --git a/target/linux/ipq807x/ipq60xx/config-default b/target/linux/ipq807x/ipq60xx/config-default
index c75b628657..ffc6e91ec0 100644
--- a/target/linux/ipq807x/ipq60xx/config-default
+++ b/target/linux/ipq807x/ipq60xx/config-default
@@ -132,6 +132,8 @@ CONFIG_GENERIC_CSUM=y
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_GENERIC_IRQ_MIGRATION=y
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GPIO_WATCHDOG=y
+# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set
# CONFIG_GPIO_XGENE is not set
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_ARCH_KASAN=y
diff --git a/target/linux/ipq807x/patches/102-cig-wf188.patch b/target/linux/ipq807x/patches/102-cig-wf188.patch
new file mode 100644
index 0000000000..a1c123d008
--- /dev/null
+++ b/target/linux/ipq807x/patches/102-cig-wf188.patch
@@ -0,0 +1,431 @@
+Index: linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/Makefile
+===================================================================
+--- linux-4.4.60-qsdk.orig/arch/arm64/boot/dts/qcom/Makefile
++++ linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/Makefile
+@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+ qcom-ipq6018-cp01-c4.dtb \
+ qcom-ipq6018-cp02-c1.dtb \
+ qcom-ipq6018-cp03-c1.dtb \
++ qcom-ipq6018-cig-wf188.dts \
+ qcom-ipq807x-hk01.dtb \
+ qcom-ipq807x-hk01.c2.dtb \
+ qcom-ipq807x-hk01.c3.dtb \
+Index: linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/qcom-ipq6018-cig-wf188.dts
+===================================================================
+--- /dev/null
++++ linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/qcom-ipq6018-cig-wf188.dts
+@@ -0,0 +1,414 @@
++/dts-v1/;
++/*
++ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "qcom-ipq6018.dtsi"
++#include "qcom-ipq6018-rpm-regulator.dtsi"
++#include "qcom-ipq6018-cpr-regulator.dtsi"
++#include "qcom-ipq6018-cp-cpu.dtsi"
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++ #address-cells = <0x2>;
++ #size-cells = <0x2>;
++ model = "Cigtech WF-188";
++ compatible = "cig,wf188", "qcom,ipq6018-cp03", "qcom,ipq6018";
++ interrupt-parent = <&intc>;
++ qcom,msm-id = <0x1A5 0x0>;
++
++ aliases {
++ serial0 = &blsp1_uart3;
++ serial1 = &blsp1_uart2;
++
++ /*
++ * Aliases as required by u-boot
++ * to patch MAC addresses
++ */
++ ethernet0 = "/soc/dp1";
++ ethernet1 = "/soc/dp2";
++
++ led-boot = &led_power;
++ led-failsafe = &led_power;
++ led-running = &led_power;
++ led-upgrade = &led_power;
++ };
++
++ chosen {
++ bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
++#ifdef __IPQ_MEM_PROFILE_256_MB__
++ bootargs-append = " swiotlb=1";
++#else
++ bootargs-append = " swiotlb=1 coherent_pool=2M";
++#endif
++ };
++
++ /*
++ * +=========+==============+========================+
++ * | | | |
++ * | Region | Start Offset | Size |
++ * | | | |
++ * +--------+--------------+-------------------------+
++ * | | | |
++ * | | | |
++ * | | | |
++ * | | | |
++ * | Linux | 0x41000000 | 139MB |
++ * | | | |
++ * | | | |
++ * | | | |
++ * +--------+--------------+-------------------------+
++ * | TZ App | 0x49B00000 | 6MB |
++ * +--------+--------------+-------------------------+
++ *
++ * From the available 145 MB for Linux in the first 256 MB,
++ * we are reserving 6 MB for TZAPP.
++ *
++ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
++ * for memory layout.
++ */
++
++/* TZAPP is enabled only in default memory profile */
++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
++ reserved-memory {
++ tzapp:tzapp@49B00000 { /* TZAPPS */
++ no-map;
++ reg = <0x0 0x49B00000 0x0 0x00600000>;
++ };
++ };
++#endif
++};
++
++&tlmm {
++ uart_pins: uart_pins {
++ mux {
++ pins = "gpio44", "gpio45";
++ function = "blsp2_uart";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++
++ spi_0_pins: spi_0_pins {
++ mux {
++ pins = "gpio38", "gpio39", "gpio40", "gpio41";
++ function = "blsp0_spi";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++
++ qpic_pins: qpic_pins {
++ data_0 {
++ pins = "gpio15";
++ function = "qpic_pad0";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_1 {
++ pins = "gpio12";
++ function = "qpic_pad1";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_2 {
++ pins = "gpio13";
++ function = "qpic_pad2";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_3 {
++ pins = "gpio14";
++ function = "qpic_pad3";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_4 {
++ pins = "gpio5";
++ function = "qpic_pad4";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_5 {
++ pins = "gpio6";
++ function = "qpic_pad5";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_6 {
++ pins = "gpio7";
++ function = "qpic_pad6";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ data_7 {
++ pins = "gpio8";
++ function = "qpic_pad7";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ qpic_pad {
++ pins = "gpio1", "gpio3", "gpio4",
++ "gpio10", "gpio11", "gpio17";
++ function = "qpic_pad";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++
++ button_pins: button_pins {
++ wps_button {
++ pins = "gpio22";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ };
++
++ mdio_pins: mdio_pinmux {
++ mux_0 {
++ pins = "gpio64";
++ function = "mdc";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ mux_1 {
++ pins = "gpio65";
++ function = "mdio";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ mux_2 {
++ pins = "gpio75";
++ function = "gpio";
++ bias-pull-up;
++ };
++ };
++
++ leds_pins: leds_pins {
++ led_5g {
++ pins = "gpio25";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ led_2g {
++ pins = "gpio24";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ led_eth {
++ pins = "gpio18";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ led_pwr {
++ pins = "gpio16";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++ uart2_pins: uart2_pins {
++ mux {
++ pins = "gpio57", "gpio58";
++ function = "blsp4_uart";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++};
++
++&soc {
++ mdio@90000 {
++ pinctrl-0 = <&mdio_pins>;
++ pinctrl-names = "default";
++ phy-reset-gpio = <&tlmm 75 0>;
++ status = "ok";
++ phy0: ethernet-phy@0 {
++ reg = <3>;
++ };
++ phy1: ethernet-phy@1 {
++ reg = <4>;
++ };
++ };
++
++
++ ess-switch@3a000000 {
++ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
++ switch_lan_bmp = <0x08>; /* lan port bitmap */
++ switch_wan_bmp = <0x10>; /* wan port bitmap */
++ switch_inner_bmp = <0xc0>; /*inner port bitmap*/
++ switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
++ switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
++ switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
++ qcom,port_phyinfo {
++ port@3 {
++ port_id = <3>;
++ phy_address = <4>;
++ };
++ port@4 {
++ port_id = <4>;
++ phy_address = <3>;
++ };
++ };
++ };
++
++ dp1 {
++ device_type = "network";
++ compatible = "qcom,nss-dp";
++ qcom,id = <3>;
++ reg = <0x3a001400 0x200>;
++ qcom,mactype = <0>;
++ local-mac-address = [000000000000];
++ qcom,link-poll = <1>;
++ qcom,phy-mdio-addr = <4>;
++ phy-mode = "sgmii";
++ };
++
++ dp2 {
++ device_type = "network";
++ compatible = "qcom,nss-dp";
++ qcom,id = <4>;
++ reg = <0x3a001600 0x200>;
++ qcom,mactype = <0>;
++ local-mac-address = [000000000000];
++ qcom,link-poll = <1>;
++ qcom,phy-mdio-addr = <3>;
++ phy-mode = "sgmii";
++
++ };
++
++ gpio_keys {
++ compatible = "gpio-keys";
++ pinctrl-0 = <&button_pins>;
++ pinctrl-names = "default";
++
++ wps {
++ label = "wps";
++ linux,code = <KEY_WPS_BUTTON>;
++ gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
++ linux,input-type = <1>;
++ debounce-interval = <60>;
++ };
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-0 = <&leds_pins>;
++ pinctrl-names = "default";
++
++ led@25 {
++ label = "led_5g";
++ gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "wf188:green:5g";
++ default-state = "off";
++ };
++ led@24 {
++ label = "led_2g";
++ gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "wf188:green:2g";
++ default-state = "off";
++ };
++ led@18 {
++ label = "led_eth";
++ gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "wf188:green:eth";
++ default-state = "off";
++ };
++ led_power: led@16 {
++ label = "led_pwr";
++ gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "wf188:green:power";
++ default-state = "off";
++ };
++ };
++
++ gpio-watchdog {
++ compatible = "linux,wdt-gpio";
++ gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
++ hw_algo = "toggle";
++ hw_margin_ms = <5000>;
++ };
++};
++
++&blsp1_uart3 {
++ pinctrl-0 = <&uart_pins>;
++ pinctrl-names = "default";
++ status = "ok";
++};
++
++&spi_0 {
++ pinctrl-0 = <&spi_0_pins>;
++ pinctrl-names = "default";
++ cs-select = <0>;
++ status = "ok";
++
++ m25p80@0 {
++ #address-cells = <1>;
++ #size-cells = <1>;
++ reg = <0>;
++ compatible = "n25q128a11";
++ linux,modalias = "m25p80", "n25q128a11";
++ spi-max-frequency = <50000000>;
++ use-default-sizes;
++ };
++};
++
++&blsp1_uart2 {
++ pinctrl-0 = <&uart2_pins>;
++ pinctrl-names = "default";
++ dmas = <&blsp_dma 2>,
++ <&blsp_dma 3>;
++ dma-names = "tx", "rx";
++ status = "ok";
++};
++&qpic_bam {
++ status = "ok";
++};
++
++&nand {
++ pinctrl-0 = <&qpic_pins>;
++ pinctrl-names = "default";
++ status = "disabled";
++};
++
++&ssphy_0 {
++ status = "ok";
++};
++
++&qusb_phy_0 {
++ status = "ok";
++};
++
++&usb3 {
++ status = "ok";
++};
++
++&nss_crypto {
++ status = "ok";
++};
++
++/* TZAPP is enabled in default memory profile only */
++#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
++&qseecom {
++ mem-start = <0x49B00000>;
++ mem-size = <0x600000>;
++ status = "ok";
++};
++#endif
--
2.25.1

View File

@@ -1,57 +0,0 @@
From 3e58efc4643555c1fe6df69174e972c9e071e382 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 28 Jul 2020 10:50:21 +0200
Subject: [PATCH 7/7] uboot-envtools: add ipq807x support
Signed-off-by: John Crispin <john@phrozen.org>
---
package/boot/uboot-envtools/files/ipq807x | 37 +++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 package/boot/uboot-envtools/files/ipq807x
diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
new file mode 100644
index 0000000000..6c429f1852
--- /dev/null
+++ b/package/boot/uboot-envtools/files/ipq807x
@@ -0,0 +1,37 @@
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+ubootenv_mtdinfo () {
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
+
+ if [ -n "$nor_flash" ]; then
+ ubootenv_size=$mtd_size
+ else
+ # size is fixed to 0x40000 in u-boot
+ ubootenv_size=0x40000
+ fi
+
+ sectors=$(( $ubootenv_size / $mtd_erase ))
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
+}
+
+case "$board" in
+*)
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
--
2.25.1

View File

@@ -1,932 +0,0 @@
From 1ec1e22c54814bf1a7922f4bb56aab8fb28bd116 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 28 Jul 2020 14:58:30 +0200
Subject: [PATCH 8/9] ipq807x: add Sercomm Wallaby support
Signed-off-by: John Crispin <john@phrozen.org>
---
profiles/wallaby.yml | 12 +
.../ipq807x/base-files/etc/board.d/02_network | 15 +-
.../etc/hotplug.d/firmware/10-ath11k-caldata | 3 +-
.../base-files/lib/upgrade/platform.sh | 6 +-
.../ipq807x/patches/103-sercomm-wallaby.patch | 816 ++++++++++++++++++
5 files changed, 842 insertions(+), 10 deletions(-)
create mode 100644 profiles/wallaby.yml
create mode 100644 target/linux/ipq807x/patches/103-sercomm-wallaby.patch
diff --git a/profiles/wallaby.yml b/profiles/wallaby.yml
new file mode 100644
index 0000000000..3e963b91bf
--- /dev/null
+++ b/profiles/wallaby.yml
@@ -0,0 +1,12 @@
+---
+profile: sercomm_wallaby
+target: ipq807x
+subtarget: ipq807x
+description: Build image for the Sercomm Wallaby
+_packages:
+ - opensync-tip
+feeds:
+ - name: ipq807x
+ path: ../../feeds/ipq807x
+
+
diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network
index 6e299cb746..9ebd905355 100755
--- a/target/linux/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq807x/base-files/etc/board.d/02_network
@@ -7,22 +7,23 @@
qcom_setup_interfaces()
{
local board="$1"
+ ucidef_add_switch "switch0"
+ ucidef_add_switch_attr "switch0" "enable" "false"
+ ucidef_add_switch_attr "switch0" "reset" "false"
case $board in
cig,wf188)
- ucidef_add_switch "switch0"
- ucidef_add_switch_attr "switch0" "enable" "false"
- ucidef_add_switch_attr "switch0" "reset" "false"
ucidef_set_interface_lan "eth0"
;;
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01)
- ucidef_add_switch "switch0"
- ucidef_add_switch_attr "switch0" "enable" "false"
- ucidef_add_switch_attr "switch0" "reset" "false"
- ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
+ ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
ucidef_set_interface_wan "eth5"
;;
+ sercomm,wallaby)
+ ucidef_set_interface_lan "eth0"
+ ucidef_set_interface_wan "eth1"
+ ;;
esac
}
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
index 1fd9a4fa65..ff0e79008e 100755
--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
@@ -28,7 +28,8 @@ board=$(board_name)
case "$FIRMWARE" in
"IPQ8074/caldata.bin")
case "$board" in
- qcom,ipq807x-hk01)
+ qcom,ipq807x-hk01|\
+ sercomm,wallaby)
caldata_extract "0:ART" 0x1000 0x20000
;;
esac
diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
index 823624c5d0..a38f2c64bf 100755
--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
@@ -22,7 +22,8 @@ platform_check_image() {
case $board in
cig,wf188|\
qcom,ipq6018-cp01|\
- qcom,ipq807x-hk01)
+ qcom,ipq807x-hk01|\
+ sercomm,wallaby)
[ "$magic_long" = "73797375" ] && return 0
;;
esac
@@ -40,7 +41,8 @@ platform_do_upgrade() {
qca_do_upgrade $1
;;
qcom,ipq6018-cp01|\
- qcom,ipq807x-hk01)
+ qcom,ipq807x-hk01|\
+ sercomm,wallaby)
nand_upgrade_tar "$1"
;;
esac
diff --git a/target/linux/ipq807x/patches/103-sercomm-wallaby.patch b/target/linux/ipq807x/patches/103-sercomm-wallaby.patch
new file mode 100644
index 0000000000..c6d12fe963
--- /dev/null
+++ b/target/linux/ipq807x/patches/103-sercomm-wallaby.patch
@@ -0,0 +1,816 @@
+Index: linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/Makefile
+===================================================================
+--- linux-4.4.60-qsdk.orig/arch/arm64/boot/dts/qcom/Makefile
++++ linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/Makefile
+@@ -30,6 +30,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+ qcom-ipq807x-ac04.dtb \
+ qcom-ipq807x-oak02.dtb \
+ qcom-ipq807x-oak03.dtb \
++ qcom-ipq807x-sercomm-wallaby.dtb \
+ qcom-ipq807x-db.hk01.dtb \
+ qcom-ipq807x-db.hk02.dtb
+
+Index: linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/qcom-ipq807x-sercomm-wallaby.dts
+===================================================================
+--- /dev/null
++++ linux-4.4.60-qsdk/arch/arm64/boot/dts/qcom/qcom-ipq807x-sercomm-wallaby.dts
+@@ -0,0 +1,799 @@
++/dts-v1/;
++/*
++ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++#include "qcom-ipq807x-soc.dtsi"
++#include "qcom-ipq807x-hk-cpu.dtsi"
++
++/ {
++ #address-cells = <0x2>;
++ #size-cells = <0x2>;
++ model = "Sercomm Wallaby";
++ compatible = "sercomm,wallaby", "qcom,ipq807x-hk09", "qcom,ipq807x";
++ qcom,msm-id = <0x156 0x0>;
++ interrupt-parent = <&intc>;
++ qcom,board-id = <0x8 0x0>;
++ qcom,pmic-id = <0x0 0x0 0x0 0x0>;
++
++ aliases {
++ /*
++ * Aliases as required by u-boot
++ * to patch MAC addresses
++ */
++ ethernet3 = "/soc/dp4";
++ ethernet4 = "/soc/dp5";
++
++ led-boot = &led_green;
++ led-failsafe = &led_green;
++ led-running = &led_green;
++ led-upgrade = &led_blue;
++ };
++};
++
++&tlmm {
++ pinctrl-0 = <&btcoex_pins>;
++ pinctrl-names = "default";
++
++ btcoex_pins: btcoex_pins {
++ mux_0 {
++ pins = "gpio64";
++ function = "pta1_1";
++ drive-strength = <6>;
++ bias-pull-down;
++ };
++ mux_1 {
++ pins = "gpio65";
++ function = "pta1_2";
++ drive-strength = <6>;
++ bias-pull-down;
++ };
++ mux_2 {
++ pins = "gpio66";
++ function = "pta1_0";
++ drive-strength = <6>;
++ bias-pull-down;
++ };
++ };
++
++ mdio_pins: mdio_pinmux {
++ mux_0 {
++ pins = "gpio68";
++ function = "mdc";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ mux_1 {
++ pins = "gpio69";
++ function = "mdio";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ mux_2 {
++ pins = "gpio25";
++ function = "gpio";
++ bias-pull-up;
++ };
++ mux_3 {
++ pins = "gpio44";
++ function = "gpio";
++ bias-pull-up;
++ };
++ };
++
++ uart_pins: uart_pins {
++ mux {
++ pins = "gpio23", "gpio24";
++ function = "blsp4_uart1";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ };
++
++ spi_0_pins: spi_0_pins {
++ mux {
++ pins = "gpio38", "gpio39", "gpio40", "gpio41";
++ function = "blsp0_spi";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ };
++
++ spi_3_pins: spi_3_pins {
++ mux {
++ pins = "gpio50", "gpio52", "gpio53";
++ function = "blsp3_spi";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ spi_cs {
++ pins = "gpio22";
++ function = "blsp3_spi2";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ quartz_interrupt {
++ pins = "gpio47";
++ function = "gpio";
++ input;
++ bias-disable;
++ };
++ quartz_reset {
++ pins = "gpio21";
++ function = "gpio";
++ output-low;
++ bias-disable;
++ };
++ };
++
++ qpic_pins: qpic_pins {
++ data_0 {
++ pins = "gpio15";
++ function = "qpic_pad0";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_1 {
++ pins = "gpio12";
++ function = "qpic_pad1";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_2 {
++ pins = "gpio13";
++ function = "qpic_pad2";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_3 {
++ pins = "gpio14";
++ function = "qpic_pad3";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_4 {
++ pins = "gpio5";
++ function = "qpic_pad4";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_5 {
++ pins = "gpio6";
++ function = "qpic_pad5";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_6 {
++ pins = "gpio7";
++ function = "qpic_pad6";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ data_7 {
++ pins = "gpio8";
++ function = "qpic_pad7";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ qpic_pad {
++ pins = "gpio1", "gpio3", "gpio4",
++ "gpio10", "gpio11", "gpio17";
++ function = "qpic_pad";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ };
++
++ hsuart_pins: hsuart_pins {
++ mux {
++ pins = "gpio46", "gpio47", "gpio48", "gpio49";
++ function = "blsp2_uart";
++ drive-strength = <8>;
++ bias-disable;
++ };
++ };
++
++ button_pins: button_pins {
++ reset_button {
++ pins = "gpio33";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-up;
++ };
++ };
++
++ led_pins: led_pins {
++ led_wan {
++ pins = "gpio31";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++
++ led_lan {
++ pins = "gpio32";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++
++ led_blue {
++ pins = "gpio60";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++
++ led_green {
++ pins = "gpio61";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++
++ led_red {
++ pins = "gpio62";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++
++ usb_mux_sel_pins: usb_mux_pins {
++ mux {
++ pins = "gpio27";
++ function = "gpio";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++
++ pcie0_pins: pcie_pins {
++ pcie0_rst {
++ pins = "gpio58";
++ function = "pcie0_rst";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ pcie0_wake {
++ pins = "gpio59";
++ function = "pcie0_wake";
++ drive-strength = <8>;
++ bias-pull-down;
++ };
++ };
++};
++
++&soc {
++ gpio_keys {
++ compatible = "gpio-keys";
++ pinctrl-0 = <&button_pins>;
++ pinctrl-names = "default";
++
++ button@1 {
++ label = "reset";
++ linux,code = <KEY_RESTART>;
++ gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
++ linux,input-type = <1>;
++ debounce-interval = <60>;
++ };
++ };
++
++ mdio: mdio@90000 {
++ pinctrl-0 = <&mdio_pins>;
++ pinctrl-names = "default";
++ phy-reset-gpio = <&tlmm 37 0 &tlmm 25 1 &tlmm 44 1>;
++ compatible = "qcom,ipq40xx-mdio", "qcom,qca-mdio";
++ phy3: ethernet-phy@3 {
++ reg = <3>;
++ };
++ phy4: ethernet-phy@4 {
++ reg = <4>;
++ };
++ };
++
++ ess-switch@3a000000 {
++ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
++ switch_lan_bmp = <0x10>; /* lan port bitmap */
++ switch_wan_bmp = <0x20>; /* wan port bitmap */
++ switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
++ switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
++ switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
++ bm_tick_mode = <0>; /* bm tick mode */
++ tm_tick_mode = <0>; /* tm tick mode */
++ qcom,port_phyinfo {
++ port@0 {
++ port_id = <1>;
++ phy_address = <0>;
++ };
++ port@1 {
++ port_id = <2>;
++ phy_address = <1>;
++ };
++ port@2 {
++ port_id = <3>;
++ phy_address = <2>;
++ };
++ port@3 {
++ port_id = <4>;
++ phy_address = <3>;
++ };
++ port@4 {
++ port_id = <5>;
++ phy_address = <4>;
++/* port_mac_sel = "QGMAC_PORT"; */
++ };
++/* port@5 {
++ port_id = <6>;
++ phy_address = <28>;
++ port_mac_sel = "QGMAC_PORT";
++ };*/
++ };
++ port_scheduler_resource {
++ port@0 {
++ port_id = <0>;
++ ucast_queue = <0 143>;
++ mcast_queue = <256 271>;
++ l0sp = <0 35>;
++ l0cdrr = <0 47>;
++ l0edrr = <0 47>;
++ l1cdrr = <0 7>;
++ l1edrr = <0 7>;
++ };
++ port@1 {
++ port_id = <1>;
++ ucast_queue = <144 159>;
++ mcast_queue = <272 275>;
++ l0sp = <36 39>;
++ l0cdrr = <48 63>;
++ l0edrr = <48 63>;
++ l1cdrr = <8 11>;
++ l1edrr = <8 11>;
++ };
++ port@2 {
++ port_id = <2>;
++ ucast_queue = <160 175>;
++ mcast_queue = <276 279>;
++ l0sp = <40 43>;
++ l0cdrr = <64 79>;
++ l0edrr = <64 79>;
++ l1cdrr = <12 15>;
++ l1edrr = <12 15>;
++ };
++ port@3 {
++ port_id = <3>;
++ ucast_queue = <176 191>;
++ mcast_queue = <280 283>;
++ l0sp = <44 47>;
++ l0cdrr = <80 95>;
++ l0edrr = <80 95>;
++ l1cdrr = <16 19>;
++ l1edrr = <16 19>;
++ };
++ port@4 {
++ port_id = <4>;
++ ucast_queue = <192 207>;
++ mcast_queue = <284 287>;
++ l0sp = <48 51>;
++ l0cdrr = <96 111>;
++ l0edrr = <96 111>;
++ l1cdrr = <20 23>;
++ l1edrr = <20 23>;
++ };
++ port@5 {
++ port_id = <5>;
++ ucast_queue = <208 223>;
++ mcast_queue = <288 291>;
++ l0sp = <52 55>;
++ l0cdrr = <112 127>;
++ l0edrr = <112 127>;
++ l1cdrr = <24 27>;
++ l1edrr = <24 27>;
++ };
++ port@6 {
++ port_id = <6>;
++ ucast_queue = <224 239>;
++ mcast_queue = <292 295>;
++ l0sp = <56 59>;
++ l0cdrr = <128 143>;
++ l0edrr = <128 143>;
++ l1cdrr = <28 31>;
++ l1edrr = <28 31>;
++ };
++ port@7 {
++ port_id = <7>;
++ ucast_queue = <240 255>;
++ mcast_queue = <296 299>;
++ l0sp = <60 63>;
++ l0cdrr = <144 159>;
++ l0edrr = <144 159>;
++ l1cdrr = <32 35>;
++ l1edrr = <32 35>;
++ };
++ };
++ port_scheduler_config {
++ port@0 {
++ port_id = <0>;
++ l1scheduler {
++ group@0 {
++ sp = <0 1>; /*L0 SPs*/
++ /*cpri cdrr epri edrr*/
++ cfg = <0 0 0 0>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ /*unicast queues*/
++ ucast_queue = <0 4 8>;
++ /*multicast queues*/
++ mcast_queue = <256 260>;
++ /*sp cpri cdrr epri edrr*/
++ cfg = <0 0 0 0 0>;
++ };
++ group@1 {
++ ucast_queue = <1 5 9>;
++ mcast_queue = <257 261>;
++ cfg = <0 1 1 1 1>;
++ };
++ group@2 {
++ ucast_queue = <2 6 10>;
++ mcast_queue = <258 262>;
++ cfg = <0 2 2 2 2>;
++ };
++ group@3 {
++ ucast_queue = <3 7 11>;
++ mcast_queue = <259 263>;
++ cfg = <0 3 3 3 3>;
++ };
++ };
++ };
++ port@1 {
++ port_id = <1>;
++ l1scheduler {
++ group@0 {
++ sp = <36>;
++ cfg = <0 8 0 8>;
++ };
++ group@1 {
++ sp = <37>;
++ cfg = <1 9 1 9>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <144>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <272>;
++ mcast_loop_pri = <4>;
++ cfg = <36 0 48 0 48>;
++ };
++ };
++ };
++ port@2 {
++ port_id = <2>;
++ l1scheduler {
++ group@0 {
++ sp = <40>;
++ cfg = <0 12 0 12>;
++ };
++ group@1 {
++ sp = <41>;
++ cfg = <1 13 1 13>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <160>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <276>;
++ mcast_loop_pri = <4>;
++ cfg = <40 0 64 0 64>;
++ };
++ };
++ };
++ port@3 {
++ port_id = <3>;
++ l1scheduler {
++ group@0 {
++ sp = <44>;
++ cfg = <0 16 0 16>;
++ };
++ group@1 {
++ sp = <45>;
++ cfg = <1 17 1 17>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <176>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <280>;
++ mcast_loop_pri = <4>;
++ cfg = <44 0 80 0 80>;
++ };
++ };
++ };
++ port@4 {
++ port_id = <4>;
++ l1scheduler {
++ group@0 {
++ sp = <48>;
++ cfg = <0 20 0 20>;
++ };
++ group@1 {
++ sp = <49>;
++ cfg = <1 21 1 21>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <192>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <284>;
++ mcast_loop_pri = <4>;
++ cfg = <48 0 96 0 96>;
++ };
++ };
++ };
++ port@5 {
++ port_id = <5>;
++ l1scheduler {
++ group@0 {
++ sp = <52>;
++ cfg = <0 24 0 24>;
++ };
++ group@1 {
++ sp = <53>;
++ cfg = <1 25 1 25>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <208>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <288>;
++ mcast_loop_pri = <4>;
++ cfg = <52 0 112 0 112>;
++ };
++ };
++ };
++ port@6 {
++ port_id = <6>;
++ l1scheduler {
++ group@0 {
++ sp = <56>;
++ cfg = <0 28 0 28>;
++ };
++ group@1 {
++ sp = <57>;
++ cfg = <1 29 1 29>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <224>;
++ ucast_loop_pri = <16>;
++ mcast_queue = <292>;
++ mcast_loop_pri = <4>;
++ cfg = <56 0 128 0 128>;
++ };
++ };
++ };
++ port@7 {
++ port_id = <7>;
++ l1scheduler {
++ group@0 {
++ sp = <60>;
++ cfg = <0 32 0 32>;
++ };
++ };
++ l0scheduler {
++ group@0 {
++ ucast_queue = <240>;
++ mcast_queue = <296>;
++ cfg = <60 0 144 0 144>;
++ };
++ };
++ };
++ };
++ };
++
++ dp4 {
++ device_type = "network";
++ compatible = "qcom,nss-dp";
++ qcom,id = <4>;
++ reg = <0x3a001600 0x200>;
++ qcom,mactype = <0>;
++ local-mac-address = [000000000000];
++ qcom,link-poll = <1>;
++ qcom,phy-mdio-addr = <3>;
++ phy-mode = "sgmii";
++ };
++
++ dp5 {
++ device_type = "network";
++ compatible = "qcom,nss-dp";
++ qcom,id = <5>;
++ reg = <0x3a003000 0x3fff>;
++ qcom,mactype = <1>;
++ local-mac-address = [000000000000];
++ qcom,link-poll = <1>;
++ qcom,phy-mdio-addr = <4>;
++ phy-mode = "sgmii";
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-0 = <&led_pins>;
++ pinctrl-names = "default";
++
++ led_wan {
++ label = "wallaby:green:wan";
++ gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>;
++ default-state = "off";
++ };
++
++ led_lan {
++ label = "wallaby:green:lan";
++ gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
++ default-state = "off";
++ };
++
++ led_blue: led_blue {
++ label = "wallaby:blue:status";
++ gpio = <&tlmm 60 GPIO_ACTIVE_HIGH>;
++ default-state = "off";
++ };
++
++ led_green: led_green {
++ label = "wallaby:green:status";
++ gpio = <&tlmm 61 GPIO_ACTIVE_HIGH>;
++ default-state = "off";
++ };
++
++ led_red {
++ label = "wallaby:red:status";
++ gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
++ default-state = "off";
++ };
++
++ };
++ nss-macsec0 {
++ compatible = "qcom,nss-macsec";
++ phy_addr = <0x18>;
++ phy_access_mode = <0>;
++ mdiobus = <&mdio>;
++ };
++ nss-macsec1 {
++ compatible = "qcom,nss-macsec";
++ phy_addr = <0x1c>;
++ phy_access_mode = <0>;
++ mdiobus = <&mdio>;
++ };
++};
++
++&serial_blsp4 {
++ pinctrl-0 = <&uart_pins>;
++ pinctrl-names = "default";
++ status = "ok";
++};
++
++&spi_0 { /* BLSP1 QUP1 */
++ pinctrl-0 = <&spi_0_pins>;
++ pinctrl-names = "default";
++ cs-select = <0>;
++ status = "ok";
++
++ m25p80@0 {
++ #address-cells = <1>;
++ #size-cells = <1>;
++ reg = <0>;
++ compatible = "n25q128a11";
++ linux,modalias = "m25p80", "n25q128a11";
++ spi-max-frequency = <50000000>;
++ use-default-sizes;
++ };
++};
++
++&spi_4 { /* BLSP1 QUP3 */
++ pinctrl-0 = <&spi_3_pins>;
++ pinctrl-names = "default";
++ cs-select = <2>;
++ quartz-reset-gpio = <&tlmm 21 1>;
++ status = "ok";
++ spidev3: spi@3 {
++ compatible = "qca,spidev";
++ reg = <0>;
++ spi-max-frequency = <24000000>;
++ };
++};
++
++&serial_blsp2 {
++ status = "disabled";
++};
++
++&msm_imem {
++ status = "disabled";
++};
++
++&ssphy_0 {
++ status = "ok";
++};
++
++&qusb_phy_0 {
++ status = "ok";
++};
++
++&ssphy_1 {
++ status = "ok";
++};
++
++&qusb_phy_1 {
++ status = "ok";
++};
++
++&usb3_0 {
++ status = "ok";
++};
++
++&usb3_1 {
++ status = "ok";
++};
++
++&cryptobam {
++ status = "ok";
++};
++
++&crypto {
++ status = "ok";
++};
++
++&i2c_0 {
++ status = "disabled";
++};
++
++&i2c_1 {
++ status = "disabled";
++};
++
++&qpic_bam {
++ status = "ok";
++};
++
++&nand {
++ pinctrl-0 = <&qpic_pins>;
++ pinctrl-names = "default";
++ status = "ok";
++};
++
++&qpic_lcd {
++ status = "disabled";
++};
++
++&qpic_lcd_panel {
++ status = "disabled";
++};
++
++&ledc {
++ status = "disabled";
++};
++
++&pcie0 {
++ status = "disabled";
++};
++
++&pcie1 {
++ status = "disabled";
++};
++
--
2.25.1

View File

@@ -1,71 +0,0 @@
From 651aeb745b190d1b0b86b04b3fa2354dd3321537 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 28 Jul 2020 15:00:04 +0200
Subject: [PATCH 1/2] ipq807x: improve image building code
Add support for qsdk upgrade images.
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ipq807x/image/Makefile | 8 ++++++--
target/linux/ipq807x/image/ipq60xx.mk | 1 -
target/linux/ipq807x/image/ipq807x.mk | 12 +++++++++++-
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/target/linux/ipq807x/image/Makefile b/target/linux/ipq807x/image/Makefile
index 5752cbcabc..3a219e6d6c 100644
--- a/target/linux/ipq807x/image/Makefile
+++ b/target/linux/ipq807x/image/Makefile
@@ -9,9 +9,13 @@ define Device/Default
KERNEL_NAME := zImage
FILESYSTEMS := squashfs
DEVICE_DTS_DIR := $(DTS_DIR)
- IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+ KERNEL_IN_UBI := 1
+ ROOTFSNAME_IN_UBI := ubi_rootfs
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ IMAGES := sysupgrade.tar nand-factory.bin
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
+ IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
KERNEL_NAME := Image
KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
diff --git a/target/linux/ipq807x/image/ipq60xx.mk b/target/linux/ipq807x/image/ipq60xx.mk
index c165663ad1..aa7629416e 100644
--- a/target/linux/ipq807x/image/ipq60xx.mk
+++ b/target/linux/ipq807x/image/ipq60xx.mk
@@ -17,6 +17,5 @@ define Device/qcom_cp01_c1
DEVICE_DTS := qcom-ipq6018-cp01-c1
DEVICE_DTS_DIR := $(DTS_DIR)/qcom
SUPPORTED_DEVICES := qcom,ipq6018-cp01
- IMAGES := sysupgrade.tar
endef
TARGET_DEVICES += qcom_cp01_c1
diff --git a/target/linux/ipq807x/image/ipq807x.mk b/target/linux/ipq807x/image/ipq807x.mk
index 7a65cfd4ea..9bc9403d9e 100644
--- a/target/linux/ipq807x/image/ipq807x.mk
+++ b/target/linux/ipq807x/image/ipq807x.mk
@@ -5,7 +5,17 @@ define Device/qcom_hk01
DEVICE_DTS := qcom-ipq807x-hk01
DEVICE_DTS_DIR := $(DTS_DIR)/qcom
DEVICE_DTS_CONFIG=config@hk01
- IMAGES := sysupgrade.tar
SUPPORTED_DEVICES := qcom,ipq807x-hk01
+ DEVICE_PACKAGES := ath11k-wifi-qcom
endef
TARGET_DEVICES += qcom_hk01
+
+define Device/sercomm_wallaby
+ DEVICE_TITLE := Sercomm Kiwi
+ DEVICE_DTS := qcom-ipq807x-sercomm-wallaby
+ DEVICE_DTS_DIR := $(DTS_DIR)/qcom
+ DEVICE_DTS_CONFIG=config@hk09
+ SUPPORTED_DEVICES := sercomm,wallaby
+ DEVICE_PACKAGES := ath11k-wifi-sercomm-wallaby
+endef
+TARGET_DEVICES += sercomm_wallaby
--
2.25.1