ipq806x: sync upstream source code
This commit is contained in:
parent
0344f9c0b0
commit
3ff11b8cc8
@ -27,6 +27,7 @@ ALLWIFIBOARDS:= \
|
||||
cellc_rtl30vw \
|
||||
century_wr142ac \
|
||||
dlink_dap2610 \
|
||||
edgecore_ecw5410 \
|
||||
engenius_eap2200 \
|
||||
engenius_emd1 \
|
||||
engenius_emr3500 \
|
||||
@ -36,6 +37,7 @@ ALLWIFIBOARDS:= \
|
||||
hugo_ac1200 \
|
||||
linksys_ea8300 \
|
||||
mobipromo_cm520-79f \
|
||||
nec_wg2600hp3 \
|
||||
p2w_r619ac \
|
||||
qxwlan_e2600ac
|
||||
|
||||
@ -106,6 +108,7 @@ $(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP)
|
||||
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
|
||||
$(eval $(call generate-ipq-wifi-package,century_wr142ac,Century WR142AC))
|
||||
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
|
||||
@ -115,6 +118,7 @@ $(eval $(call generate-ipq-wifi-package,hiwifi_c526a,HiWiFi C526A))
|
||||
$(eval $(call generate-ipq-wifi-package,hugo_ac1200,Hugo AC1200))
|
||||
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
|
||||
$(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
|
||||
$(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
|
||||
$(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
|
||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
||||
|
||||
|
||||
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984
Normal file
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-nec_wg2600hp3.qca9984
Normal file
BIN
package/firmware/ipq-wifi/board-nec_wg2600hp3.qca9984
Normal file
Binary file not shown.
@ -22,8 +22,8 @@ DEFAULT_PACKAGES += \
|
||||
kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \
|
||||
kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-phy-qcom-ipq806x-usb kmod-usb3 kmod-usb-dwc3-qcom \
|
||||
kmod-ath10k-ct wpad-openssl uboot-envtools e2fsprogs \
|
||||
autocore-arm automount autosamba shadowsocksr-libev-server \
|
||||
kmod-ath10k-ct wpad-openssl uboot-envtools \
|
||||
autocore-arm automount autosamba e2fsprogs \
|
||||
luci-app-zerotier openssh-sftp-server
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@ -18,11 +18,18 @@ compex,wpq864)
|
||||
ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "pcie-usb" "PCIe USB" "green:usb-pcie" "usb3-port1"
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy0tpt"
|
||||
;;
|
||||
nec,wg2600hp)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy0tpt"
|
||||
ucidef_set_led_switch "wan" "WAN" "green:active" "switch0" "0x2"
|
||||
;;
|
||||
nec,wg2600hp3)
|
||||
ucidef_set_led_switch "wan" "WAN" "green:active" "switch0" "0x2"
|
||||
;;
|
||||
netgear,d7800 |\
|
||||
netgear,r7500 |\
|
||||
netgear,r7500v2 |\
|
||||
@ -32,6 +39,15 @@ netgear,r7800)
|
||||
ucidef_set_led_switch "wan" "WAN" "white:wan" "switch0" "0x20"
|
||||
ucidef_set_led_ide "esata" "eSATA" "white:esata"
|
||||
;;
|
||||
tplink,ad7200)
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "blue:usb1" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "blue:usb3" "usb3-port1" "usb4-port1"
|
||||
ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x3c"
|
||||
ucidef_set_led_wlan "wlan2g" "wlan2g" "blue:wlan2g" "phy2tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "wlan5g" "blue:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_netdev "wlan60g" "wlan60g" "blue:wlan60g" "wlan0"
|
||||
;;
|
||||
tplink,c2600)
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "white:usb_2" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "white:usb_4" "usb3-port1" "usb4-port1"
|
||||
|
||||
@ -12,6 +12,11 @@ board_config_update
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
asrock,g10 |\
|
||||
nec,wg2600hp)
|
||||
ucidef_add_switch "switch0" \
|
||||
"2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
|
||||
;;
|
||||
buffalo,wxr-2533dhp |\
|
||||
compex,wpq864 |\
|
||||
netgear,d7800 |\
|
||||
@ -22,10 +27,16 @@ tplink,vr2600v)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
||||
;;
|
||||
qcom,ipq8064-ap161)
|
||||
ucidef_set_interface_lan "eth1 eth2"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
||||
edgecore,ecw5410)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:art" 0x6)"
|
||||
ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:art" 0x0)"
|
||||
else
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)"
|
||||
ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)"
|
||||
fi
|
||||
;;
|
||||
linksys,ea7500-v1)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
@ -41,15 +52,21 @@ linksys,ea8500)
|
||||
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
||||
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
||||
;;
|
||||
nec,wg2600hp)
|
||||
nec,wg2600hp3)
|
||||
ucidef_add_switch "switch0" \
|
||||
"2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
|
||||
"2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
|
||||
;;
|
||||
netgear,r7800 |\
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
|
||||
;;
|
||||
qcom,ipq8064-ap161)
|
||||
ucidef_set_interface_lan "eth1 eth2"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
||||
;;
|
||||
qcom,ipq8064-db149)
|
||||
ucidef_set_interface_lan "eth1 eth2 eth3"
|
||||
ucidef_add_switch "switch0" \
|
||||
@ -62,6 +79,9 @@ ruijie,rg-mtfi-m520)
|
||||
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
||||
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)"
|
||||
;;
|
||||
ubnt,unifi-ac-hd)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
|
||||
@ -25,16 +25,33 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath10k/pre-cal-pci-0000:01:00.0.bin")
|
||||
case $board in
|
||||
asrock,g10)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
caldata_extract "0:art" 0x1000 0x2f20
|
||||
else
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
caldata_extract "0:ART" 0x1000 0x2f20
|
||||
fi
|
||||
;;
|
||||
buffalo,wxr-2533dhp)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e)
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
caldata_extract "0:art" 0x1000 0x2f20
|
||||
else
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
caldata_extract "0:ART" 0x1000 0x2f20
|
||||
fi
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
caldata_extract "art" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1)
|
||||
;;
|
||||
nec,wg2600hp)
|
||||
nec,wg2600hp |\
|
||||
nec,wg2600hp3)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0x12)
|
||||
;;
|
||||
@ -44,6 +61,7 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +1)
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
caldata_extract "radio" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1)
|
||||
@ -66,6 +84,14 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath10k/pre-cal-pci-0001:01:00.0.bin")
|
||||
case $board in
|
||||
asrock,g10)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
caldata_extract "0:art" 0x5000 0x2f20
|
||||
else
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
fi
|
||||
;;
|
||||
buffalo,wxr-2533dhp)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x18)
|
||||
@ -75,7 +101,8 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2)
|
||||
;;
|
||||
nec,wg2600hp)
|
||||
nec,wg2600hp |\
|
||||
nec,wg2600hp3)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0xc)
|
||||
;;
|
||||
@ -85,6 +112,7 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +2)
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
caldata_extract "radio" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x8)
|
||||
@ -105,6 +133,18 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath10k/pre-cal-pci-0002:01:00.0.bin")
|
||||
case $board in
|
||||
edgecore,ecw5410)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
caldata_extract "0:art" 0x5000 0x2f20
|
||||
else
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@ -9,17 +9,25 @@ PHYNBR=${DEVPATH##*/phy}
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
ubnt,unifi-ac-hd)
|
||||
macaddr_add $(mtd_get_mac_binary EEPROM 0x6) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
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 " ]
|
||||
|
||||
20
target/linux/ipq806x/base-files/etc/init.d/bootcount
Executable file
20
target/linux/ipq806x/base-files/etc/init.d/bootcount
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
. "$IPKG_INSTROOT/lib/upgrade/asrock.sh"
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
asrock,g10)
|
||||
asrock_bootconfig_mangle "bootcheck" && reboot
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
fw_setenv bootcount 0
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
mtd resetbc s_env || true
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
START=97
|
||||
boot() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case $(board_name) in
|
||||
linksys,ea7500-v1 |\
|
||||
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
|
||||
|
||||
}
|
||||
13
target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth
Normal file
13
target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth
Normal file
@ -0,0 +1,13 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
preinit_reorder_eth() {
|
||||
case $(board_name) in
|
||||
ubnt,unifi-ac-hd)
|
||||
ip link set eth0 name ethtmp
|
||||
ip link set eth1 name eth0
|
||||
ip link set ethtmp name eth1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_reorder_eth
|
||||
@ -1,9 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
preinit_set_mac_address() {
|
||||
case $(board_name) in
|
||||
asrock,g10)
|
||||
lan_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.MAC.Address)
|
||||
wan_mac=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
|
||||
ip link set dev eth0 address "${lan_mac}"
|
||||
ip link set dev eth1 address "${wan_mac}"
|
||||
;;
|
||||
ruijie,rg-mtfi-m520)
|
||||
base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr)
|
||||
ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
|
||||
|
||||
56
target/linux/ipq806x/base-files/lib/upgrade/asrock.sh
Normal file
56
target/linux/ipq806x/base-files/lib/upgrade/asrock.sh
Normal file
@ -0,0 +1,56 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
asrock_bootconfig_mangle() {
|
||||
local mtdnum="$(find_mtd_index 0:bootconfig)"
|
||||
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
||||
[ -n "$mtdnum" ] || mtdnum="$(find_mtd_index 0:BOOTCONFIG)"
|
||||
|
||||
if [ -z "$mtdnum" ]; then
|
||||
echo "cannot find bootconfig mtd partition"
|
||||
return 1
|
||||
fi
|
||||
dd if=/dev/mtd$mtdnum of=/tmp/mtd$mtdnum bs=1k
|
||||
|
||||
local partition_byte="$(dd if=/tmp/mtd$mtdnum bs=1 skip=52 count=1)"
|
||||
local upgrade_byte="$(dd if=/tmp/mtd$mtdnum bs=1 skip=4 count=1)"
|
||||
|
||||
if [ $1 = "bootcheck" ]; then
|
||||
if [ ! -s $upgrade_byte ]; then
|
||||
dd if=/dev/mtd$mtdnum of=/tmp/mtd$mtdnum bs=1k
|
||||
printf '\x00' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=4
|
||||
printf '\x00' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=56
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
elif [ $1 = "sysupgrade" ]; then
|
||||
printf '\x01' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=4
|
||||
printf '\x01' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=56
|
||||
fi
|
||||
|
||||
if [ -s $partition_byte ]; then
|
||||
printf '\x01' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=52
|
||||
else
|
||||
printf '\x00' | dd of=/tmp/mtd$mtdnum conv=notrunc bs=1 seek=52
|
||||
fi
|
||||
|
||||
mtd write /tmp/mtd$mtdnum /dev/mtd$mtdnum
|
||||
return 0
|
||||
}
|
||||
|
||||
asrock_upgrade_prepare() {
|
||||
local ubidev="$( nand_find_ubi ubi )"
|
||||
|
||||
#Set upgrade flag. If something goes wrong, router will boot with
|
||||
#factory firmware.
|
||||
asrock_bootconfig_mangle 'sysupgrade'
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "cannot find bootconfig mtd partition"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Just delete these partitions if present and use
|
||||
# OpenWrt's standard names for those.
|
||||
ubirmvol /dev/$ubidev -N ubi_rootfs &> /dev/null || true
|
||||
ubirmvol /dev/$ubidev -N ubi_rootfs_data &> /dev/null || true
|
||||
}
|
||||
@ -3,28 +3,45 @@
|
||||
#
|
||||
|
||||
linksys_get_target_firmware() {
|
||||
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"
|
||||
|
||||
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}"
|
||||
fi
|
||||
|
||||
# re-enable recovery so we get back if the new firmware is broken
|
||||
fw_setenv auto_recovery yes
|
||||
|
||||
echo "$target_firmware"
|
||||
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
|
||||
}
|
||||
|
||||
linksys_get_root_magic() {
|
||||
|
||||
@ -10,26 +10,40 @@ platform_check_image() {
|
||||
|
||||
platform_do_upgrade() {
|
||||
case "$(board_name)" in
|
||||
asrock,g10)
|
||||
asrock_upgrade_prepare
|
||||
nand_do_upgrade "$ARGV"
|
||||
;;
|
||||
buffalo,wxr-2533dhp)
|
||||
buffalo_upgrade_prepare_ubi
|
||||
CI_ROOTPART="ubi_rootfs"
|
||||
nand_do_upgrade "$ARGV"
|
||||
;;
|
||||
compex,wpq864|\
|
||||
compex,wpq864 |\
|
||||
netgear,d7800 |\
|
||||
netgear,r7500 |\
|
||||
netgear,r7500v2 |\
|
||||
netgear,r7800 |\
|
||||
qcom,ipq8064-ap148 |\
|
||||
qcom,ipq8064-ap161 |\
|
||||
ruijie,rg-mtfi-m520 |\
|
||||
zyxel,nbg6817)
|
||||
qcom,ipq8064-ap161)
|
||||
nand_do_upgrade "$ARGV"
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
|
||||
if [ "$part" = "rootfs1" ]; then
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_UBIPART="rootfs2"
|
||||
else
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_UBIPART="rootfs1"
|
||||
fi
|
||||
nand_do_upgrade "$ARGV"
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
platform_do_upgrade_linksys "$ARGV"
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
PART_NAME="os-image:rootfs"
|
||||
MTD_CONFIG_ARGS="-s 0x200000"
|
||||
@ -40,20 +54,14 @@ platform_do_upgrade() {
|
||||
MTD_CONFIG_ARGS="-s 0x200000"
|
||||
default_do_upgrade "$ARGV"
|
||||
;;
|
||||
nec,wg2600hp |\
|
||||
*)
|
||||
default_do_upgrade "$ARGV"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_nand_pre_upgrade() {
|
||||
case "$(board_name)" in
|
||||
ruijie,rg-mtfi-m520)
|
||||
ruijie_do_upgrade "$1"
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
zyxel_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
default_do_upgrade "$ARGV"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -48,5 +48,7 @@ ruijie_do_upgrade() {
|
||||
|
||||
ruijie_do_flash $tar_file $kernel $rootfs
|
||||
|
||||
nand_do_upgrade "$1"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -121,5 +121,7 @@ zyxel_do_upgrade() {
|
||||
|
||||
zyxel_do_flash $tar_file $kernel $rootfs $dualflagmtd
|
||||
|
||||
nand_do_upgrade "$1"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
15
target/linux/ipq806x/base-files/sbin/asrock_g10_back_to_factory
Executable file
15
target/linux/ipq806x/base-files/sbin/asrock_g10_back_to_factory
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/upgrade/asrock.sh
|
||||
|
||||
case $(board_name) in
|
||||
asrock,g10)
|
||||
asrock_bootconfig_mangle "factory"
|
||||
if [ $? -eq 0 ]; then
|
||||
reboot
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported hardware."
|
||||
;;
|
||||
esac
|
||||
@ -79,6 +79,7 @@ CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_QCOM=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE_OVERRIDE=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_QCOM=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
|
||||
@ -1,303 +0,0 @@
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Linksys EA8500 WiFi Router";
|
||||
compatible = "linksys,ea8500", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0x1e000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
aliases {
|
||||
mdio-gpio0 = &mdio0;
|
||||
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200n8";
|
||||
append-rootblock = "ubi.mtd="; /* append to bootargs adding the root deviceblock nbr from bootloader */
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART >;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wps {
|
||||
label = "green:wps";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "green:wifi";
|
||||
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio65", "gpio67", "gpio68";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6", "gpio53", "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sata_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
compatible = "qcom,nandcs";
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
art: art@c80000 {
|
||||
label = "art";
|
||||
reg = <0x0c80000 0x0140000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
APPSBL@dc0000 {
|
||||
label = "APPSBL";
|
||||
reg = <0x0dc0000 0x0100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
u_env@ec0000 {
|
||||
label = "u_env";
|
||||
reg = <0x0ec0000 0x0040000>;
|
||||
};
|
||||
|
||||
s_env@f00000 {
|
||||
label = "s_env";
|
||||
reg = <0x0f00000 0x0040000>;
|
||||
};
|
||||
|
||||
devinfo@f40000 {
|
||||
label = "devinfo";
|
||||
reg = <0x0f40000 0x0040000>;
|
||||
};
|
||||
|
||||
linux@f80000 {
|
||||
label = "kernel1";
|
||||
reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs*/
|
||||
};
|
||||
|
||||
rootfs@1280000 {
|
||||
label = "rootfs1";
|
||||
reg = <0x1280000 0x2500000>;
|
||||
};
|
||||
|
||||
linux2@3780000 {
|
||||
label = "kernel2";
|
||||
reg = <0x3780000 0x2800000>;
|
||||
};
|
||||
|
||||
rootfs2@3a80000 {
|
||||
label = "rootfs2";
|
||||
reg = <0x3a80000 0x2500000>;
|
||||
};
|
||||
|
||||
syscfg@5f80000 {
|
||||
label = "syscfg";
|
||||
reg = <0x5f80000 0x2080000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PWS_REG */
|
||||
0x000e4 0x6a545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
};
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <1>;
|
||||
qcom,phy_mdio_addr = <4>;
|
||||
qcom,poll_required = <1>;
|
||||
qcom,rgmii_delay = <0>;
|
||||
qcom,emulation = <0>;
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
/* LAN */
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
qcom,phy_mdio_addr = <0>; /* none */
|
||||
qcom,poll_required = <0>; /* no polling */
|
||||
qcom,rgmii_delay = <0>;
|
||||
qcom,emulation = <0>;
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
@ -0,0 +1,438 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8062.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/delete-node/ &nand_pins;
|
||||
|
||||
/ {
|
||||
model = "NEC Platforms Aterm WG2600HP3";
|
||||
compatible = "nec,wg2600hp3", "qcom,ipq8062", "qcom,ipq8064";
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x42000000 0x1e000000>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac2;
|
||||
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_red;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
pinctrl-0 = <&buttons_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 22 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
mode0 {
|
||||
label = "mode0";
|
||||
gpios = <&qcom_pinmux 40 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
linux,input-type = <EV_SW>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
mode1 {
|
||||
label = "mode1";
|
||||
gpios = <&qcom_pinmux 41 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_1>;
|
||||
linux,input-type = <EV_SW>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "green:power";
|
||||
gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_power_red: power_red {
|
||||
label = "red:power";
|
||||
gpios = <&qcom_pinmux 35 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
active_green {
|
||||
label = "green:active";
|
||||
gpios = <&qcom_pinmux 42 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
active_red {
|
||||
label = "red:active";
|
||||
gpios = <&qcom_pinmux 38 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g_green {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
wlan2g_red {
|
||||
label = "red:wlan2g";
|
||||
gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan5g_green {
|
||||
label = "green:wlan5g";
|
||||
gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wlan5g_red {
|
||||
label = "red:wlan5g";
|
||||
gpios = <&qcom_pinmux 58 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
tv_green {
|
||||
label = "green:tv";
|
||||
gpios = <&qcom_pinmux 46 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
tv_red {
|
||||
label = "red:tv";
|
||||
gpios = <&qcom_pinmux 36 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
converter_green {
|
||||
label = "green:converter";
|
||||
gpios = <&qcom_pinmux 43 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
converter_red {
|
||||
label = "red:converter";
|
||||
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
pinctrl-0 = <&akro_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
function = "gsbi5";
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
data {
|
||||
pins = "gpio18", "gpio19";
|
||||
drive-strength = <10>;
|
||||
};
|
||||
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
drive-strength = <10>;
|
||||
};
|
||||
|
||||
clk {
|
||||
pins = "gpio21";
|
||||
drive-strength = <12>;
|
||||
};
|
||||
};
|
||||
|
||||
buttons_pins: buttons_pins {
|
||||
mux {
|
||||
pins = "gpio22", "gpio24", "gpio40",
|
||||
"gpio41";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
mux {
|
||||
pins = "gpio14", "gpio15", "gpio35",
|
||||
"gpio36", "gpio38", "gpio42",
|
||||
"gpio43", "gpio46", "gpio55",
|
||||
"gpio56", "gpio57", "gpio58";
|
||||
function = "gpio";
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
akro2 {
|
||||
pins = "gpio15", "gpio35", "gpio38",
|
||||
"gpio42", "gpio43", "gpio46",
|
||||
"gpio55", "gpio56", "gpio57",
|
||||
"gpio58";
|
||||
drive-strength = <2>;
|
||||
};
|
||||
|
||||
akro4 {
|
||||
pins = "gpio14", "gpio36";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* Stock firmware has the following settings, so let's do the same.
|
||||
* I don't sure why these are required.
|
||||
*/
|
||||
akro_pins: akro_pinmux {
|
||||
akro {
|
||||
pins = "gpio17", "gpio26", "gpio47";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
reset {
|
||||
pins = "gpio45";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
gmac0_rgmii {
|
||||
pins = "gpio25";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
status = "okay";
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
|
||||
spi@1a280000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
m25p,fast-read;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0000000 0x0020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x0020000 0x0020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "SBL2";
|
||||
reg = <0x0040000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "SBL3";
|
||||
reg = <0x0080000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "DDRCONFIG";
|
||||
reg = <0x0100000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@110000 {
|
||||
label = "SSD";
|
||||
reg = <0x0110000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@120000 {
|
||||
label = "TZ";
|
||||
reg = <0x0120000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1a0000 {
|
||||
label = "RPM";
|
||||
reg = <0x01a0000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@220000 {
|
||||
label = "APPSBL";
|
||||
reg = <0x0220000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@2a0000 {
|
||||
label = "APPSBLENV";
|
||||
reg = <0x02a0000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@2b0000 {
|
||||
label = "PRODUCTDATA";
|
||||
reg = <0x02b0000 0x0030000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@2e0000 {
|
||||
label = "ART";
|
||||
reg = <0x02e0000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@320000 {
|
||||
label = "TP";
|
||||
reg = <0x0320000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@360000 {
|
||||
label = "TINY";
|
||||
reg = <0x0360000 0x0500000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@860000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x0860000 0x17a0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
force_gen1 = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
ieee80211-freq-limit = <2400000 2483000>;
|
||||
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
0x04 0x80080080 /* PAD0_MODE */
|
||||
0x0c 0x06000000 /* PAD6_MODE */
|
||||
0x10 0x002613a0 /* PWS_REG */
|
||||
0x50 0xcc36cc36 /* LED_CTRL0 */
|
||||
0x54 0xca36ca36 /* LED_CTRL1 */
|
||||
0x58 0xc936c936 /* LED_CTRL2 */
|
||||
0x5c 0x03ffff00 /* LED_CTRL3 */
|
||||
0x7c 0x0000004e /* PORT0_STATUS */
|
||||
0x94 0x0000004e /* PORT6_STATUS */
|
||||
0xe0 0xc74164de /* SGMII_CTRL */
|
||||
0xe4 0x0006a545 /* MAC_PWR_SEL */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <1>;
|
||||
mdiobus = <&mdio0>;
|
||||
mtd-mac-address = <&factory 0x0>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
mdiobus = <&mdio0>;
|
||||
mtd-mac-address = <&factory 0x6>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
@ -1,11 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "TP-Link Archer C2600";
|
||||
compatible = "tplink,c2600", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0x1e000000>;
|
||||
device_type = "memory";
|
||||
@ -13,112 +12,11 @@
|
||||
|
||||
aliases {
|
||||
mdio-gpio0 = &mdio0;
|
||||
|
||||
led-boot = &power;
|
||||
led-failsafe = &general;
|
||||
led-running = &power;
|
||||
led-upgrade = &general;
|
||||
label-mac-device = &gmac2;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
ledswitch {
|
||||
label = "ledswitch";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan {
|
||||
label = "white:lan";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb4 {
|
||||
label = "white:usb_4";
|
||||
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb2 {
|
||||
label = "white:usb_2";
|
||||
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "white:wps";
|
||||
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_amber {
|
||||
label = "amber:wan";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_white {
|
||||
label = "white:wan";
|
||||
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
general: general {
|
||||
label = "white:general";
|
||||
gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio16", "gpio54", "gpio65";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33",
|
||||
"gpio53", "gpio66";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
@ -169,7 +67,7 @@
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
status = "okay";
|
||||
|
||||
spi5: spi@1a280000 {
|
||||
spi@1a280000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
@ -177,156 +75,156 @@
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
|
||||
SBL1@0 {
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
MIBIB@20000 {
|
||||
partition@20000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x20000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
SBL2@40000 {
|
||||
partition@40000 {
|
||||
label = "SBL2";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
SBL3@60000 {
|
||||
partition@60000 {
|
||||
label = "SBL3";
|
||||
reg = <0x60000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
DDRCONFIG@90000 {
|
||||
partition@90000 {
|
||||
label = "DDRCONFIG";
|
||||
reg = <0x90000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
SSD@a0000 {
|
||||
partition@a0000 {
|
||||
label = "SSD";
|
||||
reg = <0xa0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
TZ@b0000 {
|
||||
partition@b0000 {
|
||||
label = "TZ";
|
||||
reg = <0xb0000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
RPM@e0000 {
|
||||
partition@e0000 {
|
||||
label = "RPM";
|
||||
reg = <0xe0000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
fs-uboot@100000 {
|
||||
partition@100000 {
|
||||
label = "fs-uboot";
|
||||
reg = <0x100000 0x70000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
uboot-env@170000 {
|
||||
partition@170000 {
|
||||
label = "uboot-env";
|
||||
reg = <0x170000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
radio@1b0000 {
|
||||
partition@1b0000 {
|
||||
label = "radio";
|
||||
reg = <0x1b0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
os-image@1f0000 {
|
||||
partition@1f0000 {
|
||||
label = "os-image";
|
||||
reg = <0x1f0000 0x400000>;
|
||||
};
|
||||
|
||||
rootfs@5f0000 {
|
||||
partition@5f0000 {
|
||||
label = "rootfs";
|
||||
reg = <0x5f0000 0x1900000>;
|
||||
};
|
||||
|
||||
defaultmac: default-mac@1ef0000 {
|
||||
defaultmac: partition@1ef0000 {
|
||||
label = "default-mac";
|
||||
reg = <0x1ef0000 0x00200>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
pin@1ef0200 {
|
||||
partition@1ef0200 {
|
||||
label = "pin";
|
||||
reg = <0x1ef0200 0x00200>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
product-info@1ef0400 {
|
||||
partition@1ef0400 {
|
||||
label = "product-info";
|
||||
reg = <0x1ef0400 0x0fc00>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition-table@1f00000 {
|
||||
partition@1f00000 {
|
||||
label = "partition-table";
|
||||
reg = <0x1f00000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
soft-version@1f10000 {
|
||||
partition@1f10000 {
|
||||
label = "soft-version";
|
||||
reg = <0x1f10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
support-list@1f20000 {
|
||||
partition@1f20000 {
|
||||
label = "support-list";
|
||||
reg = <0x1f20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
profile@1f30000 {
|
||||
partition@1f30000 {
|
||||
label = "profile";
|
||||
reg = <0x1f30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
default-config@1f40000 {
|
||||
partition@1f40000 {
|
||||
label = "default-config";
|
||||
reg = <0x1f40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
user-config@1f50000 {
|
||||
partition@1f50000 {
|
||||
label = "user-config";
|
||||
reg = <0x1f50000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
qos-db@1f90000 {
|
||||
partition@1f90000 {
|
||||
label = "qos-db";
|
||||
reg = <0x1f90000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
usb-config@1fd0000 {
|
||||
partition@1fd0000 {
|
||||
label = "usb-config";
|
||||
reg = <0x1fd0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
log@1fe0000 {
|
||||
partition@1fe0000 {
|
||||
label = "log";
|
||||
reg = <0x1fe0000 0x20000>;
|
||||
read-only;
|
||||
@ -0,0 +1,135 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-ad7200-c2600.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link Talon AD7200";
|
||||
compatible = "tplink,ad7200", "qcom,ipq8064";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status;
|
||||
led-failsafe = &led_status;
|
||||
led-running = &led_status;
|
||||
led-upgrade = &led_status;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
led_enable {
|
||||
label = "led-enable";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan {
|
||||
label = "blue:lan";
|
||||
gpios = <&qcom_pinmux 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb1 {
|
||||
label = "blue:usb1";
|
||||
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "blue:wlan5g";
|
||||
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb3 {
|
||||
label = "blue:usb3";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_orange {
|
||||
label = "orange:wan";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "blue:wan";
|
||||
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "blue:wps";
|
||||
gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan60g {
|
||||
label = "blue:wlan60g";
|
||||
gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status: status {
|
||||
label = "blue:status";
|
||||
gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio53", "gpio54", "gpio67";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio2", "gpio8", "gpio15", "gpio16", "gpio17", "gpio26",
|
||||
"gpio33", "gpio55", "gpio56", "gpio66";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
};
|
||||
@ -0,0 +1,119 @@
|
||||
#include "qcom-ipq8064-ad7200-c2600.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link Archer C2600";
|
||||
compatible = "tplink,c2600", "qcom,ipq8064";
|
||||
|
||||
aliases {
|
||||
led-boot = &power;
|
||||
led-failsafe = &general;
|
||||
led-running = &power;
|
||||
led-upgrade = &general;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
ledswitch {
|
||||
label = "ledswitch";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan {
|
||||
label = "white:lan";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb4 {
|
||||
label = "white:usb_4";
|
||||
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb2 {
|
||||
label = "white:usb_2";
|
||||
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "white:wps";
|
||||
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_amber {
|
||||
label = "amber:wan";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_white {
|
||||
label = "white:wan";
|
||||
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
general: general {
|
||||
label = "white:general";
|
||||
gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio16", "gpio54", "gpio65";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33",
|
||||
"gpio53", "gpio66";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -292,13 +292,17 @@
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy4>;
|
||||
qcom,id = <1>;
|
||||
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mtd-mac-address = <&art 6>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
@ -0,0 +1,91 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-eax500.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Linksys EA7500 V1 WiFi Router";
|
||||
compatible = "linksys,ea7500-v1", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0xe000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
/* look for root deviceblock nbr in this bootarg */
|
||||
find-rootblock = "ubi.mtd=";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio65", "gpio68";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@5f80000 {
|
||||
label = "sysdiag";
|
||||
reg = <0x5f80000 0x100000>;
|
||||
};
|
||||
|
||||
partition@6080000 {
|
||||
label = "syscfg";
|
||||
reg = <0x6080000 0x1f80000>;
|
||||
};
|
||||
};
|
||||
@ -0,0 +1,128 @@
|
||||
#include "qcom-ipq8064-eax500.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Linksys EA8500 WiFi Router";
|
||||
compatible = "linksys,ea8500", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0x1e000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
aliases {
|
||||
mdio-gpio0 = &mdio0;
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
wps {
|
||||
label = "green:wps";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "green:wifi";
|
||||
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio65", "gpio67", "gpio68";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6", "gpio53", "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sata_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@5f80000 {
|
||||
label = "syscfg";
|
||||
reg = <0x5f80000 0x2080000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
qcom,phy_mdio_addr = <4>;
|
||||
qcom,poll_required = <1>;
|
||||
qcom,rgmii_delay = <0>;
|
||||
qcom,emulation = <0>;
|
||||
};
|
||||
|
||||
/* LAN */
|
||||
&gmac2 {
|
||||
qcom,phy_mdio_addr = <0>; /* none */
|
||||
qcom,poll_required = <0>; /* no polling */
|
||||
qcom,rgmii_delay = <0>;
|
||||
qcom,emulation = <0>;
|
||||
};
|
||||
@ -1,79 +1,14 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Linksys EA7500 V1 WiFi Router";
|
||||
compatible = "linksys,ea7500-v1", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0xe000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200n8";
|
||||
|
||||
append-rootblock = "ubi.mtd="; /* append to bootargs adding the root deviceblock nbr from bootloader */
|
||||
find-rootblock = "ubi.mtd="; /* look for root deviceblock nbr in this bootarg */
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power: power {
|
||||
label = "white:power";
|
||||
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio65", "gpio68";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio6";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
/* append to bootargs adding the root deviceblock nbr from bootloader */
|
||||
append-rootblock = "ubi.mtd=";
|
||||
};
|
||||
};
|
||||
|
||||
@ -87,6 +22,7 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
max-link-speed = <1>;
|
||||
};
|
||||
|
||||
@ -197,7 +133,7 @@
|
||||
|
||||
partition@f80000 {
|
||||
label = "kernel1";
|
||||
reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs*/
|
||||
reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs */
|
||||
};
|
||||
|
||||
partition@1280000 {
|
||||
@ -214,16 +150,6 @@
|
||||
label = "rootfs2";
|
||||
reg = <0x3a80000 0x2500000>;
|
||||
};
|
||||
|
||||
partition@5f80000 {
|
||||
label = "sysdiag";
|
||||
reg = <0x5f80000 0x100000>;
|
||||
};
|
||||
|
||||
partition@6080000 {
|
||||
label = "syscfg";
|
||||
reg = <0x6080000 0x1f80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -251,6 +177,7 @@
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <1>;
|
||||
|
||||
@ -265,6 +192,7 @@
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
|
||||
@ -0,0 +1,250 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
compatible = "asrock,g10", "qcom,ipq8064";
|
||||
model = "ASRock G10";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
ethernet1 = &gmac0;
|
||||
|
||||
led-boot = &led_status_blue;
|
||||
led-failsafe = &led_status_amber;
|
||||
led-running = &led_status_blue;
|
||||
led-upgrade = &led_status_amber;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-override = "console=ttyMSM0,115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
/*
|
||||
* this is a bit misleading. Because there are about seven
|
||||
* multicolor LEDs connected all wired together in parallel.
|
||||
*/
|
||||
|
||||
status_yellow {
|
||||
label = "yellow:status";
|
||||
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_amber: status_amber {
|
||||
label = "amber:status";
|
||||
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_blue: status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
/*
|
||||
* LED is declared in vendors boardfile but it's not
|
||||
* working and the manual doesn't mention anything
|
||||
* about the LED being white.
|
||||
|
||||
status_white {
|
||||
label = "white:status";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
i2c-gpio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compatible = "i2c-gpio";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>, /* sda */
|
||||
<&qcom_pinmux 54 GPIO_ACTIVE_HIGH>; /* scl */
|
||||
i2c-gpio,delay-us = <5>;
|
||||
i2c-gpio,scl-output-only;
|
||||
|
||||
mcu@50 {
|
||||
reg = <0x50>;
|
||||
compatible = "sonix,sn8f25e21";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
ir-remote {
|
||||
label = "ir-remote";
|
||||
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps5g {
|
||||
label = "wps5g";
|
||||
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
wps2g {
|
||||
label = "wps2g";
|
||||
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <1>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi4_serial {
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x000e4 0x6a545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
compatible = "qcom,nandcs";
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-step-size = <512>;
|
||||
|
||||
partitions {
|
||||
compatible = "qcom,smem-part";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio7", "gpio8", "gpio9", "gpio26";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio15", "gpio16", "gpio64", "gpio65";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_pins: uart0_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11";
|
||||
function = "gsbi4";
|
||||
drive-strength = <10>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rpm {
|
||||
pinctrl-0 = <&i2c4_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tcsr {
|
||||
qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
|
||||
};
|
||||
|
||||
/delete-node/ &pcie2_pins;
|
||||
/delete-node/ &pcie2;
|
||||
@ -22,14 +22,6 @@
|
||||
bootargs = "root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait noinitrd";
|
||||
};
|
||||
|
||||
cpus {
|
||||
idle-states {
|
||||
CPU_SPC: spc {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
@ -232,6 +224,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
&sata_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -242,16 +242,17 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
|
||||
/delete-property/ perst-gpios;
|
||||
pinctrl-0 = <&pcie0_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
|
||||
reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
|
||||
/delete-property/ perst-gpios;
|
||||
pinctrl-0 = <&pcie1_pins>;
|
||||
pinctrl-names = "default";
|
||||
max-link-speed = <1>;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
@ -314,3 +315,7 @@
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&CPU_SPC {
|
||||
status = "disabled";
|
||||
};
|
||||
@ -0,0 +1,301 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Ubiquiti UniFi AC HD";
|
||||
compatible = "ubnt,unifi-ac-hd", "qcom,ipq8064";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac2;
|
||||
led-boot = &led_dome_white;
|
||||
led-failsafe = &led_dome_white;
|
||||
led-running = &led_dome_blue;
|
||||
led-upgrade = &led_dome_blue;
|
||||
mdio-gpio0 = &mdio0;
|
||||
ethernet0 = &gmac2;
|
||||
ethernet1 = &gmac1;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_dome_blue: dome_blue {
|
||||
label = "blue:dome";
|
||||
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_dome_white: dome_white {
|
||||
label = "white:dome";
|
||||
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio68";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio9", "gpio53";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
function = "gsbi5";
|
||||
drive-strength = <10>;
|
||||
bias-none;
|
||||
};
|
||||
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
drive-strength = <12>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&CPU_SPC {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
status = "okay";
|
||||
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
|
||||
spi@1a280000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 0>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "mx25u25635f", "jedec,spi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
m25p,fast-read;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "SBL2";
|
||||
reg = <0x30000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "SBL3";
|
||||
reg = <0x50000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "DDRCONFIG";
|
||||
reg = <0x80000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@90000 {
|
||||
label = "SSD";
|
||||
reg = <0x90000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@a0000 {
|
||||
label = "TZ";
|
||||
reg = <0xa0000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@d0000 {
|
||||
label = "RPM";
|
||||
reg = <0xd0000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@f0000 {
|
||||
label = "APPSBL";
|
||||
reg = <0xf0000 0xc0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1b0000 {
|
||||
label = "APPSBLENV";
|
||||
reg = <0x1b0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
eeprom: partition@1c0000 {
|
||||
label = "EEPROM";
|
||||
reg = <0x1c0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1d0000 {
|
||||
label = "bootselect";
|
||||
reg = <0x1d0000 0x10000>;
|
||||
};
|
||||
|
||||
partition@1e0000 {
|
||||
compatible = "denx,fit";
|
||||
label = "firmware";
|
||||
reg = <0x1e0000 0xe70000>;
|
||||
};
|
||||
|
||||
partition@1050000 {
|
||||
label = "kernel1";
|
||||
reg = <0x1050000 0xe70000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1ec0000 {
|
||||
label = "debug";
|
||||
reg = <0x1ec0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1fc0000 {
|
||||
label = "cfg";
|
||||
reg = <0x1fc0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
nand-ecc-strength = <4>;
|
||||
nand-bus-width = <8>;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
|
||||
phy5: ethernet-phy@5 {
|
||||
reg = <5>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
|
||||
mdiobus = <&mdio0>;
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <1>;
|
||||
|
||||
mtd-mac-address = <&eeprom 0x6>;
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
mdiobus = <&mdio0>;
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
|
||||
mtd-mac-address = <&eeprom 0x0>;
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tcsr {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hs_phy_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hs_phy_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -127,6 +127,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&CPU_SPC {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
@ -1,34 +1,8 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
/*
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de>
|
||||
* Copyright (C) 2018 Mathias Kresin <dev@kresin.me>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the names of the copyright holders nor the names of any
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "qcom-ipq8064-v1.0.dtsi"
|
||||
@ -0,0 +1,341 @@
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
model = "Edgecore ECW5410";
|
||||
compatible = "edgecore,ecw5410", "qcom,ipq8064";
|
||||
|
||||
reserved-memory {
|
||||
nss@40000000 {
|
||||
reg = <0x40000000 0x1000000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
smem: smem@41000000 {
|
||||
reg = <0x41000000 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wifi_dump@44000000 {
|
||||
reg = <0x44000000 0x600000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
cpus {
|
||||
idle-states {
|
||||
CPU_SPC: spc {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial1 = &gsbi1_serial;
|
||||
mdio-gpio0 = &mdio0;
|
||||
ethernet0 = &gmac3;
|
||||
ethernet1 = &gmac2;
|
||||
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " console=ttyMSM0,115200n8 root=/dev/ubiblock0_1";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "green:power";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g_green {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g_yellow {
|
||||
label = "yellow:wlan2g";
|
||||
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g_green {
|
||||
label = "green:wlan5g";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_red: power_red {
|
||||
label = "red:power";
|
||||
gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g_yellow {
|
||||
label = "yellow:wlan5g";
|
||||
gpios = <&qcom_pinmux 59 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&qcom_pinmux {
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19";
|
||||
function = "gsbi5";
|
||||
drive-strength = <10>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
clk {
|
||||
pins = "gpio21";
|
||||
function = "gsbi5";
|
||||
drive-strength = <12>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
function = "gpio";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio16", "gpio23", "gpio24", "gpio26",
|
||||
"gpio28", "gpio59";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio25";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart1_pins: uart1_pins {
|
||||
mux {
|
||||
pins = "gpio51", "gpio52", "gpio53", "gpio54";
|
||||
function = "gsbi1";
|
||||
drive-strength = <12>;
|
||||
bias-none;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi1 {
|
||||
qcom,mode = <GSBI_PROT_UART_W_FC>;
|
||||
status = "okay";
|
||||
|
||||
serial@12450000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&uart1_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
status = "okay";
|
||||
|
||||
spi4: spi@1a280000 {
|
||||
status = "okay";
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
|
||||
partitions {
|
||||
compatible = "qcom,smem-part";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hs_phy_0 { /* USB3 port 0 HS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hs_phy_1 { /* USB3 port 1 HS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_0 { /* USB3 port 0 SS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_1 { /* USB3 port 1 SS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
|
||||
/delete-property/ pinctrl-0;
|
||||
/delete-property/ pinctrl-names;
|
||||
/delete-property/ perst-gpios;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
status = "okay";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
|
||||
/delete-property/ pinctrl-0;
|
||||
/delete-property/ pinctrl-names;
|
||||
/delete-property/ perst-gpios;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
status = "okay";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
nand@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>;
|
||||
|
||||
rootfs1@0 {
|
||||
label = "rootfs1";
|
||||
reg = <0x0000000 0x4000000>;
|
||||
};
|
||||
|
||||
rootfs2@4000000 {
|
||||
label = "rootfs2";
|
||||
reg = <0x4000000 0x4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
mdio1: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
qcom,id = <2>;
|
||||
mdiobus = <&mdio0>;
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy1>;
|
||||
};
|
||||
|
||||
&gmac3 {
|
||||
status = "okay";
|
||||
|
||||
qcom,id = <3>;
|
||||
mdiobus = <&mdio1>;
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
@ -3,6 +3,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += TPLINK_BOARD_ID
|
||||
|
||||
define Build/buffalo-rootfs-cksum
|
||||
( \
|
||||
echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
|
||||
@ -10,13 +13,25 @@ define Build/buffalo-rootfs-cksum
|
||||
) >> $@
|
||||
endef
|
||||
|
||||
define Build/edimax-header
|
||||
$(eval edimax_model=$(word 1,$(1)))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkedimaximg \
|
||||
-b -s CSYS -m $(edimax_model) \
|
||||
-f 0x70000 -S 0x1200000 \
|
||||
-i $@ -o $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
|
||||
KERNEL_PREFIX := $$(IMAGE_PREFIX)
|
||||
KERNEL_LOADADDR = 0x42208000
|
||||
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
|
||||
DEVICE_DTS_CONFIG := config@1
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
|
||||
IMAGE/sysupgrade.bin/squashfs :=
|
||||
endef
|
||||
@ -53,42 +68,53 @@ define Device/DniImage
|
||||
NETGEAR_BOARD_ID :=
|
||||
NETGEAR_HW_ID :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES := factory.img sysupgrade.bin
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata
|
||||
endef
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
|
||||
define Device/TpSafeImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
TPLINK_BOARD_ID :=
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
|
||||
endef
|
||||
DEVICE_VARS += TPLINK_BOARD_ID
|
||||
|
||||
define Device/ZyXELImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $${KERNEL_SIZE}
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE)
|
||||
KERNEL_NAME := zImage
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
endef
|
||||
|
||||
define Device/asrock_g10
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := ASRock
|
||||
DEVICE_MODEL := G10
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 5332k
|
||||
DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
|
||||
IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
|
||||
endef
|
||||
TARGET_DEVICES += asrock_g10
|
||||
|
||||
define Device/buffalo_wxr-2533dhp
|
||||
$(call Device/LegacyImage)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WXR-2533DHP
|
||||
DEVICE_DTS := qcom-ipq8064-wxr-2533dhp
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 65536k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
|
||||
sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
@ -100,19 +126,32 @@ define Device/compex_wpq864
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Compex
|
||||
DEVICE_MODEL := WPQ864
|
||||
DEVICE_DTS := qcom-ipq8064-wpq864
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_PACKAGES := kmod-gpio-beeper
|
||||
endef
|
||||
TARGET_DEVICES += compex_wpq864
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := ECW5410
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea7500-v1
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA7500
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_DTS := qcom-ipq8064-ea7500-v1
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
@ -128,7 +167,7 @@ define Device/linksys_ea8500
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA8500
|
||||
DEVICE_DTS := qcom-ipq8064-ea8500
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
@ -136,8 +175,8 @@ define Device/linksys_ea8500
|
||||
BOARD_NAME := ea8500
|
||||
SUPPORTED_DEVICES += ea8500
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-ubi
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea8500
|
||||
@ -146,20 +185,33 @@ define Device/nec_wg2600hp
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC
|
||||
DEVICE_MODEL := Aterm WG2600HP
|
||||
DEVICE_DTS := qcom-ipq8064-wg2600hp
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := wg2600hp
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp
|
||||
|
||||
define Device/nec_wg2600hp3
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC Platforms
|
||||
DEVICE_MODEL := Aterm WG2600HP3
|
||||
SOC := qcom-ipq8062
|
||||
BLOCKSIZE := 64k
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := -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 \
|
||||
ath10k-firmware-qca9984-ct ipq-wifi-nec_wg2600hp3
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp3
|
||||
|
||||
define Device/netgear_d7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 D7800
|
||||
DEVICE_DTS := qcom-ipq8064-d7800
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := D7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
|
||||
@ -176,7 +228,7 @@ define Device/netgear_r7500
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_DTS := qcom-ipq8064-r7500
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500
|
||||
NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
|
||||
@ -193,7 +245,7 @@ define Device/netgear_r7500v2
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_DTS := qcom-ipq8064-r7500v2
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500v2
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
|
||||
@ -209,7 +261,7 @@ define Device/netgear_r7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4S R7800
|
||||
DEVICE_DTS := qcom-ipq8065-r7800
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
|
||||
@ -227,6 +279,7 @@ define Device/qcom_ipq8064-ap148
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := standard
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
@ -243,6 +296,7 @@ define Device/qcom_ipq8064-ap148-legacy
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := legacy
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
@ -257,6 +311,7 @@ define Device/qcom_ipq8064-ap161
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP161
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap161
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
@ -270,6 +325,7 @@ define Device/qcom_ipq8064-db149
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := DB149
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-db149
|
||||
KERNEL_INSTALL := 1
|
||||
BOARD_NAME := db149
|
||||
@ -280,7 +336,7 @@ TARGET_DEVICES += qcom_ipq8064-db149
|
||||
define Device/ruijie_rg-mtfi-m520
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := RG-MTFi-M520
|
||||
DEVICE_DTS := qcom-ipq8064-mtfi-m520
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := rg-mtfi-m520
|
||||
@ -297,12 +353,28 @@ define Device/ruijie_rg-mtfi-m520
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-mtfi-m520
|
||||
|
||||
define Device/tplink_ad7200
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := AD7200
|
||||
DEVICE_VARIANT := v1/v2
|
||||
DEVICE_ALT0_VENDOR := TP-Link
|
||||
DEVICE_ALT0_MODEL := Talon AD7200
|
||||
DEVICE_ALT0_VARIANT := v1/v2
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
TPLINK_BOARD_ID := AD7200
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210
|
||||
endef
|
||||
TARGET_DEVICES += tplink_ad7200
|
||||
|
||||
define Device/tplink_c2600
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer C2600
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_DTS := qcom-ipq8064-c2600
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := c2600
|
||||
@ -316,25 +388,36 @@ define Device/tplink_vr2600v
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer VR2600v
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_DTS := qcom-ipq8064-vr2600v
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL_SIZE := 3072k
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := vr2600v
|
||||
SUPPORTED_DEVICES += vr2600v
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
|
||||
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/ubnt_unifi-ac-hd
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
DEVICE_MODEL := UniFi AC HD
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 14784k
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifi-ac-hd
|
||||
|
||||
define Device/zyxel_nbg6817
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NBG6817
|
||||
DEVICE_DTS := qcom-ipq8065-nbg6817
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := nbg6817
|
||||
|
||||
@ -10,27 +10,30 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -907,8 +907,23 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -907,8 +907,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-ipq4019-ap.dk04.1-c3.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c2.dtb \
|
||||
+ qcom-ipq8062-wg2600hp3.dtb \
|
||||
qcom-ipq8064-ap148.dtb \
|
||||
qcom-ipq8064-rb3011.dtb \
|
||||
+ qcom-ipq8064-ap161.dtb \
|
||||
+ qcom-ipq8064-c2600.dtb \
|
||||
+ qcom-ipq8064-d7800.dtb \
|
||||
+ qcom-ipq8064-db149.dtb \
|
||||
+ qcom-ipq8064-ap161.dtb \
|
||||
+ qcom-ipq8064-ea7500-v1.dtb \
|
||||
+ qcom-ipq8064-ea8500.dtb \
|
||||
+ qcom-ipq8064-mtfi-m520.dtb \
|
||||
+ qcom-ipq8064-g10.dtb \
|
||||
+ qcom-ipq8064-r7500.dtb \
|
||||
+ qcom-ipq8064-r7500v2.dtb \
|
||||
+ qcom-ipq8064-rg-mtfi-m520.dtb \
|
||||
+ qcom-ipq8064-unifi-ac-hd.dtb \
|
||||
+ qcom-ipq8064-wg2600hp.dtb \
|
||||
+ qcom-ipq8064-wpq864.dtb \
|
||||
+ qcom-ipq8064-wxr-2533dhp.dtb \
|
||||
+ qcom-ipq8065-nbg6817.dtb \
|
||||
+ qcom-ipq8065-r7800.dtb \
|
||||
+ qcom-ipq8068-ecw5410.dtb \
|
||||
qcom-msm8660-surf.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
qcom-msm8974-fairphone-fp2.dtb \
|
||||
|
||||
@ -10,25 +10,29 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -842,7 +842,21 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -842,7 +842,25 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-ipq4019-ap.dk04.1-c3.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c2.dtb \
|
||||
+ qcom-ipq8062-wg2600hp3.dtb \
|
||||
qcom-ipq8064-ap148.dtb \
|
||||
+ qcom-ipq8064-ap161.dtb \
|
||||
+ qcom-ipq8064-c2600.dtb \
|
||||
+ qcom-ipq8064-d7800.dtb \
|
||||
+ qcom-ipq8064-db149.dtb \
|
||||
+ qcom-ipq8064-ap161.dtb \
|
||||
+ qcom-ipq8064-ea7500-v1.dtb \
|
||||
+ qcom-ipq8064-ea8500.dtb \
|
||||
+ qcom-ipq8064-mtfi-m520.dtb \
|
||||
+ qcom-ipq8064-g10.dtb \
|
||||
+ qcom-ipq8064-r7500.dtb \
|
||||
+ qcom-ipq8064-r7500v2.dtb \
|
||||
+ qcom-ipq8064-rg-mtfi-m520.dtb \
|
||||
+ qcom-ipq8064-unifi-ac-hd.dtb \
|
||||
+ qcom-ipq8064-wg2600hp.dtb \
|
||||
+ qcom-ipq8064-wpq864.dtb \
|
||||
+ qcom-ipq8064-wxr-2533dhp.dtb \
|
||||
+ qcom-ipq8065-nbg6817.dtb \
|
||||
+ qcom-ipq8065-r7800.dtb \
|
||||
+ qcom-ipq8068-ecw5410.dtb \
|
||||
qcom-msm8660-surf.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
qcom-msm8974-fairphone-fp2.dtb \
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1840,6 +1840,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
|
||||
|
||||
endchoice
|
||||
|
||||
+config CMDLINE_OVERRIDE
|
||||
+ bool "Use alternative cmdline from device tree"
|
||||
+ help
|
||||
+ Some bootloaders may have uneditable bootargs. While CMDLINE_FORCE can
|
||||
+ be used, this is not a good option for kernels that are shared across
|
||||
+ devices. This setting enables using "chosen/cmdline-override" as the
|
||||
+ cmdline if it exists in the device tree.
|
||||
+
|
||||
config CMDLINE
|
||||
string "Default kernel command string"
|
||||
default ""
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -1060,6 +1060,17 @@ int __init early_init_dt_scan_chosen(uns
|
||||
if (p != NULL && l > 0)
|
||||
strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
|
||||
|
||||
+ /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
|
||||
+ * device tree option of chosen/bootargs-override. This is
|
||||
+ * helpful on boards where u-boot sets bootargs, and is unable
|
||||
+ * to be modified.
|
||||
+ */
|
||||
+#ifdef CONFIG_CMDLINE_OVERRIDE
|
||||
+ p = of_get_flat_dt_prop(node, "bootargs-override", &l);
|
||||
+ if (p != NULL && l > 0)
|
||||
+ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
|
||||
@ -8,5 +8,5 @@
|
||||
+ if (p != NULL && l > 0)
|
||||
+ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
|
||||
|
||||
/*
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
/* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
|
||||
* device tree option of chosen/bootargs-override. This is
|
||||
|
||||
Loading…
Reference in New Issue
Block a user