Merge Official Source
This commit is contained in:
commit
150b02f16e
@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=229
|
||||
PKG_RELEASE:=230
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
|
||||
@ -20,7 +20,6 @@ uci_apply_defaults() {
|
||||
boot() {
|
||||
[ -f /proc/mounts ] || /sbin/mount_root
|
||||
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
|
||||
[ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
|
||||
|
||||
mkdir -p /var/run
|
||||
mkdir -p /var/log
|
||||
|
||||
@ -32,6 +32,7 @@ ubootenv_mtdinfo () {
|
||||
|
||||
case "$board" in
|
||||
alfa-network,ap120c-ac |\
|
||||
edgecore,ecw5211 |\
|
||||
glinet,gl-b1300 |\
|
||||
openmesh,a42 |\
|
||||
openmesh,a62)
|
||||
|
||||
@ -31,6 +31,9 @@ ubootenv_mtdinfo () {
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
edgecore,ecw5410)
|
||||
ubootenv_add_uci_config "/dev/mtd11" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000"
|
||||
|
||||
@ -26,7 +26,7 @@ zyxel,p-2812hnu-f1)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
|
||||
;;
|
||||
buffalo,wbmr-300hpd)
|
||||
idx="$(find_mtd_index ubootconfig)"
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
|
||||
;;
|
||||
|
||||
@ -31,6 +31,9 @@ ALLWIFIBOARDS:= \
|
||||
buffalo_wtr-m2133hp \
|
||||
cellc_rtl30vw \
|
||||
dlink_dap2610 \
|
||||
edgecore_ecw5211 \
|
||||
edgecore_ecw5410 \
|
||||
edgecore_oap100 \
|
||||
engenius_eap2200 \
|
||||
engenius_emd1 \
|
||||
engenius_emr3500 \
|
||||
@ -47,7 +50,7 @@ define Package/ipq-wifi-default
|
||||
SUBMENU:=ath10k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@TARGET_ipq40xx
|
||||
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x)
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
@ -106,6 +109,9 @@ $(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater
|
||||
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
|
||||
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
|
||||
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5211,Edgecore ECW5211))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
|
||||
$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
|
||||
|
||||
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984
Normal file
BIN
package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-edgecore_oap100.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-edgecore_oap100.qca4019
Normal file
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 16 Sep 2020 18:43:46 +0200
|
||||
Subject: [PATCH] mac80211: allow bigger A-MSDU sizes in VHT, even if HT is
|
||||
limited
|
||||
|
||||
Some APs (e.g. Asus RT-AC88U) have been observed to report an HT MSDU size
|
||||
limit of 3839 and a VHT limit of 7991. These APs can handle bigger frames
|
||||
than 3839 bytes just fine, so we should remove the VHT limit based on the
|
||||
HT capabilities. This improves tx throughput.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/vht.c
|
||||
+++ b/net/mac80211/vht.c
|
||||
@@ -315,10 +315,6 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
||||
|
||||
sta->sta.bandwidth = ieee80211_sta_cur_vht_bw(sta);
|
||||
|
||||
- /* If HT IE reported 3839 bytes only, stay with that size. */
|
||||
- if (sta->sta.max_amsdu_len == IEEE80211_MAX_MPDU_LEN_HT_3839)
|
||||
- return;
|
||||
-
|
||||
switch (vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK) {
|
||||
case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454:
|
||||
sta->sta.max_amsdu_len = IEEE80211_MAX_MPDU_LEN_VHT_11454;
|
||||
@ -0,0 +1,34 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 17 Sep 2020 12:07:19 +0200
|
||||
Subject: [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware
|
||||
supports
|
||||
|
||||
Limit maximum VHT MPDU size by local capability
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/vht.c
|
||||
+++ b/net/mac80211/vht.c
|
||||
@@ -168,10 +168,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
||||
/* take some capabilities as-is */
|
||||
cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info);
|
||||
vht_cap->cap = cap_info;
|
||||
- vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
|
||||
- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
|
||||
- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
|
||||
- IEEE80211_VHT_CAP_RXLDPC |
|
||||
+ vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC |
|
||||
IEEE80211_VHT_CAP_VHT_TXOP_PS |
|
||||
IEEE80211_VHT_CAP_HTC_VHT |
|
||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK |
|
||||
@@ -180,6 +177,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
|
||||
IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN |
|
||||
IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
|
||||
|
||||
+ vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK,
|
||||
+ own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK);
|
||||
+
|
||||
/* and some based on our own capabilities */
|
||||
switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
||||
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=json-c
|
||||
PKG_VERSION:=0.14
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=0.15
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
|
||||
PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
|
||||
PKG_HASH:=99914e644a25201d82ccefa20430f7515c110923360f9ef46755527c02412afa
|
||||
PKG_HASH:=99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/math_compat.h
|
||||
+++ b/math_compat.h
|
||||
@@ -6,31 +6,9 @@
|
||||
@@ -6,38 +6,9 @@
|
||||
* @brief Do not use, json-c internal, may be changed or removed at any time.
|
||||
*/
|
||||
|
||||
@ -10,6 +10,9 @@
|
||||
-#ifdef HAVE_DECL__ISNAN
|
||||
-#include <float.h>
|
||||
-#define isnan(x) _isnan(x)
|
||||
-#else
|
||||
-/* On platforms like AIX and "IBM i" we need to provide our own isnan */
|
||||
-#define isnan(x) ((x) != (x))
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
@ -17,6 +20,10 @@
|
||||
-#ifdef HAVE_DECL__FINITE
|
||||
-#include <float.h>
|
||||
-#define isinf(x) (!_finite(x))
|
||||
-#else
|
||||
-#include <float.h>
|
||||
-/* On platforms like AIX and "IBM i" we need to provide our own isinf */
|
||||
-#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX)
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
|
||||
File diff suppressed because one or more lines are too long
11
package/libs/libjson-c/patches/001-dont-build-docs.patch
Normal file
11
package/libs/libjson-c/patches/001-dont-build-docs.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -401,8 +401,6 @@ set(JSON_C_SOURCES
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
|
||||
-add_subdirectory(doc)
|
||||
-
|
||||
# uninstall
|
||||
add_custom_target(uninstall
|
||||
COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
||||
PKG_SOURCE_DATE:=2020-09-15
|
||||
PKG_SOURCE_VERSION:=11723570af9cb7bd87842e79c85ee99530be9902
|
||||
PKG_MIRROR_HASH:=39aa6d700689419db8e8f9bf59a4b9c9539c3ee636e0befebf38476bc883cc18
|
||||
PKG_SOURCE_DATE:=2020-09-18
|
||||
PKG_SOURCE_VERSION:=47c34bd6ad49cae408b8d7c150c6f9f324aaddf5
|
||||
PKG_MIRROR_HASH:=31ee0eca69577380842588abc442526c23b2c20df13e79738843b8b417f99d17
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@ -12,10 +12,10 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
|
||||
PKG_SOURCE_DATE:=2020-09-10
|
||||
PKG_SOURCE_VERSION:=646daa0bec742e4c0af010ca85eda9021d95e4cf
|
||||
PKG_SOURCE_DATE:=2020-09-18
|
||||
PKG_SOURCE_VERSION:=3fea6559817a22de1b8375b9b1f3d818e6534591
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_MIRROR_HASH:=7c1770b0f959e1e2602411ccd1bf7201f658d949ae35ad511d731ed7afbd6ce4
|
||||
PKG_MIRROR_HASH:=d9284a23017c4393f210afb5bdc7f6d9e0b3ef46cc6e2cc2b2bcaa0199c942af
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
@ -85,8 +85,9 @@ zram_comp_algo()
|
||||
local dev="$1"
|
||||
local zram_comp_algo="$( uci -q get system.@system[0].zram_comp_algo )"
|
||||
|
||||
if [ -z "$zram_comp_algo" ] || [ ! -e /sys/block/$( basename $dev )/comp_algorithm ]; then
|
||||
return 0
|
||||
if [ -z "$zram_comp_algo" ]; then
|
||||
# lzo-rle fails on small RAM devices, default to lzo, which is always available
|
||||
zram_comp_algo="lzo"
|
||||
fi
|
||||
|
||||
if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=usbutils
|
||||
PKG_VERSION:=007
|
||||
PKG_RELEASE:=10
|
||||
PKG_RELEASE:=11
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
|
||||
@ -32,13 +32,13 @@ define Package/usbutils
|
||||
URL:=http://www.linux-usb.org/
|
||||
endef
|
||||
|
||||
USB_IDS_VER:=0.321
|
||||
USB_IDS_VER:=0.339
|
||||
USB_IDS_FILE:=usb.ids.$(USB_IDS_VER)
|
||||
define Download/usb_ids
|
||||
FILE:=$(USB_IDS_FILE)
|
||||
URL_FILE:=usb.ids
|
||||
URL:=@GITHUB/vcrhonek/hwdata/v$(USB_IDS_VER)
|
||||
HASH:=00aa21766bb078186d2bc2cca9a2ae910aa2b787a810e97019b1b3f94c9453f2
|
||||
HASH:=5ab6b663d3119217aa4117e95063c9b82646107344f2ae1d22248c6c29389fd7
|
||||
endef
|
||||
$(eval $(call Download,usb_ids))
|
||||
|
||||
|
||||
@ -44,8 +44,6 @@ netgear,wndr4700)
|
||||
ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
@ -16,6 +16,4 @@ netgear,wndap620|\
|
||||
netgear,wndap660)
|
||||
macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -12,8 +12,6 @@ move_config() {
|
||||
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@ -43,8 +43,5 @@ platform_copy_config() {
|
||||
wd,mybooklive-duo)
|
||||
mbl_copy_config
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
9
target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts
Normal file
9
target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "ar7161_buffalo_wzr-hp-ag300h.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "buffalo,wzr-600dhp", "qca,ar7161";
|
||||
model = "Buffalo WZR-600DHP";
|
||||
};
|
||||
@ -1,272 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "ar7100.dtsi"
|
||||
#include "ar7161_buffalo_wzr-hp-ag300h.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "buffalo,wzr-hp-ag300h", "qca,ar7161";
|
||||
model = "Buffalo WZR-HP-AG300H/WZR-600DHP";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_diag;
|
||||
led-failsafe = &led_diag;
|
||||
led-upgrade = &led_diag;
|
||||
};
|
||||
|
||||
extosc: ref {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "ref";
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_diag: diag {
|
||||
label = "buffalo:red:diag";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
ath9k-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
band2g_a {
|
||||
label = "buffalo:amber:band2g";
|
||||
gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb {
|
||||
label = "buffalo:green:usb";
|
||||
gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
band2g_g {
|
||||
label = "buffalo:green:band2g";
|
||||
gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
band5g_g {
|
||||
label = "buffalo:green:band5g";
|
||||
gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
router {
|
||||
label = "buffalo:green:router";
|
||||
gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
movie_engine {
|
||||
label = "buffalo:blue:movie_engine";
|
||||
gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
band5g_a {
|
||||
label = "buffalo:amber:band5g";
|
||||
gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
usb {
|
||||
linux,code = <BTN_2>;
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
aoss {
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
router_auto {
|
||||
linux,code = <BTN_6>;
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
router_off {
|
||||
linux,code = <BTN_5>;
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
movie_engine {
|
||||
linux,code = <BTN_7>;
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
gpio_usb_power {
|
||||
gpio-export,name = "buffalo:power:usb";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
flash {
|
||||
compatible = "mtd-concat";
|
||||
|
||||
devices = <&flash0 &flash1>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0000000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x0040000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@50000 {
|
||||
label = "art";
|
||||
reg = <0x0050000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x0060000 0x1f90000>;
|
||||
};
|
||||
|
||||
partition@1ff0000 {
|
||||
label = "user_property";
|
||||
reg = <0x1ff0000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
usb_ohci_port: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
usb_ehci_port: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
ath9k0: wifi@0,11 {
|
||||
compatible = "pci168c,0029";
|
||||
reg = <0x8800 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
ath9k1: wifi@0,12 {
|
||||
compatible = "pci168c,0029";
|
||||
reg = <0x9000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
};
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll {
|
||||
clocks = <&extosc>;
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
num-cs = <2>;
|
||||
cs-gpios = <0>, <0>;
|
||||
|
||||
flash0: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
|
||||
flash1: flash@1 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x120c>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x520c>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
phy-handle = <&phy4>;
|
||||
model = "Buffalo WZR-HP-AG300H";
|
||||
};
|
||||
|
||||
271
target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
Normal file
271
target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
Normal file
@ -0,0 +1,271 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "ar7100.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_diag;
|
||||
led-failsafe = &led_diag;
|
||||
led-upgrade = &led_diag;
|
||||
};
|
||||
|
||||
extosc: ref {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "ref";
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_diag: diag {
|
||||
label = "buffalo:red:diag";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
ath9k-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
band2g_a {
|
||||
label = "buffalo:amber:band2g";
|
||||
gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb {
|
||||
label = "buffalo:green:usb";
|
||||
gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
band2g_g {
|
||||
label = "buffalo:green:band2g";
|
||||
gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
band5g_g {
|
||||
label = "buffalo:green:band5g";
|
||||
gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
router {
|
||||
label = "buffalo:green:router";
|
||||
gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
movie_engine {
|
||||
label = "buffalo:blue:movie_engine";
|
||||
gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
band5g_a {
|
||||
label = "buffalo:amber:band5g";
|
||||
gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
usb {
|
||||
linux,code = <BTN_2>;
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
aoss {
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
router_auto {
|
||||
linux,code = <BTN_6>;
|
||||
linux,input-type = <EV_SW>;
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
router_off {
|
||||
linux,code = <BTN_5>;
|
||||
linux,input-type = <EV_SW>;
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
movie_engine {
|
||||
linux,code = <BTN_7>;
|
||||
linux,input-type = <EV_SW>;
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
gpio_usb_power {
|
||||
gpio-export,name = "buffalo:power:usb";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
flash {
|
||||
compatible = "mtd-concat";
|
||||
|
||||
devices = <&flash0 &flash1>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0000000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x0040000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@50000 {
|
||||
label = "art";
|
||||
reg = <0x0050000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x0060000 0x1f90000>;
|
||||
};
|
||||
|
||||
partition@1ff0000 {
|
||||
label = "user_property";
|
||||
reg = <0x1ff0000 0x0010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
usb_ohci_port: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
usb_ehci_port: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
ath9k0: wifi@0,11 {
|
||||
compatible = "pci168c,0029";
|
||||
reg = <0x8800 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
ath9k1: wifi@0,12 {
|
||||
compatible = "pci168c,0029";
|
||||
reg = <0x9000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
};
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll {
|
||||
clocks = <&extosc>;
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
num-cs = <2>;
|
||||
cs-gpios = <0>, <0>;
|
||||
|
||||
flash0: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
|
||||
flash1: flash@1 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x120c>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x520c>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
phy-handle = <&phy4>;
|
||||
};
|
||||
@ -122,13 +122,13 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "bootloader2";
|
||||
reg = <0x10000 0x0>;
|
||||
read-only;
|
||||
soft_config {
|
||||
};
|
||||
|
||||
soft_config {
|
||||
partition@10000 {
|
||||
label = "bootloader2";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&info 0x08>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
ð0 {
|
||||
|
||||
158
target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
Normal file
158
target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
Normal file
@ -0,0 +1,158 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "ar9344.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ubiquiti UniFi AP Pro";
|
||||
compatible = "ubnt,unifi-ap-pro";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_white;
|
||||
led-failsafe = &led_white;
|
||||
led-running = &led_blue;
|
||||
led-upgrade = &led_blue;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_white: led-white {
|
||||
label = "ubnt:white:dome";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_blue: led-blue {
|
||||
label = "ubnt:blue:dome";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ref {
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
uboot: partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xf60000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x0 0x300000>;
|
||||
/* Can be resized w/o issues.
|
||||
* U-Boot can load kernel from the
|
||||
* entirety of the "firmware" partition space.
|
||||
*/
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "rootfs";
|
||||
reg = <0x300000 0xc60000>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@fb0000 {
|
||||
label = "cfg";
|
||||
reg = <0xfb0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0033";
|
||||
reg = <0 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
0x4 0x7600000 /* PORT0 PAD MODE CTRL */
|
||||
0x10 0x80000080 /* POWER_ON_STRAP */
|
||||
0x7c 0x7e /* PORT0_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x6000000 0x101 0x1616>;
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
@ -126,9 +126,15 @@
|
||||
reg = <0x020000 0x730000>;
|
||||
};
|
||||
|
||||
tplink: partition@750000 {
|
||||
info: partition@750000 {
|
||||
label = "info";
|
||||
reg = <0x750000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@760000 {
|
||||
label = "tplink";
|
||||
reg = <0x750000 0x0a0000>;
|
||||
reg = <0x760000 0x090000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -146,7 +152,7 @@
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
mtd-mac-address = <&tplink 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
@ -158,7 +164,7 @@
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&tplink 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
|
||||
@ -125,9 +125,21 @@
|
||||
compatible = "tplink,firmware";
|
||||
};
|
||||
|
||||
config: partition@3b0000 {
|
||||
partition@3b0000 {
|
||||
label = "partition-table";
|
||||
reg = <0x3b0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
info: partition@3c0000 {
|
||||
label = "info";
|
||||
reg = <0x3c0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@3d0000 {
|
||||
label = "config";
|
||||
reg = <0x3b0000 0x040000>;
|
||||
reg = <0x3d0000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -145,7 +157,7 @@
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
mtd-mac-address = <&config 0x10008>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
@ -156,5 +168,5 @@
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&config 0x10008>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
phy-handle = <&phy4>;
|
||||
pll-data = <0x9e000000 0x80000101 0x80001313>;
|
||||
|
||||
mtd-mac-address = <&config 0x10008>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
@ -144,9 +144,21 @@
|
||||
reg = <0x020000 0xd70000>;
|
||||
};
|
||||
|
||||
config: partition@d90000 {
|
||||
partition@d90000 {
|
||||
label = "partition-table";
|
||||
reg = <0xd90000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
info: partition@da0000 {
|
||||
label = "info";
|
||||
reg = <0xda0000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@dc0000 {
|
||||
label = "config";
|
||||
reg = <0xd90000 0x260000>;
|
||||
reg = <0xdc0000 0x230000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -167,5 +179,5 @@
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&config 0x10008>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@10000 {
|
||||
label = "mac";
|
||||
info: partition@10000 {
|
||||
label = "info";
|
||||
reg = <0x010000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -52,8 +52,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@10000 {
|
||||
label = "mac";
|
||||
info: partition@10000 {
|
||||
label = "info";
|
||||
reg = <0x010000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -58,8 +58,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@30000 {
|
||||
label = "mac";
|
||||
info: partition@30000 {
|
||||
label = "info";
|
||||
reg = <0x030000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -130,7 +130,7 @@
|
||||
|
||||
phy-handle = <&swphy0>;
|
||||
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
|
||||
gmac-config {
|
||||
@ -144,12 +144,12 @@
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@10000 {
|
||||
label = "mac";
|
||||
info: partition@10000 {
|
||||
label = "info";
|
||||
reg = <0x010000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@1fb00 {
|
||||
label = "mac";
|
||||
info: partition@1fb00 {
|
||||
label = "info";
|
||||
reg = <0x01fb00 0x000500>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@1fb00 {
|
||||
label = "mac";
|
||||
info: partition@1fb00 {
|
||||
label = "info";
|
||||
reg = <0x01fb00 0x000500>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -76,19 +76,19 @@
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -96,8 +96,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@20000 {
|
||||
label = "mac";
|
||||
info: partition@20000 {
|
||||
label = "info";
|
||||
reg = <0x020000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -96,8 +96,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@20000 {
|
||||
label = "mac";
|
||||
info: partition@20000 {
|
||||
label = "info";
|
||||
reg = <0x020000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -42,12 +42,12 @@
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
};
|
||||
|
||||
&partitions {
|
||||
mac: partition@630000 {
|
||||
label = "mac";
|
||||
info: partition@630000 {
|
||||
label = "info";
|
||||
reg = <0x630000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
mac: partition@7e0000 {
|
||||
label = "mac";
|
||||
info: partition@7e0000 {
|
||||
label = "info";
|
||||
reg = <0x7e0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
};
|
||||
|
||||
ð0 {
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
mtd-mac-address = <&mac 0x8>;
|
||||
mtd-mac-address = <&info 0x8>;
|
||||
};
|
||||
|
||||
@ -94,6 +94,7 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
|
||||
;;
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h|\
|
||||
tplink,archer-c25-v1|\
|
||||
tplink,archer-c60-v1|\
|
||||
@ -370,6 +371,10 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2"
|
||||
;;
|
||||
ubnt,unifi-ap-pro)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan"
|
||||
;;
|
||||
zbtlink,zbt-wd323|\
|
||||
xiaomi,mi-router-4q)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
|
||||
@ -98,6 +98,7 @@ case "$FIRMWARE" in
|
||||
tplink,tl-wdr4300-v1-il|\
|
||||
tplink,tl-wdr4310-v1|\
|
||||
tplink,tl-wdr4900-v2|\
|
||||
ubnt,unifi-ap-pro|\
|
||||
winchannel,wb2000)
|
||||
caldata_extract "art" 0x5000 0x440
|
||||
;;
|
||||
@ -132,6 +133,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:11.0.bin")
|
||||
case $board in
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h|\
|
||||
netgear,wndr3700|\
|
||||
netgear,wndr3700-v2|\
|
||||
@ -155,6 +157,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:12.0.bin")
|
||||
case $board in
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h|\
|
||||
netgear,wndr3700|\
|
||||
netgear,wndr3700-v2|\
|
||||
|
||||
@ -98,7 +98,8 @@ case "$FIRMWARE" in
|
||||
tplink,archer-c2-v3|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5|\
|
||||
tplink,archer-c25-v1)
|
||||
tplink,archer-c25-v1|\
|
||||
tplink,tl-wr902ac-v1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1)
|
||||
;;
|
||||
@ -118,7 +119,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
tplink,re350k-v1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary config 0x10008) +2)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +2)
|
||||
;;
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1)
|
||||
@ -134,10 +135,6 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) +1)
|
||||
;;
|
||||
tplink,tl-wr902ac-v1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary tplink 0x8) -1)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
@ -195,18 +192,13 @@ case "$FIRMWARE" in
|
||||
tplink,archer-c6-v2|\
|
||||
tplink,archer-c6-v2-us)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) -1)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
tplink,eap225-wall-v2|\
|
||||
tplink,tl-wpa8630p-v2-eu|\
|
||||
tplink,tl-wpa8630p-v2-int)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) +1)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
tplink,eap225-wall-v2)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER
|
||||
|
||||
define Build/buffalo-tag
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval hwver=$(word 2,$(1)))
|
||||
@ -17,3 +19,16 @@ define Build/buffalo-tftp-header
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
|
||||
define Device/buffalo_common
|
||||
DEVICE_VENDOR := Buffalo
|
||||
BUFFALO_PRODUCT :=
|
||||
BUFFALO_HWVER := 3
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc $$$$(BUFFALO_PRODUCT) 1.99 | \
|
||||
buffalo-tag $$$$(BUFFALO_PRODUCT) $$$$(BUFFALO_HWVER)
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
endef
|
||||
|
||||
@ -13,6 +13,14 @@ define Build/mkubntimage
|
||||
-k $(IMAGE_KERNEL) -r $@ -o $@
|
||||
endef
|
||||
|
||||
define Build/mkubntimage2
|
||||
-$(STAGING_DIR_HOST)/bin/mkfwimage2 -f 0x9f000000 \
|
||||
-v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
|
||||
-p jffs2:0x50000:0xf60000:0:0:$@ \
|
||||
-o $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
# all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
|
||||
# booting the image, the size doesn't matter.
|
||||
define Build/mkubntimage-split
|
||||
@ -369,3 +377,20 @@ define Device/ubnt_unifiac-pro
|
||||
SUPPORTED_DEVICES += unifiac-pro
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifiac-pro
|
||||
|
||||
define Device/ubnt_unifi-ap-pro
|
||||
SOC := ar9344
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
DEVICE_MODEL := UniFi AP Pro
|
||||
UBNT_TYPE := BZ
|
||||
UBNT_CHIP := ar934x
|
||||
KERNEL_SIZE := 3072k
|
||||
IMAGE_SIZE := 15744k
|
||||
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | jffs2 kernel0
|
||||
IMAGES := sysupgrade.bin factory.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs |\
|
||||
pad-rootfs | append-metadata | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2
|
||||
SUPPORTED_DEVICES += uap-pro
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifi-ap-pro
|
||||
|
||||
@ -315,17 +315,12 @@ endef
|
||||
TARGET_DEVICES += avm_fritzdvbc
|
||||
|
||||
define Device/buffalo_bhr-4grv
|
||||
$(Device/buffalo_common)
|
||||
SOC := ar7242
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := BHR-4GRV
|
||||
BUFFALO_PRODUCT := BHR-4GRV
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
IMAGE_SIZE := 32256k
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | \
|
||||
buffalo-tag BHR-4GRV 3
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
SUPPORTED_DEVICES += wzr-hp-g450h
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_bhr-4grv
|
||||
@ -338,52 +333,48 @@ define Device/buffalo_bhr-4grv2
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_bhr-4grv2
|
||||
|
||||
define Device/buffalo_wzr-hp-ag300h
|
||||
define Device/buffalo_wzr_ar7161
|
||||
$(Device/buffalo_common)
|
||||
SOC := ar7161
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WZR-HP-AG300H
|
||||
IMAGE_SIZE := 32320k
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | \
|
||||
buffalo-tag WZR-HP-AG300H 3
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
BUFFALO_PRODUCT := WZR-HP-AG300H
|
||||
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-leds-reset kmod-owl-loader
|
||||
IMAGE_SIZE := 32320k
|
||||
SUPPORTED_DEVICES += wzr-hp-ag300h
|
||||
endef
|
||||
|
||||
define Device/buffalo_wzr-600dhp
|
||||
$(Device/buffalo_wzr_ar7161)
|
||||
DEVICE_MODEL := WZR-600DHP
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-600dhp
|
||||
|
||||
define Device/buffalo_wzr-hp-ag300h
|
||||
$(Device/buffalo_wzr_ar7161)
|
||||
DEVICE_MODEL := WZR-HP-AG300H
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-hp-ag300h
|
||||
|
||||
define Device/buffalo_wzr-hp-g302h-a1a0
|
||||
$(Device/buffalo_common)
|
||||
SOC := ar7242
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WZR-HP-G302H
|
||||
DEVICE_VARIANT := A1A0
|
||||
BUFFALO_PRODUCT := WZR-HP-G302H
|
||||
BUFFALO_HWVER := 4
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
IMAGE_SIZE := 32128k
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | \
|
||||
buffalo-tag WZR-HP-G302H 4
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
SUPPORTED_DEVICES += wzr-hp-g300nh2
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
|
||||
|
||||
define Device/buffalo_wzr-hp-g450h
|
||||
$(Device/buffalo_common)
|
||||
SOC := ar7242
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WZR-HP-G450H/WZR-450HP
|
||||
BUFFALO_PRODUCT := WZR-HP-G450H
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
IMAGE_SIZE := 32256k
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | \
|
||||
buffalo-tag WZR-HP-G450H 3
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
SUPPORTED_DEVICES += wzr-hp-g450h
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-hp-g450h
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
include ./common-buffalo.mk
|
||||
|
||||
define Device/buffalo_whr-g301n
|
||||
$(Device/buffalo_common)
|
||||
SOC := ar7240
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WHR-G301N
|
||||
BUFFALO_PRODUCT := WHR-G301N
|
||||
IMAGE_SIZE := 3712k
|
||||
IMAGES += factory.bin tftp.bin
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
||||
pad-rootfs | check-size
|
||||
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | \
|
||||
buffalo-tag WHR-G301N 3
|
||||
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
|
||||
SUPPORTED_DEVICES += whr-g301n
|
||||
DEFAULT := n
|
||||
endef
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 17 Sep 2020 18:41:23 +0200
|
||||
Subject: [PATCH] net: dsa: support hardware flow table offload
|
||||
|
||||
Look up the master device and the port id
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/netfilter/nf_flow_table.h
|
||||
+++ b/include/net/netfilter/nf_flow_table.h
|
||||
@@ -90,6 +90,7 @@ struct flow_offload {
|
||||
#define FLOW_OFFLOAD_PATH_ETHERNET BIT(0)
|
||||
#define FLOW_OFFLOAD_PATH_VLAN BIT(1)
|
||||
#define FLOW_OFFLOAD_PATH_PPPOE BIT(2)
|
||||
+#define FLOW_OFFLOAD_PATH_DSA BIT(3)
|
||||
|
||||
struct flow_offload_hw_path {
|
||||
struct net_device *dev;
|
||||
@@ -100,6 +101,7 @@ struct flow_offload_hw_path {
|
||||
u16 vlan_proto;
|
||||
u16 vlan_id;
|
||||
u16 pppoe_sid;
|
||||
+ u16 dsa_port;
|
||||
};
|
||||
|
||||
#define NF_FLOW_TIMEOUT (30 * HZ)
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -19,6 +19,10 @@
|
||||
#include <linux/if_bridge.h>
|
||||
#include <linux/netpoll.h>
|
||||
#include <linux/ptp_classify.h>
|
||||
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||
+#include <linux/netfilter.h>
|
||||
+#include <net/netfilter/nf_flow_table.h>
|
||||
+#endif
|
||||
|
||||
#include "dsa_priv.h"
|
||||
|
||||
@@ -1221,6 +1225,27 @@ static struct devlink_port *dsa_slave_ge
|
||||
return dp->ds->devlink ? &dp->devlink_port : NULL;
|
||||
}
|
||||
|
||||
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||
+static int dsa_flow_offload_check(struct flow_offload_hw_path *path)
|
||||
+{
|
||||
+ struct net_device *dev = path->dev;
|
||||
+ struct dsa_port *dp;
|
||||
+
|
||||
+ if (!(path->flags & FLOW_OFFLOAD_PATH_ETHERNET))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ dp = dsa_slave_to_port(dev);
|
||||
+ path->dsa_port = dp->index;
|
||||
+ path->dev = dsa_slave_to_master(dev);
|
||||
+ path->flags |= FLOW_OFFLOAD_PATH_DSA;
|
||||
+
|
||||
+ if (path->dev->netdev_ops->ndo_flow_offload_check)
|
||||
+ return path->dev->netdev_ops->ndo_flow_offload_check(path);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_NF_FLOW_TABLE */
|
||||
+
|
||||
static const struct net_device_ops dsa_slave_netdev_ops = {
|
||||
.ndo_open = dsa_slave_open,
|
||||
.ndo_stop = dsa_slave_close,
|
||||
@@ -1245,6 +1270,9 @@ static const struct net_device_ops dsa_s
|
||||
.ndo_vlan_rx_add_vid = dsa_slave_vlan_rx_add_vid,
|
||||
.ndo_vlan_rx_kill_vid = dsa_slave_vlan_rx_kill_vid,
|
||||
.ndo_get_devlink_port = dsa_slave_get_devlink_port,
|
||||
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||
+ .ndo_flow_offload_check = dsa_flow_offload_check,
|
||||
+#endif
|
||||
};
|
||||
|
||||
static struct device_type dsa_type = {
|
||||
@ -27,6 +27,10 @@ avm,fritzbox-7530 |\
|
||||
glinet,gl-b1300)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt"
|
||||
;;
|
||||
edgecore,oap100)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5g" "phy1tpt"
|
||||
;;
|
||||
engenius,eap1300)
|
||||
ucidef_set_led_netdev "lan" "LAN" "${boardname}:blue:lan" "eth0"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt"
|
||||
@ -62,12 +66,11 @@ zyxel,nbg6617)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt"
|
||||
;;
|
||||
edgecore,ecw5211 |\
|
||||
zyxel,wre6606)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
@ -38,6 +38,8 @@ ipq40xx_setup_interfaces()
|
||||
;;
|
||||
asus,map-ac2200|\
|
||||
cilab,meshpoint-one|\
|
||||
edgecore,ecw5211|\
|
||||
edgecore,oap100|\
|
||||
openmesh,a42|\
|
||||
openmesh,a62)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
@ -61,7 +63,10 @@ ipq40xx_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
avm,fritzrepeater-3000|\
|
||||
avm,fritzrepeater-3000)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "4:lan:1" "5:lan:2"
|
||||
;;
|
||||
compex,wpj419|\
|
||||
compex,wpj428|\
|
||||
engenius,eap2200)
|
||||
|
||||
@ -98,6 +98,8 @@ case "$FIRMWARE" in
|
||||
cellc,rtl30vw |\
|
||||
compex,wpj419 |\
|
||||
compex,wpj428 |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap1300 |\
|
||||
engenius,eap2200 |\
|
||||
openmesh,a42 |\
|
||||
@ -193,6 +195,8 @@ case "$FIRMWARE" in
|
||||
cellc,rtl30vw |\
|
||||
compex,wpj419 |\
|
||||
compex,wpj428 |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap1300 |\
|
||||
engenius,eap2200 |\
|
||||
openmesh,a42 |\
|
||||
|
||||
@ -12,8 +12,6 @@ set_preinit_iface() {
|
||||
zyxel,nbg6617)
|
||||
ifname=eth0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +66,8 @@ platform_do_upgrade() {
|
||||
avm,fritzrepeater-3000 |\
|
||||
buffalo,wtr-m2133hp |\
|
||||
cilab,meshpoint-one |\
|
||||
edgecore,ecw5211 |\
|
||||
edgecore,oap100 |\
|
||||
engenius,eap2200 |\
|
||||
mobipromo,cm520-79f |\
|
||||
qxwlan,e2600ac-c2)
|
||||
|
||||
@ -0,0 +1,325 @@
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
model = "Edgecore ECW5211";
|
||||
compatible = "edgecore,ecw5211";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " root=/dev/ubiblock0_1";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "ecw5211:yellow:power";
|
||||
gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "ecw5211:green:wlan2g";
|
||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "ecw5211:green:wlan5g";
|
||||
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
rng@22000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
mdio@90000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ess-psgmii@98000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
counter@4a1000 {
|
||||
compatible = "qcom,qca-gcnt";
|
||||
reg = <0x4a1000 0x4>;
|
||||
};
|
||||
|
||||
tcsr@1949000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1949000 0x100>;
|
||||
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
||||
};
|
||||
|
||||
tcsr@194b000 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x194b000 0x100>;
|
||||
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||
};
|
||||
|
||||
ess_tcsr@1953000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1953000 0x1000>;
|
||||
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||
};
|
||||
|
||||
tcsr@1957000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1957000 0x100>;
|
||||
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||
};
|
||||
|
||||
usb2: usb2@60f8800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb3: usb3@8af8800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
crypto@8e3a000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@b017000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ess-switch@c000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
edma@c080000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_mdio {
|
||||
pins = "gpio53";
|
||||
function = "mdio";
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_mdc {
|
||||
pins = "gpio52";
|
||||
function = "mdc";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
serial_pins: serial_pinmux {
|
||||
mux {
|
||||
pins = "gpio60", "gpio61";
|
||||
function = "blsp_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_pins: spi0_pinmux {
|
||||
pin {
|
||||
function = "blsp_spi0";
|
||||
pins = "gpio55", "gpio56", "gpio57";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pin_cs {
|
||||
function = "gpio";
|
||||
pins = "gpio54", "gpio4";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_pins: i2c0_pinmux {
|
||||
mux_i2c {
|
||||
function = "blsp_i2c0";
|
||||
pins = "gpio58", "gpio59";
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 4 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "0:SBL1";
|
||||
reg = <0x00000000 0x00040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "0:MIBIB";
|
||||
reg = <0x00040000 0x00020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "0:QSEE";
|
||||
reg = <0x00060000 0x00060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@c0000 {
|
||||
label = "0:CDT";
|
||||
reg = <0x000c0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@d0000 {
|
||||
label = "0:DDRPARAMS";
|
||||
reg = <0x000d0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@e0000 {
|
||||
label = "0:APPSBLENV"; /* uboot env*/
|
||||
reg = <0x000e0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@f0000 {
|
||||
label = "0:APPSBL"; /* uboot */
|
||||
reg = <0x000f0000 0x00080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@170000 {
|
||||
label = "0:ART";
|
||||
reg = <0x00170000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
spi-nand@1 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "spi-nand";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "rootfs";
|
||||
reg = <0x00000000 0x04000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_i2c3 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
tpm@29 {
|
||||
compatible = "atmel,at97sc3204t";
|
||||
reg = <0x29>;
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&serial_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
qcom,poll_required = <1>;
|
||||
qcom,poll_required_dynamic = <1>;
|
||||
qcom,phy_mdio_addr = <4>;
|
||||
vlan_tag = <2 0x20>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
qcom,poll_required = <1>;
|
||||
qcom,poll_required_dynamic = <1>;
|
||||
qcom,phy_mdio_addr = <3>;
|
||||
vlan_tag = <1 0x10>;
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5211";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
status = "okay";
|
||||
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5211";
|
||||
};
|
||||
|
||||
&usb3_ss_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
@ -58,12 +58,13 @@
|
||||
ess-switch@c000000 {
|
||||
status = "okay";
|
||||
|
||||
switch_lan_bmp = <0x10>;
|
||||
switch_wan_bmp = <0x20>;
|
||||
switch_lan_bmp = <0x30>;
|
||||
switch_wan_bmp = <0x02>;
|
||||
};
|
||||
|
||||
edma@c080000 {
|
||||
status = "okay";
|
||||
qcom,num_gmac = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -209,6 +210,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
vlan_tag = <1 0x30>;
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
339
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
Executable file
339
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
Executable file
@ -0,0 +1,339 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
model = "EdgeCore OAP-100";
|
||||
compatible = "edgecore,oap100";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_system;
|
||||
led-failsafe = &led_system;
|
||||
led-running = &led_system;
|
||||
led-upgrade = &led_system;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " root=/dev/ubiblock0_1";
|
||||
};
|
||||
|
||||
soc {
|
||||
mdio@90000 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ess-psgmii@98000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
tcsr@1949000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1949000 0x100>;
|
||||
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
||||
};
|
||||
|
||||
ess_tcsr@1953000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1953000 0x1000>;
|
||||
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||
};
|
||||
|
||||
tcsr@1957000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1957000 0x100>;
|
||||
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||
};
|
||||
|
||||
tcsr@194b000 {
|
||||
/* select hostmode */
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x194b000 0x100>;
|
||||
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb2@60f8800 {
|
||||
status = "okay";
|
||||
|
||||
dwc3@6000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
usb2_port1: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb3@8af8800 {
|
||||
status = "okay";
|
||||
|
||||
dwc3@8a00000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
usb3_port1: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
|
||||
usb3_port2: port@2 {
|
||||
reg = <2>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
crypto@8e3a000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@b017000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ess-switch@c000000 {
|
||||
status = "okay";
|
||||
switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */
|
||||
switch_initvlas = <0x0007c 0x54>; /* port0 status */
|
||||
switch_lan_bmp = <0x10>;
|
||||
};
|
||||
|
||||
edma@c080000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
key {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_system: led_system {
|
||||
label = "oap100:green:system";
|
||||
gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_2g {
|
||||
label = "oap100:blue:wlan2g";
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_5g {
|
||||
label = "oap100:blue:wlan5g";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
usb {
|
||||
gpio-export,name = "usb-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
poe {
|
||||
gpio-export,name = "poe-power";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
serial_0_pins: serial_pinmux {
|
||||
mux {
|
||||
pins = "gpio16", "gpio17";
|
||||
function = "blsp_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi_0_pins: spi_0_pinmux {
|
||||
pinmux {
|
||||
function = "blsp_spi0";
|
||||
pins = "gpio13", "gpio14", "gpio15";
|
||||
drive-strength = <12>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pinmux_cs {
|
||||
function = "gpio";
|
||||
pins = "gpio12";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
nand_pins: nand_pins {
|
||||
pullups {
|
||||
pins = "gpio53", "gpio58", "gpio59";
|
||||
function = "qpic";
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pulldowns {
|
||||
pins = "gpio54", "gpio55", "gpio56",
|
||||
"gpio57", "gpio60", "gpio61",
|
||||
"gpio62", "gpio63", "gpio64",
|
||||
"gpio65", "gpio66", "gpio67",
|
||||
"gpio68", "gpio69";
|
||||
function = "qpic";
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio6";
|
||||
function = "mdio";
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_2 {
|
||||
pins = "gpio7";
|
||||
function = "mdc";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
linux,modalias = "m25p80", "gd25q256";
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition0@0 {
|
||||
label = "0:SBL1";
|
||||
reg = <0x00000000 0x00040000>;
|
||||
read-only;
|
||||
};
|
||||
partition1@40000 {
|
||||
label = "0:MIBIB";
|
||||
reg = <0x00040000 0x00020000>;
|
||||
read-only;
|
||||
};
|
||||
partition2@60000 {
|
||||
label = "0:QSEE";
|
||||
reg = <0x00060000 0x00060000>;
|
||||
read-only;
|
||||
};
|
||||
partition3@c0000 {
|
||||
label = "0:CDT";
|
||||
reg = <0x000c0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition4@d0000 {
|
||||
label = "0:DDRPARAMS";
|
||||
reg = <0x000d0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition5@e0000 {
|
||||
label = "0:APPSBLENV";
|
||||
reg = <0x000e0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
partition6@f0000 {
|
||||
label = "0:APPSBL";
|
||||
reg = <0x000f0000 0x00080000>;
|
||||
read-only;
|
||||
};
|
||||
partition7@170000 {
|
||||
label = "0:ART";
|
||||
reg = <0x00170000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "rootfs";
|
||||
reg = <0x00000000 0x4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
pinctrl-0 = <&serial_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
qcom,ath10k-calibration-variant = "Edgecore OAP100";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
status = "okay";
|
||||
qcom,ath10k-calibration-variant = "Edgecore OAP100";
|
||||
};
|
||||
|
||||
&usb3_ss_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
@ -344,6 +344,31 @@ define Device/dlink_dap-2610
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dap-2610
|
||||
|
||||
define Device/edgecore_ecw5211
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_TITLE := Edgecore ECW5211
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
|
||||
DEVICE_DTS := qcom-ipq4018-ecw5211
|
||||
DEVICE_PACKAGES := ipq-wifi-edgecore_ecw5211 kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5211
|
||||
|
||||
define Device/edgecore_oap100
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_TITLE := Edgecore OAP100
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGES := nand-sysupgrade.bin
|
||||
DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
|
||||
DEVICE_DTS := qcom-ipq4019-oap100
|
||||
DEVICE_PACKAGES := ipq-wifi-edgecore_oap100 kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap100
|
||||
|
||||
define Device/engenius_eap1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := EnGenius
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -785,11 +785,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -785,11 +785,54 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-apq8074-dragonboard.dtb \
|
||||
qcom-apq8084-ifc6540.dtb \
|
||||
qcom-apq8084-mtp.dtb \
|
||||
@ -20,6 +20,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
+ qcom-ipq4018-cs-w3-wd1200g-eup.dtb \
|
||||
+ qcom-ipq4018-ea6350v3.dtb \
|
||||
+ qcom-ipq4018-eap1300.dtb \
|
||||
+ qcom-ipq4018-ecw5211.dtb \
|
||||
+ qcom-ipq4018-emd1.dtb \
|
||||
+ qcom-ipq4018-emr3500.dtb \
|
||||
+ qcom-ipq4018-ens620ext.dtb \
|
||||
@ -47,6 +48,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
+ qcom-ipq4019-map-ac2200.dtb \
|
||||
+ qcom-ipq4019-e2600ac-c1.dtb \
|
||||
+ qcom-ipq4019-e2600ac-c2.dtb \
|
||||
+ qcom-ipq4019-oap100.dtb \
|
||||
+ qcom-ipq4019-r619ac.dtb \
|
||||
+ qcom-ipq4019-r619ac-128m.dtb \
|
||||
+ qcom-ipq4019-rtl30vw.dtb \
|
||||
|
||||
@ -0,0 +1,165 @@
|
||||
From 4267880319bc1a2270d352e0ded6d6386242a7ef Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <blogic@openwrt.org>
|
||||
Date: Tue, 12 Aug 2014 20:49:27 +0200
|
||||
Subject: [PATCH 24/53] GPIO: add named gpio exports
|
||||
|
||||
Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
---
|
||||
drivers/gpio/gpiolib-of.c | 68 +++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/gpio/gpiolib-sysfs.c | 10 +++++-
|
||||
include/asm-generic/gpio.h | 6 ++++
|
||||
include/linux/gpio/consumer.h | 8 +++++
|
||||
4 files changed, 91 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/gpio/gpiolib-of.c
|
||||
+++ b/drivers/gpio/gpiolib-of.c
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/platform_device.h>
|
||||
|
||||
#include "gpiolib.h"
|
||||
|
||||
@@ -513,3 +515,68 @@ void of_gpiochip_remove(struct gpio_chip
|
||||
gpiochip_remove_pin_ranges(chip);
|
||||
of_node_put(chip->of_node);
|
||||
}
|
||||
+
|
||||
+static struct of_device_id gpio_export_ids[] = {
|
||||
+ { .compatible = "gpio-export" },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
+static int of_gpio_export_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ struct device_node *cnp;
|
||||
+ u32 val;
|
||||
+ int nb = 0;
|
||||
+
|
||||
+ for_each_child_of_node(np, cnp) {
|
||||
+ const char *name = NULL;
|
||||
+ int gpio;
|
||||
+ bool dmc;
|
||||
+ int max_gpio = 1;
|
||||
+ int i;
|
||||
+
|
||||
+ of_property_read_string(cnp, "gpio-export,name", &name);
|
||||
+
|
||||
+ if (!name)
|
||||
+ max_gpio = of_gpio_count(cnp);
|
||||
+
|
||||
+ for (i = 0; i < max_gpio; i++) {
|
||||
+ unsigned flags = 0;
|
||||
+ enum of_gpio_flags of_flags;
|
||||
+
|
||||
+ gpio = of_get_gpio_flags(cnp, i, &of_flags);
|
||||
+ if (!gpio_is_valid(gpio))
|
||||
+ return gpio;
|
||||
+
|
||||
+ if (of_flags == OF_GPIO_ACTIVE_LOW)
|
||||
+ flags |= GPIOF_ACTIVE_LOW;
|
||||
+
|
||||
+ if (!of_property_read_u32(cnp, "gpio-export,output", &val))
|
||||
+ flags |= val ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
|
||||
+ else
|
||||
+ flags |= GPIOF_IN;
|
||||
+
|
||||
+ if (devm_gpio_request_one(&pdev->dev, gpio, flags, name ? name : of_node_full_name(np)))
|
||||
+ continue;
|
||||
+
|
||||
+ dmc = of_property_read_bool(cnp, "gpio-export,direction_may_change");
|
||||
+ gpio_export_with_name(gpio, dmc, name);
|
||||
+ nb++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ dev_info(&pdev->dev, "%d gpio(s) exported\n", nb);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver gpio_export_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "gpio-export",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = of_match_ptr(gpio_export_ids),
|
||||
+ },
|
||||
+ .probe = of_gpio_export_probe,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(gpio_export_driver);
|
||||
--- a/drivers/gpio/gpiolib-sysfs.c
|
||||
+++ b/drivers/gpio/gpiolib-sysfs.c
|
||||
@@ -553,7 +553,7 @@ static struct class gpio_class = {
|
||||
*
|
||||
* Returns zero on success, else an error.
|
||||
*/
|
||||
-int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
|
||||
+int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name)
|
||||
{
|
||||
struct gpio_chip *chip;
|
||||
struct gpio_device *gdev;
|
||||
@@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc,
|
||||
offset = gpio_chip_hwgpio(desc);
|
||||
if (chip->names && chip->names[offset])
|
||||
ioname = chip->names[offset];
|
||||
+ if (name)
|
||||
+ ioname = name;
|
||||
|
||||
dev = device_create_with_groups(&gpio_class, &gdev->dev,
|
||||
MKDEV(0, 0), data, gpio_groups,
|
||||
@@ -636,6 +638,12 @@ err_unlock:
|
||||
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
|
||||
return status;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__gpiod_export);
|
||||
+
|
||||
+int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
|
||||
+{
|
||||
+ return __gpiod_export(desc, direction_may_change, NULL);
|
||||
+}
|
||||
EXPORT_SYMBOL_GPL(gpiod_export);
|
||||
|
||||
static int match_export(struct device *dev, const void *desc)
|
||||
--- a/include/asm-generic/gpio.h
|
||||
+++ b/include/asm-generic/gpio.h
|
||||
@@ -127,6 +127,12 @@ static inline int gpio_export(unsigned g
|
||||
return gpiod_export(gpio_to_desc(gpio), direction_may_change);
|
||||
}
|
||||
|
||||
+int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name);
|
||||
+static inline int gpio_export_with_name(unsigned gpio, bool direction_may_change, const char *name)
|
||||
+{
|
||||
+ return __gpiod_export(gpio_to_desc(gpio), direction_may_change, name);
|
||||
+}
|
||||
+
|
||||
static inline int gpio_export_link(struct device *dev, const char *name,
|
||||
unsigned gpio)
|
||||
{
|
||||
--- a/include/linux/gpio/consumer.h
|
||||
+++ b/include/linux/gpio/consumer.h
|
||||
@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
|
||||
|
||||
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
|
||||
|
||||
+int _gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name);
|
||||
int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
|
||||
int gpiod_export_link(struct device *dev, const char *name,
|
||||
struct gpio_desc *desc);
|
||||
@@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de
|
||||
|
||||
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
|
||||
|
||||
+static inline int _gpiod_export(struct gpio_desc *desc,
|
||||
+ bool direction_may_change,
|
||||
+ const char *name)
|
||||
+{
|
||||
+ return -ENOSYS;
|
||||
+}
|
||||
+
|
||||
static inline int gpiod_export(struct gpio_desc *desc,
|
||||
bool direction_may_change)
|
||||
{
|
||||
@ -8,9 +8,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
arch/arm/boot/dts/Makefile | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
Index: linux-5.4.63/arch/arm/boot/dts/Makefile
|
||||
===================================================================
|
||||
--- linux-5.4.63.orig/arch/arm/boot/dts/Makefile
|
||||
+++ linux-5.4.63/arch/arm/boot/dts/Makefile
|
||||
@@ -837,11 +837,54 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-apq8074-dragonboard.dtb \
|
||||
qcom-apq8084-ifc6540.dtb \
|
||||
qcom-apq8084-mtp.dtb \
|
||||
@ -20,6 +22,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
+ qcom-ipq4018-cs-w3-wd1200g-eup.dtb \
|
||||
+ qcom-ipq4018-ea6350v3.dtb \
|
||||
+ qcom-ipq4018-eap1300.dtb \
|
||||
+ qcom-ipq4018-ecw5211.dtb \
|
||||
+ qcom-ipq4018-emd1.dtb \
|
||||
+ qcom-ipq4018-emr3500.dtb \
|
||||
+ qcom-ipq4018-ens620ext.dtb \
|
||||
@ -49,6 +52,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
+ qcom-ipq4019-r619ac.dtb \
|
||||
+ qcom-ipq4019-r619ac-128m.dtb \
|
||||
+ qcom-ipq4019-habanero-dvk.dtb \
|
||||
+ qcom-ipq4019-oap100.dtb \
|
||||
+ qcom-ipq4019-rtl30vw.dtb \
|
||||
+ qcom-ipq4019-u4019-32m.dtb \
|
||||
+ qcom-ipq4019-wpj419.dtb \
|
||||
|
||||
@ -19,6 +19,10 @@ compex,wpq864)
|
||||
ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1"
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt"
|
||||
;;
|
||||
nec,wg2600hp)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt"
|
||||
@ -49,8 +53,6 @@ tplink,vr2600v)
|
||||
zyxel,nbg6817)
|
||||
ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:internet" "eth1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
@ -22,10 +22,10 @@ tplink,vr2600v)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
||||
;;
|
||||
qcom,ipq8064-ap161)
|
||||
ucidef_set_interface_lan "eth1 eth2"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
||||
edgecore,ecw5410)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)"
|
||||
ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)"
|
||||
;;
|
||||
linksys,ea7500-v1)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
@ -50,6 +50,11 @@ tplink,c2600)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
|
||||
;;
|
||||
qcom,ipq8064-ap161)
|
||||
ucidef_set_interface_lan "eth1 eth2"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
||||
;;
|
||||
qcom,ipq8064-db149)
|
||||
ucidef_set_interface_lan "eth1 eth2 eth3"
|
||||
ucidef_add_switch "switch0" \
|
||||
|
||||
@ -13,6 +13,9 @@ case "$FIRMWARE" in
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e)
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
ath10kcal_extract "0:ART" 4096 12064
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
caldata_extract "art" 0x1000 0x2f20
|
||||
@ -77,6 +80,13 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath10k/pre-cal-pci-0002:01:00.0.bin")
|
||||
case $board in
|
||||
edgecore,ecw5410)
|
||||
ath10kcal_extract "0:ART" 20480 12064
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@ -4,6 +4,9 @@ START=99
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
edgecore,ecw5410)
|
||||
fw_setenv bootcount 0
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
mtd resetbc s_env || true
|
||||
|
||||
@ -24,8 +24,16 @@ platform_do_upgrade() {
|
||||
qcom,ipq8064-ap161)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
zyxel_do_upgrade "$1"
|
||||
edgecore,ecw5410)
|
||||
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
|
||||
if [ "$part" = "rootfs1" ]; then
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_UBIPART="rootfs2"
|
||||
else
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_UBIPART="rootfs1"
|
||||
fi
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
@ -41,6 +49,9 @@ platform_do_upgrade() {
|
||||
MTD_CONFIG_ARGS="-s 0x200000"
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
zyxel_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
|
||||
@ -68,6 +68,7 @@ CONFIG_ARM_QCOM_CPUIDLE=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
|
||||
@ -0,0 +1,400 @@
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
model = "Edgecore ECW5410";
|
||||
compatible = "edgecore,ecw5410", "qcom,ipq8064";
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
nss@40000000 {
|
||||
reg = <0x40000000 0x1000000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
smem: smem@41000000 {
|
||||
reg = <0x41000000 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wifi_dump@44000000 {
|
||||
reg = <0x44000000 0x600000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
rsvd@41200000 {
|
||||
reg = <0x41200000 0x300000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
cpus {
|
||||
idle-states {
|
||||
CPU_SPC: spc {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &gsbi4_serial;
|
||||
serial1 = &gsbi1_serial;
|
||||
mdio-gpio0 = &mdio0;
|
||||
ethernet0 = &gmac3;
|
||||
ethernet1 = &gmac2;
|
||||
|
||||
led-boot = &power_green;
|
||||
led-failsafe = &power_red;
|
||||
led-running = &power_green;
|
||||
led-upgrade = &power_green;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " console=ttyMSM0,115200n8 root=/dev/ubiblock0_1";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
power_green: power_green {
|
||||
label = "ecw5410:green:power";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g_green {
|
||||
label = "ecw5410:green:wlan2g";
|
||||
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan2g_yellow {
|
||||
label = "ecw5410:yellow:wlan2g";
|
||||
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g_green {
|
||||
label = "ecw5410:green:wlan5g";
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
power_red: power_red {
|
||||
label = "ecw5410:red:power";
|
||||
gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g_yellow {
|
||||
label = "ecw5410:yellow:wlan5g";
|
||||
gpios = <&qcom_pinmux 59 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&qcom_pinmux {
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19";
|
||||
function = "gsbi5";
|
||||
drive-strength = <10>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
clk {
|
||||
pins = "gpio21";
|
||||
function = "gsbi5";
|
||||
drive-strength = <12>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
function = "gpio";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
nand_pins: nand_pins {
|
||||
disable {
|
||||
pins = "gpio34", "gpio35", "gpio36", "gpio37",
|
||||
"gpio38";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pullups {
|
||||
pins = "gpio39";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
hold {
|
||||
pins = "gpio40", "gpio41", "gpio42", "gpio43",
|
||||
"gpio44", "gpio45", "gpio46", "gpio47";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-bus-hold;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0_pins: mdio0_pins {
|
||||
mux {
|
||||
pins = "gpio0", "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio16", "gpio23", "gpio24", "gpio26",
|
||||
"gpio28", "gpio59";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio25";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart1_pins: uart1_pins {
|
||||
mux {
|
||||
pins = "gpio51", "gpio52", "gpio53", "gpio54";
|
||||
function = "gsbi1";
|
||||
drive-strength = <12>;
|
||||
bias-none;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi1 {
|
||||
qcom,mode = <GSBI_PROT_UART_W_FC>;
|
||||
status = "okay";
|
||||
|
||||
serial@12450000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&uart1_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi4 {
|
||||
qcom,mode = <GSBI_PROT_I2C_UART>;
|
||||
status = "okay";
|
||||
|
||||
serial@16340000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/*
|
||||
* The i2c device on gsbi4 should not be enabled.
|
||||
* On ipq806x designs gsbi4 i2c is meant for exclusive
|
||||
* RPM usage. Turning this on in kernel manifests as
|
||||
* i2c failure for the RPM.
|
||||
*/
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
status = "okay";
|
||||
|
||||
spi4: spi@1a280000 {
|
||||
status = "okay";
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
|
||||
partitions {
|
||||
compatible = "qcom,smem";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hs_phy_0 { /* USB3 port 0 HS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hs_phy_1 { /* USB3 port 1 HS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_0 { /* USB3 port 0 SS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ss_phy_1 { /* USB3 port 1 SS phy */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
|
||||
/delete-property/ pinctrl-0;
|
||||
/delete-property/ pinctrl-names;
|
||||
/delete-property/ perst-gpios;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
status = "okay";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
|
||||
/delete-property/ pinctrl-0;
|
||||
/delete-property/ pinctrl-names;
|
||||
/delete-property/ perst-gpios;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
status = "okay";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
nand@1ac00000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
nand@0 {
|
||||
compatible = "qcom,nandcs";
|
||||
|
||||
reg = <0>;
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-step-size = <512>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
rootfs1@0 {
|
||||
label = "rootfs1";
|
||||
reg = <0x0000000 0x4000000>;
|
||||
};
|
||||
|
||||
rootfs2@4000000 {
|
||||
label = "rootfs2";
|
||||
reg = <0x4000000 0x4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
qcom,id = <2>;
|
||||
mdiobus = <&mdio0>;
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy1>;
|
||||
};
|
||||
|
||||
&gmac3 {
|
||||
status = "okay";
|
||||
|
||||
qcom,id = <3>;
|
||||
mdiobus = <&mdio1>;
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
@ -126,6 +126,18 @@ define Device/linksys_ea7500-v1
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea7500-v1
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_TITLE := Edgecore ECW5410
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS := qcom-ipq8068-ecw5410
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea8500
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -843,6 +843,19 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -843,6 +843,20 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-ipq4019-ap.dk07.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c2.dtb \
|
||||
qcom-ipq8064-ap148.dtb \
|
||||
@ -27,6 +27,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
+ qcom-ipq8064-wxr-2533dhp.dtb \
|
||||
+ qcom-ipq8065-nbg6817.dtb \
|
||||
+ qcom-ipq8065-r7800.dtb \
|
||||
+ qcom-ipq8068-ecw5410.dtb \
|
||||
qcom-msm8660-surf.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
qcom-msm8974-fairphone-fp2.dtb \
|
||||
|
||||
46
target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch
Normal file
46
target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch
Normal file
@ -0,0 +1,46 @@
|
||||
Index: linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
===================================================================
|
||||
--- linux-5.4.65.orig/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -865,6 +865,41 @@
|
||||
reg = <0x12100000 0x10000>;
|
||||
};
|
||||
|
||||
+ gsbi1: gsbi@12440000 {
|
||||
+ compatible = "qcom,gsbi-v1.0.0";
|
||||
+ cell-index = <1>;
|
||||
+ reg = <0x12440000 0x100>;
|
||||
+ clocks = <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "iface";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ syscon-tcsr = <&tcsr>;
|
||||
+
|
||||
+ gsbi1_serial: serial@12450000 {
|
||||
+ compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
+ reg = <0x12450000 0x100>,
|
||||
+ <0x12400000 0x03>;
|
||||
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&gcc GSBI1_UART_CLK>, <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "core", "iface";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ gsbi1_i2c: i2c@12460000 {
|
||||
+ compatible = "qcom,i2c-qup-v1.1.1";
|
||||
+ reg = <0x12460000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "core", "iface";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gsbi2: gsbi@12480000 {
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
cell-index = <2>;
|
||||
@ -0,0 +1,14 @@
|
||||
Index: linux-5.4.65/drivers/of/fdt.c
|
||||
===================================================================
|
||||
--- linux-5.4.65.orig/drivers/of/fdt.c
|
||||
+++ linux-5.4.65/drivers/of/fdt.c
|
||||
@@ -1059,6 +1059,9 @@ int __init early_init_dt_scan_chosen(uns
|
||||
p = of_get_flat_dt_prop(node, "bootargs", &l);
|
||||
if (p != NULL && l > 0)
|
||||
strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
|
||||
+ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
|
||||
+ if (p != NULL && l > 0)
|
||||
+ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
|
||||
|
||||
/*
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
@ -37,7 +37,7 @@ lantiq_setup_macs()
|
||||
|
||||
case "$board" in
|
||||
allnet,all0333cj)
|
||||
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
};
|
||||
|
||||
partition@3ff200 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x3ff200 0xc00>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
read-only;
|
||||
};
|
||||
partition@64000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x64000 0x004000>;
|
||||
};
|
||||
ath9k_cal: partition@68000 {
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
|
||||
partition@10000 {
|
||||
reg = <0x10000 0x10000>;
|
||||
label = "uboot-env";
|
||||
label = "u-boot-env";
|
||||
read-only;
|
||||
};
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>; /* 64 KB */
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
};
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -123,7 +123,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
};
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x20000>;
|
||||
};
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -179,7 +179,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x20000 0x20000>;
|
||||
};
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x10000>; /* 64KB */
|
||||
};
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
};
|
||||
|
||||
partition@10000 {
|
||||
label = "uboot_env";
|
||||
label = "u-boot-env";
|
||||
reg = <0x10000 0x10000>; /* 64 KB */
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user