From 38f64e09603c4435f8734c77c05bc1ca8c7f5ef9 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Sat, 28 Dec 2019 17:53:52 -0800 Subject: [PATCH] ipq806x: revert to kernel 4.14 --- target/linux/ipq806x/Makefile | 15 +- .../ipq806x/base-files/etc/board.d/01_leds | 4 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 128 +++++-- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 +- .../ipq806x/base-files/etc/init.d/bootcount | 11 - .../base-files/etc/init.d/linksys_recovery | 23 ++ .../ipq806x/base-files/lib/upgrade/linksys.sh | 57 +-- .../base-files/lib/upgrade/platform.sh | 24 +- .../ipq806x/base-files/lib/upgrade/zyxel.sh | 4 +- target/linux/ipq806x/config-4.14 | 9 + target/linux/ipq806x/config-4.19 | 18 +- .../arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 5 +- .../arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 4 +- .../arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 24 +- .../arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 4 +- .../arm/boot/dts/qcom-ipq8064-r7500v2.dts | 12 +- .../arm/boot/dts/qcom-ipq8064-vr2600v.dts | 4 +- .../arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 4 +- .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 6 +- .../arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +- .../arm/boot/dts/qcom-ipq8065-nbg6817.dts | 4 +- .../arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 5 +- .../arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 2 +- .../arch/arm/boot/dts/qcom-ipq8064-ap161.dts | 6 +- .../arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 11 +- .../arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 11 +- .../arch/arm/boot/dts/qcom-ipq8064-db149.dts | 6 +- .../arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 29 +- .../arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 9 +- .../arm/boot/dts/qcom-ipq8064-r7500v2.dts | 17 +- .../arm/boot/dts/qcom-ipq8064-vr2600v.dts | 9 +- .../arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 5 +- .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 326 +++++++++--------- .../arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 4 +- .../arch/arm/boot/dts/qcom-ipq8064.dtsi | 82 ++--- .../arm/boot/dts/qcom-ipq8065-nbg6817.dts | 9 +- .../arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 10 +- .../arch/arm/boot/dts/qcom-ipq8065.dtsi | 8 - target/linux/ipq806x/generic/target.mk | 1 - target/linux/ipq806x/image/Makefile | 79 ++--- ...e-scm_call-to-route-GPIO-irq-to-Apps.patch | 6 +- ...d-add-SMEM-parser-for-QCOM-platforms.patch | 2 +- .../0032-phy-add-qcom-dwc3-phy.patch | 4 +- ...Krait-L2-register-accessor-functions.patch | 13 + ...pport-for-High-Frequency-PLLs-HFPLLs.patch | 11 + .../0034-0003-clk-qcom-Add-HFPLL-driver.patch | 12 +- ...t-bindings-clock-Document-qcom-hfpll.patch | 6 + ...lk-qcom-Add-MSM8960-APQ8064-s-HFPLLs.patch | 13 +- ...4-0006-clk-qcom-Add-IPQ806X-s-HFPLLs.patch | 7 +- ...lk-qcom-Add-support-for-Krait-clocks.patch | 13 + ...008-clk-qcom-Add-KPSS-ACC-GCC-driver.patch | 12 +- ...-bindings-arm-Document-qcom-kpss-gcc.patch | 8 + ...om-Add-Krait-clock-controller-driver.patch | 18 +- ...indings-clock-Document-qcom-krait-cc.patch | 6 + ...afe-switch-hook-for-krait-mux-clocks.patch | 19 +- ...le-to-register-cpufreq-on-Krait-CPUs.patch | 10 +- ...cpufreq-qcom-independent-core-clocks.patch | 14 +- ...ow-to-set-regulator-without-opp_list.patch | 6 +- ...rt-adjusting-OPP-voltages-at-runtime.patch | 2 +- ...per-to-get-an-opp-regulator-for-devi.patch | 2 +- ...e-voltage-tolerance-when-adjusting-t.patch | 4 +- ...-dt-Handle-OPP-voltage-adjust-events.patch | 10 +- ...056-cpufreq-dt-Add-missing-rcu-locks.patch | 2 +- ...arch-arm-force-ZRELADDR-on-arch-qcom.patch | 2 +- .../0063-1-ipq806x-tsens-driver.patch | 1 + ...sens-support-configurable-interrupts.patch | 48 +-- .../0063-3-tsens-fix-kernel-4_19.patch | 20 -- .../patches-4.19/0064-clk-clk-rpm-fixes.patch | 4 +- .../0065-arm-override-compiler-flags.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 14 +- .../0069-arm-boot-add-dts-files.patch | 8 +- ...I-qcom-Fixed-IPQ806x-specific-clocks.patch | 12 +- ...com-Fixed-IPQ806x-PCIE-reset-changes.patch | 11 +- ...qcom-Fixed-IPQ806x-PCIE-init-changes.patch | 16 +- ...rogramming-the-PCIE-iATU-for-IPQ806x.patch | 6 +- .../0071-6-PCI-qcom-Force-GEN1-support.patch | 16 +- ...7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch | 6 +- ...qcom-Fixed-pcie_phy_clk-branch-issue.patch | 12 +- ...nge-duplicate-pci-reset-to-phy-reset.patch | 2 +- .../0072-add-ipq806x-with-no-clocks.patch | 4 +- ...e-scm_call-to-route-GPIO-irq-to-Apps.patch | 4 +- ...RM-dts-qcom-add-gpio-ranges-property.patch | 2 +- 82 files changed, 770 insertions(+), 621 deletions(-) delete mode 100755 target/linux/ipq806x/base-files/etc/init.d/bootcount create mode 100755 target/linux/ipq806x/base-files/etc/init.d/linksys_recovery delete mode 100644 target/linux/ipq806x/generic/target.mk delete mode 100644 target/linux/ipq806x/patches-4.19/0063-3-tsens-fix-kernel-4_19.patch diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 24409d671..cd44f76e2 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -9,19 +9,22 @@ FEATURES:=squashfs nand fpu ramdisk CPU_TYPE:=cortex-a15 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin -SUBTARGETS:=generic -KERNEL_PATCHVER:=4.19 +KERNEL_PATCHVER:=4.14 KERNELNAME:=zImage Image dtbs include $(INCLUDE_DIR)/target.mk + +# TODO: 4.19 drops kmod-usb-dwc3-of-simple which is replaced by_kmod-usb-dwc3-qcom +# 4.19 also integrates kmod-usb-phy-qcom-dwc3 DEFAULT_PACKAGES += \ kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \ - kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ - kmod-usb-phy-qcom-dwc3 kmod-usb3 kmod-usb-dwc3-qcom \ - kmod-ath10k-ct wpad-basic \ - uboot-envtools + kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ + kmod-usb3 kmod-usb-dwc3-of-simple kmod-usb-phy-qcom-dwc3 \ + kmod-ath10k wpad \ + uboot-envtools \ + automount autosamba luci-app-ipsec-vpnd luci-app-xlnetacc v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server $(eval $(call BuildTarget)) diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index f8b6c3235..509d334c4 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -22,7 +22,7 @@ compex,wpq864) nec,wg2600hp) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt" - ucidef_set_led_switch "wan" "WAN" "${boardname}:green:active" "switch0" "0x2" + ucidef_set_led_switch "wan" "WAN" "${boardname}:green:active" "switch0" "0x1e" ;; netgear,d7800 |\ netgear,r7500 |\ @@ -30,7 +30,7 @@ netgear,r7500v2 |\ netgear,r7800) ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb1" "usb1-port1" "usb2-port1" ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb2" "usb3-port1" "usb4-port1" - ucidef_set_led_switch "wan" "WAN" "${boardname}:white:wan" "switch0" "0x20" + ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:wan" "eth0" ucidef_set_led_ide "esata" "eSATA" "${boardname}:white:esata" ;; tplink,c2600) diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 6013bb100..e05f2b2c7 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -1,8 +1,78 @@ #!/bin/sh +# xor multiple hex values of the same length +xor() { + local val + local ret="0x$1" + local retlen=${#1} + + shift + while [ -n "$1" ]; do + val="0x$1" + ret=$((ret ^ val)) + shift + done + + printf "%0${retlen}x" "$ret" +} + +ath10kcal_die() { + echo "ath10cal: " "$*" + exit 1 +} + +ath10kcal_from_file() { + local source=$1 + local offset=$2 + local count=$3 + + dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $source" +} + +ath10kcal_extract() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || \ + ath10kcal_die "no mtd device found for partition $part" + + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $mtd" +} + +ath10kcal_patch_mac_crc() { + local mac=$1 + local mac_offset=6 + local chksum_offset=2 + local xor_mac + local xor_fw_mac + local xor_fw_chksum + + [ -z "$mac" ] && return + + xor_fw_mac=$(hexdump -v -n 6 -s $mac_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE) + xor_fw_mac="${xor_fw_mac:0:4} ${xor_fw_mac:4:4} ${xor_fw_mac:8:4}" + + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 + + xor_mac=${mac//:/} + xor_mac="${xor_mac:0:4} ${xor_mac:4:4} ${xor_mac:8:4}" + + xor_fw_chksum=$(hexdump -v -n 2 -s $chksum_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE) + xor_fw_chksum=$(xor $xor_fw_chksum $xor_fw_mac $xor_mac) + + printf "%b" "\x${xor_fw_chksum:0:2}\x${xor_fw_chksum:2:2}" | \ + dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=$chksum_offset count=2 +} + [ -e /lib/firmware/$FIRMWARE ] && exit 0 -. /lib/functions/caldata.sh +. /lib/functions.sh +. /lib/functions/system.sh board=$(board_name) @@ -10,68 +80,68 @@ case "$FIRMWARE" in "ath10k/pre-cal-pci-0000:01:00.0.bin") case $board in buffalo,wxr-2533dhp) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e) + ath10kcal_extract "ART" 4096 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_binary ART 30) ;; linksys,ea8500) - caldata_extract "art" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) + ath10kcal_extract "art" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) ;; nec,wg2600hp) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary PRODUCTDATA 0xc) +1) + ath10kcal_extract "ART" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary PRODUCTDATA 12) +1) ;; netgear,d7800 |\ netgear,r7500v2 |\ netgear,r7800) - caldata_extract "art" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +1) + ath10kcal_extract "art" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 6) +1) ;; tplink,c2600) - caldata_extract "radio" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1) + ath10kcal_extract "radio" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary default-mac 8) -1) ;; tplink,vr2600v) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x0) -1) + ath10kcal_extract "ART" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary default-mac 0) -1) ;; zyxel,nbg6817) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) + ath10kcal_extract "0:ART" 4096 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) ;; esac ;; "ath10k/pre-cal-pci-0001:01:00.0.bin") case $board in buffalo,wxr-2533dhp) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary ART 0x18) + ath10kcal_extract "ART" 20480 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_binary ART 24) ;; linksys,ea8500) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2) + ath10kcal_extract "art" 20480 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2) ;; nec,wg2600hp) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0xc) + ath10kcal_extract "ART" 20480 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_binary PRODUCTDATA 12) ;; netgear,d7800 |\ netgear,r7500v2 |\ netgear,r7800) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +2) + ath10kcal_extract "art" 20480 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 6) +2) ;; tplink,c2600) - caldata_extract "radio" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x8) + ath10kcal_extract "radio" 20480 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_binary default-mac 8) ;; tplink,vr2600v) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x0) + ath10kcal_extract "ART" 20480 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_binary default-mac 0) ;; zyxel,nbg6817) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) + ath10kcal_extract "0:ART" 20480 12064 + ath10kcal_patch_mac_crc $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) ;; esac ;; diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index f0256fd25..4b476e56a 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -13,13 +13,13 @@ OPATH=${DEVPATH##/devices/platform/} OPATH=${OPATH%%/ieee*} # 10 radios is enough for anyone! -for i in $(seq 0 9); +for i in `seq 0 9`; do - BUS=$(uci get wireless.@wifi-device[$i].path) + BUS=`uci get wireless.@wifi-device[$i].path` if [ "$BUS " == "$OPATH " ] then PHYNAME=${DEVPATH##*ieee80211/} - NPHYNAME=$(uci get wireless.@wifi-device[$i].phyname) + NPHYNAME=`uci get wireless.@wifi-device[$i].phyname` if [ "$NPHYNAME " != " " ] then if [ "$PHYNAME " != "$NPHYNAME " ] diff --git a/target/linux/ipq806x/base-files/etc/init.d/bootcount b/target/linux/ipq806x/base-files/etc/init.d/bootcount deleted file mode 100755 index d0bf708e6..000000000 --- a/target/linux/ipq806x/base-files/etc/init.d/bootcount +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 - -boot() { - case $(board_name) in - linksys,ea8500) - mtd resetbc s_env || true - ;; - esac -} diff --git a/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery new file mode 100755 index 000000000..45e73a75d --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=97 +boot() { +. /lib/functions.sh + +case $(board_name) in + linksys,ea8500) + # make sure auto_recovery in uboot is always on + AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" + if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then + fw_setenv auto_recovery yes + fi + # reset the boot counter + mtd resetbc s_env + ;; +esac + +echo 35 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold +echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor +} + diff --git a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh index a957bf114..0234ce0a5 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh @@ -3,47 +3,28 @@ # linksys_get_target_firmware() { - - local cur_boot_part mtd_ubi0 - - cur_boot_part=$(/usr/sbin/fw_printenv -n boot_part) - if [ -z "${cur_boot_part}" ] ; then - mtd_ubi0=$(cat /sys/devices/virtual/ubi/ubi0/mtd_num) - case $(egrep ^mtd${mtd_ubi0}: /proc/mtd | cut -d '"' -f 2) in - kernel1|rootfs1) - cur_boot_part=1 - ;; - kernel2|rootfs2) - cur_boot_part=2 - ;; - esac - >&2 printf "Current boot_part='%s' selected from ubi0/mtd_num='%s'" \ - "${cur_boot_part}" "${mtd_ubi0}" + cur_boot_part=`/usr/sbin/fw_printenv -n boot_part` + target_firmware="" + if [ "$cur_boot_part" = "1" ] + then + # current primary boot - update alt boot + target_firmware="kernel2" + fw_setenv boot_part 2 + #In EA8500 bootcmd is always "bootipq", so don't change + #fw_setenv bootcmd "run altnandboot" + elif [ "$cur_boot_part" = "2" ] + then + # current alt boot - update primary boot + target_firmware="kernel1" + fw_setenv boot_part 1 + #In EA8500 bootcmd is always "bootipq", so don't change + #fw_setenv bootcmd "run nandboot" fi - cur_boot_part=$(/usr/sbin/fw_printenv -n boot_part) + # re-enable recovery so we get back if the new firmware is broken + fw_setenv auto_recovery yes - case $cur_boot_part in - 1) - fw_setenv -s - <<-EOF - boot_part 2 - auto_recovery yes - EOF - printf "kernel2" - return - ;; - 2) - fw_setenv -s - <<-EOF - boot_part 1 - auto_recovery yes - EOF - printf "kernel1" - return - ;; - *) - return - ;; - esac + echo "$target_firmware" } linksys_get_root_magic() { diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index b61047ff7..2f0190629 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -13,7 +13,7 @@ platform_do_upgrade() { buffalo,wxr-2533dhp) buffalo_upgrade_prepare_ubi CI_ROOTPART="ubi_rootfs" - nand_do_upgrade "$1" + nand_do_upgrade "$ARGV" ;; compex,wpq864|\ netgear,d7800 |\ @@ -21,28 +21,34 @@ platform_do_upgrade() { netgear,r7500v2 |\ netgear,r7800 |\ qcom,ipq8064-ap148 |\ - qcom,ipq8064-ap161) - nand_do_upgrade "$1" - ;; + qcom,ipq8064-ap161 |\ zyxel,nbg6817) - zyxel_do_upgrade "$1" + nand_do_upgrade "$ARGV" ;; linksys,ea8500) - platform_do_upgrade_linksys "$1" + platform_do_upgrade_linksys "$ARGV" ;; tplink,c2600) PART_NAME="os-image:rootfs" MTD_CONFIG_ARGS="-s 0x200000" - default_do_upgrade "$1" + default_do_upgrade "$ARGV" ;; tplink,vr2600v) PART_NAME="kernel:rootfs" MTD_CONFIG_ARGS="-s 0x200000" - default_do_upgrade "$1" + default_do_upgrade "$ARGV" ;; nec,wg2600hp |\ *) - default_do_upgrade "$1" + default_do_upgrade "$ARGV" + ;; + esac +} + +platform_nand_pre_upgrade() { + case "$(board_name)" in + zyxel,nbg6817) + zyxel_do_upgrade "$1" ;; esac } diff --git a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh index cece018b3..ba8e82595 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh @@ -60,7 +60,7 @@ zyxel_do_flash() { mkdir /tmp/new_root mount -t ext4 $loopdev /tmp/new_root && { echo "Saving config to rootfs_data at position ${offset}." - cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE" + cp -v /tmp/sysupgrade.tgz /tmp/new_root/ umount /tmp/new_root } @@ -118,7 +118,5 @@ zyxel_do_upgrade() { zyxel_do_flash $tar_file $kernel $rootfs $dualflagmtd - nand_do_upgrade "$1" - return 0 } diff --git a/target/linux/ipq806x/config-4.14 b/target/linux/ipq806x/config-4.14 index 38f5c9450..30736ae14 100644 --- a/target/linux/ipq806x/config-4.14 +++ b/target/linux/ipq806x/config-4.14 @@ -112,10 +112,16 @@ CONFIG_CRC16=y CONFIG_CRC32_SLICEBY8=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_QCE=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HMAC=y @@ -124,12 +130,15 @@ CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_XTS=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_GPIO=y # CONFIG_DEBUG_UART_8250 is not set diff --git a/target/linux/ipq806x/config-4.19 b/target/linux/ipq806x/config-4.19 index 7a06ab908..e85be2076 100644 --- a/target/linux/ipq806x/config-4.19 +++ b/target/linux/ipq806x/config-4.19 @@ -64,7 +64,6 @@ CONFIG_ARM_THUMB=y # CONFIG_ARM_THUMBEE is not set CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y -CONFIG_ARM_MODULE_PLTS=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_MQ_PCI=y CONFIG_BOUNCE=y @@ -117,11 +116,17 @@ CONFIG_CRC32_SLICEBY8=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_QCE=y CONFIG_CRYPTO_DEV_QCOM_RNG=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_HMAC=y @@ -130,12 +135,15 @@ CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_XTS=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_GPIO=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" @@ -268,7 +276,6 @@ CONFIG_MDIO_BITBANG=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_GPIO=y -# CONFIG_MDIO_IPQ8064 is not set # CONFIG_MDM_GCC_9615 is not set # CONFIG_MDM_LCC_9615 is not set CONFIG_MEMFD_CREATE=y @@ -323,8 +330,9 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEON=y CONFIG_NET_DSA=y -CONFIG_NET_DSA_HWMON=y +# CONFIG_NET_DSA_LEGACY is not set CONFIG_NET_DSA_QCA8K=y +# CONFIG_NET_DSA_REALTEK_SMI is not set CONFIG_NET_DSA_TAG_QCA=y # CONFIG_NET_DSA_VITESSE_VSC73XX is not set CONFIG_NET_FLOW_LIMIT=y @@ -352,7 +360,6 @@ CONFIG_OLD_SIGSUSPEND3=y CONFIG_PADATA=y CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_PCI=y -# CONFIG_PCI_V3_SEMI is not set CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y CONFIG_PCIE_DW=y @@ -369,7 +376,7 @@ CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y CONFIG_PHYLINK=y # CONFIG_PHY_QCOM_APQ8064_SATA is not set -# CONFIG_PHY_QCOM_DWC3 is not set +CONFIG_PHY_QCOM_DWC3=y CONFIG_PHY_QCOM_IPQ806X_SATA=y # CONFIG_PHY_QCOM_QMP is not set # CONFIG_PHY_QCOM_QUSB2 is not set @@ -454,6 +461,7 @@ CONFIG_SERIAL_8250_FSL=y # CONFIG_SERIAL_AMBA_PL011 is not set CONFIG_SERIAL_MSM=y CONFIG_SERIAL_MSM_CONSOLE=y +# CONFIG_SFP is not set CONFIG_SGL_ALLOC=y CONFIG_SMP=y CONFIG_SMP_ON_UP=y diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index c4fb2524c..0db451958 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -29,7 +29,6 @@ led-failsafe = &general; led-running = &power; led-upgrade = &general; - label-mac-device = &gmac2; }; chosen { @@ -411,7 +410,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -441,7 +440,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index 1760b1968..14ed6fb2f 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -326,7 +326,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -350,7 +350,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index ca8376afd..900d602ed 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -39,6 +39,10 @@ soc { pinmux@800000 { + + pinctrl-0 = <&switch_reset>; + pinctrl-names = "default"; + button_pins: button_pins { mux { pins = "gpio65", "gpio67", "gpio68"; @@ -66,6 +70,16 @@ }; }; + switch_reset: switch_reset_pins { + mux { + pins = "gpio63"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + mdio0_pins: mdio0_pins { mux { pins = "gpio0", "gpio1"; @@ -164,10 +178,6 @@ status = "ok"; }; - pcie2: pci@1b900000 { - status = "ok"; - }; - nand@1ac00000 { status = "ok"; @@ -351,7 +361,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -375,7 +385,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; @@ -398,3 +408,5 @@ }; }; +/delete-node/ &pcie2_pins; +/delete-node/ &pcie2; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index b6505dd54..5a3056807 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -295,7 +295,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -319,7 +319,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index faec8b35a..1005ea137 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -257,7 +257,13 @@ ubi@1880000 { label = "ubi"; - reg = <0x1880000 0x6080000>; + reg = <0x1880000 0x1C00000>; + }; + + netgear@3480000 { + label = "netgear"; + reg = <0x3480000 0x4480000>; + read-only; }; reserve@7900000 { @@ -325,7 +331,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -349,7 +355,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 2c224016b..56421b25e 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -323,7 +323,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -359,7 +359,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index e2a481723..881b54220 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -94,7 +94,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 14258d594..591f3539f 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -151,7 +151,7 @@ reg = <0x1340000 0x4000000>; }; - BOOTCONFIG@5340000 { + BOOTCONFIG@1340000 { label = "BOOTCONFIG"; reg = <0x5340000 0x0060000>; }; @@ -246,7 +246,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; @@ -294,7 +294,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi index 8387460d2..df09b9970 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -860,8 +860,6 @@ compatible = "qcom,ipq806x-ahci", "generic-ahci"; reg = <0x29000000 0x180>; - ports-implemented = <0x1>; - interrupts = <0 209 0x0>; clocks = <&gcc SFAB_SATA_S_H_CLK>, @@ -961,7 +959,7 @@ }; usb3_0: usb30@0 { - compatible = "qcom,dwc3"; + compatible = "qcom,dwc3-ipq8064", "qcom,dwc3"; #address-cells = <1>; #size-cells = <1>; clocks = <&gcc USB30_0_MASTER_CLK>; @@ -986,7 +984,7 @@ }; usb3_1: usb30@1 { - compatible = "qcom,dwc3"; + compatible = "qcom,dwc3-ipq8064", "qcom,dwc3"; #address-cells = <1>; #size-cells = <1>; clocks = <&gcc USB30_1_MASTER_CLK>; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 7cd1c7b56..dd06fccd1 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -324,7 +324,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -349,7 +349,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 447c0da69..c4c928794 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -34,7 +34,6 @@ led-failsafe = &power_amber; led-running = &power_white; led-upgrade = &power_amber; - label-mac-device = &gmac2; }; chosen { @@ -425,7 +424,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; pinctrl-names = "default"; @@ -455,7 +454,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&led_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 8ef5b92b5..c8f188473 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -2,7 +2,7 @@ / { model = "Qualcomm Technologies, Inc. IPQ8064/AP-148"; - compatible = "qcom,ipq8064-ap148", "qcom,ipq8064"; + compatible = "qcom,ipq8064-ap148"; memory@0 { reg = <0x42000000 0x1e000000>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts index 6a16167e1..f1f50f0e0 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ap161.dts @@ -2,7 +2,7 @@ / { model = "Qualcomm IPQ8064/AP161"; - compatible = "qcom,ipq8064-ap161", "qcom,ipq8064"; + compatible = "qcom,ipq8064-ap161"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -140,11 +140,11 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index d90518bf2..6e3b5f0cc 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -4,7 +4,7 @@ / { model = "TP-Link Archer C2600"; - compatible = "tplink,c2600", "qcom,ipq8064"; + compatible = "tplink,c2600"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -29,7 +29,6 @@ led-failsafe = &general; led-running = &power; led-upgrade = &general; - label-mac-device = &gmac2; }; chosen { @@ -315,14 +314,14 @@ }; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pin>; pinctrl-names = "default"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pin>; @@ -342,8 +341,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; @@ -477,3 +475,4 @@ &adm_dma { status = "okay"; }; + diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index ac1a96589..e187c3e42 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -4,7 +4,7 @@ / { model = "Netgear Nighthawk X4 D7800"; - compatible = "netgear,d7800", "qcom,ipq8064"; + compatible = "netgear,d7800"; memory@0 { reg = <0x42000000 0xe000000>; @@ -152,14 +152,14 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; @@ -190,7 +190,7 @@ #address-cells = <1>; #size-cells = <0>; - cs0 { + flash@0 { reg = <0>; compatible = "qcom,nandcs"; @@ -262,8 +262,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts index 5da523a72..491c37cf2 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -2,7 +2,7 @@ / { model = "Qualcomm IPQ8064/DB149"; - compatible = "qcom,ipq8064-db149", "qcom,ipq8064"; + compatible = "qcom,ipq8064-db149"; reserved-memory { #address-cells = <1>; @@ -123,11 +123,11 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index 6f54e19da..e5f95ab85 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -4,7 +4,7 @@ / { model = "Linksys EA8500 WiFi Router"; - compatible = "linksys,ea8500", "qcom,ipq8064"; + compatible = "linksys,ea8500"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -39,6 +39,10 @@ soc { pinmux@800000 { + + pinctrl-0 = <&switch_reset>; + pinctrl-names = "default"; + button_pins: button_pins { mux { pins = "gpio65", "gpio67", "gpio68"; @@ -66,6 +70,16 @@ }; }; + switch_reset: switch_reset_pins { + mux { + pins = "gpio63"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + mdio0_pins: mdio0_pins { mux { pins = "gpio0", "gpio1"; @@ -131,11 +145,11 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; }; @@ -148,10 +162,6 @@ status = "okay"; }; - pcie2: pci@1b900000 { - status = "okay"; - }; - nand@1ac00000 { status = "okay"; @@ -278,8 +288,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; @@ -383,3 +392,5 @@ }; }; +/delete-node/ &pcie2_pins; +/delete-node/ &pcie2; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 8130b583d..c21abb90c 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -5,7 +5,7 @@ / { model = "Netgear Nighthawk X4 R7500"; - compatible = "netgear,r7500", "qcom,ipq8064"; + compatible = "netgear,r7500"; memory@0 { reg = <0x42000000 0xe000000>; @@ -132,12 +132,12 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { clocks = <&gcc USB30_1_MASTER_CLK>; status = "okay"; }; - usb3_1: usb3@100f8800 { + usb30@1 { clocks = <&gcc USB30_0_MASTER_CLK>; status = "okay"; }; @@ -223,8 +223,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 21287ef9d..b02f86404 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -4,7 +4,7 @@ / { model = "Netgear Nighthawk X4 R7500v2"; - compatible = "netgear,r7500v2", "qcom,ipq8064"; + compatible = "netgear,r7500v2"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -156,14 +156,14 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; @@ -241,7 +241,13 @@ ubi@1880000 { label = "ubi"; - reg = <0x1880000 0x6080000>; + reg = <0x1880000 0x1C00000>; + }; + + netgear@3480000 { + label = "netgear"; + reg = <0x3480000 0x4480000>; + read-only; }; reserve@7900000 { @@ -257,8 +263,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index bdcd30280..989d0c3c0 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -4,7 +4,7 @@ / { model = "TP-Link Archer VR2600v"; - compatible = "tplink,vr2600v", "qcom,ipq8064"; + compatible = "tplink,vr2600v"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -233,11 +233,11 @@ }; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; }; @@ -254,8 +254,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index 6667b1f47..c7bbea2d2 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -4,7 +4,7 @@ / { model = "NEC Aterm WG2600HP"; - compatible = "nec,wg2600hp", "qcom,ipq8064"; + compatible = "nec,wg2600hp"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -40,8 +40,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 280dc8856..95f51939d 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: BSD-3-Clause /* * BSD LICENSE * @@ -37,7 +38,7 @@ #include / { - compatible = "compex,wpq864", "qcom,ipq8064"; + compatible = "compex,wpq864"; model = "Compex WPQ864"; aliases { @@ -61,160 +62,6 @@ pinctrl-0 = <&rpm_pins>; pinctrl-names = "default"; }; - - nand@1ac00000 { - status = "okay"; - - pinctrl-0 = <&nand_pins>; - pinctrl-names = "default"; - - mt29f2g08abbeah4@0 { - compatible = "qcom,nandcs"; - - reg = <0>; - - nand-ecc-strength = <4>; - nand-bus-width = <8>; - nand-ecc-step-size = <512>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - SBL1@0 { - label = "SBL1"; - reg = <0x0000000 0x0040000>; - read-only; - }; - - MIBIB@40000 { - label = "MIBIB"; - reg = <0x0040000 0x0140000>; - read-only; - }; - - SBL2@180000 { - label = "SBL2"; - reg = <0x0180000 0x0140000>; - read-only; - }; - - SBL3@2c0000 { - label = "SBL3"; - reg = <0x02c0000 0x0280000>; - read-only; - }; - - DDRCONFIG@540000 { - label = "DDRCONFIG"; - reg = <0x0540000 0x0120000>; - read-only; - }; - - SSD@660000 { - label = "SSD"; - reg = <0x0660000 0x0120000>; - read-only; - }; - - TZ@780000 { - label = "TZ"; - reg = <0x0780000 0x0280000>; - read-only; - }; - - RPM@a00000 { - label = "RPM"; - reg = <0x0a00000 0x0280000>; - read-only; - }; - - APPSBL@c80000 { - label = "APPSBL"; - reg = <0x0c80000 0x0500000>; - read-only; - }; - - APPSBLENV@1180000 { - label = "APPSBLENV"; - reg = <0x1180000 0x0080000>; - }; - - ART@1200000 { - label = "ART"; - reg = <0x1200000 0x0140000>; - }; - - ubi@1340000 { - label = "ubi"; - reg = <0x1340000 0x4000000>; - }; - - BOOTCONFIG@5340000 { - label = "BOOTCONFIG"; - reg = <0x5340000 0x0060000>; - }; - - SBL2-1@53a0000- { - label = "SBL2_1"; - reg = <0x53a0000 0x0140000>; - read-only; - }; - - SBL3-1@54e0000 { - label = "SBL3_1"; - reg = <0x54e0000 0x0280000>; - read-only; - }; - - DDRCONFIG-1@5760000 { - label = "DDRCONFIG_1"; - reg = <0x5760000 0x0120000>; - read-only; - }; - - SSD-1@5880000 { - label = "SSD_1"; - reg = <0x5880000 0x0120000>; - read-only; - }; - - TZ-1@59a0000 { - label = "TZ_1"; - reg = <0x59a0000 0x0280000>; - read-only; - }; - - RPM-1@5c20000 { - label = "RPM_1"; - reg = <0x5c20000 0x0280000>; - read-only; - }; - - BOOTCONFIG1@5ea0000 { - label = "BOOTCONFIG1"; - reg = <0x5ea0000 0x0060000>; - }; - - APPSBL-1@5f00000 { - label = "APPSBL_1"; - reg = <0x5f00000 0x0500000>; - read-only; - }; - - ubi-1@6400000 { - label = "ubi_1"; - reg = <0x6400000 0x4000000>; - }; - - unused@a400000 { - label = "unused"; - reg = <0xa400000 0x5c00000>; - }; - }; - }; - }; }; mdio0: mdio { @@ -384,22 +231,6 @@ }; }; -&ss_phy_0 { /* USB3 port 0 SS phy */ - status = "okay"; - - rx_eq = <2>; - tx_deamp_3_5db = <32>; - mpll = <160>; -}; - -&ss_phy_1 { /* USB3 port 1 SS phy */ - status = "okay"; - - rx_eq = <2>; - tx_deamp_3_5db = <32>; - mpll = <160>; -}; - &pcie0 { status = "okay"; @@ -559,3 +390,156 @@ &tcsr { qcom,usb-ctrl-select = ; }; + +&nand { + status = "okay"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + flash@0 { + compatible = "qcom,nandcs"; + reg = <0>; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + SBL1@0 { + label = "SBL1"; + reg = <0x0000000 0x0040000>; + read-only; + }; + + MIBIB@40000 { + label = "MIBIB"; + reg = <0x0040000 0x0140000>; + read-only; + }; + + SBL2@180000 { + label = "SBL2"; + reg = <0x0180000 0x0140000>; + read-only; + }; + + SBL3@2c0000 { + label = "SBL3"; + reg = <0x02c0000 0x0280000>; + read-only; + }; + + DDRCONFIG@540000 { + label = "DDRCONFIG"; + reg = <0x0540000 0x0120000>; + read-only; + }; + + SSD@660000 { + label = "SSD"; + reg = <0x0660000 0x0120000>; + read-only; + }; + + TZ@780000 { + label = "TZ"; + reg = <0x0780000 0x0280000>; + read-only; + }; + + RPM@a00000 { + label = "RPM"; + reg = <0x0a00000 0x0280000>; + read-only; + }; + + APPSBL@c80000 { + label = "APPSBL"; + reg = <0x0c80000 0x0500000>; + read-only; + }; + + APPSBLENV@1180000 { + label = "APPSBLENV"; + reg = <0x1180000 0x0080000>; + }; + + ART@1200000 { + label = "ART"; + reg = <0x1200000 0x0140000>; + }; + + ubi@1340000 { + label = "ubi"; + reg = <0x1340000 0x4000000>; + }; + + BOOTCONFIG@1340000 { + label = "BOOTCONFIG"; + reg = <0x5340000 0x0060000>; + }; + + SBL2-1@53a0000- { + label = "SBL2_1"; + reg = <0x53a0000 0x0140000>; + read-only; + }; + + SBL3-1@54e0000 { + label = "SBL3_1"; + reg = <0x54e0000 0x0280000>; + read-only; + }; + + DDRCONFIG-1@5760000 { + label = "DDRCONFIG_1"; + reg = <0x5760000 0x0120000>; + read-only; + }; + + SSD-1@5880000 { + label = "SSD_1"; + reg = <0x5880000 0x0120000>; + read-only; + }; + + TZ-1@59a0000 { + label = "TZ_1"; + reg = <0x59a0000 0x0280000>; + read-only; + }; + + RPM-1@5c20000 { + label = "RPM_1"; + reg = <0x5c20000 0x0280000>; + read-only; + }; + + BOOTCONFIG1@5ea0000 { + label = "BOOTCONFIG1"; + reg = <0x5ea0000 0x0060000>; + }; + + APPSBL-1@5f00000 { + label = "APPSBL_1"; + reg = <0x5f00000 0x0500000>; + read-only; + }; + + ubi-1@6400000 { + label = "ubi_1"; + reg = <0x6400000 0x4000000>; + }; + + unused@a400000 { + label = "unused"; + reg = <0xa400000 0x5c00000>; + }; + }; + }; +}; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index 12cfa3b0f..6aa32b1bd 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -5,7 +5,7 @@ / { model = "Buffalo WXR-2533DHP"; - compatible = "buffalo,wxr-2533dhp", "qcom,ipq8064"; + compatible = "buffalo,wxr-2533dhp"; memory@42000000 { reg = <0x42000000 0x1e000000>; @@ -516,4 +516,4 @@ output-high; }; }; -}; \ No newline at end of file +}; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi index 5cb4a5e78..2a6bd2521 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /dts-v1/; #include "skeleton.dtsi" @@ -50,7 +51,6 @@ clock-names = "cpu", "l2"; clock-latency = <100000>; cpu-supply = <&smb208_s2b>; - voltage-tolerance = <5>; cooling-min-state = <0>; cooling-max-state = <10>; #cooling-cells = <2>; @@ -71,7 +71,6 @@ CPU_SPC: spc { compatible = "qcom,idle-state-spc", "arm,idle-state"; - status = "okay"; entry-latency-us = <400>; exit-latency-us = <900>; min-residency-us = <3000>; @@ -697,7 +696,7 @@ timer@200a000 { compatible = "qcom,kpss-timer", - "qcom,kpss-wdt-ipq8064", "qcom,msm-timer"; + "qcom,kpss-wdt-ipq8064", "qcom,msm-timer"; interrupts = , , <0x02009000 0x1000>; regulator; }; saw1: regulator@2099000 { - compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon"; + compatible = "qcom,saw2", "syscon"; reg = <0x02099000 0x1000>, <0x02009000 0x1000>; regulator; }; @@ -920,8 +919,6 @@ compatible = "qcom,ipq806x-ahci", "generic-ahci"; reg = <0x29000000 0x180>; - ports-implemented = <0x1>; - interrupts = ; clocks = <&gcc SFAB_SATA_S_H_CLK>, @@ -980,22 +977,6 @@ reg = <0x01200600 0x100>; }; - hs_phy_0: hs_phy_0 { - compatible = "qcom,dwc3-hs-usb-phy"; - regmap = <&usb3_0>; - clocks = <&gcc USB30_0_UTMI_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - }; - - ss_phy_0: ss_phy_0 { - compatible = "qcom,dwc3-ss-usb-phy"; - regmap = <&usb3_0>; - clocks = <&gcc USB30_0_MASTER_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - }; - usb3_0: usb3@110f8800 { compatible = "qcom,dwc3", "syscon"; #address-cells = <1>; @@ -1011,6 +992,22 @@ status = "disabled"; + hs_phy_0: hs_phy { + compatible = "qcom,dwc3-hs-usb-phy"; + regmap = <&usb3_0>; + clocks = <&gcc USB30_0_UTMI_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + + ss_phy_0: ss_phy { + compatible = "qcom,dwc3-ss-usb-phy"; + regmap = <&usb3_0>; + clocks = <&gcc USB30_0_MASTER_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + dwc3_0: dwc3@11000000 { compatible = "snps,dwc3"; reg = <0x11000000 0xcd00>; @@ -1022,22 +1019,6 @@ }; }; - hs_phy_1: hs_phy_1 { - compatible = "qcom,dwc3-hs-usb-phy"; - regmap = <&usb3_1>; - clocks = <&gcc USB30_1_UTMI_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - }; - - ss_phy_1: ss_phy_1 { - compatible = "qcom,dwc3-ss-usb-phy"; - regmap = <&usb3_1>; - clocks = <&gcc USB30_1_MASTER_CLK>; - clock-names = "ref"; - #phy-cells = <0>; - }; - usb3_1: usb3@100f8800 { compatible = "qcom,dwc3", "syscon"; #address-cells = <1>; @@ -1053,6 +1034,22 @@ status = "disabled"; + hs_phy_1: hs_phy { + compatible = "qcom,dwc3-hs-usb-phy"; + regmap = <&usb3_1>; + clocks = <&gcc USB30_1_UTMI_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + + ss_phy_1: ss_phy { + compatible = "qcom,dwc3-ss-usb-phy"; + regmap = <&usb3_1>; + clocks = <&gcc USB30_1_MASTER_CLK>; + clock-names = "ref"; + #phy-cells = <0>; + }; + dwc3_1: dwc3@10000000 { compatible = "snps,dwc3"; reg = <0x10000000 0xcd00>; @@ -1282,7 +1279,6 @@ }; gmac0: ethernet@37000000 { - device_type = "network"; compatible = "qcom,ipq806x-gmac"; reg = <0x37000000 0x200000>; interrupts = ; @@ -1305,7 +1301,6 @@ }; gmac1: ethernet@37200000 { - device_type = "network"; compatible = "qcom,ipq806x-gmac"; reg = <0x37200000 0x200000>; interrupts = ; @@ -1328,7 +1323,6 @@ }; gmac2: ethernet@37400000 { - device_type = "network"; compatible = "qcom,ipq806x-gmac"; reg = <0x37400000 0x200000>; interrupts = ; @@ -1351,7 +1345,6 @@ }; gmac3: ethernet@37600000 { - device_type = "network"; compatible = "qcom,ipq806x-gmac"; reg = <0x37600000 0x200000>; interrupts = ; @@ -1403,10 +1396,11 @@ }; amba { - compatible = "arm,amba-bus"; + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges; + sdcc1: sdcc@12400000 { status = "disabled"; compatible = "arm,pl18x", "arm,primecell"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 378ea775b..2a9f82ff1 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -4,7 +4,7 @@ / { model = "ZyXEL NBG6817"; - compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064"; + compatible = "zyxel,nbg6817"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -189,14 +189,14 @@ }; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; @@ -222,8 +222,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 6a1d016f7..0bc6853ac 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -4,7 +4,7 @@ / { model = "Netgear Nighthawk X4S R7800"; - compatible = "netgear,r7800", "qcom,ipq8065", "qcom,ipq8064"; + compatible = "netgear,r7800"; memory@0 { reg = <0x42000000 0x1e000000>; @@ -34,7 +34,6 @@ led-failsafe = &power_amber; led-running = &power_white; led-upgrade = &power_amber; - label-mac-device = &gmac2; }; chosen { @@ -225,14 +224,14 @@ status = "okay"; }; - usb3_0: usb3@110f8800 { + usb30@0 { status = "okay"; pinctrl-0 = <&usb0_pwr_en_pins>; pinctrl-names = "default"; }; - usb3_1: usb3@100f8800 { + usb30@1 { status = "okay"; pinctrl-0 = <&usb1_pwr_en_pins>; @@ -350,8 +349,7 @@ compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065.dtsi index d18aea4c5..86de2bd8b 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -75,12 +75,4 @@ }; }; }; - - cpus { - idle-states { - CPU_SPC: spc { - status = "disabled"; - }; - }; - }; }; diff --git a/target/linux/ipq806x/generic/target.mk b/target/linux/ipq806x/generic/target.mk deleted file mode 100644 index f5cb1fb19..000000000 --- a/target/linux/ipq806x/generic/target.mk +++ /dev/null @@ -1 +0,0 @@ -BOARDNAME:=Generic diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 81f14b475..b3f4ca76f 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -82,8 +82,7 @@ endef define Device/buffalo_wxr-2533dhp $(call Device/LegacyImage) DEVICE_DTS := qcom-ipq8064-wxr-2533dhp - DEVICE_VENDOR := Buffalo - DEVICE_MODEL := WXR-2533DHP + DEVICE_TITLE := Buffalo WXR-2533DHP BLOCKSIZE := 128k PAGESIZE := 2048 IMAGE_SIZE := 65536k @@ -91,26 +90,23 @@ define Device/buffalo_wxr-2533dhp IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \ sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += buffalo_wxr-2533dhp define Device/compex_wpq864 $(call Device/FitImage) $(call Device/UbiFit) - DEVICE_VENDOR := Compex - DEVICE_MODEL := WPQ864 BLOCKSIZE := 128k PAGESIZE := 2048 DEVICE_DTS := qcom-ipq8064-wpq864 + DEVICE_TITLE := Compex WPQ864 DEVICE_PACKAGES := kmod-gpio-beeper endef TARGET_DEVICES += compex_wpq864 define Device/linksys_ea8500 $(call Device/LegacyImage) - DEVICE_VENDOR := Linksys - DEVICE_MODEL := EA8500 DEVICE_DTS := qcom-ipq8064-ea8500 PAGESIZE := 2048 BLOCKSIZE := 128k @@ -121,27 +117,25 @@ define Device/linksys_ea8500 UBINIZE_OPTS := -E 5 IMAGES := factory.bin sysupgrade.bin IMAGE/factory.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-ubi - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Linksys EA8500 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += linksys_ea8500 define Device/nec_wg2600hp $(call Device/LegacyImage) - DEVICE_VENDOR := NEC - DEVICE_MODEL := Aterm WG2600HP DEVICE_DTS := qcom-ipq8064-wg2600hp BLOCKSIZE := 64k BOARD_NAME := wg2600hp + DEVICE_TITLE := NEC Aterm WG2600HP IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += nec_wg2600hp define Device/netgear_d7800 $(call Device/DniImage) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := Nighthawk X4 D7800 DEVICE_DTS := qcom-ipq8064-d7800 KERNEL_SIZE := 4096k NETGEAR_BOARD_ID := D7800 @@ -150,15 +144,13 @@ define Device/netgear_d7800 PAGESIZE := 2048 BOARD_NAME := d7800 SUPPORTED_DEVICES += d7800 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Netgear Nighthawk X4 D7800 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += netgear_d7800 define Device/netgear_r7500 $(call Device/DniImage) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := Nighthawk X4 R7500 - DEVICE_VARIANT := v1 DEVICE_DTS := qcom-ipq8064-r7500 KERNEL_SIZE := 4096k NETGEAR_BOARD_ID := R7500 @@ -167,15 +159,13 @@ define Device/netgear_r7500 PAGESIZE := 2048 BOARD_NAME := r7500 SUPPORTED_DEVICES += r7500 - DEVICE_PACKAGES := ath10k-firmware-qca988x-ct + DEVICE_TITLE := Netgear Nighthawk X4 R7500 + DEVICE_PACKAGES := ath10k-firmware-qca988x endef TARGET_DEVICES += netgear_r7500 define Device/netgear_r7500v2 $(call Device/DniImage) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := Nighthawk X4 R7500 - DEVICE_VARIANT := v2 DEVICE_DTS := qcom-ipq8064-r7500v2 KERNEL_SIZE := 4096k NETGEAR_BOARD_ID := R7500v2 @@ -184,14 +174,13 @@ define Device/netgear_r7500v2 PAGESIZE := 2048 BOARD_NAME := r7500v2 SUPPORTED_DEVICES += r7500v2 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct ath10k-firmware-qca988x-ct + DEVICE_TITLE := Netgear Nighthawk X4 R7500v2 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 ath10k-firmware-qca988x endef TARGET_DEVICES += netgear_r7500v2 define Device/netgear_r7800 $(call Device/DniImage) - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := Nighthawk X4S R7800 DEVICE_DTS := qcom-ipq8065-r7800 KERNEL_SIZE := 4096k NETGEAR_BOARD_ID := R7800 @@ -200,85 +189,75 @@ define Device/netgear_r7800 PAGESIZE := 2048 BOARD_NAME := r7800 SUPPORTED_DEVICES += r7800 - DEVICE_PACKAGES := ath10k-firmware-qca9984-ct + DEVICE_TITLE := Netgear Nighthawk X4S R7800 + DEVICE_PACKAGES := ath10k-firmware-qca9984 endef TARGET_DEVICES += netgear_r7800 define Device/qcom_ipq8064-ap148 $(call Device/FitImage) $(call Device/UbiFit) - DEVICE_VENDOR := Qualcomm - DEVICE_MODEL := AP148 - DEVICE_VARIANT := standard DEVICE_DTS := qcom-ipq8064-ap148 KERNEL_INSTALL := 1 BLOCKSIZE := 128k PAGESIZE := 2048 BOARD_NAME := ap148 SUPPORTED_DEVICES += ap148 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Qualcomm AP148 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += qcom_ipq8064-ap148 define Device/qcom_ipq8064-ap148-legacy $(call Device/LegacyImage) $(call Device/UbiFit) - DEVICE_VENDOR := Qualcomm - DEVICE_MODEL := AP148 - DEVICE_VARIANT := legacy DEVICE_DTS := qcom-ipq8064-ap148 BLOCKSIZE := 128k PAGESIZE := 2048 BOARD_NAME := ap148 SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Qualcomm AP148 (legacy) + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += qcom_ipq8064-ap148-legacy define Device/qcom_ipq8064-ap161 $(call Device/FitImage) $(call Device/UbiFit) - DEVICE_VENDOR := Qualcomm - DEVICE_MODEL := AP161 DEVICE_DTS := qcom-ipq8064-ap161 KERNEL_INSTALL := 1 BLOCKSIZE := 128k PAGESIZE := 2048 BOARD_NAME := ap161 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Qualcomm AP161 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += qcom_ipq8064-ap161 define Device/qcom_ipq8064-db149 $(call Device/FitImage) - DEVICE_VENDOR := Qualcomm - DEVICE_MODEL := DB149 DEVICE_DTS := qcom-ipq8064-db149 KERNEL_INSTALL := 1 BOARD_NAME := db149 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := Qualcomm DB149 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += qcom_ipq8064-db149 define Device/tplink_c2600 $(call Device/TpSafeImage) - DEVICE_VENDOR := TP-Link - DEVICE_MODEL := Archer C2600 - DEVICE_VARIANT := v1 DEVICE_DTS := qcom-ipq8064-c2600 BLOCKSIZE := 128k PAGESIZE := 2048 BOARD_NAME := c2600 SUPPORTED_DEVICES += c2600 TPLINK_BOARD_ID := C2600 - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := TP-Link Archer C2600 + DEVICE_PACKAGES := ath10k-firmware-qca99x0 endef TARGET_DEVICES += tplink_c2600 define Device/tplink_vr2600v - DEVICE_VENDOR := TP-Link - DEVICE_MODEL := Archer VR2600v - DEVICE_VARIANT := v1 KERNEL_SUFFIX := -uImage KERNEL = kernel-bin | append-dtb | uImage none KERNEL_NAME := zImage @@ -288,15 +267,14 @@ define Device/tplink_vr2600v PAGESIZE := 2048 BOARD_NAME := vr2600v SUPPORTED_DEVICES += vr2600v - DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct + DEVICE_TITLE := TP-Link Archer VR2600v + DEVICE_PACKAGES := ath10k-firmware-qca99x0 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata endef TARGET_DEVICES += tplink_vr2600v define Device/zyxel_nbg6817 - DEVICE_VENDOR := ZyXEL - DEVICE_MODEL := NBG6817 DEVICE_DTS := qcom-ipq8065-nbg6817 KERNEL_SIZE := 4096k BLOCKSIZE := 64k @@ -305,7 +283,8 @@ define Device/zyxel_nbg6817 RAS_ROOTFS_SIZE := 20934k RAS_VERSION := "V1.99(OWRT.9999)C0" SUPPORTED_DEVICES += nbg6817 - DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup + DEVICE_TITLE := ZyXEL NBG6817 + DEVICE_PACKAGES := ath10k-firmware-qca9984 e2fsprogs kmod-fs-ext4 losetup $(call Device/ZyXELImage) endef TARGET_DEVICES += zyxel_nbg6817 diff --git a/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch index f57773ef4..150768645 100644 --- a/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ b/target/linux/ipq806x/patches-4.14/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -171,9 +171,9 @@ Signed-off-by: Ajay Kishore +extern s32 qcom_scm_pinmux_read(u32 arg1); +extern s32 qcom_scm_pinmux_write(u32 arg1, u32 arg2); #else - - #include -@@ -76,5 +78,7 @@ qcom_scm_set_remote_state(u32 state,u32 + static inline + int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) +@@ -73,5 +75,7 @@ qcom_scm_set_remote_state(u32 state,u32 static inline int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) { return -ENODEV; } static inline int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) { return -ENODEV; } static inline int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) { return -ENODEV; } diff --git a/target/linux/ipq806x/patches-4.19/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch b/target/linux/ipq806x/patches-4.19/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch index a7e95513f..a7cfac544 100644 --- a/target/linux/ipq806x/patches-4.19/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch +++ b/target/linux/ipq806x/patches-4.19/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch @@ -18,7 +18,7 @@ Signed-off-by: Ram Chandra Jangir --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -193,6 +193,13 @@ config MTD_MYLOADER_PARTS +@@ -194,6 +194,13 @@ config MTD_MYLOADER_PARTS You will still need the parsing functions to be called by the driver for your particular device. It won't happen automatically. diff --git a/target/linux/ipq806x/patches-4.19/0032-phy-add-qcom-dwc3-phy.patch b/target/linux/ipq806x/patches-4.19/0032-phy-add-qcom-dwc3-phy.patch index 0de0878f8..397054d4c 100644 --- a/target/linux/ipq806x/patches-4.19/0032-phy-add-qcom-dwc3-phy.patch +++ b/target/linux/ipq806x/patches-4.19/0032-phy-add-qcom-dwc3-phy.patch @@ -8,7 +8,7 @@ Signed-off-by: Andy Gross --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig -@@ -65,3 +65,15 @@ config PHY_QCOM_USB_HSIC +@@ -56,3 +56,15 @@ config PHY_QCOM_USB_HSIC select GENERIC_PHY help Support for the USB HSIC ULPI compliant PHY on QCOM chipsets. @@ -26,7 +26,7 @@ Signed-off-by: Andy Gross + --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile -@@ -9,3 +9,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom- +@@ -8,3 +8,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom- obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-20nm.o obj-$(CONFIG_PHY_QCOM_USB_HS) += phy-qcom-usb-hs.o obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o diff --git a/target/linux/ipq806x/patches-4.19/0034-0001-ARM-Add-Krait-L2-register-accessor-functions.patch b/target/linux/ipq806x/patches-4.19/0034-0001-ARM-Add-Krait-L2-register-accessor-functions.patch index 68acbeeec..0a6fa0660 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0001-ARM-Add-Krait-L2-register-accessor-functions.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0001-ARM-Add-Krait-L2-register-accessor-functions.patch @@ -28,6 +28,8 @@ Signed-off-by: Stephen Boyd create mode 100644 arch/arm/common/krait-l2-accessors.c create mode 100644 arch/arm/include/asm/krait-l2-accessors.h +diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig +index e5ad0708849a..c8e198631d41 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig @@ -7,6 +7,9 @@ config DMABOUNCE @@ -40,6 +42,8 @@ Signed-off-by: Stephen Boyd config SHARP_LOCOMO bool +diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile +index 3157be413297..219a260bbe5f 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile @@ -7,6 +7,7 @@ obj-y += firmware.o @@ -50,6 +54,9 @@ Signed-off-by: Stephen Boyd obj-$(CONFIG_SHARP_LOCOMO) += locomo.o obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o obj-$(CONFIG_SHARP_SCOOP) += scoop.o +diff --git a/arch/arm/common/krait-l2-accessors.c b/arch/arm/common/krait-l2-accessors.c +new file mode 100644 +index 000000000000..9a97ddadecd6 --- /dev/null +++ b/arch/arm/common/krait-l2-accessors.c @@ -0,0 +1,48 @@ @@ -101,6 +108,9 @@ Signed-off-by: Stephen Boyd + return val; +} +EXPORT_SYMBOL(krait_get_l2_indirect_reg); +diff --git a/arch/arm/include/asm/krait-l2-accessors.h b/arch/arm/include/asm/krait-l2-accessors.h +new file mode 100644 +index 000000000000..a5f2cdd6445f --- /dev/null +++ b/arch/arm/include/asm/krait-l2-accessors.h @@ -0,0 +1,9 @@ @@ -113,3 +123,6 @@ Signed-off-by: Stephen Boyd +extern u32 krait_get_l2_indirect_reg(u32 addr); + +#endif +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0002-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch b/target/linux/ipq806x/patches-4.19/0034-0002-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch index d43d0c89b..b4a7411a9 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0002-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0002-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch @@ -18,6 +18,8 @@ Signed-off-by: Stephen Boyd create mode 100644 drivers/clk/qcom/clk-hfpll.c create mode 100644 drivers/clk/qcom/clk-hfpll.h +diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile +index 21a45035930d..7818e6c78413 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -11,6 +11,7 @@ clk-qcom-y += clk-branch.o @@ -28,6 +30,9 @@ Signed-off-by: Stephen Boyd clk-qcom-y += reset.o clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o +diff --git a/drivers/clk/qcom/clk-hfpll.c b/drivers/clk/qcom/clk-hfpll.c +new file mode 100644 +index 000000000000..3c04805f2a55 --- /dev/null +++ b/drivers/clk/qcom/clk-hfpll.c @@ -0,0 +1,244 @@ @@ -275,6 +280,9 @@ Signed-off-by: Stephen Boyd + .init = clk_hfpll_init, +}; +EXPORT_SYMBOL_GPL(clk_ops_hfpll); +diff --git a/drivers/clk/qcom/clk-hfpll.h b/drivers/clk/qcom/clk-hfpll.h +new file mode 100644 +index 000000000000..2a57b2fb2f2f --- /dev/null +++ b/drivers/clk/qcom/clk-hfpll.h @@ -0,0 +1,44 @@ @@ -322,3 +330,6 @@ Signed-off-by: Stephen Boyd +extern const struct clk_ops clk_ops_hfpll; + +#endif +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0003-clk-qcom-Add-HFPLL-driver.patch b/target/linux/ipq806x/patches-4.19/0034-0003-clk-qcom-Add-HFPLL-driver.patch index 292eb66d6..24b61b083 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0003-clk-qcom-Add-HFPLL-driver.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0003-clk-qcom-Add-HFPLL-driver.patch @@ -20,6 +20,8 @@ Signed-off-by: Stephen Boyd 3 files changed, 105 insertions(+) create mode 100644 drivers/clk/qcom/hfpll.c +diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig +index 064768699fe7..21aec1048225 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -272,3 +272,11 @@ config SPMI_PMIC_CLKDIV @@ -34,13 +36,18 @@ Signed-off-by: Stephen Boyd + Support for the high-frequency PLLs present on Qualcomm devices. + Say Y if you want to support CPU frequency scaling on devices + such as MSM8974, APQ8084, etc. +diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile +index 7818e6c78413..f82eeaca278e 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile -@@ -44,3 +44,4 @@ obj-$(CONFIG_SDM_DISPCC_845) += dispcc-s +@@ -44,3 +44,4 @@ obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o +obj-$(CONFIG_QCOM_HFPLL) += hfpll.o +diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c +new file mode 100644 +index 000000000000..a6de7101430c --- /dev/null +++ b/drivers/clk/qcom/hfpll.c @@ -0,0 +1,96 @@ @@ -140,3 +147,6 @@ Signed-off-by: Stephen Boyd +MODULE_DESCRIPTION("QCOM HFPLL Clock Driver"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:qcom-hfpll"); +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0004-dt-bindings-clock-Document-qcom-hfpll.patch b/target/linux/ipq806x/patches-4.19/0034-0004-dt-bindings-clock-Document-qcom-hfpll.patch index 1db989f6d..559e5f5a5 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0004-dt-bindings-clock-Document-qcom-hfpll.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0004-dt-bindings-clock-Document-qcom-hfpll.patch @@ -16,6 +16,9 @@ Signed-off-by: Stephen Boyd 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,hfpll.txt +diff --git a/Documentation/devicetree/bindings/clock/qcom,hfpll.txt b/Documentation/devicetree/bindings/clock/qcom,hfpll.txt +new file mode 100644 +index 000000000000..ec02a024424c --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,hfpll.txt @@ -0,0 +1,60 @@ @@ -79,3 +82,6 @@ Signed-off-by: Stephen Boyd + clock-names = "xo"; + clock-output-names = "hfpll0"; + }; +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0005-clk-qcom-Add-MSM8960-APQ8064-s-HFPLLs.patch b/target/linux/ipq806x/patches-4.19/0034-0005-clk-qcom-Add-MSM8960-APQ8064-s-HFPLLs.patch index 5ed5625f2..3bc256fa5 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0005-clk-qcom-Add-MSM8960-APQ8064-s-HFPLLs.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0005-clk-qcom-Add-MSM8960-APQ8064-s-HFPLLs.patch @@ -15,6 +15,8 @@ Signed-off-by: Stephen Boyd include/dt-bindings/clock/qcom,gcc-msm8960.h | 2 + 2 files changed, 174 insertions(+) +diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c +index fd495e0471bb..399474755654 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -30,6 +30,7 @@ @@ -190,7 +192,7 @@ Signed-off-by: Stephen Boyd static struct clk_pll pll14 = { .l_reg = 0x31c4, .m_reg = 0x31c8, -@@ -3107,6 +3266,9 @@ static struct clk_regmap *gcc_msm8960_cl +@@ -3107,6 +3266,9 @@ static struct clk_regmap *gcc_msm8960_clks[] = { [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr, [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr, [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr, @@ -200,7 +202,7 @@ Signed-off-by: Stephen Boyd }; static const struct qcom_reset_map gcc_msm8960_resets[] = { -@@ -3318,6 +3480,11 @@ static struct clk_regmap *gcc_apq8064_cl +@@ -3318,6 +3480,11 @@ static struct clk_regmap *gcc_apq8064_clks[] = { [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr, [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr, [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr, @@ -212,7 +214,7 @@ Signed-off-by: Stephen Boyd }; static const struct qcom_reset_map gcc_apq8064_resets[] = { -@@ -3477,6 +3644,11 @@ static int gcc_msm8960_probe(struct plat +@@ -3477,6 +3644,11 @@ static int gcc_msm8960_probe(struct platform_device *pdev) if (ret) return ret; @@ -224,6 +226,8 @@ Signed-off-by: Stephen Boyd tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1, NULL, 0); if (IS_ERR(tsens)) +diff --git a/include/dt-bindings/clock/qcom,gcc-msm8960.h b/include/dt-bindings/clock/qcom,gcc-msm8960.h +index 7d20eedfee98..e02742fc81cc 100644 --- a/include/dt-bindings/clock/qcom,gcc-msm8960.h +++ b/include/dt-bindings/clock/qcom,gcc-msm8960.h @@ -319,5 +319,7 @@ @@ -234,3 +238,6 @@ Signed-off-by: Stephen Boyd +#define PLL17 307 #endif +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0006-clk-qcom-Add-IPQ806X-s-HFPLLs.patch b/target/linux/ipq806x/patches-4.19/0034-0006-clk-qcom-Add-IPQ806X-s-HFPLLs.patch index 74c66178a..33911c671 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0006-clk-qcom-Add-IPQ806X-s-HFPLLs.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0006-clk-qcom-Add-IPQ806X-s-HFPLLs.patch @@ -13,6 +13,8 @@ Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq806x.c | 82 ++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) +diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c +index 5f61225657ab..33d1bc5c6a46 100644 --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c @@ -30,6 +30,7 @@ @@ -108,7 +110,7 @@ Signed-off-by: Stephen Boyd static struct clk_pll pll14 = { .l_reg = 0x31c4, .m_reg = 0x31c8, -@@ -2798,6 +2877,9 @@ static struct clk_regmap *gcc_ipq806x_cl +@@ -2797,6 +2876,9 @@ static struct clk_regmap *gcc_ipq806x_clks[] = { [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, [NSSTCM_CLK] = &nss_tcm_clk.clkr, @@ -118,3 +120,6 @@ Signed-off-by: Stephen Boyd }; static const struct qcom_reset_map gcc_ipq806x_resets[] = { +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0007-clk-qcom-Add-support-for-Krait-clocks.patch b/target/linux/ipq806x/patches-4.19/0034-0007-clk-qcom-Add-support-for-Krait-clocks.patch index 181b91f6e..bfca13dde 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0007-clk-qcom-Add-support-for-Krait-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0007-clk-qcom-Add-support-for-Krait-clocks.patch @@ -24,6 +24,8 @@ Signed-off-by: Stephen Boyd create mode 100644 drivers/clk/qcom/clk-krait.c create mode 100644 drivers/clk/qcom/clk-krait.h +diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig +index 21aec1048225..93f1342f1949 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -1,3 +1,7 @@ @@ -34,6 +36,8 @@ Signed-off-by: Stephen Boyd config QCOM_GDSC bool select PM_GENERIC_DOMAINS if PM +diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile +index f82eeaca278e..506c4cfd775f 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -11,6 +11,7 @@ clk-qcom-y += clk-branch.o @@ -44,6 +48,9 @@ Signed-off-by: Stephen Boyd clk-qcom-y += clk-hfpll.o clk-qcom-y += reset.o clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o +diff --git a/drivers/clk/qcom/clk-krait.c b/drivers/clk/qcom/clk-krait.c +new file mode 100644 +index 000000000000..2e417678029f --- /dev/null +++ b/drivers/clk/qcom/clk-krait.c @@ -0,0 +1,124 @@ @@ -171,6 +178,9 @@ Signed-off-by: Stephen Boyd + .recalc_rate = krait_div2_recalc_rate, +}; +EXPORT_SYMBOL_GPL(krait_div2_clk_ops); +diff --git a/drivers/clk/qcom/clk-krait.h b/drivers/clk/qcom/clk-krait.h +new file mode 100644 +index 000000000000..441ba1e18b81 --- /dev/null +++ b/drivers/clk/qcom/clk-krait.h @@ -0,0 +1,37 @@ @@ -211,3 +221,6 @@ Signed-off-by: Stephen Boyd +extern const struct clk_ops krait_div2_clk_ops; + +#endif +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0008-clk-qcom-Add-KPSS-ACC-GCC-driver.patch b/target/linux/ipq806x/patches-4.19/0034-0008-clk-qcom-Add-KPSS-ACC-GCC-driver.patch index aa19ea2e3..9ce63d2de 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0008-clk-qcom-Add-KPSS-ACC-GCC-driver.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0008-clk-qcom-Add-KPSS-ACC-GCC-driver.patch @@ -20,6 +20,8 @@ Signed-off-by: Stephen Boyd 3 files changed, 96 insertions(+) create mode 100644 drivers/clk/qcom/kpss-xcc.c +diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig +index 93f1342f1949..bed7ef4f51a2 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -284,3 +284,11 @@ config QCOM_HFPLL @@ -34,14 +36,19 @@ Signed-off-by: Stephen Boyd + Support for the Krait ACC and GCC clock controllers. Say Y + if you want to support CPU frequency scaling on devices such + as MSM8960, APQ8064, etc. +diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile +index 506c4cfd775f..92310ee33e9e 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile -@@ -45,4 +45,5 @@ obj-$(CONFIG_SDM_DISPCC_845) += dispcc-s +@@ -45,4 +45,5 @@ obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o +obj-$(CONFIG_KPSS_XCC) += kpss-xcc.o obj-$(CONFIG_QCOM_HFPLL) += hfpll.o +diff --git a/drivers/clk/qcom/kpss-xcc.c b/drivers/clk/qcom/kpss-xcc.c +new file mode 100644 +index 000000000000..8590b5edd19d --- /dev/null +++ b/drivers/clk/qcom/kpss-xcc.c @@ -0,0 +1,87 @@ @@ -132,3 +139,6 @@ Signed-off-by: Stephen Boyd +MODULE_DESCRIPTION("Krait Processor Sub System (KPSS) Clock Driver"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:kpss-xcc"); +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0009-dt-bindings-arm-Document-qcom-kpss-gcc.patch b/target/linux/ipq806x/patches-4.19/0034-0009-dt-bindings-arm-Document-qcom-kpss-gcc.patch index 6af40895b..804b67efd 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0009-dt-bindings-arm-Document-qcom-kpss-gcc.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0009-dt-bindings-arm-Document-qcom-kpss-gcc.patch @@ -18,6 +18,8 @@ Signed-off-by: Stephen Boyd 2 files changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt +diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt +index 1333db9acfee..7f696362a4a1 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt @@ -21,10 +21,29 @@ PROPERTIES @@ -50,6 +52,9 @@ Signed-off-by: Stephen Boyd + clock-names = "pll8_vote", "pxo"; + clock-output-names = "acpu0_aux"; }; +diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt +new file mode 100644 +index 000000000000..e628758950e1 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt @@ -0,0 +1,44 @@ @@ -97,3 +102,6 @@ Signed-off-by: Stephen Boyd + clock-names = "pll8_vote", "pxo"; + clock-output-names = "acpu_l2_aux"; + }; +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0010-clk-qcom-Add-Krait-clock-controller-driver.patch b/target/linux/ipq806x/patches-4.19/0034-0010-clk-qcom-Add-Krait-clock-controller-driver.patch index 7ee1f50f4..06738b649 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0010-clk-qcom-Add-Krait-clock-controller-driver.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0010-clk-qcom-Add-Krait-clock-controller-driver.patch @@ -22,6 +22,8 @@ Signed-off-by: Stephen Boyd 4 files changed, 352 insertions(+), 2 deletions(-) create mode 100644 drivers/clk/qcom/krait-cc.c +diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig +index bed7ef4f51a2..646bc38d2993 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -292,3 +292,11 @@ config KPSS_XCC @@ -36,16 +38,20 @@ Signed-off-by: Stephen Boyd + help + Support for the Krait CPU clocks on Qualcomm devices. + Say Y if you want to support CPU frequency scaling. +diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile +index 92310ee33e9e..949829b18813 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile -@@ -47,3 +47,4 @@ obj-$(CONFIG_SDM_VIDEOCC_845) += videocc +@@ -47,3 +47,4 @@ obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o obj-$(CONFIG_KPSS_XCC) += kpss-xcc.o obj-$(CONFIG_QCOM_HFPLL) += hfpll.o +obj-$(CONFIG_KRAITCC) += krait-cc.o +diff --git a/drivers/clk/qcom/clk-krait.c b/drivers/clk/qcom/clk-krait.c +index 2e417678029f..7ede744c6a14 100644 --- a/drivers/clk/qcom/clk-krait.c +++ b/drivers/clk/qcom/clk-krait.c -@@ -44,7 +44,7 @@ static int krait_mux_set_parent(struct c +@@ -44,7 +44,7 @@ static int krait_mux_set_parent(struct clk_hw *hw, u8 index) struct krait_mux_clk *mux = to_krait_mux_clk(hw); u32 sel; @@ -54,7 +60,7 @@ Signed-off-by: Stephen Boyd mux->en_mask = sel; /* Don't touch mux if CPU is off as it won't work */ if (__clk_is_enabled(hw->clk)) -@@ -63,7 +63,7 @@ static u8 krait_mux_get_parent(struct cl +@@ -63,7 +63,7 @@ static u8 krait_mux_get_parent(struct clk_hw *hw) sel &= mux->mask; mux->en_mask = sel; @@ -63,6 +69,9 @@ Signed-off-by: Stephen Boyd } const struct clk_ops krait_mux_clk_ops = { +diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c +new file mode 100644 +index 000000000000..7c9dfb032065 --- /dev/null +++ b/drivers/clk/qcom/krait-cc.c @@ -0,0 +1,341 @@ @@ -407,3 +416,6 @@ Signed-off-by: Stephen Boyd +MODULE_DESCRIPTION("Krait CPU Clock Driver"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:krait-cc"); +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0011-dt-bindings-clock-Document-qcom-krait-cc.patch b/target/linux/ipq806x/patches-4.19/0034-0011-dt-bindings-clock-Document-qcom-krait-cc.patch index 13e05c425..efbe91bd0 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0011-dt-bindings-clock-Document-qcom-krait-cc.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0011-dt-bindings-clock-Document-qcom-krait-cc.patch @@ -16,6 +16,9 @@ Signed-off-by: Stephen Boyd 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.txt +diff --git a/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt b/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt +new file mode 100644 +index 000000000000..030ba60dab08 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt @@ -0,0 +1,34 @@ @@ -53,3 +56,6 @@ Signed-off-by: Stephen Boyd + clock-names = "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb"; + #clock-cells = <1>; + }; +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0034-0012-clk-qcom-Add-safe-switch-hook-for-krait-mux-clocks.patch b/target/linux/ipq806x/patches-4.19/0034-0012-clk-qcom-Add-safe-switch-hook-for-krait-mux-clocks.patch index 847b4809a..7456d14fe 100644 --- a/target/linux/ipq806x/patches-4.19/0034-0012-clk-qcom-Add-safe-switch-hook-for-krait-mux-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0034-0012-clk-qcom-Add-safe-switch-hook-for-krait-mux-clocks.patch @@ -20,9 +20,11 @@ Signed-off-by: Stephen Boyd drivers/clk/qcom/krait-cc.c | 56 ++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) +diff --git a/drivers/clk/qcom/clk-krait.c b/drivers/clk/qcom/clk-krait.c +index 7ede744c6a14..59f1af415b58 100644 --- a/drivers/clk/qcom/clk-krait.c +++ b/drivers/clk/qcom/clk-krait.c -@@ -50,6 +50,8 @@ static int krait_mux_set_parent(struct c +@@ -50,6 +50,8 @@ static int krait_mux_set_parent(struct clk_hw *hw, u8 index) if (__clk_is_enabled(hw->clk)) __krait_mux_set_sel(mux, sel); @@ -31,6 +33,8 @@ Signed-off-by: Stephen Boyd return 0; } +diff --git a/drivers/clk/qcom/clk-krait.h b/drivers/clk/qcom/clk-krait.h +index 441ba1e18b81..9120bd2f5297 100644 --- a/drivers/clk/qcom/clk-krait.h +++ b/drivers/clk/qcom/clk-krait.h @@ -12,6 +12,9 @@ struct krait_mux_clk { @@ -43,6 +47,8 @@ Signed-off-by: Stephen Boyd struct clk_hw hw; struct notifier_block clk_nb; +diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c +index 7c9dfb032065..4d4b657d33c3 100644 --- a/drivers/clk/qcom/krait-cc.c +++ b/drivers/clk/qcom/krait-cc.c @@ -26,6 +26,49 @@ static unsigned int pri_mux_map[] = { @@ -103,7 +109,7 @@ Signed-off-by: Stephen Boyd struct krait_mux_clk *mux; static const char *sec_mux_list[] = { "acpu_aux", -@@ -93,6 +137,7 @@ krait_add_sec_mux(struct device *dev, in +@@ -93,6 +137,7 @@ krait_add_sec_mux(struct device *dev, int id, const char *s, mux->shift = 2; mux->parent_map = sec_mux_map; mux->hw.init = &init; @@ -111,7 +117,7 @@ Signed-off-by: Stephen Boyd init.name = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s); if (!init.name) -@@ -108,6 +153,11 @@ krait_add_sec_mux(struct device *dev, in +@@ -108,6 +153,11 @@ krait_add_sec_mux(struct device *dev, int id, const char *s, clk = devm_clk_register(dev, &mux->hw); @@ -131,7 +137,7 @@ Signed-off-by: Stephen Boyd struct krait_mux_clk *mux; const char *p_names[3]; struct clk_init_data init = { -@@ -139,6 +190,7 @@ krait_add_pri_mux(struct device *dev, in +@@ -139,6 +190,7 @@ krait_add_pri_mux(struct device *dev, int id, const char *s, mux->lpl = id >= 0; mux->parent_map = pri_mux_map; mux->hw.init = &init; @@ -139,7 +145,7 @@ Signed-off-by: Stephen Boyd init.name = kasprintf(GFP_KERNEL, "krait%s_pri_mux", s); if (!init.name) -@@ -164,6 +216,10 @@ krait_add_pri_mux(struct device *dev, in +@@ -164,6 +216,10 @@ krait_add_pri_mux(struct device *dev, int id, const char *s, clk = devm_clk_register(dev, &mux->hw); @@ -150,3 +156,6 @@ Signed-off-by: Stephen Boyd kfree(p_names[2]); err_p2: kfree(p_names[1]); +-- +2.20.1 + diff --git a/target/linux/ipq806x/patches-4.19/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch b/target/linux/ipq806x/patches-4.19/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch index 5b081feac..d07ea5c59 100644 --- a/target/linux/ipq806x/patches-4.19/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch +++ b/target/linux/ipq806x/patches-4.19/0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch @@ -72,9 +72,9 @@ Signed-off-by: Stephen Boyd + }; --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm -@@ -121,6 +121,15 @@ config ARM_QCOM_CPUFREQ_KRYO - - If in doubt, say N. +@@ -100,6 +100,15 @@ config ARM_OMAP2PLUS_CPUFREQ + depends on ARCH_OMAP2PLUS + default ARCH_OMAP2PLUS +config ARM_QCOM_CPUFREQ + tristate "Qualcomm based" @@ -90,14 +90,14 @@ Signed-off-by: Stephen Boyd help --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile -@@ -64,6 +64,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) += mvebu-cp +@@ -62,6 +62,7 @@ obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ) += me obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o +obj-$(CONFIG_ARM_QCOM_CPUFREQ) += qcom-cpufreq.o obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) += qcom-cpufreq-kryo.o obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o - obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o + obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq-debugfs.o --- /dev/null +++ b/drivers/cpufreq/qcom-cpufreq.c @@ -0,0 +1,204 @@ diff --git a/target/linux/ipq806x/patches-4.19/0046-cpufreq-qcom-independent-core-clocks.patch b/target/linux/ipq806x/patches-4.19/0046-cpufreq-qcom-independent-core-clocks.patch index 7743dd1c4..b3b3072bc 100644 --- a/target/linux/ipq806x/patches-4.19/0046-cpufreq-qcom-independent-core-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0046-cpufreq-qcom-independent-core-clocks.patch @@ -28,7 +28,7 @@ Signed-off-by: Sricharan R --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -239,7 +239,10 @@ static int cpufreq_init(struct cpufreq_p +@@ -231,7 +231,10 @@ static int cpufreq_init(struct cpufreq_p } if (fallback) { @@ -40,9 +40,9 @@ Signed-off-by: Sricharan R /* * OPP tables are initialized only for policy->cpu, do it for -@@ -359,6 +362,8 @@ static int dt_cpufreq_probe(struct platf - dt_cpufreq_driver.suspend = data->suspend; - } +@@ -376,6 +379,8 @@ static int dt_cpufreq_probe(struct platf + if (data && data->have_governor_per_policy) + dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY; + dt_cpufreq_driver.driver_data = data; + @@ -51,8 +51,8 @@ Signed-off-by: Sricharan R dev_err(&pdev->dev, "failed register driver: %d\n", ret); --- a/drivers/cpufreq/cpufreq-dt.h +++ b/drivers/cpufreq/cpufreq-dt.h -@@ -15,6 +15,12 @@ - struct cpufreq_policy; +@@ -13,6 +13,12 @@ + #include struct cpufreq_dt_platform_data { + /* @@ -62,5 +62,5 @@ Signed-off-by: Sricharan R + */ + bool independent_clocks; bool have_governor_per_policy; + }; - int (*suspend)(struct cpufreq_policy *policy); diff --git a/target/linux/ipq806x/patches-4.19/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch b/target/linux/ipq806x/patches-4.19/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch index d415f7b74..24e74b069 100644 --- a/target/linux/ipq806x/patches-4.19/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch +++ b/target/linux/ipq806x/patches-4.19/0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch @@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -1317,11 +1317,13 @@ struct opp_table *dev_pm_opp_set_regulat +@@ -1277,11 +1277,13 @@ struct opp_table *dev_pm_opp_set_regulat if (!opp_table) return ERR_PTR(-ENOMEM); @@ -22,5 +22,5 @@ Signed-off-by: Georgi Djakov } +#endif - /* Another CPU that shares the OPP table has set the regulators ? */ - if (opp_table->regulators) + /* Already have regulators set */ + if (opp_table->regulators) { diff --git a/target/linux/ipq806x/patches-4.19/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-4.19/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index 1a0e50d3d..929dbc444 100644 --- a/target/linux/ipq806x/patches-4.19/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-4.19/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -27,7 +27,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -1625,6 +1625,83 @@ put_table: +@@ -1605,6 +1605,83 @@ put_table: } /** diff --git a/target/linux/ipq806x/patches-4.19/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch b/target/linux/ipq806x/patches-4.19/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch index 4312db905..0edc6ac75 100644 --- a/target/linux/ipq806x/patches-4.19/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch +++ b/target/linux/ipq806x/patches-4.19/0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch @@ -12,7 +12,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -125,6 +125,27 @@ unsigned long dev_pm_opp_get_freq(struct +@@ -126,6 +126,27 @@ unsigned long dev_pm_opp_get_freq(struct } EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq); diff --git a/target/linux/ipq806x/patches-4.19/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-4.19/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index 2882f505d..059e332e5 100644 --- a/target/linux/ipq806x/patches-4.19/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-4.19/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -1669,6 +1669,7 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -1649,6 +1649,7 @@ int dev_pm_opp_adjust_voltage(struct dev struct opp_table *opp_table; struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV); int r = 0; @@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov /* keep the node allocated */ new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); -@@ -1705,6 +1706,10 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -1685,6 +1686,10 @@ int dev_pm_opp_adjust_voltage(struct dev /* plug in new node */ new_opp->supplies[0].u_volt = u_volt; diff --git a/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch b/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch index 5a4232ded..e85b8c593 100644 --- a/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch +++ b/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch @@ -35,7 +35,7 @@ Signed-off-by: Georgi Djakov bool have_static_opps; }; -@@ -47,12 +50,15 @@ static int set_target(struct cpufreq_pol +@@ -47,12 +47,15 @@ static int set_target(struct cpufreq_pol unsigned long freq = policy->freq_table[index].frequency; int ret; @@ -51,7 +51,7 @@ Signed-off-by: Georgi Djakov return ret; } -@@ -95,6 +101,39 @@ node_put: +@@ -87,6 +97,39 @@ node_put: return name; } @@ -91,7 +91,7 @@ Signed-off-by: Georgi Djakov static int resources_available(void) { struct device *cpu_dev; -@@ -161,6 +200,7 @@ static int cpufreq_init(struct cpufreq_p +@@ -153,6 +196,7 @@ static int cpufreq_init(struct cpufreq_p bool fallback = false; const char *name; int ret; @@ -99,7 +99,7 @@ Signed-off-by: Georgi Djakov cpu_dev = get_cpu_device(policy->cpu); if (!cpu_dev) { -@@ -254,10 +294,13 @@ static int cpufreq_init(struct cpufreq_p +@@ -246,10 +290,13 @@ static int cpufreq_init(struct cpufreq_p __func__, ret); } @@ -114,7 +114,7 @@ Signed-off-by: Georgi Djakov } priv->cpu_dev = cpu_dev; -@@ -287,6 +330,8 @@ static int cpufreq_init(struct cpufreq_p +@@ -285,6 +332,8 @@ static int cpufreq_init(struct cpufreq_p out_free_cpufreq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); diff --git a/target/linux/ipq806x/patches-4.19/0056-cpufreq-dt-Add-missing-rcu-locks.patch b/target/linux/ipq806x/patches-4.19/0056-cpufreq-dt-Add-missing-rcu-locks.patch index 4925efabe..d9d76e409 100644 --- a/target/linux/ipq806x/patches-4.19/0056-cpufreq-dt-Add-missing-rcu-locks.patch +++ b/target/linux/ipq806x/patches-4.19/0056-cpufreq-dt-Add-missing-rcu-locks.patch @@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c -@@ -146,8 +146,10 @@ static int opp_notifier(struct notifier_ +@@ -144,8 +144,10 @@ static int opp_notifier(struct notifier_ ret = PTR_ERR(cpu_reg); goto out; } diff --git a/target/linux/ipq806x/patches-4.19/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-4.19/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch index 543f18ce4..f810f6ac4 100644 --- a/target/linux/ipq806x/patches-4.19/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch +++ b/target/linux/ipq806x/patches-4.19/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch @@ -33,7 +33,7 @@ Signed-off-by: Mathieu Olivari --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -331,7 +331,7 @@ config ARCH_MULTIPLATFORM +@@ -341,7 +341,7 @@ config ARCH_MULTIPLATFORM depends on MMU select ARM_HAS_SG_CHAIN select ARM_PATCH_PHYS_VIRT diff --git a/target/linux/ipq806x/patches-4.19/0063-1-ipq806x-tsens-driver.patch b/target/linux/ipq806x/patches-4.19/0063-1-ipq806x-tsens-driver.patch index 9ee88533a..89d9ba8d5 100644 --- a/target/linux/ipq806x/patches-4.19/0063-1-ipq806x-tsens-driver.patch +++ b/target/linux/ipq806x/patches-4.19/0063-1-ipq806x-tsens-driver.patch @@ -612,3 +612,4 @@ Signed-off-by: Rajith Cherian /* TSENS v2 targets */ extern const struct tsens_data data_8996, data_tsens_v2; + diff --git a/target/linux/ipq806x/patches-4.19/0063-2-tsens-support-configurable-interrupts.patch b/target/linux/ipq806x/patches-4.19/0063-2-tsens-support-configurable-interrupts.patch index 62e26cbee..af21e4fb3 100644 --- a/target/linux/ipq806x/patches-4.19/0063-2-tsens-support-configurable-interrupts.patch +++ b/target/linux/ipq806x/patches-4.19/0063-2-tsens-support-configurable-interrupts.patch @@ -23,7 +23,7 @@ Signed-off-by: Rajith Cherian --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c -@@ -77,7 +77,7 @@ static int of_thermal_get_temp(struct th +@@ -95,7 +95,7 @@ static int of_thermal_get_temp(struct th { struct __thermal_zone *data = tz->devdata; @@ -32,7 +32,7 @@ Signed-off-by: Rajith Cherian return -EINVAL; return data->ops->get_temp(data->sensor_data, temp); -@@ -88,7 +88,8 @@ static int of_thermal_set_trips(struct t +@@ -106,7 +106,8 @@ static int of_thermal_set_trips(struct t { struct __thermal_zone *data = tz->devdata; @@ -42,7 +42,7 @@ Signed-off-by: Rajith Cherian return -EINVAL; return data->ops->set_trips(data->sensor_data, low, high); -@@ -174,6 +175,9 @@ static int of_thermal_set_emul_temp(stru +@@ -192,6 +193,9 @@ static int of_thermal_set_emul_temp(stru { struct __thermal_zone *data = tz->devdata; @@ -52,7 +52,7 @@ Signed-off-by: Rajith Cherian return data->ops->set_emul_temp(data->sensor_data, temp); } -@@ -182,7 +186,7 @@ static int of_thermal_get_trend(struct t +@@ -200,7 +204,7 @@ static int of_thermal_get_trend(struct t { struct __thermal_zone *data = tz->devdata; @@ -61,7 +61,7 @@ Signed-off-by: Rajith Cherian return -EINVAL; return data->ops->get_trend(data->sensor_data, trip, trend); -@@ -271,7 +275,9 @@ static int of_thermal_set_mode(struct th +@@ -289,7 +293,9 @@ static int of_thermal_set_mode(struct th mutex_unlock(&tz->lock); data->mode = mode; @@ -72,7 +72,7 @@ Signed-off-by: Rajith Cherian return 0; } -@@ -281,7 +287,8 @@ static int of_thermal_get_trip_type(stru +@@ -299,7 +305,8 @@ static int of_thermal_get_trip_type(stru { struct __thermal_zone *data = tz->devdata; @@ -82,7 +82,7 @@ Signed-off-by: Rajith Cherian return -EDOM; *type = data->trips[trip].type; -@@ -289,12 +296,39 @@ static int of_thermal_get_trip_type(stru +@@ -307,12 +314,39 @@ static int of_thermal_get_trip_type(stru return 0; } @@ -123,7 +123,7 @@ Signed-off-by: Rajith Cherian return -EDOM; *temp = data->trips[trip].temperature; -@@ -307,7 +341,8 @@ static int of_thermal_set_trip_temp(stru +@@ -325,7 +359,8 @@ static int of_thermal_set_trip_temp(stru { struct __thermal_zone *data = tz->devdata; @@ -133,7 +133,7 @@ Signed-off-by: Rajith Cherian return -EDOM; if (data->ops->set_trip_temp) { -@@ -329,7 +364,8 @@ static int of_thermal_get_trip_hyst(stru +@@ -347,7 +382,8 @@ static int of_thermal_get_trip_hyst(stru { struct __thermal_zone *data = tz->devdata; @@ -143,7 +143,7 @@ Signed-off-by: Rajith Cherian return -EDOM; *hyst = data->trips[trip].hysteresis; -@@ -342,7 +378,8 @@ static int of_thermal_set_trip_hyst(stru +@@ -360,7 +396,8 @@ static int of_thermal_set_trip_hyst(stru { struct __thermal_zone *data = tz->devdata; @@ -153,7 +153,7 @@ Signed-off-by: Rajith Cherian return -EDOM; /* thermal framework should take care of data->mask & (1 << trip) */ -@@ -417,6 +454,9 @@ thermal_zone_of_add_sensor(struct device +@@ -435,6 +472,9 @@ thermal_zone_of_add_sensor(struct device if (ops->set_emul_temp) tzd->ops->set_emul_temp = of_thermal_set_emul_temp; @@ -163,7 +163,7 @@ Signed-off-by: Rajith Cherian mutex_unlock(&tzd->lock); return tzd; -@@ -711,7 +751,10 @@ static const char * const trip_types[] = +@@ -729,7 +769,10 @@ static const char * const trip_types[] = [THERMAL_TRIP_ACTIVE] = "active", [THERMAL_TRIP_PASSIVE] = "passive", [THERMAL_TRIP_HOT] = "hot", @@ -243,7 +243,7 @@ Signed-off-by: Rajith Cherian static SIMPLE_DEV_PM_OPS(tsens_pm_ops, tsens_suspend, tsens_resume); static const struct of_device_id tsens_table[] = { -@@ -86,6 +112,8 @@ MODULE_DEVICE_TABLE(of, tsens_table); +@@ -83,6 +109,8 @@ MODULE_DEVICE_TABLE(of, tsens_table); static const struct thermal_zone_of_device_ops tsens_of_ops = { .get_temp = tsens_get_temp, .get_trend = tsens_get_trend, @@ -252,18 +252,18 @@ Signed-off-by: Rajith Cherian }; static int tsens_register(struct tsens_device *tmdev) -@@ -134,7 +162,7 @@ static int tsens_probe(struct platform_d +@@ -131,7 +159,7 @@ static int tsens_probe(struct platform_d if (id) data = id->data; else - data = &data_8960; + return -EINVAL; - num_sensors = data->num_sensors; - -@@ -155,6 +183,9 @@ static int tsens_probe(struct platform_d + if (data->num_sensors <= 0) { + dev_err(dev, "invalid number of sensors\n"); +@@ -146,6 +174,9 @@ static int tsens_probe(struct platform_d tmdev->dev = dev; - tmdev->num_sensors = num_sensors; + tmdev->num_sensors = data->num_sensors; tmdev->ops = data->ops; + + tmdev->tsens_irq = platform_get_irq(pdev, 0); @@ -321,7 +321,7 @@ Signed-off-by: Rajith Cherian --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c -@@ -113,12 +113,48 @@ trip_point_type_show(struct device *dev, +@@ -115,12 +115,48 @@ trip_point_type_show(struct device *dev, return sprintf(buf, "passive\n"); case THERMAL_TRIP_ACTIVE: return sprintf(buf, "active\n"); @@ -370,7 +370,7 @@ Signed-off-by: Rajith Cherian trip_point_temp_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { -@@ -559,6 +595,12 @@ static int create_trip_attrs(struct ther +@@ -562,6 +598,12 @@ static int create_trip_attrs(struct ther tz->trip_type_attrs[indx].attr.show = trip_point_type_show; attrs[indx] = &tz->trip_type_attrs[indx].attr.attr; @@ -385,7 +385,7 @@ Signed-off-by: Rajith Cherian "trip_point_%d_temp", indx); --- a/include/linux/thermal.h +++ b/include/linux/thermal.h -@@ -63,11 +63,19 @@ enum thermal_device_mode { +@@ -78,11 +78,19 @@ enum thermal_device_mode { THERMAL_DEVICE_ENABLED, }; @@ -405,7 +405,7 @@ Signed-off-by: Rajith Cherian }; enum thermal_trend { -@@ -105,6 +113,8 @@ struct thermal_zone_device_ops { +@@ -120,6 +128,8 @@ struct thermal_zone_device_ops { enum thermal_trip_type *); int (*get_trip_temp) (struct thermal_zone_device *, int, int *); int (*set_trip_temp) (struct thermal_zone_device *, int, int); @@ -414,7 +414,7 @@ Signed-off-by: Rajith Cherian int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); int (*set_trip_hyst) (struct thermal_zone_device *, int, int); int (*get_crit_temp) (struct thermal_zone_device *, int *); -@@ -349,6 +359,8 @@ struct thermal_genl_event { +@@ -363,6 +373,8 @@ struct thermal_genl_event { * temperature. * @set_trip_temp: a pointer to a function that sets the trip temperature on * hardware. @@ -423,7 +423,7 @@ Signed-off-by: Rajith Cherian */ struct thermal_zone_of_device_ops { int (*get_temp)(void *, int *); -@@ -356,6 +368,8 @@ struct thermal_zone_of_device_ops { +@@ -370,6 +382,8 @@ struct thermal_zone_of_device_ops { int (*set_trips)(void *, int, int); int (*set_emul_temp)(void *, int); int (*set_trip_temp)(void *, int, int); diff --git a/target/linux/ipq806x/patches-4.19/0063-3-tsens-fix-kernel-4_19.patch b/target/linux/ipq806x/patches-4.19/0063-3-tsens-fix-kernel-4_19.patch deleted file mode 100644 index a87069290..000000000 --- a/target/linux/ipq806x/patches-4.19/0063-3-tsens-fix-kernel-4_19.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drivers/thermal/qcom/tsens-common.c -+++ b/drivers/thermal/qcom/tsens-common.c -@@ -128,6 +128,7 @@ int __init init_common(struct tsens_devi - { - void __iomem *base; - struct resource *res; -+ resource_size_t size; - struct platform_device *op = of_find_device_by_node(tmdev->dev->of_node); - - if (!op) -@@ -142,7 +143,8 @@ int __init init_common(struct tsens_devi - } - - res = platform_get_resource(op, IORESOURCE_MEM, 0); -- base = devm_ioremap_resource(&op->dev, res); -+ size = resource_size(res); -+ base = devm_ioremap(&op->dev, res->start, size); - if (IS_ERR(base)) - return PTR_ERR(base); - diff --git a/target/linux/ipq806x/patches-4.19/0064-clk-clk-rpm-fixes.patch b/target/linux/ipq806x/patches-4.19/0064-clk-clk-rpm-fixes.patch index 72217de12..306474ab0 100644 --- a/target/linux/ipq806x/patches-4.19/0064-clk-clk-rpm-fixes.patch +++ b/target/linux/ipq806x/patches-4.19/0064-clk-clk-rpm-fixes.patch @@ -12,7 +12,7 @@ Signed-off-by: John Crispin --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt -@@ -16,6 +16,7 @@ Required properties : +@@ -14,6 +14,7 @@ Required properties : "qcom,rpmcc-msm8974", "qcom,rpmcc" "qcom,rpmcc-apq8064", "qcom,rpmcc" "qcom,rpmcc-msm8996", "qcom,rpmcc" @@ -22,7 +22,7 @@ Signed-off-by: John Crispin --- a/include/dt-bindings/clock/qcom,rpmcc.h +++ b/include/dt-bindings/clock/qcom,rpmcc.h -@@ -45,6 +45,10 @@ +@@ -37,6 +37,10 @@ #define RPM_XO_A0 27 #define RPM_XO_A1 28 #define RPM_XO_A2 29 diff --git a/target/linux/ipq806x/patches-4.19/0065-arm-override-compiler-flags.patch b/target/linux/ipq806x/patches-4.19/0065-arm-override-compiler-flags.patch index 6f1cdcf4d..0d2a4274c 100644 --- a/target/linux/ipq806x/patches-4.19/0065-arm-override-compiler-flags.patch +++ b/target/linux/ipq806x/patches-4.19/0065-arm-override-compiler-flags.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -64,7 +64,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-i +@@ -67,7 +67,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-i # macro, but instead defines a whole series of macros which makes # testing for a specific architecture or later rather impossible. arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m diff --git a/target/linux/ipq806x/patches-4.19/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-4.19/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index b7b9c991e..c7123eac5 100644 --- a/target/linux/ipq806x/patches-4.19/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-4.19/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1926,6 +1926,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1938,6 +1938,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. @@ -157,9 +157,9 @@ Signed-off-by: Adrian Panella } --- a/init/main.c +++ b/init/main.c -@@ -102,6 +102,10 @@ - #define CREATE_TRACE_POINTS - #include +@@ -95,6 +95,10 @@ + #include + #include +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) +#include @@ -168,10 +168,10 @@ Signed-off-by: Adrian Panella static int kernel_init(void *); extern void init_IRQ(void); -@@ -593,6 +597,18 @@ asmlinkage __visible void __init start_k +@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k + page_alloc_init(); + pr_notice("Kernel command line: %s\n", boot_command_line); - /* parameters may set static keys */ - jump_label_init(); + +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) + //Show bootloader's original command line for reference diff --git a/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch index 77ce4c424..e11378b42 100644 --- a/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-4.19/0069-arm-boot-add-dts-files.patch @@ -10,9 +10,9 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -791,6 +791,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \ - qcom-ipq4019-ap.dk07.1-c1.dtb \ - qcom-ipq4019-ap.dk07.1-c2.dtb \ +@@ -699,6 +699,18 @@ dtb-$(CONFIG_ARCH_QCOM) += \ + qcom-apq8084-mtp.dtb \ + qcom-ipq4019-ap.dk01.1-c1.dtb \ qcom-ipq8064-ap148.dtb \ + qcom-ipq8064-c2600.dtb \ + qcom-ipq8064-d7800.dtb \ @@ -28,4 +28,4 @@ Signed-off-by: John Crispin + qcom-ipq8065-r7800.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8960-cdp.dtb \ - qcom-msm8974-fairphone-fp2.dtb \ + qcom-msm8974-lge-nexus5-hammerhead.dtb \ diff --git a/target/linux/ipq806x/patches-4.19/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch b/target/linux/ipq806x/patches-4.19/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch index 3a3e0a000..7064da973 100644 --- a/target/linux/ipq806x/patches-4.19/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0071-1-PCI-qcom-Fixed-IPQ806x-specific-clocks.patch @@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -85,6 +85,8 @@ struct qcom_pcie_resources_2_1_0 { +@@ -91,6 +91,8 @@ struct qcom_pcie_resources_2_1_0 { struct clk *iface_clk; struct clk *core_clk; struct clk *phy_clk; @@ -18,7 +18,7 @@ Signed-off-by: Sham Muthayyan struct reset_control *pci_reset; struct reset_control *axi_reset; struct reset_control *ahb_reset; -@@ -235,6 +237,14 @@ static int qcom_pcie_get_resources_2_1_0 +@@ -249,6 +251,14 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->phy_clk)) return PTR_ERR(res->phy_clk); @@ -33,7 +33,7 @@ Signed-off-by: Sham Muthayyan res->pci_reset = devm_reset_control_get_exclusive(dev, "pci"); if (IS_ERR(res->pci_reset)) return PTR_ERR(res->pci_reset); -@@ -267,6 +277,8 @@ static void qcom_pcie_deinit_2_1_0(struc +@@ -281,6 +291,8 @@ static void qcom_pcie_deinit_2_1_0(struc clk_disable_unprepare(res->iface_clk); clk_disable_unprepare(res->core_clk); clk_disable_unprepare(res->phy_clk); @@ -42,7 +42,7 @@ Signed-off-by: Sham Muthayyan regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); } -@@ -296,16 +308,28 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -324,16 +336,28 @@ static int qcom_pcie_init_2_1_0(struct q goto err_assert_ahb; } @@ -74,7 +74,7 @@ Signed-off-by: Sham Muthayyan } ret = reset_control_deassert(res->ahb_reset); -@@ -361,10 +385,14 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -389,10 +413,14 @@ static int qcom_pcie_init_2_1_0(struct q return 0; err_deassert_ahb: @@ -90,4 +90,4 @@ Signed-off-by: Sham Muthayyan +err_clk_core: clk_disable_unprepare(res->iface_clk); err_assert_ahb: - regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); + regulator_disable(res->vdda_phy); diff --git a/target/linux/ipq806x/patches-4.19/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch b/target/linux/ipq806x/patches-4.19/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch index 5bd865a42..66357d273 100644 --- a/target/linux/ipq806x/patches-4.19/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch +++ b/target/linux/ipq806x/patches-4.19/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch @@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -92,6 +92,7 @@ struct qcom_pcie_resources_2_1_0 { +@@ -98,6 +98,7 @@ struct qcom_pcie_resources_2_1_0 { struct reset_control *ahb_reset; struct reset_control *por_reset; struct reset_control *phy_reset; @@ -17,7 +17,7 @@ Signed-off-by: Sham Muthayyan struct regulator_bulk_data supplies[QCOM_PCIE_2_1_0_MAX_SUPPLY]; }; -@@ -261,6 +262,10 @@ static int qcom_pcie_get_resources_2_1_0 +@@ -275,6 +276,10 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->por_reset)) return PTR_ERR(res->por_reset); @@ -28,7 +28,7 @@ Signed-off-by: Sham Muthayyan res->phy_reset = devm_reset_control_get_exclusive(dev, "phy"); return PTR_ERR_OR_ZERO(res->phy_reset); } -@@ -274,6 +279,7 @@ static void qcom_pcie_deinit_2_1_0(struc +@@ -288,6 +293,7 @@ static void qcom_pcie_deinit_2_1_0(struc reset_control_assert(res->ahb_reset); reset_control_assert(res->por_reset); reset_control_assert(res->pci_reset); @@ -36,10 +36,10 @@ Signed-off-by: Sham Muthayyan clk_disable_unprepare(res->iface_clk); clk_disable_unprepare(res->core_clk); clk_disable_unprepare(res->phy_clk); -@@ -290,15 +296,21 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -306,6 +312,12 @@ static int qcom_pcie_init_2_1_0(struct q u32 val; int ret; - + + ret = reset_control_assert(res->ahb_reset); + if (ret) { + dev_err(dev, "cannot assert ahb reset\n"); @@ -49,6 +49,7 @@ Signed-off-by: Sham Muthayyan ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies); if (ret < 0) { dev_err(dev, "cannot enable regulators\n"); +@@ -324,9 +336,9 @@ static int qcom_pcie_init_2_1_0(struct q return ret; } diff --git a/target/linux/ipq806x/patches-4.19/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch b/target/linux/ipq806x/patches-4.19/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch index dde8fbaa7..01c740ce1 100644 --- a/target/linux/ipq806x/patches-4.19/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch +++ b/target/linux/ipq806x/patches-4.19/0071-3-PCI-qcom-Fixed-IPQ806x-PCIE-init-changes.patch @@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -45,7 +45,13 @@ +@@ -52,7 +52,13 @@ #define PCIE_CAP_CPL_TIMEOUT_DISABLE 0x10 #define PCIE20_PARF_PHY_CTRL 0x40 @@ -23,7 +23,7 @@ Signed-off-by: Sham Muthayyan #define PCIE20_PARF_DBI_BASE_ADDR 0x168 #define PCIE20_PARF_SLV_ADDR_SPACE_SIZE 0x16C #define PCIE20_PARF_MHI_CLOCK_RESET_CTRL 0x174 -@@ -76,6 +82,18 @@ +@@ -83,6 +89,18 @@ #define DBI_RO_WR_EN 1 #define PERST_DELAY_US 1000 @@ -42,15 +42,15 @@ Signed-off-by: Sham Muthayyan #define PCIE20_v3_PARF_SLV_ADDR_SPACE_SIZE 0x358 #define SLV_ADDR_SPACE_SZ 0x10000000 -@@ -94,6 +112,7 @@ struct qcom_pcie_resources_2_1_0 { +@@ -102,6 +120,7 @@ struct qcom_pcie_resources_2_1_0 { + struct reset_control *por_reset; struct reset_control *phy_reset; - struct reset_control *ext_reset; struct regulator_bulk_data supplies[QCOM_PCIE_2_1_0_MAX_SUPPLY]; + uint8_t phy_tx0_term_offset; }; struct qcom_pcie_resources_1_0_0 { -@@ -173,6 +192,16 @@ struct qcom_pcie { +@@ -179,6 +198,16 @@ struct qcom_pcie { #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) @@ -67,7 +67,7 @@ Signed-off-by: Sham Muthayyan static void qcom_ep_reset_assert(struct qcom_pcie *pcie) { gpiod_set_value_cansleep(pcie->reset, 1); -@@ -266,6 +295,10 @@ static int qcom_pcie_get_resources_2_1_0 +@@ -280,6 +309,10 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->ext_reset)) return PTR_ERR(res->ext_reset); @@ -78,7 +78,7 @@ Signed-off-by: Sham Muthayyan res->phy_reset = devm_reset_control_get_exclusive(dev, "phy"); return PTR_ERR_OR_ZERO(res->phy_reset); } -@@ -293,7 +326,6 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -309,7 +342,6 @@ static int qcom_pcie_init_2_1_0(struct q struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; struct dw_pcie *pci = pcie->pci; struct device *dev = pci->dev; @@ -86,7 +86,7 @@ Signed-off-by: Sham Muthayyan int ret; ret = reset_control_assert(res->ahb_reset); -@@ -350,15 +382,26 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -378,15 +410,26 @@ static int qcom_pcie_init_2_1_0(struct q goto err_deassert_ahb; } diff --git a/target/linux/ipq806x/patches-4.19/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch b/target/linux/ipq806x/patches-4.19/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch index f6ebe0c0a..be56f74aa 100644 --- a/target/linux/ipq806x/patches-4.19/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch +++ b/target/linux/ipq806x/patches-4.19/0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x.patch @@ -11,7 +11,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -76,6 +76,30 @@ +@@ -83,6 +83,30 @@ #define PCIE20_CAP_LINK_1 (PCIE20_CAP + 0x14) #define PCIE_CAP_LINK1_VAL 0x2FD7F @@ -42,7 +42,7 @@ Signed-off-by: Sham Muthayyan #define PCIE20_PARF_Q2A_FLUSH 0x1AC #define PCIE20_MISC_CONTROL_1_REG 0x8BC -@@ -240,6 +264,57 @@ static void qcom_pcie_2_1_0_ltssm_enable +@@ -251,6 +275,57 @@ static void qcom_pcie_2_1_0_ltssm_enable writel(val, pcie->elbi + PCIE20_ELBI_SYS_CTRL); } @@ -100,7 +100,7 @@ Signed-off-by: Sham Muthayyan static int qcom_pcie_get_resources_2_1_0(struct qcom_pcie *pcie) { struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; -@@ -437,6 +512,9 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -465,6 +540,9 @@ static int qcom_pcie_init_2_1_0(struct q writel(CFG_BRIDGE_SB_INIT, pci->dbi_base + PCIE20_AXI_MSTR_RESP_COMP_CTRL1); diff --git a/target/linux/ipq806x/patches-4.19/0071-6-PCI-qcom-Force-GEN1-support.patch b/target/linux/ipq806x/patches-4.19/0071-6-PCI-qcom-Force-GEN1-support.patch index c1461e68c..0cf442aa0 100644 --- a/target/linux/ipq806x/patches-4.19/0071-6-PCI-qcom-Force-GEN1-support.patch +++ b/target/linux/ipq806x/patches-4.19/0071-6-PCI-qcom-Force-GEN1-support.patch @@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -122,6 +122,8 @@ +@@ -129,6 +129,8 @@ #define PCIE20_v3_PARF_SLV_ADDR_SPACE_SIZE 0x358 #define SLV_ADDR_SPACE_SZ 0x10000000 @@ -18,7 +18,7 @@ Signed-off-by: Sham Muthayyan #define QCOM_PCIE_2_1_0_MAX_SUPPLY 3 struct qcom_pcie_resources_2_1_0 { struct clk *iface_clk; -@@ -212,6 +214,7 @@ struct qcom_pcie { +@@ -218,6 +220,7 @@ struct qcom_pcie { struct phy *phy; struct gpio_desc *reset; const struct qcom_pcie_ops *ops; @@ -26,7 +26,7 @@ Signed-off-by: Sham Muthayyan }; #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) -@@ -504,6 +507,11 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -532,6 +535,11 @@ static int qcom_pcie_init_2_1_0(struct q /* wait for clock acquisition */ usleep_range(1000, 1500); @@ -38,7 +38,7 @@ Signed-off-by: Sham Muthayyan /* Set the Max TLP size to 2K, instead of using default of 4K */ -@@ -1367,6 +1375,8 @@ static int qcom_pcie_probe(struct platfo +@@ -1382,6 +1390,8 @@ static int qcom_pcie_probe(struct platfo struct dw_pcie *pci; struct qcom_pcie *pcie; int ret; @@ -47,13 +47,13 @@ Signed-off-by: Sham Muthayyan pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) -@@ -1397,6 +1407,9 @@ static int qcom_pcie_probe(struct platfo - goto err_pm_runtime_put; - } +@@ -1403,6 +1413,9 @@ static int qcom_pcie_probe(struct platfo + if (IS_ERR(pcie->reset)) + return PTR_ERR(pcie->reset); + of_property_read_u32(np, "force_gen1", &force_gen1); + pcie->force_gen1 = force_gen1; + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "parf"); pcie->parf = devm_ioremap_resource(dev, res); - if (IS_ERR(pcie->parf)) { + if (IS_ERR(pcie->parf)) diff --git a/target/linux/ipq806x/patches-4.19/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch b/target/linux/ipq806x/patches-4.19/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch index e7b5b6f9a..e2c1f0512 100644 --- a/target/linux/ipq806x/patches-4.19/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch +++ b/target/linux/ipq806x/patches-4.19/0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B.patch @@ -16,7 +16,7 @@ Signed-off-by: Gokul Sriram Palanisamy --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -124,6 +124,14 @@ +@@ -131,6 +131,14 @@ #define PCIE20_LNK_CONTROL2_LINK_STATUS2 0xA0 @@ -31,8 +31,8 @@ Signed-off-by: Gokul Sriram Palanisamy #define QCOM_PCIE_2_1_0_MAX_SUPPLY 3 struct qcom_pcie_resources_2_1_0 { struct clk *iface_clk; -@@ -1475,6 +1483,35 @@ err_pm_runtime_put: - return ret; +@@ -1472,6 +1480,35 @@ static int qcom_pcie_probe(struct platfo + return 0; } +static void qcom_pcie_fixup_final(struct pci_dev *dev) diff --git a/target/linux/ipq806x/patches-4.19/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch b/target/linux/ipq806x/patches-4.19/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch index 7cbeb3bed..a00df30b8 100644 --- a/target/linux/ipq806x/patches-4.19/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch +++ b/target/linux/ipq806x/patches-4.19/0071-8-pcie-qcom-Fixed-pcie_phy_clk-branch-issue.patch @@ -38,7 +38,7 @@ Signed-off-by: Abhishek Sahu --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -393,6 +393,7 @@ static void qcom_pcie_deinit_2_1_0(struc +@@ -407,6 +407,7 @@ static void qcom_pcie_deinit_2_1_0(struc { struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; @@ -46,15 +46,15 @@ Signed-off-by: Abhishek Sahu reset_control_assert(res->pci_reset); reset_control_assert(res->axi_reset); reset_control_assert(res->ahb_reset); -@@ -401,7 +402,6 @@ static void qcom_pcie_deinit_2_1_0(struc +@@ -415,7 +416,6 @@ static void qcom_pcie_deinit_2_1_0(struc reset_control_assert(res->ext_reset); clk_disable_unprepare(res->iface_clk); clk_disable_unprepare(res->core_clk); - clk_disable_unprepare(res->phy_clk); clk_disable_unprepare(res->aux_clk); clk_disable_unprepare(res->ref_clk); - regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); -@@ -444,12 +444,6 @@ static int qcom_pcie_init_2_1_0(struct q + regulator_disable(res->vdda); +@@ -472,12 +472,6 @@ static int qcom_pcie_init_2_1_0(struct q goto err_clk_core; } @@ -67,7 +67,7 @@ Signed-off-by: Abhishek Sahu ret = clk_prepare_enable(res->aux_clk); if (ret) { dev_err(dev, "cannot prepare/enable aux clock\n"); -@@ -513,6 +507,12 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -541,6 +535,12 @@ static int qcom_pcie_init_2_1_0(struct q return ret; } @@ -80,7 +80,7 @@ Signed-off-by: Abhishek Sahu /* wait for clock acquisition */ usleep_range(1000, 1500); if (pcie->force_gen1) { -@@ -538,8 +538,6 @@ err_deassert_ahb: +@@ -566,8 +566,6 @@ err_deassert_ahb: err_clk_ref: clk_disable_unprepare(res->aux_clk); err_clk_aux: diff --git a/target/linux/ipq806x/patches-4.19/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch b/target/linux/ipq806x/patches-4.19/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch index 3fff78bfd..1847fe40c 100644 --- a/target/linux/ipq806x/patches-4.19/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch +++ b/target/linux/ipq806x/patches-4.19/0071-9-pcie-qcom-change-duplicate-pci-reset-to-phy-reset.patch @@ -14,7 +14,7 @@ Signed-off-by: Abhishek Sahu --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -394,7 +394,7 @@ static void qcom_pcie_deinit_2_1_0(struc +@@ -408,7 +408,7 @@ static void qcom_pcie_deinit_2_1_0(struc struct qcom_pcie_resources_2_1_0 *res = &pcie->res.v2_1_0; clk_disable_unprepare(res->phy_clk); diff --git a/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch index 76c7cfd56..035281f66 100644 --- a/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch @@ -1,7 +1,7 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -609,6 +609,9 @@ static const struct of_device_id qcom_sc - { .compatible = "qcom,scm-ipq4019", +@@ -422,6 +422,9 @@ static const struct of_device_id qcom_sc + { .compatible = "qcom,scm-msm8996", .data = NULL, /* no clocks */ }, + { .compatible = "qcom,scm-ipq806x", diff --git a/target/linux/ipq806x/patches-4.19/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch b/target/linux/ipq806x/patches-4.19/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch index 78a5bb417..4847973a2 100644 --- a/target/linux/ipq806x/patches-4.19/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch +++ b/target/linux/ipq806x/patches-4.19/0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch @@ -24,7 +24,7 @@ Signed-off-by: Ajay Kishore #include "../core.h" #include "../pinconf.h" #include "pinctrl-msm.h" -@@ -628,6 +629,9 @@ static void msm_gpio_irq_mask(struct irq +@@ -646,6 +647,9 @@ static void msm_gpio_irq_ack(struct irq_ const struct msm_pingroup *g; unsigned long flags; u32 val; @@ -34,7 +34,7 @@ Signed-off-by: Ajay Kishore g = &pctrl->soc->groups[d->hwirq]; -@@ -732,11 +736,30 @@ static int msm_gpio_irq_set_type(struct +@@ -684,11 +688,30 @@ static int msm_gpio_irq_set_type(struct else clear_bit(d->hwirq, pctrl->dual_edge_irqs); diff --git a/target/linux/ipq806x/patches-4.19/080-ARM-dts-qcom-add-gpio-ranges-property.patch b/target/linux/ipq806x/patches-4.19/080-ARM-dts-qcom-add-gpio-ranges-property.patch index 04cb9b3bb..3c1b8fccd 100644 --- a/target/linux/ipq806x/patches-4.19/080-ARM-dts-qcom-add-gpio-ranges-property.patch +++ b/target/linux/ipq806x/patches-4.19/080-ARM-dts-qcom-add-gpio-ranges-property.patch @@ -60,7 +60,7 @@ will be executed twice with the same parameters for the same pinctrl. --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi -@@ -625,6 +625,7 @@ +@@ -108,6 +108,7 @@ reg = <0x800000 0x4000>; gpio-controller;