提交 e8afb840 编写于 作者: C coolsnowwolf

rework AC58U/ARCH17 code work with ASUS uboot recovery

上级 9662a533
......@@ -13,7 +13,8 @@ endef
define Build/Compile
endef
ALLWIFIBOARDS:=8dev_jalapeno asus_rt-ac58u avm_fritzbox-4040 glinet_gl-b1300 meraki_mr33 netgear_ex61x0v2
#ALLWIFIBOARDS:=<devicename>
ALLWIFIBOARDS:=rt-acrh17
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
define Package/ipq-wifi-default
......@@ -47,11 +48,7 @@ Don't install it for any other device!
PREV_BOARD+=ipq-wifi-$(1)
endef
$(eval $(call generate-ipq-wifi-package,8dev_jalapeno,board-8dev_jalapeno.bin,8devices Jalapeno))
$(eval $(call generate-ipq-wifi-package,asus_rt-ac58u,board-asus_rt-ac58u.bin,ASUS RT-AC58U))
$(eval $(call generate-ipq-wifi-package,avm_fritzbox-4040,board-avm_fritzbox-4040.bin,AVM FRITZ!Box 4040))
$(eval $(call generate-ipq-wifi-package,glinet_gl-b1300,board-glinet_gl-b1300.bin,GL.iNet GL-B1300))
$(eval $(call generate-ipq-wifi-package,meraki_mr33,board-meraki_mr33.bin,Cisco Meraki MR33))
$(eval $(call generate-ipq-wifi-package,netgear_ex61x0v2,board-netgear_ex61x0v2.bin,Netgear EX61x0v2))
#$(eval $(call generate-ipq-wifi-package,<devicename>,<filename>,<displayname>))
$(eval $(call generate-ipq-wifi-package,rt-acrh17,board-rt-acrh17.bin,ASUS RT-ACRH17/RT-AC82U/RT-AC42U))
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
......@@ -43,7 +43,8 @@ glinet,gl-b1300)
"0t@eth0" "3:lan" "4:lan" "5:wan"
;;
8dev,jalapeno |\
openmesh,a42)
openmesh,a42 |\
openmesh,a62)
ucidef_add_switch "switch0" \
"0t@eth0" "4:lan" "5:wan"
;;
......
......@@ -110,6 +110,17 @@ case "$FIRMWARE" in
;;
esac
;;
"ath10k/pre-cal-pci-0000:01:00.0.bin")
case "$board" in
asus,rt-acrh17)
CI_UBIPART=UBI_DEV
ath10kcal_ubi_extract "Factory" 36864 12064
;;
openmesh,a62)
ath10kcal_extract "0:ART" 36864 12064
;;
esac
;;
"ath10k/pre-cal-ahb-a000000.wifi.bin")
case "$board" in
8dev,jalapeno |\
......@@ -136,7 +147,8 @@ case "$FIRMWARE" in
ath10kcal_patch_mac_crc $(mtd_get_mac_binary dnidata 0)
;;
compex,wpj428 |\
openmesh,a42)
openmesh,a42 |\
openmesh,a62)
ath10kcal_extract "0:ART" 4096 12064
;;
esac
......@@ -166,19 +178,12 @@ case "$FIRMWARE" in
ath10kcal_patch_mac_crc $(mtd_get_mac_binary dnidata 12)
;;
compex,wpj428 |\
openmesh,a42)
openmesh,a42 |\
openmesh,a62)
ath10kcal_extract "0:ART" 20480 12064
;;
esac
;;
"ath10k/pre-cal-pci-0000:01:00.0.bin")
case "$board" in
asus,rt-acrh17)
CI_UBIPART=UBI_DEV
ath10kcal_ubi_extract "Factory" 36864 12064
;;
esac
;;
*)
exit 1
;;
......
......@@ -47,6 +47,9 @@ platform_do_upgrade_openmesh() {
openmesh,a42)
primary_kernel_mtd=8
;;
openmesh,a62)
primary_kernel_mtd=10
;;
*)
echo "failed to detect primary kernel mtd partition for board"
return 1
......
......@@ -47,7 +47,7 @@ asus_nand_upgrade_tar() {
local root_ubivol="$( nand_find_volume $ubidev rootfs )"
# remove ubiblock device of rootfs
local root_ubiblk="ubiblock${root_ubivol:-3}"
local root_ubiblk="ubiblock${root_ubivol:3}"
if [ "$root_ubivol" -a -e "/dev/$root_ubiblk" ]; then
echo "removing $root_ubiblk"
if ! ubiblock -r /dev/$root_ubivol; then
......@@ -56,11 +56,11 @@ asus_nand_upgrade_tar() {
fi
fi
ubi_kill_if_exist linux
ubi_kill_if_exist linux2
ubi_kill_if_exist rootfs
ubi_kill_if_exist rootfs_data
ubi_kill_if_exist rootfs
ubi_kill_if_exist jffs2
ubi_kill_if_exist linux2
ubi_kill_if_exist linux
ubimkvol /dev/$ubidev -N linux -s $kpart_size
ubimkvol /dev/$ubidev -N linux2 -s $kpart_size
......@@ -112,7 +112,7 @@ asus_nand_upgrade_factory() {
local root_ubivol="$( nand_find_volume $ubidev rootfs )"
# remove ubiblock device of rootfs
local root_ubiblk="ubiblock${root_ubivol:-3}"
local root_ubiblk="ubiblock${root_ubivol:3}"
if [ "$root_ubivol" -a -e "/dev/$root_ubiblk" ]; then
echo "removing $root_ubiblk"
if ! ubiblock -r /dev/$root_ubivol; then
......@@ -121,11 +121,11 @@ asus_nand_upgrade_factory() {
fi
fi
ubi_kill_if_exist linux
ubi_kill_if_exist linux2
ubi_kill_if_exist rootfs
ubi_kill_if_exist rootfs_data
ubi_kill_if_exist rootfs
ubi_kill_if_exist jffs2
ubi_kill_if_exist linux2
ubi_kill_if_exist linux
ubimkvol /dev/$ubidev -N linux -s $kpart_size
......@@ -159,7 +159,8 @@ platform_do_upgrade() {
asus_nand_upgrade_tar 20951040 "$1"
fi
;;
openmesh,a42)
openmesh,a42 |\
openmesh,a62)
PART_NAME="inactive"
platform_do_upgrade_openmesh "$ARGV"
;;
......
......@@ -35,7 +35,6 @@ CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
# CONFIG_ARCH_WANTS_THP_SWAP is not set
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_ARM=y
......@@ -148,12 +147,9 @@ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
# CONFIG_DEBUG_USER is not set
CONFIG_DMADEVICES=y
CONFIG_DMA_ENGINE=y
# CONFIG_DMA_NOOP_OPS is not set
CONFIG_DMA_OF=y
CONFIG_DMA_SHARED_BUFFER=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
# CONFIG_DMA_VIRT_OPS is not set
# CONFIG_DRM_LIB_RANDOM is not set
CONFIG_DTC=y
CONFIG_DT_IDLE_STATES=y
CONFIG_DYNAMIC_DEBUG=y
......@@ -161,11 +157,9 @@ CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_EEPROM_AT24=y
CONFIG_ESSEDMA=y
CONFIG_EXPORTFS=y
CONFIG_EXTCON=y
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_FUTEX_PI=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_CLOCKEVENTS=y
......@@ -456,7 +450,6 @@ CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_OF=y
CONFIG_THIN_ARCHIVES=y
# CONFIG_THUMB2_KERNEL is not set
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_TIMER_OF=y
......
......@@ -84,10 +84,12 @@
wifi@a000000 {
status = "okay";
qcom,ath10k-calibration-variant = "AVM-FRITZBox-4040";
};
wifi@a800000 {
status = "okay";
qcom,ath10k-calibration-variant = "AVM-FRITZBox-4040";
};
watchdog@b017000 {
......
......@@ -89,12 +89,12 @@
wifi@a000000 {
status = "okay";
qcom,ath10k-calibration-variant = "ASUS-RT-AC58U";
qcom,ath10k-calibration-variant = "RT-AC58U";
};
wifi@a800000 {
status = "okay";
qcom,ath10k-calibration-variant = "ASUS-RT-AC58U";
qcom,ath10k-calibration-variant = "RT-AC58U";
};
watchdog@b017000 {
......
......@@ -93,6 +93,7 @@
qcom,mtd-name = "0:ART";
qcom,cal-offset = <0x1000>;
qcom,cal-len = <12064>;
qcom,ath10k-calibration-variant = "RT-ACRH17";
};
wifi1: wifi@a800000 {
......
......@@ -266,8 +266,10 @@
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "GL-B1300";
};
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "GL-B1300";
};
......@@ -372,10 +372,10 @@
&wifi0 {
status = "okay";
/* qcom,ath10k-calibration-variant = "MERAKI-MR33"; */
qcom,ath10k-calibration-variant = "Meraki-MR33";
};
&wifi1 {
status = "okay";
/* qcom,ath10k-calibration-variant = "MERAKI-MR33"; */
qcom,ath10k-calibration-variant = "Meraki-MR33";
};
......@@ -51,7 +51,6 @@ define Device/8dev_jalapeno
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_TITLE := 8devices Jalapeno
DEVICE_PACKAGES := ipq-wifi-8dev_jalapeno
endef
TARGET_DEVICES += 8dev_jalapeno
......@@ -73,7 +72,7 @@ define Device/asus_rt-ac58u
KERNEL_INITRAMFS := $$(KERNEL) | uImage none
KERNEL_INITRAMFS_SUFFIX := -factory.trx
IMAGES := sysupgrade.bin
DEVICE_PACKAGES := ipq-wifi-asus_rt-ac58u kmod-usb-ledtrig-usbport
DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += asus_rt-ac58u
......@@ -90,7 +89,7 @@ define Device/asus_rt-acrh17
KERNEL_INITRAMFS := $$(KERNEL) | uImage none
KERNEL_INITRAMFS_SUFFIX := -factory.trx
IMAGES := sysupgrade.bin
DEVICE_PACKAGES := ath10k-firmware-qca4019 ath10k-firmware-qca9984
DEVICE_PACKAGES := ipq-wifi-rt-acrh17 ath10k-firmware-qca9984
endef
TARGET_DEVICES += asus_rt-acrh17
......@@ -100,9 +99,12 @@ define Device/avm_fritzbox-4040
BOARD_NAME := fritz4040
DEVICE_TITLE := AVM Fritz!Box 4040
IMAGE_SIZE := 29753344
IMAGES = sysupgrade.bin
UBOOT_PATH := $$(BIN_DIR)/u-boot-fritz4040/uboot-fritz4040.bin
UBOOT_PARTITION_SIZE := 524288
IMAGES = eva.bin sysupgrade.bin
IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := ipq-wifi-avm_fritzbox-4040 fritz-tffs fritz-caldata u-boot-fritz4040
DEVICE_PACKAGES := fritz-tffs fritz-caldata u-boot-fritz4040
endef
TARGET_DEVICES += avm_fritzbox-4040
......@@ -129,7 +131,6 @@ define Device/glinet_gl-b1300
IMAGE_SIZE := 26624k
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := ipq-wifi-glinet_gl-b1300
endef
TARGET_DEVICES += glinet_gl-b1300
......@@ -140,7 +141,7 @@ define Device/meraki_mr33
PAGESIZE := 2048
DEVICE_TITLE := Cisco Meraki MR33
IMAGES = sysupgrade.bin
DEVICE_PACKAGES := -swconfig ipq-wifi-meraki_mr33 ath10k-firmware-qca9887
DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887
endef
TARGET_DEVICES += meraki_mr33
......@@ -148,7 +149,6 @@ define Device/netgear_ex61x0v2
$(call Device/DniImage)
KERNEL_SIZE := 3080192
DEVICE_DTS_CONFIG := config@4
DEVICE_PACKAGES := ipq-wifi-netgear_ex61x0v2
NETGEAR_BOARD_ID := EX6150v2series
NETGEAR_HW_ID := 29765285+16+0+128+2x2
endef
......@@ -182,6 +182,22 @@ define Device/openmesh_a42
endef
TARGET_DEVICES += openmesh_a42
define Device/openmesh_a62
$(call Device/FitImageLzma)
DEVICE_DTS := qcom-ipq4019-a62
DEVICE_DTS_CONFIG := config@om.a62
BLOCKSIZE := 64k
DEVICE_TITLE := OpenMesh A62
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
IMAGE_SIZE := 15552k
IMAGES = factory.bin sysupgrade.bin
IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
DEVICE_PACKAGES := ath10k-firmware-qca9888 uboot-envtools
endef
TARGET_DEVICES += openmesh_a62
define Device/qcom_ap-dk01.1-c1
DEVICE_TITLE := QCA AP-DK01.1-C1
BOARD_NAME := ap-dk01.1-c1
......
......@@ -114,7 +114,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
struct list_head node;
};
@@ -540,7 +545,7 @@ static void bam_free_chan(struct dma_cha
@@ -539,7 +544,7 @@ static void bam_free_chan(struct dma_cha
vchan_free_chan_resources(to_virt_chan(chan));
......@@ -123,7 +123,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
dev_err(bchan->bdev->dev, "Cannot free busy channel\n");
goto err;
}
@@ -633,8 +638,6 @@ static struct dma_async_tx_descriptor *b
@@ -632,8 +637,6 @@ static struct dma_async_tx_descriptor *b
if (flags & DMA_PREP_INTERRUPT)
async_desc->flags |= DESC_FLAG_EOT;
......@@ -132,7 +132,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
async_desc->num_desc = num_alloc;
async_desc->curr_desc = async_desc->desc;
@@ -685,14 +688,16 @@ err_out:
@@ -684,14 +687,16 @@ err_out:
static int bam_dma_terminate_all(struct dma_chan *chan)
{
struct bam_chan *bchan = to_bam_chan(chan);
......@@ -152,7 +152,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
}
vchan_get_all_descriptors(&bchan->vc, &head);
@@ -764,9 +769,9 @@ static int bam_resume(struct dma_chan *c
@@ -763,9 +768,9 @@ static int bam_resume(struct dma_chan *c
*/
static u32 process_channel_irqs(struct bam_device *bdev)
{
......@@ -164,7 +164,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
srcs = readl_relaxed(bam_addr(bdev, 0, BAM_IRQ_SRCS_EE));
@@ -786,27 +791,40 @@ static u32 process_channel_irqs(struct b
@@ -785,27 +790,40 @@ static u32 process_channel_irqs(struct b
writel_relaxed(pipe_stts, bam_addr(bdev, i, BAM_P_IRQ_CLR));
spin_lock_irqsave(&bchan->vc.lock, flags);
......@@ -214,7 +214,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
}
spin_unlock_irqrestore(&bchan->vc.lock, flags);
@@ -868,6 +886,7 @@ static enum dma_status bam_tx_status(str
@@ -867,6 +885,7 @@ static enum dma_status bam_tx_status(str
struct dma_tx_state *txstate)
{
struct bam_chan *bchan = to_bam_chan(chan);
......@@ -222,7 +222,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
struct virt_dma_desc *vd;
int ret;
size_t residue = 0;
@@ -883,11 +902,17 @@ static enum dma_status bam_tx_status(str
@@ -882,11 +901,17 @@ static enum dma_status bam_tx_status(str
spin_lock_irqsave(&bchan->vc.lock, flags);
vd = vchan_find_desc(&bchan->vc, cookie);
......@@ -244,7 +244,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
spin_unlock_irqrestore(&bchan->vc.lock, flags);
@@ -928,63 +953,86 @@ static void bam_start_dma(struct bam_cha
@@ -927,63 +952,86 @@ static void bam_start_dma(struct bam_cha
{
struct virt_dma_desc *vd = vchan_next_desc(&bchan->vc);
struct bam_device *bdev = bchan->bdev;
......@@ -367,7 +367,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
/* ensure descriptor writes and dma start not reordered */
wmb();
@@ -1013,7 +1061,7 @@ static void dma_tasklet(unsigned long da
@@ -1012,7 +1060,7 @@ static void dma_tasklet(unsigned long da
bchan = &bdev->channels[i];
spin_lock_irqsave(&bchan->vc.lock, flags);
......@@ -376,7 +376,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
bam_start_dma(bchan);
spin_unlock_irqrestore(&bchan->vc.lock, flags);
}
@@ -1034,7 +1082,7 @@ static void bam_issue_pending(struct dma
@@ -1033,7 +1081,7 @@ static void bam_issue_pending(struct dma
spin_lock_irqsave(&bchan->vc.lock, flags);
/* if work pending and idle, start a transaction */
......@@ -385,7 +385,7 @@ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
bam_start_dma(bchan);
spin_unlock_irqrestore(&bchan->vc.lock, flags);
@@ -1138,6 +1186,7 @@ static void bam_channel_init(struct bam_
@@ -1133,6 +1181,7 @@ static void bam_channel_init(struct bam_
vchan_init(&bchan->vc, &bdev->common);
bchan->vc.desc_free = bam_dma_free_desc;
......
......@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -697,7 +697,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -697,7 +697,19 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
......@@ -21,6 +21,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ qcom-ipq4018-jalapeno.dtb \
+ qcom-ipq4018-rt-ac58u.dtb \
qcom-ipq4019-ap.dk01.1-c1.dtb \
+ qcom-ipq4019-a62.dtb \
+ qcom-ipq4019-ap.dk04.1-c1.dtb \
+ qcom-ipq4019-rt-acrh17.dtb \
+ qcom-ipq4028-wpj428.dtb \
......
......@@ -67,7 +67,7 @@ Changes:
qcom,acc = <&acc3>;
qcom,saw = <&saw3>;
reg = <0x3>;
@@ -264,22 +274,22 @@
@@ -265,22 +275,22 @@
};
acc0: clock-controller@b088000 {
......@@ -94,7 +94,7 @@ Changes:
reg = <0x0b0b8000 0x1000>, <0xb008000 0x1000>;
};
@@ -307,6 +317,12 @@
@@ -308,6 +318,12 @@
regulator;
};
......
......@@ -51,7 +51,7 @@ Changes:
};
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -538,5 +538,76 @@
@@ -539,5 +539,76 @@
"legacy";
status = "disabled";
};
......
......@@ -15,7 +15,7 @@ so the info might change.
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -539,6 +539,34 @@
@@ -540,6 +540,34 @@
status = "disabled";
};
......
......@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -567,6 +567,29 @@
@@ -568,6 +568,29 @@
};
};
......
......@@ -25,7 +25,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
};
cpus {
@@ -590,6 +592,64 @@
@@ -591,6 +593,64 @@
status = "disabled";
};
......
--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
@@ -121,6 +121,22 @@
status = "ok";
};
+ mdio@90000 {
+ status = "okay";
+ };
+
+ ess-switch@c000000 {
+ status = "okay";
+ };
+
+ ess-psgmii@98000 {
+ status = "okay";
+ };
+
+ edma@c080000 {
+ status = "okay";
+ };
+
usb3_ss_phy: ssphy@9a000 {
status = "ok";
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册