提交 38f64e09 编写于 作者: L LEAN-ESX

ipq806x: revert to kernel 4.14

上级 295602fc
......@@ -9,19 +9,22 @@ FEATURES:=squashfs nand fpu ramdisk
CPU_TYPE:=cortex-a15
CPU_SUBTYPE:=neon-vfpv4
MAINTAINER:=John Crispin <john@phrozen.org>
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))
......@@ -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)
......
#!/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
;;
......
......@@ -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 " ]
......
#!/bin/sh /etc/rc.common
START=99
boot() {
case $(board_name) in
linksys,ea8500)
mtd resetbc s_env || true
;;
esac
}
#!/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
}
......@@ -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)
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
# re-enable recovery so we get back if the new firmware is broken
fw_setenv auto_recovery yes
echo "$target_firmware"
}
linksys_get_root_magic() {
......
......@@ -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
}
......@@ -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
}
......@@ -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
......
......@@ -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
......
......@@ -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";
......
......@@ -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";
......
......@@ -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;
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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>;
......
......@@ -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>;
......
......@@ -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";
......
......@@ -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";
......
......@@ -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>;
......
......@@ -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";
};
......
......@@ -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";
};
......@@ -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";
......
......@@ -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";
};
......
......@@ -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;
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
// SPDX-License-Identifier: BSD-3-Clause
/*
* BSD LICENSE
*
......@@ -37,7 +38,7 @@
#include <dt-bindings/soc/qcom,tcsr.h>
/ {
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 = <TCSR_USB_SELECT_USB3_DUAL>;
};
&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>;
};
};
};
};
......@@ -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
};
// 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 = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(2) |
IRQ_TYPE_EDGE_RISING)>,
<GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(2) |
......@@ -735,13 +734,13 @@
};
saw0: regulator@2089000 {
compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
compatible = "qcom,saw2", "syscon";
reg = <0x02089000 0x1000>, <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 = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
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 = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
......@@ -1305,7 +1301,6 @@
};
gmac1: ethernet@37200000 {
device_type = "network";
compatible = "qcom,ipq806x-gmac";
reg = <0x37200000 0x200000>;
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
......@@ -1328,7 +1323,6 @@
};
gmac2: ethernet@37400000 {
device_type = "network";
compatible = "qcom,ipq806x-gmac";
reg = <0x37400000 0x200000>;
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
......@@ -1351,7 +1345,6 @@
};
gmac3: ethernet@37600000 {
device_type = "network";
compatible = "qcom,ipq806x-gmac";
reg = <0x37600000 0x200000>;
interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -75,12 +75,4 @@
};
};
};
cpus {
idle-states {
CPU_SPC: spc {
status = "disabled";
};
};
};
};
......@@ -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
......
......@@ -171,9 +171,9 @@ Signed-off-by: Ajay Kishore <akisho@codeaurora.org>
+extern s32 qcom_scm_pinmux_read(u32 arg1);
+extern s32 qcom_scm_pinmux_write(u32 arg1, u32 arg2);
#else
#include <linux/errno.h>
@@ -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; }
......
......@@ -18,7 +18,7 @@ Signed-off-by: Ram Chandra Jangir <rjangi@codeaurora.org>
--- 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.
......
......@@ -8,7 +8,7 @@ Signed-off-by: Andy Gross <agross@codeaurora.org>
--- 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 <agross@codeaurora.org>
+
--- 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
......
......@@ -28,6 +28,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ 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 <sboyd@kernel.org>
+extern u32 krait_get_l2_indirect_reg(u32 addr);
+
+#endif
--
2.20.1
......@@ -18,6 +18,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ .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 <sboyd@kernel.org>
+extern const struct clk_ops clk_ops_hfpll;
+
+#endif
--
2.20.1
......@@ -20,6 +20,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ 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 <sboyd@kernel.org>
+MODULE_DESCRIPTION("QCOM HFPLL Clock Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:qcom-hfpll");
--
2.20.1
......@@ -16,6 +16,9 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ clock-names = "xo";
+ clock-output-names = "hfpll0";
+ };
--
2.20.1
......@@ -15,6 +15,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
};
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 <sboyd@kernel.org>
};
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
+#define PLL17 307
#endif
--
2.20.1
......@@ -13,6 +13,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
};
static const struct qcom_reset_map gcc_ipq806x_resets[] = {
--
2.20.1
......@@ -24,6 +24,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ .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 <sboyd@kernel.org>
+extern const struct clk_ops krait_div2_clk_ops;
+
+#endif
--
2.20.1
......@@ -20,6 +20,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ 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 <sboyd@kernel.org>
+MODULE_DESCRIPTION("Krait Processor Sub System (KPSS) Clock Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:kpss-xcc");
--
2.20.1
......@@ -18,6 +18,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ 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 <sboyd@kernel.org>
+ clock-names = "pll8_vote", "pxo";
+ clock-output-names = "acpu_l2_aux";
+ };
--
2.20.1
......@@ -22,6 +22,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ 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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
}
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 <sboyd@kernel.org>
+MODULE_DESCRIPTION("Krait CPU Clock Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:krait-cc");
--
2.20.1
......@@ -16,6 +16,9 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
+ clock-names = "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb";
+ #clock-cells = <1>;
+ };
--
2.20.1
......@@ -20,9 +20,11 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
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 <sboyd@kernel.org>
kfree(p_names[2]);
err_p2:
kfree(p_names[1]);
--
2.20.1
......@@ -72,9 +72,9 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
+ };
--- 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 <sboyd@codeaurora.org>
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 @@
......
......@@ -28,7 +28,7 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
--- 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 <sricharan@codeaurora.org>
/*
* 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 <sricharan@codeaurora.org>
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 <linux/types.h>
struct cpufreq_dt_platform_data {
+ /*
......@@ -62,5 +62,5 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
+ */
+ bool independent_clocks;
bool have_governor_per_policy;
};
int (*suspend)(struct cpufreq_policy *policy);
......@@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- 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 <georgi.djakov@linaro.org>
}
+#endif
/* Another CPU that shares the OPP table has set the regulators ? */
if (opp_table->regulators)
/* Already have regulators set */
if (opp_table->regulators) {
......@@ -27,7 +27,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1625,6 +1625,83 @@ put_table:
@@ -1605,6 +1605,83 @@ put_table:
}
/**
......
......@@ -12,7 +12,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- 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);
......
......@@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- 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 <georgi.djakov@linaro.org>
/* 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;
......
......@@ -35,7 +35,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
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 <georgi.djakov@linaro.org>
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 <georgi.djakov@linaro.org>
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 <georgi.djakov@linaro.org>
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 <georgi.djakov@linaro.org>
}
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);
......
......@@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- 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;
}
......
......@@ -33,7 +33,7 @@ Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
--- 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
......
......@@ -612,3 +612,4 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
/* TSENS v2 targets */
extern const struct tsens_data data_8996, data_tsens_v2;
......@@ -23,7 +23,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
--- 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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
};
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 <rajith@codeaurora.org>
--- 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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
"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 <rajith@codeaurora.org>
};
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 <rajith@codeaurora.org>
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 <rajith@codeaurora.org>
*/
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);
......
--- 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);
......@@ -12,7 +12,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- 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 <john@phrozen.org>
--- 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
......
......@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- 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
......
......@@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
--- 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 <ianchi74@outlook.com>
}
--- a/init/main.c
+++ b/init/main.c
@@ -102,6 +102,10 @@
#define CREATE_TRACE_POINTS
#include <trace/events/initcall.h>
@@ -95,6 +95,10 @@
#include <asm/sections.h>
#include <asm/cacheflush.h>
+#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
+#include <linux/of.h>
......@@ -168,10 +168,10 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
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
......
......@@ -10,9 +10,9 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- 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 <john@phrozen.org>
+ qcom-ipq8065-r7800.dtb \
qcom-msm8660-surf.dtb \
qcom-msm8960-cdp.dtb \
qcom-msm8974-fairphone-fp2.dtb \
qcom-msm8974-lge-nexus5-hammerhead.dtb \
......@@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
--- 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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
}
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 <smuthayy@codeaurora.org>
+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);
......@@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
--- 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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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;
}
......
......@@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
--- 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 <smuthayy@codeaurora.org>
#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 <smuthayy@codeaurora.org>
#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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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 <smuthayy@codeaurora.org>
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;
}
......
......@@ -11,7 +11,7 @@ Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
--- 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 <smuthayy@codeaurora.org>
#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 <smuthayy@codeaurora.org>
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);
......
......@@ -9,7 +9,7 @@ Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
--- 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 <smuthayy@codeaurora.org>
#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 <smuthayy@codeaurora.org>
};
#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 <smuthayy@codeaurora.org>
/* 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 <smuthayy@codeaurora.org>
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))
......@@ -16,7 +16,7 @@ Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
--- 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 <gpalan@codeaurora.org>
#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)
......
......@@ -38,7 +38,7 @@ Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
--- 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 <absahu@codeaurora.org>
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 <absahu@codeaurora.org>
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 <absahu@codeaurora.org>
/* 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:
......
......@@ -14,7 +14,7 @@ Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
--- 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);
......
--- 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",
......
......@@ -24,7 +24,7 @@ Signed-off-by: Ajay Kishore <akisho@codeaurora.org>
#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 <akisho@codeaurora.org>
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);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册