add kernel 4.14 support for ar71xx

This commit is contained in:
coolsnowwolf 2018-09-08 16:01:41 +08:00
parent d59158550b
commit 2ca861b5a9
200 changed files with 9037 additions and 328 deletions

View File

@ -129,6 +129,7 @@ archer-c7)
;;
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2)
ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E"
@ -137,7 +138,8 @@ archer-c60-v2)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
case "$board" in
archer-c59-v1)
archer-c59-v1|\
archer-c59-v2)
ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
;;
esac
@ -402,6 +404,10 @@ gl-ar750)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:white:wlan5g" "phy0tpt"
;;
gl-ar750s)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
;;
gl-mifi)
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
@ -627,6 +633,7 @@ rb-911-2hn|\
rb-911-5hn)
ucidef_set_led_netdev "eth" "ETH" "rb:green:eth" "eth0"
;;
rb-931-2nd|\
rb-941-2nd)
ucidef_set_led_timer "user" "USR/ACT" "rb:green:user" "1000" "1000"
;;
@ -680,6 +687,9 @@ rb-wap-2nd)
ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000"
ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt"
;;
rb-wapr-2nd)
ucidef_set_led_wlan "wlan" "WLAN" "rb:green:user" "phy0tpt"
;;
re355|\
re450)
ucidef_set_led_netdev "lan_data" "LAN Data" "$board:green:lan_data" "eth0" "tx rx"

View File

@ -71,6 +71,7 @@ ar71xx_setup_interfaces()
aw-nr580|\
bullet-m|\
c-55|\
cap324|\
cap4200ag|\
cf-e380ac-v1|\
cf-e380ac-v2|\
@ -113,6 +114,7 @@ ar71xx_setup_interfaces()
rb-sxt2n|\
rb-sxt5n|\
rb-wap-2nd|\
rb-wapr-2nd|\
rb-wapg-5hact2hnd|\
re355|\
re450|\
@ -169,7 +171,6 @@ ar71xx_setup_interfaces()
pb42|\
pb44|\
rb-951ui-2hnd|\
rb-952ui-5ac2nd|\
routerstation|\
tl-wr710n|\
tl-wr720n-v3|\
@ -182,7 +183,8 @@ ar71xx_setup_interfaces()
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2|\
rb-951ui-2nd)
rb-951ui-2nd|\
rb-952ui-5ac2nd)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
@ -247,6 +249,7 @@ ar71xx_setup_interfaces()
;;
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
fritz4020|\
rb-450g)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
@ -273,7 +276,6 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "3:wan" "4:lan"
;;
cap324|\
rme-eg200)
ucidef_set_interface_lan "eth0" "dhcp"
;;
@ -306,14 +308,21 @@ ar71xx_setup_interfaces()
dir-835-a1|\
esr900|\
mynet-n750|\
sr3200|\
tl-wr1043n-v5)
sr3200)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
tl-wr1043n-v5)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
dap-2695-a1)
ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
;;
rb-931-2nd)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:3" "2:lan:2" "3:wan:1"
;;
rb-941-2nd)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:wan:1"
@ -411,7 +420,7 @@ ar71xx_setup_interfaces()
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
ew-balin)
ucidef_set_interface_raw "usb2" "usb0" "static"
ucidef_set_interface "usb2" ifname "usb0" protocol "static"
ucidef_add_switch "switch0" \
"0@eth0" "5:lan:4" "4:lan:5" "3:wan"
;;
@ -442,6 +451,10 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan"
;;
gl-ar750s)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:2" "3:lan:1" "1:wan"
;;
jwap230)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
ucidef_add_switch "switch0" \
@ -478,7 +491,7 @@ ar71xx_setup_interfaces()
;;
tellstick-znet-lite)
ucidef_set_interface_wan "eth0"
ucidef_set_interface_raw "wlan" "wlan0" "dhcp"
ucidef_set_interface "wlan" ifname "wlan0" protocol "dhcp"
;;
tl-mr3420-v2|\
tl-wr841n-v8|\
@ -510,7 +523,7 @@ ar71xx_setup_interfaces()
;;
tl-wr841n-v1|\
tl-wr941nd)
ucidef_set_interface_raw "eth" "eth0"
ucidef_set_interface "eth" ifname "eth0"
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
tl-wr741nd|\

View File

@ -66,6 +66,7 @@ get_status_led() {
archer-c25-v1|\
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
archer-c7-v4|\
@ -371,6 +372,7 @@ get_status_led() {
rb-911g-2hpnd|\
rb-911g-5hpacd|\
rb-911g-5hpnd|\
rb-931-2nd|\
rb-941-2nd|\
rb-951ui-2nd|\
rb-952ui-5ac2nd|\
@ -378,7 +380,8 @@ get_status_led() {
rb-lhg-5nd|\
rb-map-2nd|\
rb-mapl-2nd|\
rb-wap-2nd)
rb-wap-2nd|\
rb-wapr-2nd)
status_led="rb:green:user"
;;
rb-951ui-2hnd)

View File

@ -100,6 +100,7 @@ case "$FIRMWARE" in
ath10kcal_extract "caldata" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
;;
gl-ar750s|\
gl-ar750|\
tl-wpa8630)
ath10kcal_extract "art" 20480 2116
@ -167,6 +168,7 @@ case "$FIRMWARE" in
case $board in
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
cf-e355ac-v2|\

View File

@ -14,6 +14,7 @@ board=$(board_name)
case "$board" in
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2)
echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress

View File

@ -492,6 +492,9 @@ ar71xx_board_detect() {
;;
*"Archer C59 v1")
name="archer-c59-v1"
;;
*"Archer C59 v2")
name="archer-c59-v2"
;;
*"Archer C60 v1")
name="archer-c60-v1"
@ -582,7 +585,14 @@ ar71xx_board_detect() {
;;
*"CPE510/520")
name="cpe510"
tplink_pharos_board_detect "$(tplink_pharos_get_model_string | tr -d '\r')"
tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
case $AR71XX_MODEL in
'TP-Link CPE510 v2.0')
;;
*)
tplink_pharos_board_detect "$(tplink_pharos_get_model_string | tr -d '\r')"
;;
esac
;;
*"CPE830")
name="cpe830"
@ -754,6 +764,9 @@ ar71xx_board_detect() {
*"GL-AR750")
name="gl-ar750"
;;
*"GL-AR750S")
name="gl-ar750s"
;;
*"GL-CONNECT INET v1")
name="gl-inet"
@ -1067,6 +1080,9 @@ ar71xx_board_detect() {
*"RouterBOARD 921GS-5HPacD r2")
name="rb-921gs-5hpacd-r2"
;;
*"RouterBOARD 931-2nD")
name="rb-931-2nd"
;;
*"RouterBOARD 941-2nD")
name="rb-941-2nd"
;;
@ -1103,6 +1119,9 @@ ar71xx_board_detect() {
*"RouterBOARD wAP 2nD r2")
name="rb-wap-2nd"
;;
*"RouterBOARD wAP R-2nD")
name="rb-wapr-2nd"
;;
*"RouterBOARD wAP G-5HacT2HnD")
name="rb-wapg-5hact2hnd"
;;

View File

@ -212,6 +212,7 @@ platform_check_image() {
archer-c25-v1|\
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
archer-c7-v4|\
@ -267,6 +268,7 @@ platform_check_image() {
gl-ar300m|\
gl-ar300|\
gl-ar750|\
gl-ar750s|\
gl-domino|\
gl-mifi|\
gl-usb150|\
@ -580,7 +582,6 @@ platform_check_image() {
return $?
;;
cpe210|\
cpe510|\
eap120|\
wbs210|\
wbs510)
@ -591,6 +592,20 @@ platform_check_image() {
tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0
return 1
;;
cpe510)
local modelstr="$(tplink_pharos_v2_get_model_string)"
tplink_pharos_board_detect $modelstr
case $AR71XX_MODEL in
'TP-Link CPE510 v2.0')
tplink_pharos_check_image "$1" "7f454c46" "$modelstr" '\0\xff\r' && return 0
return 1
;;
*)
tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_get_model_string)" '' && return 0
return 1
;;
esac
;;
a40|\
a60|\
mr1750|\
@ -706,6 +721,7 @@ platform_check_image() {
rb-750up-r2|\
rb-911-2hn|\
rb-911-5hn|\
rb-931-2nd|\
rb-941-2nd|\
rb-951ui-2nd|\
rb-952ui-5ac2nd|\
@ -714,7 +730,8 @@ platform_check_image() {
rb-map-2nd|\
rb-mapl-2nd|\
rb-wap-2nd|\
rb-wapg-5hact2hnd)
rb-wapg-5hact2hnd|\
rb-wapr-2nd)
return 0
;;
esac
@ -732,6 +749,7 @@ platform_pre_upgrade() {
rb-750up-r2|\
rb-911-2hn|\
rb-911-5hn|\
rb-931-2nd|\
rb-941-2nd|\
rb-951ui-2nd|\
rb-952ui-5ac2nd|\
@ -740,7 +758,8 @@ platform_pre_upgrade() {
rb-map-2nd|\
rb-mapl-2nd|\
rb-wap-2nd|\
rb-wapg-5hact2hnd)
rb-wapg-5hact2hnd|\
rb-wapr-2nd)
# erase firmware if booted from initramfs
[ -z "$(rootfs_type)" ] && mtd erase firmware
;;

View File

@ -0,0 +1,485 @@
CONFIG_AG71XX=y
CONFIG_AG71XX_AR8216_SUPPORT=y
# CONFIG_AG71XX_DEBUG is not set
# CONFIG_AG71XX_DEBUG_FS is not set
CONFIG_AR8216_PHY=y
CONFIG_AR8216_PHY_LEDS=y
CONFIG_ARCH_BINFMT_ELF_STATE=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set
CONFIG_ARCH_HAS_RESET_CONTROLLER=y
# CONFIG_ARCH_HAS_SG_CHAIN is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_AT803X_PHY=y
CONFIG_ATH79=y
# CONFIG_ATH79_DEV_AP9X_PCI is not set
# CONFIG_ATH79_DEV_DSA is not set
# CONFIG_ATH79_DEV_ETH is not set
# CONFIG_ATH79_DEV_GPIO_BUTTONS is not set
# CONFIG_ATH79_DEV_LEDS_GPIO is not set
# CONFIG_ATH79_DEV_M25P80 is not set
# CONFIG_ATH79_DEV_SPI is not set
# CONFIG_ATH79_DEV_USB is not set
# CONFIG_ATH79_MACH_A60 is not set
# CONFIG_ATH79_MACH_ALFA_AP120C is not set
# CONFIG_ATH79_MACH_ALFA_AP96 is not set
# CONFIG_ATH79_MACH_ALFA_NX is not set
# CONFIG_ATH79_MACH_ALL0258N is not set
# CONFIG_ATH79_MACH_ALL0315N is not set
# CONFIG_ATH79_MACH_ANTMINER_S1 is not set
# CONFIG_ATH79_MACH_ANTMINER_S3 is not set
# CONFIG_ATH79_MACH_ANTROUTER_R1 is not set
# CONFIG_ATH79_MACH_AP121 is not set
# CONFIG_ATH79_MACH_AP121F is not set
# CONFIG_ATH79_MACH_AP132 is not set
# CONFIG_ATH79_MACH_AP136 is not set
# CONFIG_ATH79_MACH_AP143 is not set
# CONFIG_ATH79_MACH_AP147 is not set
# CONFIG_ATH79_MACH_AP152 is not set
# CONFIG_ATH79_MACH_AP531B0 is not set
# CONFIG_ATH79_MACH_AP81 is not set
# CONFIG_ATH79_MACH_AP90Q is not set
# CONFIG_ATH79_MACH_AP91_5G is not set
# CONFIG_ATH79_MACH_AP96 is not set
# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
# CONFIG_ATH79_MACH_ARDUINO_YUN is not set
# CONFIG_ATH79_MACH_AW_NR580 is not set
# CONFIG_ATH79_MACH_BHR_4GRV2 is not set
# CONFIG_ATH79_MACH_BHU_BXU2000N2_A is not set
# CONFIG_ATH79_MACH_BSB is not set
# CONFIG_ATH79_MACH_C55 is not set
# CONFIG_ATH79_MACH_C60 is not set
# CONFIG_ATH79_MACH_CAP324 is not set
# CONFIG_ATH79_MACH_CAP4200AG is not set
# CONFIG_ATH79_MACH_CARAMBOLA2 is not set
# CONFIG_ATH79_MACH_CF_E316N_V2 is not set
# CONFIG_ATH79_MACH_CF_E320N_V2 is not set
# CONFIG_ATH79_MACH_CF_E355AC is not set
# CONFIG_ATH79_MACH_CF_E375AC is not set
# CONFIG_ATH79_MACH_CF_E380AC_V1 is not set
# CONFIG_ATH79_MACH_CF_E380AC_V2 is not set
# CONFIG_ATH79_MACH_CF_E520N is not set
# CONFIG_ATH79_MACH_CF_E530N is not set
# CONFIG_ATH79_MACH_CPE505N is not set
# CONFIG_ATH79_MACH_CPE510 is not set
# CONFIG_ATH79_MACH_CPE830 is not set
# CONFIG_ATH79_MACH_CPE870 is not set
# CONFIG_ATH79_MACH_CR3000 is not set
# CONFIG_ATH79_MACH_CR5000 is not set
# CONFIG_ATH79_MACH_DAP_1330_A1 is not set
# CONFIG_ATH79_MACH_DAP_2695_A1 is not set
# CONFIG_ATH79_MACH_DB120 is not set
# CONFIG_ATH79_MACH_DGL_5500_A1 is not set
# CONFIG_ATH79_MACH_DHP_1565_A1 is not set
# CONFIG_ATH79_MACH_DIR_505_A1 is not set
# CONFIG_ATH79_MACH_DIR_600_A1 is not set
# CONFIG_ATH79_MACH_DIR_615_C1 is not set
# CONFIG_ATH79_MACH_DIR_615_I1 is not set
# CONFIG_ATH79_MACH_DIR_825_B1 is not set
# CONFIG_ATH79_MACH_DIR_825_C1 is not set
# CONFIG_ATH79_MACH_DIR_869_A1 is not set
# CONFIG_ATH79_MACH_DLAN_HOTSPOT is not set
# CONFIG_ATH79_MACH_DLAN_PRO_1200_AC is not set
# CONFIG_ATH79_MACH_DLAN_PRO_500_WP is not set
# CONFIG_ATH79_MACH_DOMYWIFI_DW33D is not set
# CONFIG_ATH79_MACH_DR342 is not set
# CONFIG_ATH79_MACH_DR344 is not set
# CONFIG_ATH79_MACH_DR531 is not set
# CONFIG_ATH79_MACH_DRAGINO2 is not set
# CONFIG_ATH79_MACH_E1700AC_V2 is not set
# CONFIG_ATH79_MACH_E2100L is not set
# CONFIG_ATH79_MACH_E558_V2 is not set
# CONFIG_ATH79_MACH_E600G_V2 is not set
# CONFIG_ATH79_MACH_E750A_V4 is not set
# CONFIG_ATH79_MACH_E750G_V8 is not set
# CONFIG_ATH79_MACH_EAP120 is not set
# CONFIG_ATH79_MACH_EAP300V2 is not set
# CONFIG_ATH79_MACH_EAP7660D is not set
# CONFIG_ATH79_MACH_EL_M150 is not set
# CONFIG_ATH79_MACH_EL_MINI is not set
# CONFIG_ATH79_MACH_ENS202EXT is not set
# CONFIG_ATH79_MACH_EPG5000 is not set
# CONFIG_ATH79_MACH_ESR1750 is not set
# CONFIG_ATH79_MACH_ESR900 is not set
# CONFIG_ATH79_MACH_EW_BALIN is not set
# CONFIG_ATH79_MACH_EW_DORIN is not set
# CONFIG_ATH79_MACH_F9K1115V2 is not set
# CONFIG_ATH79_MACH_FRITZ300E is not set
# CONFIG_ATH79_MACH_FRITZ4020 is not set
# CONFIG_ATH79_MACH_FRITZ450E is not set
# CONFIG_ATH79_MACH_GL_AR150 is not set
# CONFIG_ATH79_MACH_GL_AR300 is not set
# CONFIG_ATH79_MACH_GL_AR300M is not set
# CONFIG_ATH79_MACH_GL_AR750 is not set
# CONFIG_ATH79_MACH_GL_AR750S is not set
# CONFIG_ATH79_MACH_GL_DOMINO is not set
# CONFIG_ATH79_MACH_GL_INET is not set
# CONFIG_ATH79_MACH_GL_MIFI is not set
# CONFIG_ATH79_MACH_GL_USB150 is not set
# CONFIG_ATH79_MACH_GS_OOLITE_V1 is not set
# CONFIG_ATH79_MACH_GS_OOLITE_V5_2 is not set
# CONFIG_ATH79_MACH_HIVEAP_121 is not set
# CONFIG_ATH79_MACH_HIWIFI_HC6361 is not set
# CONFIG_ATH79_MACH_HORNET_UB is not set
# CONFIG_ATH79_MACH_JA76PF is not set
# CONFIG_ATH79_MACH_JWAP003 is not set
# CONFIG_ATH79_MACH_JWAP230 is not set
# CONFIG_ATH79_MACH_KOALA is not set
# CONFIG_ATH79_MACH_LAN_TURTLE is not set
# CONFIG_ATH79_MACH_LIMA is not set
# CONFIG_ATH79_MACH_MC_MAC1200R is not set
# CONFIG_ATH79_MACH_MR12 is not set
# CONFIG_ATH79_MACH_MR16 is not set
# CONFIG_ATH79_MACH_MR1750 is not set
# CONFIG_ATH79_MACH_MR18 is not set
# CONFIG_ATH79_MACH_MR600 is not set
# CONFIG_ATH79_MACH_MR900 is not set
# CONFIG_ATH79_MACH_MYNET_N600 is not set
# CONFIG_ATH79_MACH_MYNET_N750 is not set
# CONFIG_ATH79_MACH_MYNET_REXT is not set
# CONFIG_ATH79_MACH_MZK_W04NU is not set
# CONFIG_ATH79_MACH_MZK_W300NH is not set
# CONFIG_ATH79_MACH_N5Q is not set
# CONFIG_ATH79_MACH_NBG460N is not set
# CONFIG_ATH79_MACH_NBG6716 is not set
# CONFIG_ATH79_MACH_OM2P is not set
# CONFIG_ATH79_MACH_OM5P is not set
# CONFIG_ATH79_MACH_OM5P_AC is not set
# CONFIG_ATH79_MACH_OM5P_ACv2 is not set
# CONFIG_ATH79_MACH_OMY_G1 is not set
# CONFIG_ATH79_MACH_OMY_X1 is not set
# CONFIG_ATH79_MACH_ONION_OMEGA is not set
# CONFIG_ATH79_MACH_PB42 is not set
# CONFIG_ATH79_MACH_PB44 is not set
# CONFIG_ATH79_MACH_PQI_AIR_PEN is not set
# CONFIG_ATH79_MACH_QIHOO_C301 is not set
# CONFIG_ATH79_MACH_R36A is not set
# CONFIG_ATH79_MACH_R602N is not set
# CONFIG_ATH79_MACH_R6100 is not set
# CONFIG_ATH79_MACH_RAMBUTAN is not set
# CONFIG_ATH79_MACH_RB2011 is not set
# CONFIG_ATH79_MACH_RB4XX is not set
# CONFIG_ATH79_MACH_RB750 is not set
# CONFIG_ATH79_MACH_RB91X is not set
# CONFIG_ATH79_MACH_RB922 is not set
# CONFIG_ATH79_MACH_RB95X is not set
# CONFIG_ATH79_MACH_RBSPI is not set
# CONFIG_ATH79_MACH_RBSXTLITE is not set
# CONFIG_ATH79_MACH_RE355 is not set
# CONFIG_ATH79_MACH_RE450 is not set
# CONFIG_ATH79_MACH_RME_EG200 is not set
# CONFIG_ATH79_MACH_RUT9XX is not set
# CONFIG_ATH79_MACH_RW2458N is not set
# CONFIG_ATH79_MACH_SC1750 is not set
# CONFIG_ATH79_MACH_SC300M is not set
# CONFIG_ATH79_MACH_SC450 is not set
# CONFIG_ATH79_MACH_SMART_300 is not set
# CONFIG_ATH79_MACH_SOM9331 is not set
# CONFIG_ATH79_MACH_SR3200 is not set
# CONFIG_ATH79_MACH_T830 is not set
# CONFIG_ATH79_MACH_TELLSTICK_ZNET_LITE is not set
# CONFIG_ATH79_MACH_TEW_632BRP is not set
# CONFIG_ATH79_MACH_TEW_673GRU is not set
# CONFIG_ATH79_MACH_TEW_712BR is not set
# CONFIG_ATH79_MACH_TEW_732BR is not set
# CONFIG_ATH79_MACH_TEW_823DRU is not set
# CONFIG_ATH79_MACH_TL_MR11U is not set
# CONFIG_ATH79_MACH_TL_MR13U is not set
# CONFIG_ATH79_MACH_TL_MR3020 is not set
# CONFIG_ATH79_MACH_TL_MR3X20 is not set
# CONFIG_ATH79_MACH_TL_MR6400 is not set
# CONFIG_ATH79_MACH_TL_WA701ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WA7210N_V2 is not set
# CONFIG_ATH79_MACH_TL_WA801ND_V3 is not set
# CONFIG_ATH79_MACH_TL_WA830RE_V2 is not set
# CONFIG_ATH79_MACH_TL_WA850RE_V2 is not set
# CONFIG_ATH79_MACH_TL_WA855RE_V1 is not set
# CONFIG_ATH79_MACH_TL_WA901ND is not set
# CONFIG_ATH79_MACH_TL_WA901ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WA901ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WAX50RE is not set
# CONFIG_ATH79_MACH_TL_WDR3320_V2 is not set
# CONFIG_ATH79_MACH_TL_WDR3500 is not set
# CONFIG_ATH79_MACH_TL_WDR4300 is not set
# CONFIG_ATH79_MACH_TL_WDR6500_V2 is not set
# CONFIG_ATH79_MACH_TL_WPA8630 is not set
# CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
# CONFIG_ATH79_MACH_TL_WR2543N is not set
# CONFIG_ATH79_MACH_TL_WR703N is not set
# CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
# CONFIG_ATH79_MACH_TL_WR741ND is not set
# CONFIG_ATH79_MACH_TL_WR741ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WR802N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR802N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR810N is not set
# CONFIG_ATH79_MACH_TL_WR810N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR840N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V8 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V9 is not set
# CONFIG_ATH79_MACH_TL_WR902AC_V1 is not set
# CONFIG_ATH79_MACH_TL_WR940N_V4 is not set
# CONFIG_ATH79_MACH_TL_WR941ND is not set
# CONFIG_ATH79_MACH_TL_WR941ND_V6 is not set
# CONFIG_ATH79_MACH_TL_WR942N_V1 is not set
# CONFIG_ATH79_MACH_TS_D084 is not set
# CONFIG_ATH79_MACH_TUBE2H is not set
# CONFIG_ATH79_MACH_UBNT is not set
# CONFIG_ATH79_MACH_UBNT_UNIFIAC is not set
# CONFIG_ATH79_MACH_UBNT_XM is not set
# CONFIG_ATH79_MACH_WAM250 is not set
# CONFIG_ATH79_MACH_WEIO is not set
# CONFIG_ATH79_MACH_WHR_HP_G300N is not set
# CONFIG_ATH79_MACH_WI2A_AC200I is not set
# CONFIG_ATH79_MACH_WIFI_PINEAPPLE_NANO is not set
# CONFIG_ATH79_MACH_WLAE_AG300N is not set
# CONFIG_ATH79_MACH_WLR8100 is not set
# CONFIG_ATH79_MACH_WNDAP360 is not set
# CONFIG_ATH79_MACH_WNDR3700 is not set
# CONFIG_ATH79_MACH_WNDR4300 is not set
# CONFIG_ATH79_MACH_WNR2000 is not set
# CONFIG_ATH79_MACH_WNR2000_V3 is not set
# CONFIG_ATH79_MACH_WNR2000_V4 is not set
# CONFIG_ATH79_MACH_WNR2200 is not set
# CONFIG_ATH79_MACH_WP543 is not set
# CONFIG_ATH79_MACH_WPE72 is not set
# CONFIG_ATH79_MACH_WPJ342 is not set
# CONFIG_ATH79_MACH_WPJ344 is not set
# CONFIG_ATH79_MACH_WPJ531 is not set
# CONFIG_ATH79_MACH_WPJ558 is not set
# CONFIG_ATH79_MACH_WPJ563 is not set
# CONFIG_ATH79_MACH_WRT160NL is not set
# CONFIG_ATH79_MACH_WRT400N is not set
# CONFIG_ATH79_MACH_WRTNODE2Q is not set
# CONFIG_ATH79_MACH_WZR_450HP2 is not set
# CONFIG_ATH79_MACH_WZR_HP_AG300H is not set
# CONFIG_ATH79_MACH_WZR_HP_G300NH is not set
# CONFIG_ATH79_MACH_WZR_HP_G300NH2 is not set
# CONFIG_ATH79_MACH_WZR_HP_G450H is not set
# CONFIG_ATH79_MACH_XD3200 is not set
# CONFIG_ATH79_MACH_Z1 is not set
# CONFIG_ATH79_MACH_ZBT_WE1526 is not set
# CONFIG_ATH79_MACH_ZCN_1523H is not set
# CONFIG_ATH79_NVRAM is not set
# CONFIG_ATH79_PCI_ATH9K_FIXUP is not set
# CONFIG_ATH79_ROUTERBOOT is not set
CONFIG_ATH79_WDT=y
CONFIG_CEVT_R4K=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
CONFIG_CMDLINE_BOOL=y
# CONFIG_CMDLINE_OVERRIDE is not set
# CONFIG_COMMON_CLK_BOSTON is not set
CONFIG_COMMON_CLK=y
CONFIG_CPU_BIG_ENDIAN=y
CONFIG_CPU_GENERIC_DUMP_TLB=y
CONFIG_CPU_HAS_PREFETCH=y
CONFIG_CPU_HAS_RIXI=y
CONFIG_CPU_HAS_SYNC=y
CONFIG_CPU_MIPS32=y
CONFIG_CPU_MIPS32_R2=y
CONFIG_CPU_MIPSR2=y
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
CONFIG_CPU_R4K_CACHE_TLB=y
CONFIG_CPU_R4K_FPU=y
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_HIGHMEM=y
CONFIG_CPU_SUPPORTS_MSA=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CSRC_R4K=y
CONFIG_DMA_NONCOHERENT=y
CONFIG_EARLY_PRINTK=y
CONFIG_ETHERNET_PACKET_MANGLE=y
CONFIG_FIXED_PHY=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_IO=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_74X164=y
CONFIG_GPIO_ATH79=y
CONFIG_GPIO_GENERIC=y
# CONFIG_GPIO_LATCH is not set
CONFIG_GPIO_NXP_74HC153=y
CONFIG_GPIO_PCF857X=y
CONFIG_GPIO_SYSFS=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDWARE_WATCHPOINTS=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT_MAP=y
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
# CONFIG_HAVE_ARCH_BITREVERSE is not set
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
CONFIG_HAVE_CBPF_JIT=y
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_HAVE_NET_DSA=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HZ_PERIODIC=y
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_GPIO=y
CONFIG_IMAGE_CMDLINE_HACK=y
CONFIG_INITRAMFS_ROOT_GID=0
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_SOURCE="../../root"
CONFIG_INTEL_XWAY_PHY=y
CONFIG_IP17XX_PHY=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_MIPS_CPU=y
CONFIG_IRQ_WORK=y
CONFIG_LEDS_GPIO=y
CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BOARDINFO=y
CONFIG_MDIO_GPIO=y
CONFIG_MICREL_PHY=y
CONFIG_MIPS=y
CONFIG_MIPS_ASID_BITS=8
CONFIG_MIPS_ASID_SHIFT=0
CONFIG_MIPS_CLOCK_VSYSCALL=y
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
CONFIG_MIPS_MACHINE=y
CONFIG_MIPS_SPRAM=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_GEOMETRY=y
# CONFIG_MTD_CFI_I2 is not set
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CYBERTAN_PARTS=y
CONFIG_MTD_M25P80=y
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
CONFIG_MTD_MYLOADER_PARTS=y
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_EVA_FW=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_LZMA_FW=y
CONFIG_MTD_SPLIT_MINOR_FW=y
CONFIG_MTD_SPLIT_SEAMA_FW=y
CONFIG_MTD_SPLIT_TPLINK_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_SPLIT_WRGG_FW=y
CONFIG_MTD_TPLINK_PARTS=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_NET_DSA=y
CONFIG_NET_DSA_MV88E6060=y
CONFIG_NET_DSA_MV88E6063=y
CONFIG_NET_DSA_TAG_TRAILER=y
CONFIG_NET_SWITCHDEV=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
# CONFIG_OF is not set
# CONFIG_PCI_AR724X is not set
CONFIG_PCI_DRIVERS_LEGACY=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PGTABLE_LEVELS=2
CONFIG_PHYLIB=y
CONFIG_RATIONAL=y
# CONFIG_RCU_STALL_COMMON is not set
CONFIG_RTL8306_PHY=y
CONFIG_RTL8366RB_PHY=y
CONFIG_RTL8366S_PHY=y
CONFIG_RTL8366_SMI=y
CONFIG_RTL8367_PHY=y
# CONFIG_SCHED_INFO is not set
# CONFIG_SCSI_DMA is not set
# CONFIG_SERIAL_8250_FSL is not set
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
# CONFIG_SOC_AR71XX is not set
# CONFIG_SOC_AR724X is not set
# CONFIG_SOC_AR913X is not set
# CONFIG_SOC_AR933X is not set
# CONFIG_SOC_AR934X is not set
# CONFIG_SOC_QCA953X is not set
# CONFIG_SOC_QCA955X is not set
# CONFIG_SOC_QCA956X is not set
CONFIG_SPI=y
CONFIG_SPI_ATH79=y
CONFIG_SPI_BITBANG=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_MASTER=y
# CONFIG_SPI_RB4XX is not set
# CONFIG_SPI_VSC7385 is not set
CONFIG_SRCU=y
CONFIG_SWCONFIG=y
CONFIG_SWCONFIG_LEDS=y
CONFIG_SWPHY=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
CONFIG_SYS_HAS_EARLY_PRINTK=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
CONFIG_SYS_SUPPORTS_MIPS16=y
CONFIG_SYS_SUPPORTS_ZBOOT=y
CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_USB_SUPPORT=y

View File

@ -52,6 +52,7 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
@ -124,6 +125,7 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_GL_AR300 is not set
# CONFIG_ATH79_MACH_GL_AR300M is not set
# CONFIG_ATH79_MACH_GL_AR750 is not set
# CONFIG_ATH79_MACH_GL_AR750S is not set
# CONFIG_ATH79_MACH_GL_DOMINO is not set
# CONFIG_ATH79_MACH_GL_INET is not set
# CONFIG_ATH79_MACH_GL_MIFI is not set

View File

@ -847,6 +847,17 @@ config ATH79_MACH_GL_AR750
select ATH79_DEV_USB
select ATH79_DEV_WMAC
config ATH79_MACH_GL_AR750S
bool "GL.iNet GL-AR750S support"
select SOC_QCA956X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_USB
select ATH79_DEV_WMAC
config ATH79_MACH_GL_DOMINO
bool "DOMINO support"
select SOC_AR933X
@ -1155,6 +1166,7 @@ config ATH79_MACH_RBSPI
MikroTik ROuterBOARD 911-5Hn (911 Lite5)
MikroTik RouterBOARD mAP
MikroTik RouterBOARD mAP lite
MikroTik RouterBOARD hAP mini
MikroTik RouterBOARD hAP lite
MikroTik RouterBOARD hAP
MikroTik RouterBOARD hAP ac
@ -1165,6 +1177,7 @@ config ATH79_MACH_RBSPI
MikroTik RouterBOARD LHG 5
MikroTik RouterBOARD cAP (EXPERIMENTAL)
MikroTik RouterBOARD wAP
MikroTik RouterBOARD wAP R-2nD
config ATH79_MACH_RBSXTLITE
bool "MikroTik RouterBOARD SXT Lite"
@ -1453,7 +1466,7 @@ config ATH79_MACH_RW2458N
select ATH79_DEV_USB
config ATH79_MACH_CAP324
bool "PowerCloud CAP324 support"
bool "PowerCloud Systems CAP324 support"
select SOC_AR934X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
@ -1473,7 +1486,7 @@ config ATH79_MACH_CAP4200AG
select ATH79_DEV_WMAC
config ATH79_MACH_CR3000
bool "PowerCloud CR3000 support"
bool "PowerCloud Systems CR3000 support"
select SOC_AR934X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
@ -1562,6 +1575,17 @@ config ATH79_MACH_ARCHER_C59_V1
select ATH79_DEV_USB
select ATH79_DEV_WMAC
config ATH79_MACH_ARCHER_C59_V2
bool "TP-LINK Archer C59 v2 support"
select SOC_QCA956X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_USB
select ATH79_DEV_WMAC
config ATH79_MACH_ARCHER_C60_V1
bool "TP-LINK Archer C60 v1 support"
select SOC_QCA956X

View File

@ -135,6 +135,7 @@ obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o
obj-$(CONFIG_ATH79_MACH_GL_AR300) += mach-gl-ar300.o
obj-$(CONFIG_ATH79_MACH_GL_AR300M) += mach-gl-ar300m.o
obj-$(CONFIG_ATH79_MACH_GL_AR750) += mach-gl-ar750.o
obj-$(CONFIG_ATH79_MACH_GL_AR750S) += mach-gl-ar750s.o
obj-$(CONFIG_ATH79_MACH_GL_DOMINO) += mach-gl-domino.o
obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o
obj-$(CONFIG_ATH79_MACH_GL_MIFI) += mach-gl-mifi.o

View File

@ -86,12 +86,12 @@ static struct at803x_platform_data a60_at803x_data = {
static struct mdio_board_info a60_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &a60_at803x_data,
},
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 2,
.mdio_addr = 2,
.platform_data = &a60_at803x_data,
},
};

View File

@ -83,7 +83,7 @@ static struct ar8327_platform_data ap120c_ar8327_data = {
static struct mdio_board_info ap120c_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &ap120c_ar8327_data,
},
};

View File

@ -98,7 +98,7 @@ static struct ar8327_platform_data ap132_ar8327_data = {
static struct mdio_board_info ap132_mdio1_info[] = {
{
.bus_id = "ag71xx-mdio.1",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &ap132_ar8327_data,
},
};

View File

@ -97,7 +97,7 @@ static struct ar8327_platform_data ap152_ar8337_data = {
static struct mdio_board_info ap152_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &ap152_ar8337_data,
},
};

View File

@ -146,6 +146,49 @@ static struct gpio_led archer_c59_v1_leds_gpio[] __initdata = {
},
};
static struct gpio_led archer_c59_v2_leds_gpio[] __initdata = {
{
.name = "archer-c59-v2:green:power",
.gpio = ARCHER_C59_74HC_GPIO_LED_POWER,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:wlan2g",
.gpio = ARCHER_C59_74HC_GPIO_LED_WLAN2,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:wlan5g",
.gpio = ARCHER_C59_74HC_GPIO_LED_WLAN5,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:lan",
.gpio = ARCHER_C59_74HC_GPIO_LED_LAN,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:wan",
.gpio = ARCHER_C59_74HC_GPIO_LED_WAN_GREEN,
.active_low = 1,
},
{
.name = "archer-c59-v2:amber:wan",
.gpio = ARCHER_C59_74HC_GPIO_LED_WAN_AMBER,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:wps",
.gpio = ARCHER_C59_74HC_GPIO_LED_WPS,
.active_low = 1,
},
{
.name = "archer-c59-v2:green:usb",
.gpio = ARCHER_C59_74HC_GPIO_LED_USB,
.active_low = 1,
},
};
static struct gpio_keys_button archer_c59_v1_gpio_keys[] __initdata = {
{
.desc = "Reset button",
@ -215,9 +258,9 @@ static struct spi_board_info archer_c59_v1_spi_info[] = {
},
};
static void __init archer_c5x_v1_setup(void)
static void __init archer_c5x_v1_setup(u32 macLocation)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f010008);
u8 *mac = (u8 *) KSEG1ADDR(macLocation);
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
ath79_register_m25p80(NULL);
@ -270,7 +313,7 @@ static void __init archer_c5x_v1_setup(void)
static void __init archer_c58_v1_setup(void)
{
archer_c5x_v1_setup();
archer_c5x_v1_setup(0x1f010008);
ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c58_v1_leds_gpio),
archer_c58_v1_leds_gpio);
}
@ -280,10 +323,20 @@ MIPS_MACHINE(ATH79_MACH_ARCHER_C58_V1, "ARCHER-C58-V1",
static void __init archer_c59_v1_setup(void)
{
archer_c5x_v1_setup();
archer_c5x_v1_setup(0x1f010008);
ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v1_leds_gpio),
archer_c59_v1_leds_gpio);
}
MIPS_MACHINE(ATH79_MACH_ARCHER_C59_V1, "ARCHER-C59-V1",
"TP-LINK Archer C59 v1", archer_c59_v1_setup);
static void __init archer_c59_v2_setup(void)
{
archer_c5x_v1_setup(0x1f030008);
ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v2_leds_gpio),
archer_c59_v2_leds_gpio);
}
MIPS_MACHINE(ATH79_MACH_ARCHER_C59_V2, "ARCHER-C59-V2",
"TP-LINK Archer C59 v2", archer_c59_v2_setup);

View File

@ -200,7 +200,7 @@ static struct ar8327_platform_data archer_c7_v4_ar8337_data = {
static struct mdio_board_info archer_c7_v4_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &archer_c7_v4_ar8337_data,
},
};

View File

@ -155,7 +155,7 @@ static struct ar8327_platform_data archer_c7_v5_ar8337_data = {
static struct mdio_board_info archer_c7_v5_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &archer_c7_v5_ar8337_data,
},
};

View File

@ -197,7 +197,7 @@ static struct ar8327_platform_data archer_c7_ar8327_data = {
static struct mdio_board_info archer_c7_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &archer_c7_ar8327_data,
},
};

View File

@ -125,7 +125,7 @@ static struct ar8327_platform_data bhr_4grv2_ar8327_data = {
static struct mdio_board_info bhr_4grv2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &bhr_4grv2_ar8327_data,
},
};

View File

@ -12,10 +12,15 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/pci.h>
#include <linux/phy.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
@ -115,7 +120,7 @@ static struct ar8327_platform_data c60_ar8327_data = {
static struct mdio_board_info c60_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &c60_ar8327_data,
},
};

View File

@ -106,11 +106,11 @@ static void __init cap324_setup(void)
ARRAY_SIZE(cap324_gpio_keys),
cap324_gpio_keys);
ath79_init_mac(mac, art + CAP324_MAC_OFFSET, -1);
ath79_init_mac(mac, art + CAP324_MAC_OFFSET, -2);
ath79_wmac_disable_2ghz();
ath79_register_wmac(art + CAP324_WMAC_CALDATA_OFFSET, mac);
ath79_init_mac(mac, art + CAP324_MAC_OFFSET, -2);
ath79_init_mac(mac, art + CAP324_MAC_OFFSET, -1);
ap91_pci_init(art + CAP324_PCIE_CALDATA_OFFSET, mac);
ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 |
@ -119,7 +119,7 @@ static void __init cap324_setup(void)
ath79_register_mdio(0, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr,
art + CAP324_MAC_OFFSET, -2);
art + CAP324_MAC_OFFSET, 0);
/* GMAC0 is connected to an external PHY */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
@ -129,5 +129,5 @@ static void __init cap324_setup(void)
ath79_register_eth(0);
}
MIPS_MACHINE(ATH79_MACH_CAP324, "CAP324", "PowerCloud CAP324",
MIPS_MACHINE(ATH79_MACH_CAP324, "CAP324", "PowerCloud Systems CAP324",
cap324_setup);

View File

@ -243,7 +243,7 @@ static struct ar8327_platform_data cf_e375ac_ar8337_data = {
static struct mdio_board_info cf_e375ac_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &cf_e375ac_ar8337_data,
},
};
@ -323,7 +323,7 @@ static struct at803x_platform_data cf_e380ac_v1v2_at803x_data = {
static struct mdio_board_info cf_e380ac_v1v2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &cf_e380ac_v1v2_at803x_data,
},
};
@ -681,7 +681,7 @@ static struct ar8327_platform_data cf_e385ac_qca8337_data = {
static struct mdio_board_info cf_e385ac_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &cf_e385ac_qca8337_data,
},
};

View File

@ -21,7 +21,6 @@
*/
#include <linux/gpio.h>
#include <linux/pci.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
@ -31,7 +30,6 @@
#include <asm/mach-ath79/ath79.h>
#include "common.h"
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
@ -58,7 +56,6 @@
#define CR3000_MAC1_OFFSET 6
#define CR3000_WMAC_CALDATA_OFFSET 0x1000
#define CR3000_WMAC_MAC_OFFSET 0x1002
#define CR3000_PCIE_CALDATA_OFFSET 0x5000
static struct gpio_led cr3000_leds_gpio[] __initdata = {
{
@ -132,30 +129,40 @@ static void __init cr3000_setup(void)
/* WLAN 2GHz onboard */
ath79_register_wmac(art + CR3000_WMAC_CALDATA_OFFSET, art + CR3000_WMAC_MAC_OFFSET);
ath79_register_mdio(1, 0x0);
ath79_register_mdio(0, 0x0);
/* FE Lan on first 4-ports of internal switch and attached to GMAC1
* WAN Fast Ethernet interface attached to GMAC0
* Could be configured as a 5-port switch, but we use
* the SoC capabilities to attach port 5 to a separate PHY/MAC
* theoretically this leaves future possibility of using SoC
* acceleration/offloading.
*/
ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP);
/* Lan 4-port switch attached to GMAC1 internal switch */
ath79_init_mac(ath79_eth1_data.mac_addr, art + CR3000_MAC0_OFFSET, 0);
/* GMAC0 attached to PHY4 (port 5 of the internal switch) */
ath79_switch_data.phy4_mii_en = 1;
/* For switch carrier ignore port 5 (wan) */
ath79_switch_data.phy_poll_mask = 0x1;
/* Register MII bus */
ath79_register_mdio(1, 0x0);
/* GMAC0 attached to PHY4 (port 5 of the internal switch) */
ath79_switch_data.phy4_mii_en = 1;
ath79_switch_data.phy_poll_mask = 0x1;
/* LAN */
ath79_init_mac(ath79_eth1_data.mac_addr, art + CR3000_MAC0_OFFSET, 0);
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_eth1_data.speed = SPEED_1000;
ath79_eth1_data.duplex = DUPLEX_FULL;
ath79_register_eth(1);
ath79_init_mac(ath79_eth0_data.mac_addr, art + CR3000_MAC1_OFFSET, 0);
/* WAN Fast Ethernet interface attached to GMAC0 */
ath79_switch_data.phy4_mii_en = 1;
ath79_switch_data.phy_poll_mask = BIT(0);
ath79_eth0_data.phy_mask = BIT(0);
/* Wan */
ath79_init_mac(ath79_eth0_data.mac_addr, art + CR3000_MAC0_OFFSET, 1);
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
ath79_eth0_data.phy_mask = BIT(0);
ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
ath79_register_eth(0);
}
MIPS_MACHINE(ATH79_MACH_CR3000, "CR3000", "PowerCloud CR3000",
MIPS_MACHINE(ATH79_MACH_CR3000, "CR3000", "PowerCloud Systems CR3000",
cr3000_setup);

View File

@ -1,5 +1,5 @@
/*
* PowerCloud CR5000 support
* PowerCloud Systems CR5000 support
*
* Copyright (c) 2011 Qualcomm Atheros
* Copyright (c) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
@ -58,7 +58,7 @@
#define CR5000_WMAC_CALDATA_OFFSET 0x1000
#define CR5000_WMAC_MAC_OFFSET 0x1002
#define CR5000_PCIE_CALDATA_OFFSET 0x5000
#define CR5000_PCIE_MAC_OFFSET 0x5002
#define CR5000_PCIE_WMAC_OFFSET 0x5002
static struct gpio_led cr5000_leds_gpio[] __initdata = {
{
@ -90,7 +90,7 @@ static struct gpio_keys_button cr5000_gpio_keys[] __initdata = {
{
.desc = "Reset button",
.type = EV_KEY,
.code = KEY_WPS_BUTTON,
.code = KEY_RESTART,
.debounce_interval = CR5000_KEYS_DEBOUNCE_INTERVAL,
.gpio = CR5000_GPIO_BTN_RESET,
.active_low = 1,
@ -106,10 +106,10 @@ static struct ar8327_pad_cfg cr5000_ar8327_pad0_cfg = {
};
static struct ar8327_led_cfg cr5000_ar8327_led_cfg = {
.led_ctrl0 = 0x00000000,
.led_ctrl1 = 0xc737c737,
.led_ctrl2 = 0x00000000,
.led_ctrl3 = 0x00c30c00,
.led_ctrl0 = 0xcc35cc35,
.led_ctrl1 = 0xca35ca35,
.led_ctrl2 = 0xc935c935,
.led_ctrl3 = 0x03ffff00,
.open_drain = true,
};
@ -128,7 +128,7 @@ static struct ar8327_platform_data cr5000_ar8327_data = {
static struct mdio_board_info cr5000_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &cr5000_ar8327_data,
},
};
@ -153,7 +153,7 @@ static void __init cr5000_setup(void)
cr5000_gpio_keys);
ath79_register_usb();
ath79_register_wmac(art + CR5000_WMAC_CALDATA_OFFSET, art + CR5000_WMAC_MAC_OFFSET);
ap94_pci_init(NULL, NULL, NULL, art + CR5000_PCIE_MAC_OFFSET);
ap94_pci_init(NULL, NULL, NULL, art + CR5000_PCIE_WMAC_OFFSET);
ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
@ -172,5 +172,5 @@ static void __init cr5000_setup(void)
ath79_register_eth(0);
}
MIPS_MACHINE(ATH79_MACH_CR5000, "CR5000", "PowerCloud CR5000",
MIPS_MACHINE(ATH79_MACH_CR5000, "CR5000", "PowerCloud Systems CR5000",
cr5000_setup);

View File

@ -119,7 +119,7 @@ static struct ar8327_platform_data dap2695_ar8327_data = {
static struct mdio_board_info dap2695_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dap2695_ar8327_data,
},
};

View File

@ -104,7 +104,7 @@ static struct ar8327_platform_data dgl_5500_a1_ar8327_data = {
static struct mdio_board_info dgl_5500_a1_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dgl_5500_a1_ar8327_data,
},
};

View File

@ -114,7 +114,7 @@ static struct ar8327_platform_data dhp1565a1_ar8327_data = {
static struct mdio_board_info dhp1565a1_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dhp1565a1_ar8327_data,
},
};

View File

@ -160,7 +160,7 @@ static struct ar8327_platform_data dir825c1_ar8327_data = {
static struct mdio_board_info dir825c1_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dir825c1_ar8327_data,
},
};

View File

@ -118,7 +118,7 @@ static struct ar8327_platform_data dir869a1_ar8327_data = {
static struct mdio_board_info dir869a1_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dir869a1_ar8327_data,
},
};

View File

@ -135,7 +135,7 @@ static struct ar8327_platform_data dlan_pro_1200_ac_ar8327_data = {
static struct mdio_board_info dlan_pro_1200_ac_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dlan_pro_1200_ac_ar8327_data,
},
};

View File

@ -146,7 +146,7 @@ static struct ar8327_platform_data dlan_pro_500_wp_ar8327_data = {
static struct mdio_board_info dlan_pro_500_wp_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dlan_pro_500_wp_ar8327_data,
},
};

View File

@ -18,10 +18,15 @@
*
*/
#include <linux/version.h>
#include <linux/platform_device.h>
#include <linux/ar8216_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/platform/ar934x_nfc.h>
#include <asm/mach-ath79/ar71xx_regs.h>
@ -131,7 +136,7 @@ static struct ar8327_platform_data dw33d_qca8337_data = {
static struct mdio_board_info dw33d_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dw33d_qca8337_data,
},
};

View File

@ -139,7 +139,7 @@ static struct at803x_platform_data dr34x_at803x_data = {
static struct mdio_board_info dr34x_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &dr34x_at803x_data,
},
};

View File

@ -103,7 +103,7 @@ static struct ar8327_platform_data e1700ac_v2_qca8334_data = {
static struct mdio_board_info e1700ac_v2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &e1700ac_v2_qca8334_data,
},
};

View File

@ -120,7 +120,7 @@ static struct ar8327_platform_data e558_v2_ar8327_data = {
static struct mdio_board_info e558_v2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &e558_v2_ar8327_data,
},
};

View File

@ -110,7 +110,7 @@ static struct ar8327_platform_data e750g_v8_ar8327_data = {
static struct mdio_board_info e750g_v8_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &e750g_v8_ar8327_data,
},
};

View File

@ -114,7 +114,7 @@ static struct ar8327_platform_data epg5000_ar8327_data = {
static struct mdio_board_info epg5000_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &epg5000_ar8327_data,
},
};

View File

@ -113,7 +113,7 @@ static struct ar8327_platform_data esr1750_ar8327_data = {
static struct mdio_board_info esr1750_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &esr1750_ar8327_data,
},
};

View File

@ -136,7 +136,7 @@ static struct ar8327_platform_data esr900_ar8327_data = {
static struct mdio_board_info esr900_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &esr900_ar8327_data,
},
};

View File

@ -129,7 +129,7 @@ static struct ar8327_platform_data f9k1115v2_ar8327_data = {
static struct mdio_board_info f9k1115v2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &f9k1115v2_ar8327_data,
},
};

View File

@ -122,13 +122,14 @@ static struct gpio_keys_button fritz450E_gpio_keys[] __initdata = {
static struct at803x_platform_data fritz450E_at803x_data = {
.disable_smarteee = 1,
.has_reset_gpio = 1,
.override_sgmii_aneg = 1,
.reset_gpio = FRITZ450E_GPIO_PHY_RESET,
};
static struct mdio_board_info fritz450E_mdio_info[] = {
{
.bus_id = "ag71xx-mdio.1",
.phy_addr = FRITZ450E_PHY_ADDRESS,
.mdio_addr = FRITZ450E_PHY_ADDRESS,
.platform_data = &fritz450E_at803x_data,
},
};
@ -155,6 +156,7 @@ static void __init fritz450E_setup(void) {
ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
ath79_eth0_data.phy_mask = BIT(FRITZ450E_PHY_ADDRESS);
ath79_eth0_data.enable_sgmii_fixup = 1;
ath79_eth0_pll_data.pll_1000 = 0x03000000;
ath79_eth0_pll_data.pll_100 = 0x00000101;
ath79_eth0_pll_data.pll_10 = 0x00001313;

View File

@ -0,0 +1,193 @@
/*
* GL.iNet GL-AR750S board support
*
* Copyright (C) 2018 luochongjun <luochongjun@gl-inet.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/etherdevice.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/irq.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include <linux/platform_data/phy-at803x.h>
#include <linux/ar8216_platform.h>
#include "common.h"
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-spi.h"
#include "dev-m25p80.h"
#include "dev-wmac.h"
#include "dev-usb.h"
#include "machtypes.h"
#define GL_AR750S_KEYS_POLL_INTERVAL 20
#define GL_AR750S_KEYS_DEBOUNCE_INTERVAL (3 * GL_AR750S_KEYS_POLL_INTERVAL)
#define GL_AR750S_GPIO_LED_WLAN2G 19
#define GL_AR750S_GPIO_LED_WLAN5G 20
#define GL_AR750S_GPIO_LED_POWER 1
#define GL_AR750S_GPIO_USB_POWER 7
#define GL_AR750S_GPIO_BTN_RESET 2
#define GL_AR750S_GPIO_BTN_RIGHT 8
#define GL_AR750S_MAC0_OFFSET 0x0000
#define GL_AR750S_WMAC_CALDATA_OFFSET 0x1000
#define GL_AR750S_PCI_CALDATA_OFFSET 0x5000
#define GL_AR750S_GPIO_I2C_SDA 5
#define GL_AR750S_GPIO_I2C_SCL 21
static struct spi_board_info gl_ar750s_spi_info[] = {
{
.bus_num = 0,
.chip_select = 0,
.max_speed_hz = 25000000,
.modalias = "m25p80",
.platform_data = NULL,
},
};
static struct ath79_spi_platform_data gl_ar750s_spi_data = {
.bus_num = 0,
.num_chipselect = 2,
};
static struct gpio_led gl_ar750s_leds_gpio[] __initdata = {
{
.name = "gl-ar750s:green:power",
.gpio = GL_AR750S_GPIO_LED_POWER,
.default_state = LEDS_GPIO_DEFSTATE_KEEP,
.active_low = 1,
},{
.name = "gl-ar750s:green:usbpower",
.gpio = GL_AR750S_GPIO_USB_POWER,
.active_low = 1,
},{
.name = "gl-ar750s:green:wlan2g",
.gpio = GL_AR750S_GPIO_LED_WLAN2G,
.active_low = 1,
},{
.name = "gl-ar750s:green:wlan5g",
.gpio = GL_AR750S_GPIO_LED_WLAN5G,
.active_low = 0,
}
};
static struct gpio_keys_button gl_ar750s_gpio_keys[] __initdata = {
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = GL_AR750S_KEYS_DEBOUNCE_INTERVAL,
.gpio = GL_AR750S_GPIO_BTN_RESET,
.active_low = 1,
}, {
.desc = "right",
.type = EV_KEY,
.code = BTN_0,
.debounce_interval = GL_AR750S_KEYS_DEBOUNCE_INTERVAL,
.gpio = GL_AR750S_GPIO_BTN_RIGHT,
.active_low = 1,
},
};
static struct i2c_gpio_platform_data gl_ar750s_i2c_gpio_data = {
.sda_pin = GL_AR750S_GPIO_I2C_SDA,
.scl_pin = GL_AR750S_GPIO_I2C_SCL,
};
static struct platform_device gl_ar750s_i2c_gpio_device = {
.name = "i2c-gpio",
.id = 0,
.dev = {
.platform_data = &gl_ar750s_i2c_gpio_data,
}
};
static struct ar8327_pad_cfg gl_ar750s_ar8327_pad0_cfg = {
.mode = AR8327_PAD_MAC_SGMII,
.sgmii_delay_en = true,
};
static struct ar8327_platform_data gl_ar750s_ar8327_data = {
.pad0_cfg = &gl_ar750s_ar8327_pad0_cfg,
.port0_cfg = {
.force_link = 1,
.speed = AR8327_PORT_SPEED_1000,
.duplex = 1,
.txpause = 1,
.rxpause = 1,
},
};
static struct mdio_board_info gl_ar750s_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.mdio_addr = 0,
.platform_data = &gl_ar750s_ar8327_data,
},
};
static void __init gl_ar750s_setup(void)
{
u8 *eeprom = (u8 *) KSEG1ADDR(0x1f050000);
ath79_register_spi(&gl_ar750s_spi_data, gl_ar750s_spi_info, 1);
ath79_init_mac(ath79_eth0_data.mac_addr,
eeprom + GL_AR750S_MAC0_OFFSET, 0);
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
ath79_eth0_data.phy_mask = BIT(0);
mdiobus_register_board_info(gl_ar750s_mdio0_info,
ARRAY_SIZE(gl_ar750s_mdio0_info));
ath79_register_mdio(0, 0x00);
ath79_register_eth(0);
ath79_register_usb();
ath79_register_wmac(eeprom + GL_AR750S_WMAC_CALDATA_OFFSET, NULL);
ap91_pci_init(eeprom + GL_AR750S_PCI_CALDATA_OFFSET, NULL);
platform_device_register(&gl_ar750s_i2c_gpio_device);
ath79_register_leds_gpio(-1, ARRAY_SIZE(gl_ar750s_leds_gpio),
gl_ar750s_leds_gpio);
ath79_register_gpio_keys_polled(-1, GL_AR750S_KEYS_POLL_INTERVAL,
ARRAY_SIZE(gl_ar750s_gpio_keys),
gl_ar750s_gpio_keys);
}
MIPS_MACHINE(ATH79_MACH_GL_AR750S, "GL-AR750S", "GL-AR750S",
gl_ar750s_setup);

View File

@ -111,7 +111,7 @@ static struct ar8327_platform_data jwap230_qca8337_data = {
static struct mdio_board_info jwap230_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &jwap230_qca8337_data,
},
};

View File

@ -94,7 +94,7 @@ static struct at803x_platform_data koala_at803x_data = {
static struct mdio_board_info koala_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 5,
.mdio_addr = 5,
.platform_data = &koala_at803x_data,
},
};

View File

@ -103,7 +103,7 @@ static struct at803x_platform_data mr1750_at803x_data = {
static struct mdio_board_info mr1750_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 5,
.mdio_addr = 5,
.platform_data = &mr1750_at803x_data,
},
};

View File

@ -105,7 +105,7 @@ static struct at803x_platform_data mr900_at803x_data = {
static struct mdio_board_info mr900_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 5,
.mdio_addr = 5,
.platform_data = &mr900_at803x_data,
},
};

View File

@ -144,7 +144,7 @@ static struct ar8327_platform_data mynet_n750_ar8327_data = {
static struct mdio_board_info mynet_n750_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &mynet_n750_ar8327_data,
},
};

View File

@ -135,7 +135,7 @@ static struct at803x_platform_data mynet_rext_at803x_data = {
static struct mdio_board_info mynet_rext_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 4,
.mdio_addr = 4,
.platform_data = &mynet_rext_at803x_data,
},
};

View File

@ -20,11 +20,16 @@
*
*/
#include <linux/version.h>
#include <linux/platform_device.h>
#include <linux/ar8216_platform.h>
#include <linux/gpio.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/platform/ar934x_nfc.h>
#include <asm/mach-ath79/ar71xx_regs.h>
@ -242,7 +247,7 @@ static struct ar8327_platform_data nbg6716_ar8327_data = {
static struct mdio_board_info nbg6716_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &nbg6716_ar8327_data,
},
};

View File

@ -160,7 +160,7 @@ static struct at803x_platform_data om5p_an_at803x_data = {
static struct mdio_board_info om5p_an_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 7,
.mdio_addr = 7,
.platform_data = &om5p_an_at803x_data,
},
};

View File

@ -107,12 +107,12 @@ static struct at803x_platform_data om5pac_at803x_data = {
static struct mdio_board_info om5pac_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &om5pac_at803x_data,
},
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 2,
.mdio_addr = 2,
.platform_data = &om5pac_at803x_data,
},
};

View File

@ -119,12 +119,12 @@ static struct at803x_platform_data om5pacv2_an_at8031_data = {
static struct mdio_board_info om5pacv2_an_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 4,
.mdio_addr = 4,
.platform_data = &om5pacv2_an_at803x_data,
},
{
.bus_id = "ag71xx-mdio.1",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &om5pacv2_an_at8031_data,
},
};

View File

@ -39,7 +39,7 @@ static struct at803x_platform_data rambutan_ar8032_data = {
static struct mdio_board_info rambutan_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rambutan_ar8032_data,
},
};
@ -52,7 +52,7 @@ static struct at803x_platform_data rambutan_ar8033_data = {
static struct mdio_board_info rambutan_mdio1_info[] = {
{
.bus_id = "ag71xx-mdio.1",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rambutan_ar8033_data,
},
};

View File

@ -11,13 +11,18 @@
#define pr_fmt(fmt) "rb2011: " fmt
#include <linux/version.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
@ -156,7 +161,7 @@ static struct ar8327_platform_data rb2011_ar8327_data = {
static struct mdio_board_info rb2011_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rb2011_ar8327_data,
},
};

View File

@ -199,7 +199,7 @@ static struct ar8327_platform_data rb750gr3_ar8327_data = {
static struct mdio_board_info rb750g3_mdio_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rb750gr3_ar8327_data,
},
};

View File

@ -10,12 +10,17 @@
#define pr_fmt(fmt) "rb91x: " fmt
#include <linux/version.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/74x164.h>
@ -227,7 +232,7 @@ static struct at803x_platform_data rb91x_at803x_data = {
static struct mdio_board_info rb91x_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rb91x_at803x_data,
},
};

View File

@ -8,12 +8,17 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
@ -108,7 +113,7 @@ static struct at803x_platform_data rb922gs_at803x_data = {
static struct mdio_board_info rb922gs_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = RB922_PHY_ADDR,
.mdio_addr = RB922_PHY_ADDR,
.platform_data = &rb922gs_at803x_data,
},
};

View File

@ -12,13 +12,18 @@
#define pr_fmt(fmt) "rb95x: " fmt
#include <linux/version.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
@ -114,7 +119,7 @@ static struct ar8327_platform_data rb95x_ar8327_data = {
static struct mdio_board_info rb95x_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rb95x_ar8327_data,
},
};

View File

@ -5,6 +5,7 @@
* - MikroTik RouterBOARD mAP L-2nD
* - MikroTik RouterBOARD 911-2Hn (911 Lite2)
* - MikroTik RouterBOARD 911-5Hn (911 Lite5)
* - MikroTik RouterBOARD 931-2nD (hAP mini)
* - MikroTik RouterBOARD 941L-2nD
* - MikroTik RouterBOARD 951Ui-2nD
* - MikroTik RouterBOARD 952Ui-5ac2nD
@ -15,6 +16,7 @@
* - MikroTik RouterBOARD LHG 5nD
* - MikroTik RouterBOARD wAP2nD
* - MikroTik RouterBOARD wAP G-5HacT2HnDwAP (wAP AC)
* - MikroTik RouterBOARD wAP R-2nD
*
* Preliminary support for the following hardware
* - MikroTik RouterBOARD cAP2nD
@ -22,7 +24,7 @@
* hardware as the mAP L-2nD. It is unknown if they share the same board
* identifier.
*
* Copyright (C) 2017 Thibaut VARENE <varenet@parisc-linux.org>
* Copyright (C) 2017-2018 Thibaut VARENE <varenet@parisc-linux.org>
* Copyright (C) 2016 David Hutchison <dhutchison@bluemesh.net>
* Copyright (C) 2017 Ryan Mounce <ryan@mounce.com.au>
*
@ -211,7 +213,7 @@ static struct gpio_led rbhapl_leds[] __initdata = {
#define RB952_GPIO_POE_POWER 14
#define RB952_GPIO_POE_STATUS 12
#define RB952_GPIO_BTN_RESET 16
#define RB952_GPIO_USB_POWER RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER)
#define RB952_GPIO_USB_PWROFF RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER)
#define RB952_GPIO_LED_LAN1 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN1)
#define RB952_GPIO_LED_LAN2 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN2)
#define RB952_GPIO_LED_LAN3 RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN3)
@ -253,10 +255,12 @@ static struct gpio_led rb952_leds[] __initdata = {
/* RB 962UiGS-5HacT2HnT gpios */
#define RB962_WIFI_LED_1 1
#define RB962_WIFI_LED_2 2
#define RB962_GPIO_POE_STATUS 2
#define RB962_GPIO_POE_POWER 3
#define RB962_GPIO_LED_USER 12
#define RB962_GPIO_USB_POWER 13
#define RB962_GPIO_USB_PWROFF 13
#define RB962_GPIO_BTN_RESET 20
static struct gpio_led rb962_leds_gpio[] __initdata = {
@ -324,7 +328,7 @@ static struct ar8327_platform_data rb962_ar8327_data = {
static struct mdio_board_info rb962_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &rb962_ar8327_data,
},
};
@ -386,7 +390,7 @@ static struct gpio_led rbcap_leds[] __initdata = {
#define RBMAP_GPIO_LED_POWER 4
#define RBMAP_GPIO_POE_POWER 14
#define RBMAP_GPIO_POE_STATUS 12
#define RBMAP_GPIO_USB_POWER RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER)
#define RBMAP_GPIO_USB_PWROFF RBSPI_SSR_GPIO(RBMAP_SSR_BIT_USB_POWER)
#define RBMAP_GPIO_LED_LAN1 RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN1)
#define RBMAP_GPIO_LED_LAN2 RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_LAN2)
#define RBMAP_GPIO_LED_POEO RBSPI_SSR_GPIO(RBMAP_SSR_BIT_LED_POEO)
@ -518,7 +522,7 @@ static struct platform_device rbwapgsc_phy_device = {
#define RB911L_GPIO_LED_ETH 20
#define RB911L_GPIO_LED_POWER 11
#define RB911L_GPIO_LED_USER 3
#define RB911L_GPIO_PIN_HOLE 14 /* for reference */
#define RB911L_GPIO_PIN_HOLE 14 /* for reference, active low */
static struct gpio_led rb911l_leds[] __initdata = {
{
@ -549,6 +553,7 @@ static struct gpio_led rb911l_leds[] __initdata = {
.name = "rb:green:power",
.gpio = RB911L_GPIO_LED_POWER,
.default_state = LEDS_GPIO_DEFSTATE_ON,
.active_low = 1,
.open_drain = 1,
}, {
.name = "rb:green:user",
@ -558,6 +563,67 @@ static struct gpio_led rb911l_leds[] __initdata = {
},
};
/* RB 931-2nD gpios */
#define RB931_GPIO_BTN_RESET 0
#define RB931_GPIO_BTN_MODE 9
#define RB931_GPIO_LED_USER 1
static struct gpio_keys_button rb931_gpio_keys[] __initdata = {
{
.desc = "Reset button",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
.gpio = RB931_GPIO_BTN_RESET,
.active_low = 1,
}, {
.desc = "Mode button",
.type = EV_KEY,
.code = BTN_0,
.debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
.gpio = RB931_GPIO_BTN_MODE,
.active_low = 1,
}
};
static struct gpio_led rb931_leds[] __initdata = {
{
.name = "rb:green:user",
.gpio = RB931_GPIO_LED_USER,
.active_low = 1,
},
};
/* RB wAP R-2nD (wAP R) gpios*/
#define RBWAPR_GPIO_LED_USER 14
#define RBWAPR_GPIO_LED1 12
#define RBWAPR_GPIO_LED2 13
#define RBWAPR_GPIO_LED3 3
#define RBWAPR_GPIO_PCIE_PWROFF 15
#define RBWAPR_GPIO_CONTROL 10
#define RBWAPR_GPIO_BTN_RESET 16
static struct gpio_led rbwapr_leds[] __initdata = {
{
.name = "rb:green:user",
.gpio = RBWAPR_GPIO_LED_USER,
.active_low = 0,
},{
.name = "rb:green:led1",
.gpio = RBWAPR_GPIO_LED1,
.active_low = 1,
},{
.name = "rb:green:led2",
.gpio = RBWAPR_GPIO_LED2,
.active_low = 1,
},{
.name = "rb:green:led3",
.gpio = RBWAPR_GPIO_LED3,
.active_low = 0,
},
};
static struct gen_74x164_chip_platform_data rbspi_ssr_data = {
.base = RBSPI_SSR_GPIO_BASE,
.num_registers = 1,
@ -792,9 +858,9 @@ static void __init rbspi_952_750r2_setup(u32 flags)
rbspi_network_setup(flags, 1, 5, 6);
if (flags & RBSPI_HAS_USB)
gpio_request_one(RB952_GPIO_USB_POWER,
gpio_request_one(RB952_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW |
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power");
"USB power off");
if (flags & RBSPI_HAS_POE)
gpio_request_one(RB952_GPIO_POE_POWER,
@ -902,9 +968,9 @@ static void __init rb962_setup(void)
rbspi_wlan_init(1, 7);
if (flags & RBSPI_HAS_USB)
gpio_request_one(RB962_GPIO_USB_POWER,
gpio_request_one(RB962_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW |
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power");
"USB power off");
/* PoE output GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */
if (flags & RBSPI_HAS_POE)
@ -1011,12 +1077,11 @@ static void __init rbmap_setup(void)
GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
"POE power");
/* USB power GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */
if (flags & RBSPI_HAS_USB)
gpio_request_one(RBMAP_GPIO_USB_POWER,
gpio_request_one(RBMAP_GPIO_USB_PWROFF,
GPIOF_OUT_INIT_HIGH | GPIOF_ACTIVE_LOW |
GPIOF_EXPORT_DIR_FIXED,
"USB power");
"USB power off");
ath79_register_leds_gpio(-1, ARRAY_SIZE(rbmap_leds), rbmap_leds);
@ -1108,6 +1173,64 @@ static void __init rb911l_setup(void)
ath79_register_leds_gpio(-1, ARRAY_SIZE(rb911l_leds), rb911l_leds);
}
/*
* Init the hAP mini hardware (QCA953x).
* The 931-2nD (hAP mini) has 3 ethernet ports, with port 2-3
* being assigned to LAN on the casing, and port 1 being assigned
* to "internet" (WAN) on the casing. Port 1 is connected to PHY2.
* Since WAN is neither PHY0 nor PHY4, we cannot use GMAC0 with this device.
*/
static void __init rb931_setup(void)
{
u32 flags = RBSPI_HAS_WLAN0;
if (!rbspi_platform_setup())
return;
rbspi_peripherals_setup(flags);
/* GMAC1 is HW MAC, WLAN0 MAC is HW MAC + 3 */
rbspi_network_setup(flags, 0, 3, 0);
ath79_register_leds_gpio(-1, ARRAY_SIZE(rb931_leds), rb931_leds);
/* hAP mini has two buttons */
ath79_register_gpio_keys_polled(-1, RBSPI_KEYS_POLL_INTERVAL,
ARRAY_SIZE(rb931_gpio_keys),
rb931_gpio_keys);
}
/*
* Init the wAP R hardware.
* The wAP R-2nD has a single ethernet port and a mini PCIe slot.
* The OEM source shows it has usb (used over PCIe for LTE devices),
* and the 'control' GPIO is assumed to be an output pin not tied to an LED.
*/
static void __init rbwapr_setup(void)
{
u32 flags = RBSPI_HAS_WLAN0 | RBSPI_HAS_USB | RBSPI_HAS_PCI;
if (!rbspi_platform_setup())
return;
rbspi_peripherals_setup(flags);
/* GMAC1 is HW MAC, WLAN0 MAC is HW MAC + 1 */
rbspi_network_setup(flags, 0, 1, 0);
ath79_register_leds_gpio(-1, ARRAY_SIZE(rbwapr_leds), rbwapr_leds);
gpio_request_one(RBWAPR_GPIO_PCIE_PWROFF, GPIOF_OUT_INIT_HIGH |
GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED,
"PCIE power off");
gpio_request_one(RBWAPR_GPIO_CONTROL, GPIOF_OUT_INIT_LOW |
GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED,
"control");
rbspi_register_reset_button(RBWAPR_GPIO_BTN_RESET);
}
MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAPL, "map-hb", rbmapl_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_941, "H951L", rbhapl_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_911L, "911L", rb911l_setup);
@ -1116,6 +1239,8 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_962, "962", rb962_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_750UPR2, "750-hb", rb750upr2_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_LHG5, "lhg", rblhg_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAP, "wap-hb", rbwap_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPR, "wap-lte", rbwapr_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_CAP, "cap-hb", rbcap_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_MAP, "map2-hb", rbmap_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_WAPAC, "wapg-sc", rbwapgsc_setup);
MIPS_MACHINE_NONAME(ATH79_MACH_RB_931, "931", rb931_setup);

View File

@ -12,12 +12,17 @@
#define pr_fmt(fmt) "sxtlite: " fmt
#include <linux/version.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>

View File

@ -95,7 +95,7 @@ static struct at803x_platform_data at803x_data = {
static struct mdio_board_info sc1750_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &at803x_data,
},
};

View File

@ -82,7 +82,7 @@ static struct at803x_platform_data at803x_data = {
static struct mdio_board_info sc300m_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &at803x_data,
},
};

View File

@ -99,7 +99,7 @@ static struct at803x_platform_data at803x_data = {
static struct mdio_board_info sc450_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &at803x_data,
},
};

View File

@ -114,7 +114,7 @@ static struct ar8327_platform_data sr3200_xd3200_qca833x_data = {
static struct mdio_board_info sr3200_xd3200_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &sr3200_xd3200_qca833x_data,
},
};

View File

@ -122,7 +122,7 @@ static struct ar8327_platform_data tew_823dru_ar8327_data = {
static struct mdio_board_info tew_823dru_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &tew_823dru_ar8327_data,
},
};

View File

@ -148,7 +148,7 @@ static struct ar8327_platform_data wdr4300_ar8327_data = {
static struct mdio_board_info wdr4300_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wdr4300_ar8327_data,
},
};

View File

@ -128,7 +128,7 @@ static struct ar8327_platform_data tl_wpa8630_qca8337_data = {
static struct mdio_board_info tl_wpa8630_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &tl_wpa8630_qca8337_data,
},
};

View File

@ -115,7 +115,7 @@ static struct ar8327_platform_data db120_ar8327_data = {
static struct mdio_board_info db120_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &db120_ar8327_data,
},
};

View File

@ -159,7 +159,7 @@ static struct ar8327_platform_data wr1043nd_v2_ar8327_data = {
static struct mdio_board_info wr1043nd_v2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wr1043nd_v2_ar8327_data,
},
};

View File

@ -49,7 +49,8 @@
#define TL_WR1043_V4_GPIO_USB_POWER 8
#define TL_WR1043_V4_GPIO_LED_WAN 15
#define TL_WR1043_V4_GPIO_LED_INET 15
#define TL_WR1043_V4_GPIO_LED_WAN 16
#define TL_WR1043_V4_GPIO_LED_LAN1 9
#define TL_WR1043_V4_GPIO_LED_LAN2 14
#define TL_WR1043_V4_GPIO_LED_LAN3 21
@ -63,7 +64,7 @@
#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
#define TL_WR1043N_V5_MAC_LOCATION 0x1ff00008
#define TL_WR1043_V5_MAC_LOCATION 0x1ff00008
static struct gpio_led tl_wr1043nd_v4_leds_gpio[] __initdata = {
{
@ -88,6 +89,11 @@ static struct gpio_led tl_wr1043nd_v4_leds_gpio[] __initdata = {
},
{
.name = "tp-link:green:wan",
.gpio = TL_WR1043_V4_GPIO_LED_INET,
.active_low = 1,
},
{
.name = "tp-link:orange:wan",
.gpio = TL_WR1043_V4_GPIO_LED_WAN,
.active_low = 1,
},
@ -151,7 +157,7 @@ static struct ar8327_platform_data tl_wr1043nd_v4_ar8327_data = {
static struct mdio_board_info tl_wr1043nd_v4_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &tl_wr1043nd_v4_ar8327_data,
},
};
@ -210,6 +216,11 @@ static struct gpio_led tl_wr1043n_v5_leds_gpio[] __initdata = {
},
{
.name = "tp-link:green:wan",
.gpio = TL_WR1043_V4_GPIO_LED_INET,
.active_low = 1,
},
{
.name = "tp-link:orange:wan",
.gpio = TL_WR1043_V4_GPIO_LED_WAN,
.active_low = 1,
},
@ -240,7 +251,7 @@ static struct gpio_led tl_wr1043n_v5_leds_gpio[] __initdata = {
static void __init tl_wr1043nv5_setup(void)
{
u8 *art = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043N_V5_MAC_LOCATION);
u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043_V5_MAC_LOCATION);
ath79_register_m25p80(NULL);

View File

@ -83,7 +83,7 @@ static struct gpio_keys_button tl_wr1043nd_gpio_keys[] __initdata = {
}
};
static void tl_wr1043nd_rtl8366rb_hw_reset(bool active)
static void tl_wr1043nd_rtl8366rb_hw_reset(struct rtl8366_smi *smi, bool active)
{
if (active)
ath79_device_reset_set(AR71XX_RESET_GE0_PHY);
@ -110,7 +110,7 @@ static void __init tl_wr1043nd_setup(void)
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
tl_wr1043nd_rtl8366rb_hw_reset(true);
tl_wr1043nd_rtl8366rb_hw_reset(NULL, true);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_eth0_data.mii_bus_dev = &tl_wr1043nd_rtl8366rb_device.dev;

View File

@ -131,7 +131,7 @@ static struct ar8327_platform_data ubnt_unifiac_pro_ar8327_data = {
static struct mdio_board_info ubnt_unifiac_pro_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &ubnt_unifiac_pro_ar8327_data,
},
};

View File

@ -342,7 +342,7 @@ static struct ar8327_platform_data uap_pro_ar8327_data = {
static struct mdio_board_info uap_pro_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &uap_pro_ar8327_data,
},
};
@ -489,7 +489,7 @@ static struct at803x_platform_data ubnt_loco_m_xw_at803x_data = {
static struct mdio_board_info ubnt_loco_m_xw_mdio_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 1,
.mdio_addr = 1,
.platform_data = &ubnt_loco_m_xw_at803x_data,
},
};
@ -596,7 +596,7 @@ static struct at803x_platform_data ubnt_rocket_m_ti_at803_data = {
static struct mdio_board_info ubnt_rocket_m_ti_mdio_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 4,
.mdio_addr = 4,
.platform_data = &ubnt_rocket_m_ti_at803_data,
},
};

View File

@ -126,7 +126,7 @@ static struct ar8327_platform_data wlr8100_ar8327_data = {
static struct mdio_board_info wlr8100_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wlr8100_ar8327_data,
},
};

View File

@ -9,6 +9,7 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/pci.h>
#include <linux/phy.h>
#include <linux/gpio.h>
@ -16,7 +17,11 @@
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/platform/ar934x_nfc.h>
#include <asm/mach-ath79/ar71xx_regs.h>
@ -158,7 +163,7 @@ static struct ar8327_platform_data wndr4300_ar8327_data = {
static struct mdio_board_info wndr4300_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wndr4300_ar8327_data,
},
};

View File

@ -197,7 +197,7 @@ static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
}
};
static struct gpio_led wnr612v2_wmac_leds_gpio[] __initdata = {
static struct gpio_led wnr612v2_wmac_leds_gpio[] = {
{
.name = "netgear:green:wlan",
.gpio = WNR612V2_GPIO_WMAC_LED_WLAN_GREEN,
@ -561,7 +561,7 @@ static void __init wnr612v2_setup(void)
wnr612v2_leds_gpio);
ap9x_pci_setup_wmac_leds(0, wnr612v2_wmac_leds_gpio,
ARRAY_SIZE(wnr612v2_leds_gpio));
ARRAY_SIZE(wnr612v2_wmac_leds_gpio));
ap9x_pci_setup_wmac_btns(0, wnr612v2_wmac_keys_gpio,
ARRAY_SIZE(wnr612v2_wmac_keys_gpio),

View File

@ -130,7 +130,7 @@ static struct ar8327_platform_data wpj342_ar8327_data = {
static struct mdio_board_info wpj342_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wpj342_ar8327_data,
},
};

View File

@ -124,7 +124,7 @@ static struct ar8327_platform_data wpj344_ar8327_data = {
static struct mdio_board_info wpj344_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wpj344_ar8327_data,
},
};

View File

@ -127,7 +127,7 @@ static struct ar8327_platform_data wpj558_ar8327_data = {
static struct mdio_board_info wpj558_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wpj558_ar8327_data,
},
};

View File

@ -106,7 +106,7 @@ static struct ar8327_platform_data WPJ563_ar8337_data = {
static struct mdio_board_info WPJ563_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &WPJ563_ar8337_data,
},
};

View File

@ -168,7 +168,7 @@ static struct ar8327_platform_data wzr_450hp2_ar8327_data = {
static struct mdio_board_info wzr_450hp2_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.mdio_addr = 0,
.platform_data = &wzr_450hp2_ar8327_data,
},
};

View File

@ -114,7 +114,7 @@ static struct ar8327_platform_data z1_ar8327_data = {
static struct mdio_board_info z1_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = Z1_ETH_SWITCH_PHY,
.mdio_addr = Z1_ETH_SWITCH_PHY,
.platform_data = &z1_ar8327_data,
},
};

View File

@ -47,6 +47,7 @@ enum ath79_mach_type {
ATH79_MACH_ARCHER_C5, /* TP-LINK Archer C5 board */
ATH79_MACH_ARCHER_C58_V1, /* TP-LINK Archer C58 V1 board */
ATH79_MACH_ARCHER_C59_V1, /* TP-LINK Archer C59 V1 board */
ATH79_MACH_ARCHER_C59_V2, /* TP-LINK Archer C59 V2 board */
ATH79_MACH_ARCHER_C60_V1, /* TP-LINK Archer C60 V1 board */
ATH79_MACH_ARCHER_C60_V2, /* TP-LINK Archer C60 V2 board */
ATH79_MACH_ARCHER_C7, /* TP-LINK Archer C7 board */
@ -60,7 +61,7 @@ enum ath79_mach_type {
ATH79_MACH_BSB, /* Smart Electronics Black Swift board */
ATH79_MACH_C55, /* AirTight Networks C-55 */
ATH79_MACH_C60, /* AirTight Networks C-60 */
ATH79_MACH_CAP324, /* PowerCloud CAP324 */
ATH79_MACH_CAP324, /* PowerCloud Systems CAP324 */
ATH79_MACH_CAP4200AG, /* Senao CAP4200AG */
ATH79_MACH_CARAMBOLA2, /* 8devices Carambola2 */
ATH79_MACH_CF_E316N_V2, /* COMFAST CF-E316N v2 */
@ -79,8 +80,8 @@ enum ath79_mach_type {
ATH79_MACH_CPE510, /* TP-LINK CPE510 */
ATH79_MACH_CPE830, /* YunCore CPE830 */
ATH79_MACH_CPE870, /* YunCore CPE870 */
ATH79_MACH_CR3000, /* PowerCloud CR3000 */
ATH79_MACH_CR5000, /* PowerCloud CR5000 */
ATH79_MACH_CR3000, /* PowerCloud Systems CR3000 */
ATH79_MACH_CR5000, /* PowerCloud Systems CR5000 */
ATH79_MACH_DAP_1330_A1, /* D-Link DAP-1330 rev. A1 */
ATH79_MACH_DAP_2695_A1, /* D-Link DAP-2695 rev. A1 */
ATH79_MACH_DB120, /* Atheros DB120 reference board */
@ -131,6 +132,7 @@ enum ath79_mach_type {
ATH79_MACH_GL_AR300, /* GL-AR300 */
ATH79_MACH_GL_AR300M, /* GL-AR300M */
ATH79_MACH_GL_AR750, /* GL.iNet GL-AR750 */
ATH79_MACH_GL_AR750S, /* GL.iNet GL-AR750S */
ATH79_MACH_GL_DOMINO, /* Domino */
ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */
ATH79_MACH_GL_MIFI, /* GL-MIFI support */
@ -213,6 +215,7 @@ enum ath79_mach_type {
ATH79_MACH_RB_751G, /* Mikrotik RouterBOARD 751G */
ATH79_MACH_RB_911L, /* Mikrotik RouterBOARD 911-2Hn/911-5Hn boards */
ATH79_MACH_RB_922GS, /* Mikrotik RouterBOARD 911/922GS boards */
ATH79_MACH_RB_931, /* MikroTik RouterBOARD 931-2nD */
ATH79_MACH_RB_941, /* MikroTik RouterBOARD 941-2nD */
ATH79_MACH_RB_951G, /* Mikrotik RouterBOARD 951G */
ATH79_MACH_RB_951U, /* Mikrotik RouterBOARD 951Ui-2HnD */
@ -223,6 +226,7 @@ enum ath79_mach_type {
ATH79_MACH_RB_MAP, /* Mikrotik RouterBOARD mAP2nD */
ATH79_MACH_RB_MAPL, /* Mikrotik RouterBOARD mAP L-2nD */
ATH79_MACH_RB_WAP, /* Mikrotik RouterBOARD wAP2nD */
ATH79_MACH_RB_WAPR, /* Mikrotik RouterBOARD wAPR2nD */
ATH79_MACH_RB_WAPAC, /* Mikrotik RouterBOARD wAPG-5HacT2HnD */
ATH79_MACH_RB_SXTLITE2ND, /* Mikrotik RouterBOARD SXT Lite 2nD */
ATH79_MACH_RB_SXTLITE5ND, /* Mikrotik RouterBOARD SXT Lite 5nD */

View File

@ -37,6 +37,7 @@ struct ag71xx_platform_data {
u8 is_ar724x:1;
u8 has_ar8216:1;
u8 use_flow_control:1;
u8 enable_sgmii_fixup:1;
u8 disable_inline_checksum_engine:1;
struct ag71xx_switch_platform_data *switch_data;

View File

@ -8,17 +8,21 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <linux/mtd/mtd.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/partitions.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/version.h>
#include <linux/platform/ar934x_nfc.h>

View File

@ -12,10 +12,15 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/platform_device.h>
@ -23,7 +28,6 @@
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/version.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/rb4xx_cpld.h>

View File

@ -8,15 +8,19 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/version.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include <asm/mach-ath79/ath79.h>

View File

@ -8,10 +8,15 @@
* by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
#include <linux/mtd/nand.h>
#else
#include <linux/mtd/rawnand.h>
#endif
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/platform_device.h>
@ -19,7 +24,6 @@
#include <linux/slab.h>
#include <linux/gpio.h>
#include <linux/platform_data/rb91x_nand.h>
#include <linux/version.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include <asm/mach-ath79/ath79.h>

View File

@ -182,7 +182,11 @@ static int mv88e6063_setup_port(struct dsa_switch *ds, int p)
#else
ds->enabled_port_mask :
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
(1 << ds->dst->cpu_port)));
#else
(1 << ds->dst->cpu_dp->index)));
#endif
/*
* Port Association Vector: when learning source addresses
@ -275,15 +279,29 @@ static struct dsa_switch_ops mv88e6063_switch_ops = {
.phy_write = mv88e6063_phy_write,
};
#if LINUX_VERSION_CODE > KERNEL_VERSION(4,13,0)
static struct dsa_switch_driver mv88e6063_switch_drv = {
.ops = &mv88e6063_switch_ops,
};
#endif
static int __init mv88e6063_init(void)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
register_switch_driver(&mv88e6063_switch_ops);
#else
register_switch_driver(&mv88e6063_switch_drv);
#endif
return 0;
}
module_init(mv88e6063_init);
static void __exit mv88e6063_cleanup(void)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
unregister_switch_driver(&mv88e6063_switch_ops);
#else
unregister_switch_driver(&mv88e6063_switch_drv);
#endif
}
module_exit(mv88e6063_cleanup);

View File

@ -66,6 +66,8 @@
#define AG71XX_TX_RING_SIZE_MAX 128
#define AG71XX_RX_RING_SIZE_MAX 256
#define QCA955X_SGMII_LINK_WAR_MAX_TRY 10
#ifdef CONFIG_AG71XX_DEBUG
#define DBG(fmt, args...) pr_debug(fmt, ## args)
#else

View File

@ -12,6 +12,7 @@
*/
#include "ag71xx.h"
#include <linux/version.h>
static int ag71xx_ethtool_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd)
@ -22,7 +23,11 @@ static int ag71xx_ethtool_get_settings(struct net_device *dev,
if (!phydev)
return -ENODEV;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
return phy_ethtool_gset(phydev, cmd);
#else
return phy_ethtool_ioctl(phydev, cmd);
#endif
}
static int ag71xx_ethtool_set_settings(struct net_device *dev,
@ -34,7 +39,11 @@ static int ag71xx_ethtool_set_settings(struct net_device *dev,
if (!phydev)
return -ENODEV;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
return phy_ethtool_sset(phydev, cmd);
#else
return phy_ethtool_ioctl(phydev, cmd);
#endif
}
static void ag71xx_ethtool_get_drvinfo(struct net_device *dev,

View File

@ -31,6 +31,7 @@ MODULE_PARM_DESC(msg_level, "Message level (-1=defaults,0=none,...,16=all)");
#define ETH_SWITCH_HEADER_LEN 2
static int ag71xx_tx_packets(struct ag71xx *ag, bool flush);
static void ag71xx_qca955x_sgmii_init(void);
static inline unsigned int ag71xx_max_frame_len(unsigned int mtu)
{
@ -610,6 +611,9 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update)
if (update && pdata->set_speed)
pdata->set_speed(ag->speed);
if (update && pdata->enable_sgmii_fixup)
ag71xx_qca955x_sgmii_init();
ag71xx_wr(ag, AG71XX_REG_MAC_CFG2, cfg2);
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, fifo5);
ag71xx_wr(ag, AG71XX_REG_MAC_IFCTL, ifctl);
@ -913,6 +917,81 @@ static void ag71xx_tx_timeout(struct net_device *dev)
schedule_delayed_work(&ag->restart_work, 1);
}
static void ag71xx_bit_set(void __iomem *reg, u32 bit)
{
u32 val = __raw_readl(reg) | bit;
__raw_writel(val, reg);
__raw_readl(reg);
}
static void ag71xx_bit_clear(void __iomem *reg, u32 bit)
{
u32 val = __raw_readl(reg) & ~bit;
__raw_writel(val, reg);
__raw_readl(reg);
}
static void ag71xx_qca955x_sgmii_init()
{
void __iomem *gmac_base;
u32 mr_an_status, sgmii_status;
u8 tries = 0;
gmac_base = ioremap_nocache(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
if (!gmac_base)
goto sgmii_out;
mr_an_status = __raw_readl(gmac_base + QCA955X_GMAC_REG_MR_AN_STATUS);
if (!(mr_an_status & QCA955X_MR_AN_STATUS_AN_ABILITY))
goto sgmii_out;
__raw_writel(QCA955X_SGMII_RESET_RX_CLK_N_RESET ,
gmac_base + QCA955X_GMAC_REG_SGMII_RESET);
__raw_readl(gmac_base + QCA955X_GMAC_REG_SGMII_RESET);
udelay(10);
/* Init sequence */
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET,
QCA955X_SGMII_RESET_HW_RX_125M_N);
udelay(10);
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET,
QCA955X_SGMII_RESET_RX_125M_N);
udelay(10);
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET,
QCA955X_SGMII_RESET_TX_125M_N);
udelay(10);
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET,
QCA955X_SGMII_RESET_RX_CLK_N);
udelay(10);
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_SGMII_RESET,
QCA955X_SGMII_RESET_TX_CLK_N);
udelay(10);
do {
ag71xx_bit_set(gmac_base + QCA955X_GMAC_REG_MR_AN_CONTROL,
QCA955X_MR_AN_CONTROL_PHY_RESET |
QCA955X_MR_AN_CONTROL_AN_ENABLE);
udelay(100);
ag71xx_bit_clear(gmac_base + QCA955X_GMAC_REG_MR_AN_CONTROL,
QCA955X_MR_AN_CONTROL_PHY_RESET);
mdelay(10);
sgmii_status = __raw_readl(gmac_base + QCA955X_GMAC_REG_SGMII_DEBUG) & 0xF;
if (tries++ >= QCA955X_SGMII_LINK_WAR_MAX_TRY) {
pr_warn("ag71xx: max retries for SGMII fixup exceeded!\n");
break;
}
} while (!(sgmii_status == 0xf || sgmii_status == 0x10));
sgmii_out:
iounmap(gmac_base);
}
static void ag71xx_restart_work_func(struct work_struct *work)
{
struct ag71xx *ag = container_of(work, struct ag71xx, restart_work.work);

View File

@ -35,7 +35,6 @@ CONFIG_ATH79_MACH_ARCHER_C60_V2=y
CONFIG_ATH79_MACH_ARCHER_C7=y
CONFIG_ATH79_MACH_ARDUINO_YUN=y
CONFIG_ATH79_MACH_AW_NR580=y
CONFIG_ATH79_MACH_BHR_4GRV2=y
CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
CONFIG_ATH79_MACH_BSB=y
CONFIG_ATH79_MACH_C55=y
@ -89,7 +88,6 @@ CONFIG_ATH79_MACH_ESR1750=y
CONFIG_ATH79_MACH_ESR900=y
CONFIG_ATH79_MACH_EW_BALIN=y
CONFIG_ATH79_MACH_EW_DORIN=y
CONFIG_ATH79_MACH_F9K1115V2=y
CONFIG_ATH79_MACH_FRITZ300E=y
CONFIG_ATH79_MACH_FRITZ4020=y
CONFIG_ATH79_MACH_FRITZ450E=y
@ -97,6 +95,7 @@ CONFIG_ATH79_MACH_GL_AR150=y
CONFIG_ATH79_MACH_GL_AR300=y
CONFIG_ATH79_MACH_GL_AR300M=y
CONFIG_ATH79_MACH_GL_AR750=y
CONFIG_ATH79_MACH_GL_AR750S=y
CONFIG_ATH79_MACH_GL_DOMINO=y
CONFIG_ATH79_MACH_GL_INET=y
CONFIG_ATH79_MACH_GL_MIFI=y
@ -123,6 +122,7 @@ CONFIG_ATH79_MACH_MYNET_REXT=y
CONFIG_ATH79_MACH_MZK_W04NU=y
CONFIG_ATH79_MACH_MZK_W300NH=y
CONFIG_ATH79_MACH_N5Q=y
CONFIG_ATH79_MACH_NBG6716=y
CONFIG_ATH79_MACH_OM2P=y
CONFIG_ATH79_MACH_OM5P=y
CONFIG_ATH79_MACH_OM5P_AC=y
@ -201,7 +201,6 @@ CONFIG_ATH79_MACH_WZR_HP_G300NH=y
CONFIG_ATH79_MACH_WZR_HP_G300NH2=y
CONFIG_ATH79_MACH_WZR_HP_G450H=y
CONFIG_ATH79_MACH_XD3200=y
CONFIG_ATH79_MACH_ZBT_WE1526=y
CONFIG_ATH79_MACH_ZCN_1523H=y
CONFIG_ATH79_NVRAM=y
CONFIG_ATH79_PCI_ATH9K_FIXUP=y

View File

@ -20,6 +20,7 @@ include ./generic-tp-link.mk
include ./generic-ubnt.mk
endif
ifeq ($(SUBTARGET),tiny)
include ./tiny.mk
include ./tiny-tp-link.mk
include ./tiny-legacy-devices.mk
endif

View File

@ -1,9 +1,5 @@
DEVICE_VARS += LOADER_FLASH_OFFS TPLINK_BOARD_ID TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
define Build/copy-file
cat "$(1)" > "$@"
endef
# Arguments: <output name> <kernel offset>
define Build/loader-okli
dd if=$(KDIR)/loader-$(word 1,$(1)).$(LOADER_TYPE) bs=$(word 2,$(1)) conv=sync of="$@.new"
@ -48,21 +44,37 @@ endef
define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1
LOADER_TYPE := gz
IMAGES := sysupgrade.bin factory.bin
endef
define Device/tplink-lzma
$(Device/tplink)
KERNEL := kernel-bin | patch-cmdline | lzma
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef
define Device/tplink-nolzma
$(Device/tplink)
LOADER_TYPE := gz
LOADER_FLASH_OFFS := 0x22000
COMPILE := loader-$(1).gz
COMPILE/loader-$(1).gz := loader-okli-compile
KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 7680
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
KERNEL_NAME := vmlinux.bin.lzma
KERNEL := kernel-bin | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 7680
KERNEL_INITRAMFS_NAME := vmlinux-initramfs.bin.lzma
KERNEL_INITRAMFS := kernel-bin | loader-kernel-cmdline | tplink-v1-header
IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef
define Device/tplink-safeloader
$(Device/tplink)
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Device/tplink-4m
@ -78,19 +90,19 @@ define Device/tplink-8m
endef
define Device/tplink-4mlzma
$(Device/tplink)
$(Device/tplink-lzma)
TPLINK_FLASHLAYOUT := 4Mlzma
IMAGE_SIZE := 3904k
endef
define Device/tplink-8mlzma
$(Device/tplink)
$(Device/tplink-lzma)
TPLINK_FLASHLAYOUT := 8Mlzma
IMAGE_SIZE := 7936k
endef
define Device/tplink-16mlzma
$(Device/tplink)
$(Device/tplink-lzma)
TPLINK_FLASHLAYOUT := 16Mlzma
IMAGE_SIZE := 15872k
endef

View File

@ -143,13 +143,6 @@ define LegacyDevice/TUBE2H16M
endef
LEGACY_DEVICES += TUBE2H16M
define LegacyDevice/F9K1115V2
DEVICE_TITLE := Belkin AC1750DB (F9K1115V2)
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb3 kmod-usb-ledtrig-usbport \
kmod-ath10k ath10k-firmware-qca988x
endef
LEGACY_DEVICES += F9K1115V2
define LegacyDevice/DIR505A1
DEVICE_TITLE := D-Link DIR-505 rev. A1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport

View File

@ -2,11 +2,8 @@ include ./common-tp-link.mk
define Device/archer-cxx
$(Device/tplink-safeloader)
KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Device/archer-c25-v1
@ -17,7 +14,6 @@ define Device/archer-c25-v1
TPLINK_BOARD_ID := ARCHER-C25-V1
DEVICE_PROFILE := ARCHERC25V1
IMAGE_SIZE := 7808k
LOADER_TYPE := elf
MTDPARTS := spi0.0:128k(factory-uboot)ro,64k(u-boot)ro,1536k(kernel),6272k(rootfs),128k(config)ro,64k(art)ro,7808k@0x30000(firmware)
SUPPORTED_DEVICES := archer-c25-v1
endef
@ -49,6 +45,18 @@ define Device/archer-c59-v1
endef
TARGET_DEVICES += archer-c59-v1
define Device/archer-c59-v2
$(Device/archer-c59-v1)
DEVICE_TITLE := TP-LINK Archer C59 v2
BOARDNAME := ARCHER-C59-V2
TPLINK_BOARD_ID := ARCHER-C59-V2
DEVICE_PROFILE := ARCHERC59V2
IMAGE_SIZE := 14400k
MTDPARTS := spi0.0:128k(factory-boot)ro,64k(u-boot)ro,64k(mac)ro,14400k(firmware),1664k(tplink)ro,64k@0xff0000(art)ro
SUPPORTED_DEVICES := archer-c59-v2
endef
TARGET_DEVICES += archer-c59-v2
define Device/archer-c60-v1
$(Device/archer-cxx)
DEVICE_TITLE := TP-LINK Archer C60 v1
@ -135,7 +143,6 @@ define Device/archer-c7-v4
BOARDNAME := ARCHER-C7-V4
TPLINK_BOARD_ID := ARCHER-C7-V4
IMAGE_SIZE := 15104k
LOADER_TYPE := elf
MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,1536k(kernel),13568k(rootfs),960k(config)ro,64k(art)ro,15104k@0x40000(firmware)
SUPPORTED_DEVICES := archer-c7-v4
endef
@ -152,26 +159,21 @@ define Device/archer-c7-v5
endef
TARGET_DEVICES += archer-c7-v5
define Device/cpexxx
DEVICE_PACKAGES := rssileds
MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,1792k(kernel),5888k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
IMAGE_SIZE := 7680k
DEVICE_PROFILE := CPE510
LOADER_TYPE := elf
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Device/cpe510-520-v1
$(Device/cpexxx)
DEVICE_TITLE := TP-LINK CPE510/520 v1
BOARDNAME := CPE510
TPLINK_BOARD_ID := CPE510
LOADER_TYPE := elf
LOADER_FLASH_OFFS := 0x43000
COMPILE := loader-$(1).elf
COMPILE/loader-$(1).elf := loader-okli-compile
KERNEL := kernel-bin | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
IMAGES += factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
DEVICE_PACKAGES := rssileds
MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,1792k(kernel),5888k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
IMAGE_SIZE := 7680k
endef
TARGET_DEVICES += cpe510-520-v1
@ -184,14 +186,15 @@ endef
TARGET_DEVICES += cpe210-220-v1
define Device/cpe210-v2
$(Device/cpexxx)
$(Device/tplink-safeloader)
DEVICE_TITLE := TP-LINK CPE210 v2
BOARDNAME := CPE210V2
TPLINK_BOARD_ID := CPE210V2
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
TPLINK_HEADER_VERSION := 1
MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,1792k(kernel),5888k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
IMAGE_SIZE := 7680k
DEVICE_PACKAGES := rssileds
endef
TARGET_DEVICES += cpe210-v2
@ -227,6 +230,7 @@ endef
TARGET_DEVICES += eap120-v1
define Device/re355-v1
$(Device/tplink-safeloader)
DEVICE_TITLE := TP-LINK RE355 v1
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
MTDPARTS := spi0.0:128k(u-boot)ro,6016k(firmware),64k(partition-table)ro,64k(product-info)ro,1856k(config)ro,64k(art)ro
@ -234,18 +238,13 @@ define Device/re355-v1
BOARDNAME := RE355
TPLINK_BOARD_ID := RE355
DEVICE_PROFILE := RE355
LOADER_TYPE := elf
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
TPLINK_HEADER_VERSION := 1
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += re355-v1
define Device/re450-v1
$(Device/tplink-safeloader)
DEVICE_TITLE := TP-LINK RE450 v1
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
MTDPARTS := spi0.0:128k(u-boot)ro,6016k(firmware),64k(partition-table)ro,64k(product-info)ro,1856k(config)ro,64k(art)ro
@ -253,14 +252,8 @@ define Device/re450-v1
BOARDNAME := RE450
TPLINK_BOARD_ID := RE450
DEVICE_PROFILE := RE450
LOADER_TYPE := elf
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
TPLINK_HEADER_VERSION := 1
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += re450-v1
@ -395,19 +388,17 @@ endef
TARGET_DEVICES += tl-wr1043nd-v3
define Device/tl-wr1043nd-v4
$(Device/tplink)
$(Device/tplink-safeloader)
DEVICE_TITLE := TP-LINK TL-WR1043N/ND v4
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
BOARDNAME := TL-WR1043ND-v4
DEVICE_PROFILE := TLWR1043
TPLINK_HWID := 0x10430004
MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware)
MTDPARTS := spi0.0:128k(u-boot)ro,15552k(firmware),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro
IMAGE_SIZE := 15552k
TPLINK_BOARD_ID := TLWR1043NDV4
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header -O
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
endef
TARGET_DEVICES += tl-wr1043nd-v4
@ -493,6 +484,7 @@ endef
TARGET_DEVICES += tl-wr842n-v3
define Device/tl-wr902ac-v1
$(Device/tplink-safeloader)
DEVICE_TITLE := TP-LINK TL-WR902AC v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport \
kmod-ath10k ath10k-firmware-qca9887 -swconfig -uboot-envtools
@ -501,30 +493,20 @@ define Device/tl-wr902ac-v1
TPLINK_BOARD_ID := TL-WR902AC-V1
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
TPLINK_HEADER_VERSION := 1
SUPPORTED_DEVICES := tl-wr902ac-v1
IMAGE_SIZE := 7360k
KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
IMAGES += factory.bin
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
append-metadata | check-size $$$$(IMAGE_SIZE)
MTDPARTS := spi0.0:128k(u-boot)ro,7360k(firmware),640k(tplink)ro,64k(art)ro
endef
TARGET_DEVICES += tl-wr902ac-v1
define Device/tl-wr942n-v1
$(Device/archer-cxx)
DEVICE_TITLE := TP-LINK TL-WR942N v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
BOARDNAME := TL-WR942N-V1
TPLINK_BOARD_ID := TLWR942NV1
DEVICE_PROFILE := TLWR942
IMAGE_SIZE := 14464k
KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
MTDPARTS := spi0.0:128k(u-boot)ro,14464k(firmware),64k(product-info)ro,64k(partition-table)ro,256k(oem-config)ro,1344k(oem-vars)ro,64k(ART)ro
SUPPORTED_DEVICES := tl-wr942n-v1
endef

View File

@ -16,14 +16,6 @@ define Build/append-string
echo -n $(1) >> $@
endef
define Build/mkbuffaloimg
$(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
-R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
-K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
-i $@ -o $@.new
mv $@.new $@
endef
define Build/mkwrggimg
$(STAGING_DIR_HOST)/bin/mkwrggimg -b \
-i $@ -o $@.imghdr -d /dev/mtdblock/1 \
@ -518,6 +510,19 @@ define Device/gl-ar750
endef
TARGET_DEVICES += gl-ar750
define Device/gl-ar750s
DEVICE_TITLE := GL.iNet GL-AR750S
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887 kmod-usb-core \
kmod-usb2 kmod-usb-storage
BOARDNAME := GL-AR750S
SUPPORTED_DEVICES := gl-ar750s
IMAGE_SIZE := 16000k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
endef
TARGET_DEVICES += gl-ar750s
define Device/gl-domino
DEVICE_TITLE := GL.iNet Domino Pi
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
@ -681,61 +686,33 @@ endef
TARGET_DEVICES += wndrmacv2
define Device/cap324
DEVICE_TITLE := PowerCloud CAP324 Cloud AP
BOARDNAME := CAP324
DEVICE_PROFILE := CAP324
IMAGE_SIZE := 15296k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
endef
TARGET_DEVICES += cap324
define Device/cap324-nocloud
DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
DEVICE_TITLE := PowerCloud Systems CAP324
BOARDNAME := CAP324
DEVICE_PROFILE := CAP324
IMAGE_SIZE := 16000k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
endef
TARGET_DEVICES += cap324-nocloud
TARGET_DEVICES += cap324
define Device/cr3000
DEVICE_TITLE := PowerCloud CR3000 Cloud Router
DEVICE_TITLE := PowerCloud Systems CR3000
BOARDNAME := CR3000
DEVICE_PROFILE := CR3000
IMAGE_SIZE := 7104k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
IMAGE_SIZE := 7808k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
endef
TARGET_DEVICES += cr3000
define Device/cr3000-nocloud
DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
BOARDNAME := CR3000
DEVICE_PROFILE := CR3000
IMAGE_SIZE := 7808k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
endef
TARGET_DEVICES += cr3000-nocloud
define Device/cr5000
DEVICE_TITLE := PowerCloud CR5000 Cloud Router
DEVICE_TITLE := PowerCloud Systems CR5000
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
BOARDNAME := CR5000
DEVICE_PROFILE := CR5000
IMAGE_SIZE := 7104k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
IMAGE_SIZE := 7808k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
endef
TARGET_DEVICES += cr5000
define Device/cr5000-nocloud
DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
BOARDNAME := CR5000
DEVICE_PROFILE := CR5000
IMAGE_SIZE := 7808k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
endef
TARGET_DEVICES += cr5000-nocloud
define Device/packet-squirrel
$(Device/tplink-16mlzma)
DEVICE_TITLE := Hak5 Packet Squirrel
@ -1086,8 +1063,12 @@ define Device/NBG6616
IMAGE_SIZE := 15323k
MTDPARTS := spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware)
CMDLINE += mem=128M
IMAGES := sysupgrade.bin
RAS_BOARD := NBG6616
RAS_ROOTFS_SIZE := 14464k
RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
IMAGES := factory.bin sysupgrade.bin
KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(IMAGE_SIZE) | zyxel-ras-image
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
# We cannot currently build a factory image. It is the sysupgrade image
# prefixed with a header (which is actually written into the MTD device).
@ -1234,19 +1215,6 @@ define Device/dap-2695-a1
endef
TARGET_DEVICES += dap-2695-a1
define Device/bhr-4grv2
DEVICE_TITLE := Buffalo BHR-4GRV2
BOARDNAME := BHR-4GRV2
ROOTFS_SIZE := 14528k
KERNEL_SIZE := 1472k
IMAGE_SIZE := 16000k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
endef
TARGET_DEVICES += bhr-4grv2
define Device/wam250
DEVICE_TITLE := Samsung WAM250
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
@ -1338,18 +1306,6 @@ define Device/wrtnode2q
endef
TARGET_DEVICES += wrtnode2q
define Device/zbt-we1526
DEVICE_TITLE := Zbtlink ZBT-WE1526
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
BOARDNAME := ZBT-WE1526
IMAGE_SIZE := 16000k
KERNEL_SIZE := 1472k
ROOTFS_SIZE := 14528k
MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
endef
TARGET_DEVICES += zbt-we1526
define Device/AVM
DEVICE_PACKAGES := fritz-tffs -uboot-envtools
KERNEL := kernel-bin | patch-cmdline | lzma | eva-image

View File

@ -897,8 +897,6 @@ $(eval $(call SingleProfile,AthLzma,64k,DB120,db120,DB120,ttyS0,115200,$$(db120_
$(eval $(call SingleProfile,AthLzma,64k,HORNETUBx2,hornet-ub-x2,HORNET-UB,ttyATH0,115200,$$(alfa_mtdlayout_16M),KRuImage,65536))
$(eval $(call SingleProfile,AthLzma,64k,TUBE2H16M,tube2h-16M,TUBE2H,ttyATH0,115200,$$(alfa_mtdlayout_16M),KRuImage,65536))
$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9k1115v2,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC))
$(eval $(call SingleProfile,CameoAP121_8M,64kraw-nojffs,DIR505A1,dir-505-a1,DIR-505-A1,ttyATH0,115200,"HORNET-PACKET-DIR505A1-3",1.99.99,""))
$(eval $(call SingleProfile,CameoAP135,64kraw,DGL5500A1,dgl-5500-a1,DGL-5500-A1,ttyS0,115200,$$(dgl_5500_mtdlayout),"00AP135AR9558-RT-130508-00"))
@ -972,6 +970,8 @@ endif # ifeq ($(SUBTARGET),generic)
ifeq ($(SUBTARGET),tiny)
$(eval $(call SingleProfile,Belkin,64k,F9K1115V2,f9k1115v2,F9K1115V2,ttyS0,115200,$$(f9k1115v2_mtdlayout),BR-6679BAC))
$(eval $(call SingleProfile,CameoAP91,64kraw,DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00"))
$(eval $(call SingleProfile,CameoAP91,64kraw,DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02"))
$(eval $(call SingleProfile,CameoAP91,64kraw,FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01"))

Some files were not shown because too many files have changed in this diff Show More