Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
736024c007
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,4 +29,4 @@ git-src
|
||||
.project
|
||||
.cproject
|
||||
.ccache
|
||||
.vscode
|
||||
.vscode*
|
||||
|
||||
@ -0,0 +1,116 @@
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Sat, 6 Feb 2021 12:51:12 +0100
|
||||
Subject: [PATCH] mac80211: enable QoS support for nl80211 ctrl port
|
||||
|
||||
This patch unifies sending control port frames
|
||||
over nl80211 and AF_PACKET sockets a little more.
|
||||
|
||||
Before this patch, EAPOL frames got QoS prioritization
|
||||
only when using AF_PACKET sockets.
|
||||
|
||||
__ieee80211_select_queue only selects a QoS-enabled queue
|
||||
for control port frames, when the control port protocol
|
||||
is set correctly on the skb. For the AF_PACKET path this
|
||||
works, but the nl80211 path used ETH_P_802_3.
|
||||
|
||||
Another check for injected frames in wme.c then prevented
|
||||
the QoS TID to be copied in the frame.
|
||||
|
||||
In order to fix this, get rid of the frame injection marking
|
||||
for nl80211 ctrl port and set the correct ethernet protocol.
|
||||
|
||||
Please note:
|
||||
An erlier version of this path tried to prevent
|
||||
frame aggregation for control port frames in order to speed up
|
||||
the initial connection setup a little. This seemed to cause
|
||||
issues on my older Intel dvm-based hardware, and was therefore
|
||||
removed again. Future commits which try to reintroduce this
|
||||
have to check carefully how hw behaves with aggregated and
|
||||
non-aggregated traffic for the same TID.
|
||||
My NIC: Intel(R) Centrino(R) Ultimate-N 6300 AGN, REV=0x74
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Link: https://lore.kernel.org/r/20210206115112.567881-1-markus.theil@tu-ilmenau.de
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -628,16 +628,12 @@ static void ieee80211_report_ack_skb(str
|
||||
u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie;
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
- __be16 ethertype = 0;
|
||||
-
|
||||
- if (skb->len >= ETH_HLEN && skb->protocol == cpu_to_be16(ETH_P_802_3))
|
||||
- skb_copy_bits(skb, 2 * ETH_ALEN, ðertype, ETH_TLEN);
|
||||
|
||||
rcu_read_lock();
|
||||
sdata = ieee80211_sdata_from_skb(local, skb);
|
||||
if (sdata) {
|
||||
- if (ethertype == sdata->control_port_protocol ||
|
||||
- ethertype == cpu_to_be16(ETH_P_PREAUTH))
|
||||
+ if (skb->protocol == sdata->control_port_protocol ||
|
||||
+ skb->protocol == cpu_to_be16(ETH_P_PREAUTH))
|
||||
cfg80211_control_port_tx_status(&sdata->wdev,
|
||||
cookie,
|
||||
skb->data,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1195,9 +1195,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->sta = rcu_dereference(sdata->u.vlan.sta);
|
||||
if (!tx->sta && sdata->wdev.use_4addr)
|
||||
return TX_DROP;
|
||||
- } else if (info->flags & (IEEE80211_TX_INTFL_NL80211_FRAME_TX |
|
||||
- IEEE80211_TX_CTL_INJECTED) ||
|
||||
- tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
+ } else if (tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
|
||||
@@ -5421,6 +5419,7 @@ int ieee80211_tx_control_port(struct wip
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
+ struct sta_info *sta;
|
||||
struct sk_buff *skb;
|
||||
struct ethhdr *ehdr;
|
||||
u32 ctrl_flags = 0;
|
||||
@@ -5443,8 +5442,7 @@ int ieee80211_tx_control_port(struct wip
|
||||
if (cookie)
|
||||
ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
|
||||
|
||||
- flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX |
|
||||
- IEEE80211_TX_CTL_INJECTED;
|
||||
+ flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX;
|
||||
|
||||
skb = dev_alloc_skb(local->hw.extra_tx_headroom +
|
||||
sizeof(struct ethhdr) + len);
|
||||
@@ -5461,10 +5459,25 @@ int ieee80211_tx_control_port(struct wip
|
||||
ehdr->h_proto = proto;
|
||||
|
||||
skb->dev = dev;
|
||||
- skb->protocol = htons(ETH_P_802_3);
|
||||
+ skb->protocol = proto;
|
||||
skb_reset_network_header(skb);
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
+ /* update QoS header to prioritize control port frames if possible,
|
||||
+ * priorization also happens for control port frames send over
|
||||
+ * AF_PACKET
|
||||
+ */
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ if (ieee80211_lookup_ra_sta(sdata, skb, &sta) == 0 && !IS_ERR(sta)) {
|
||||
+ u16 queue = __ieee80211_select_queue(sdata, sta, skb);
|
||||
+
|
||||
+ skb_set_queue_mapping(skb, queue);
|
||||
+ skb_get_hash(skb);
|
||||
+ }
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
/* mutex lock is only needed for incrementing the cookie counter */
|
||||
mutex_lock(&local->mtx);
|
||||
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
*
|
||||
* Transmit and frame generation functions.
|
||||
*/
|
||||
@@ -1403,8 +1403,17 @@ static void ieee80211_txq_enqueue(struct
|
||||
@@ -1401,8 +1401,17 @@ static void ieee80211_txq_enqueue(struct
|
||||
ieee80211_set_skb_enqueue_time(skb);
|
||||
|
||||
spin_lock_bh(&fq->lock);
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
spin_unlock_bh(&fq->lock);
|
||||
}
|
||||
|
||||
@@ -3846,6 +3855,9 @@ bool ieee80211_txq_airtime_check(struct
|
||||
@@ -3844,6 +3853,9 @@ bool ieee80211_txq_airtime_check(struct
|
||||
if (!txq->sta)
|
||||
return true;
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4173,6 +4173,9 @@ static bool ieee80211_tx_8023(struct iee
|
||||
@@ -4171,6 +4171,9 @@ static bool ieee80211_tx_8023(struct iee
|
||||
unsigned long flags;
|
||||
int q = info->hw_queue;
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.rate_init = minstrel_ht_rate_init,
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -3933,6 +3933,29 @@ void ieee80211_txq_schedule_start(struct
|
||||
@@ -3931,6 +3931,29 @@ void ieee80211_txq_schedule_start(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_txq_schedule_start);
|
||||
|
||||
@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
void __ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
u32 info_flags,
|
||||
@@ -3963,6 +3986,8 @@ void __ieee80211_subif_start_xmit(struct
|
||||
@@ -3961,6 +3984,8 @@ void __ieee80211_subif_start_xmit(struct
|
||||
skb_get_hash(skb);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (sta) {
|
||||
struct ieee80211_fast_tx *fast_tx;
|
||||
|
||||
@@ -4226,6 +4251,8 @@ static void ieee80211_8023_xmit(struct i
|
||||
@@ -4224,6 +4249,8 @@ static void ieee80211_8023_xmit(struct i
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1780,8 +1780,6 @@ static int invoke_tx_handlers_early(stru
|
||||
@@ -1778,8 +1778,6 @@ static int invoke_tx_handlers_early(stru
|
||||
CALL_TXH(ieee80211_tx_h_ps_buf);
|
||||
CALL_TXH(ieee80211_tx_h_check_control_port_protocol);
|
||||
CALL_TXH(ieee80211_tx_h_select_key);
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
|
||||
txh_done:
|
||||
if (unlikely(res == TX_DROP)) {
|
||||
@@ -1814,6 +1812,9 @@ static int invoke_tx_handlers_late(struc
|
||||
@@ -1812,6 +1810,9 @@ static int invoke_tx_handlers_late(struc
|
||||
goto txh_done;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
CALL_TXH(ieee80211_tx_h_michael_mic_add);
|
||||
CALL_TXH(ieee80211_tx_h_sequence);
|
||||
CALL_TXH(ieee80211_tx_h_fragment);
|
||||
@@ -3384,15 +3385,21 @@ out:
|
||||
@@ -3382,15 +3383,21 @@ out:
|
||||
* Can be called while the sta lock is held. Anything that can cause packets to
|
||||
* be generated will cause deadlock!
|
||||
*/
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
if (key)
|
||||
info->control.hw_key = &key->conf;
|
||||
|
||||
@@ -3441,6 +3448,8 @@ static void ieee80211_xmit_fast_finish(s
|
||||
@@ -3439,6 +3446,8 @@ static void ieee80211_xmit_fast_finish(s
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
}
|
||||
|
||||
static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
|
||||
@@ -3544,24 +3553,17 @@ static bool ieee80211_xmit_fast(struct i
|
||||
@@ -3542,24 +3551,17 @@ static bool ieee80211_xmit_fast(struct i
|
||||
tx.sta = sta;
|
||||
tx.key = fast_tx->key;
|
||||
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
||||
sdata = container_of(sdata->bss,
|
||||
@@ -3672,8 +3674,12 @@ begin:
|
||||
@@ -3670,8 +3672,12 @@ begin:
|
||||
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
|
||||
pn_offs = ieee80211_hdrlen(hdr->frame_control);
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
tx->sta->tx_stats.last_rate = txrc.reported_rate;
|
||||
} else if (tx->sta)
|
||||
tx->sta->tx_stats.last_rate = txrc.reported_rate;
|
||||
@@ -3662,8 +3664,16 @@ begin:
|
||||
@@ -3660,8 +3662,16 @@ begin:
|
||||
else
|
||||
info->flags &= ~IEEE80211_TX_CTL_AMPDU;
|
||||
|
||||
|
||||
@ -54,8 +54,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int tid;
|
||||
|
||||
memset(tx, 0, sizeof(*tx));
|
||||
@@ -1202,8 +1226,10 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
@@ -1200,8 +1224,10 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
} else if (tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
- if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
|
||||
@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
|
||||
@@ -1213,8 +1239,12 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
@@ -1211,8 +1237,12 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
struct tid_ampdu_tx *tid_tx;
|
||||
|
||||
tid = ieee80211_get_tid(hdr);
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (tid_tx) {
|
||||
bool queued;
|
||||
|
||||
@@ -3949,29 +3979,6 @@ void ieee80211_txq_schedule_start(struct
|
||||
@@ -3947,29 +3977,6 @@ void ieee80211_txq_schedule_start(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_txq_schedule_start);
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:json-c_project:json-c
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -17,8 +17,6 @@ PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
|
||||
PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
||||
@ -11,8 +11,6 @@ PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
|
||||
@ -23,6 +23,8 @@ find_3g_iface() {
|
||||
fi
|
||||
}
|
||||
|
||||
[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
|
||||
|
||||
case "$DEVICENAME" in
|
||||
tty*)
|
||||
[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiwinfo
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
@ -17,14 +17,6 @@ PKG_MIRROR_HASH:=f33779035153da6bd0b2f100f402f62f1554ab87ed6fbbd938d41df6b9947a1
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl-mini \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl-mimo \
|
||||
CONFIG_PACKAGE_kmod-cfg80211
|
||||
|
||||
IWINFO_ABI_VERSION:=20210430
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -34,13 +26,13 @@ define Package/libiwinfo
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Generalized Wireless Information Library (iwinfo)
|
||||
DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus
|
||||
DEPENDS:=+libnl-tiny +libuci +libubus
|
||||
ABI_VERSION:=$(IWINFO_ABI_VERSION)
|
||||
endef
|
||||
|
||||
define Package/libiwinfo/description
|
||||
Wireless information library with consistent interface for proprietary Broadcom,
|
||||
nl80211 and wext driver interfaces.
|
||||
Wireless information library with simplified API for nl80211
|
||||
and wext driver interfaces.
|
||||
endef
|
||||
|
||||
|
||||
@ -73,12 +65,6 @@ endef
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
IWINFO_BACKENDS := \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
|
||||
$(if $(CONFIG_PACKAGE_kmod-cfg80211),nl80211)
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
@ -88,7 +74,7 @@ MAKE_FLAGS += \
|
||||
FPIC="$(FPIC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
BACKENDS="$(IWINFO_BACKENDS)" \
|
||||
BACKENDS="nl80211" \
|
||||
SOVERSION="$(IWINFO_ABI_VERSION)"
|
||||
|
||||
define Build/InstallDev
|
||||
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2021-06-03
|
||||
PKG_SOURCE_VERSION:=a8cf678230ed163ff7a07eb1e2c872f9d655460a
|
||||
PKG_MIRROR_HASH:=aee34cd1c1aa0f1a459dda0b2c6cbdb6b66e67147ebd1bcbb2a16a2ef923d008
|
||||
PKG_SOURCE_DATE:=2021-06-30
|
||||
PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044
|
||||
PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
@ -15,7 +15,6 @@ PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
PKG_ASLR_PIE_REGULAR:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -22,8 +22,6 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
|
||||
http://www.tecgraf.puc-rio.br/lua/ftp/
|
||||
PKG_HASH:=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS := nonshared
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYRIGHT
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
gpio: gpio@18040000 {
|
||||
compatible = "qca,ar7100-gpio";
|
||||
reg = <0x18040000 0x30>;
|
||||
reg = <0x18040000 0x28>;
|
||||
interrupts = <2>;
|
||||
|
||||
ngpios = <16>;
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
gpio: gpio@18040000 {
|
||||
compatible = "qca,ar7240-gpio",
|
||||
"qca,ar7100-gpio";
|
||||
reg = <0x18040000 0x30>;
|
||||
reg = <0x18040000 0x28>;
|
||||
interrupts = <2>;
|
||||
|
||||
ngpios = <18>;
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
gpio: gpio@18040000 {
|
||||
compatible = "qca,ar9132-gpio",
|
||||
"qca,ar7100-gpio";
|
||||
reg = <0x18040000 0x30>;
|
||||
reg = <0x18040000 0x28>;
|
||||
interrupts = <2>;
|
||||
|
||||
ngpios = <22>;
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
gpio: gpio@18040000 {
|
||||
compatible = "qca,ar7100-gpio";
|
||||
reg = <0x18040000 0x34>;
|
||||
reg = <0x18040000 0x28>;
|
||||
interrupts = <2>;
|
||||
|
||||
ngpios = <30>;
|
||||
|
||||
193
target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
Normal file
193
target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
Normal file
@ -0,0 +1,193 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9331.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Teltonika RUT230 v1";
|
||||
compatible = "teltonika,rut230-v1", "qca,ar9331";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &wmac;
|
||||
led-boot = &led_ss0;
|
||||
led-failsafe = &led_ss0;
|
||||
led-upgrade = &led_ss0;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
input {
|
||||
label = "input";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
sim-tray {
|
||||
label = "sim-tray";
|
||||
linux,code = <BTN_1>;
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&switch_led_disable_pins>;
|
||||
|
||||
led_ss0: signal-strength-0 {
|
||||
label = "green:signal-strength-0";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
signal-strength-1 {
|
||||
label = "green:signal-strength-1";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
signal-strength-2 {
|
||||
label = "green:signal-strength-2";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
signal-strength-3 {
|
||||
label = "green:signal-strength-3";
|
||||
gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
signal-strength-4 {
|
||||
label = "green:signal-strength4";
|
||||
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
2g {
|
||||
label = "green:2g";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
3g {
|
||||
label = "green:3g";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lan {
|
||||
label = "green:lan";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
/* GPIO 13 - ACTIVE HIGH for hwrev 0 */
|
||||
};
|
||||
|
||||
wan {
|
||||
label = "green:wan";
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
|
||||
};
|
||||
|
||||
/* 4G LED - GPIO21 ACTIVE_HIGH for RUT240 */
|
||||
};
|
||||
|
||||
reg_usb_vbus: reg_usb_vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&config 0x0>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&config 0x0>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <30000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
config: partition@20000 {
|
||||
label = "config";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@30000 {
|
||||
label = "art";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
compatible = "tplink,firmware";
|
||||
label = "firmware";
|
||||
reg = <0x40000 0xf30000>;
|
||||
};
|
||||
|
||||
partition@f70000 {
|
||||
label = "event-log";
|
||||
reg = <0xf70000 0x90000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb {
|
||||
dr_mode = "host";
|
||||
vbus-supply = <®_usb_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio {
|
||||
modem-power {
|
||||
gpio-hog;
|
||||
output-low;
|
||||
gpios = <18 GPIO_ACTIVE_HIGH>;
|
||||
line-name = "modem-power";
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&config 0x0>;
|
||||
mtd-mac-address-increment = <2>;
|
||||
};
|
||||
@ -107,6 +107,12 @@
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
beeper {
|
||||
gpio-export,name = "beeper";
|
||||
gpio-export,output = <1>; /* Must be 1 to avoid EMI induced clicking noise */
|
||||
gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb_power {
|
||||
gpio-export,name = "power-usb";
|
||||
gpio-export,output = <1>;
|
||||
|
||||
34
target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
Normal file
34
target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
Normal file
@ -0,0 +1,34 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9342_ubnt_xw.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ubnt,powerbeam-m-xw", "ubnt,xw", "qca,ar9342";
|
||||
model = "Ubiquiti PowerBeam M (XW)";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <4>;
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
/* default for ar934x, except for 1000M and 10M */
|
||||
pll-data = <0x02000000 0x00000101 0x00001313>;
|
||||
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy4>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
rxd-delay = <3>;
|
||||
rxdv-delay = <3>;
|
||||
};
|
||||
};
|
||||
@ -78,7 +78,7 @@
|
||||
|
||||
gpio: gpio@18040000 {
|
||||
compatible = "qca,ar9340-gpio";
|
||||
reg = <0x18040000 0x2c>;
|
||||
reg = <0x18040000 0x28>;
|
||||
|
||||
interrupts = <2>;
|
||||
ngpios = <23>;
|
||||
|
||||
177
target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
Normal file
177
target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
Normal file
@ -0,0 +1,177 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca956x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Xiaomi AIoT AC2350";
|
||||
compatible = "xiaomi,aiot-ac2350", "qca,qca9563";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
|
||||
led-boot = &led_system_orange;
|
||||
led-failsafe = &led_system_orange;
|
||||
led-running = &led_system_blue;
|
||||
led-upgrade = &led_system_orange;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_system_blue: system_blue {
|
||||
label = "blue:system";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_system_orange: system_orange {
|
||||
label = "orange:system";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "blue:wan";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_orange {
|
||||
label = "orange:wan";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
wps {
|
||||
gpio-export,name = "wps";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-reset {
|
||||
gpio-export,name = "usb-reset";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "Bootloader";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "Nvram";
|
||||
reg = <0x30000 0x10000>;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "Bdata";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "crash";
|
||||
reg = <0x50000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@60000 {
|
||||
label = "art";
|
||||
reg = <0x60000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@70000 {
|
||||
label = "cfg_bak";
|
||||
reg = <0x70000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@90000 {
|
||||
label = "overlay";
|
||||
reg = <0x90000 0x170000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@200000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x200000 0xe00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0x1>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
phy-mode = "sgmii";
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
0x04 0x00000080 /* PORT0 PAD MODE CTRL */
|
||||
0x08 0x01000000 /* PORT5 PAD MODE CTRL */
|
||||
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
|
||||
0x10 0x602613a0 /* POWER_ON_STRAP */
|
||||
0x50 0xcf35cf35 /* LED_CTRL0 */
|
||||
0x54 0xca35ca35 /* LED_CTRL1 */
|
||||
0x58 0xc935c935 /* LED_CTRL2 */
|
||||
0x5c 0x03ffff00 /* LED_CTRL3 */
|
||||
0x7c 0x000000fe /* PORT0_STATUS */
|
||||
0x94 0x000010c2 /* PORT6_STATUS */
|
||||
0xe0 0xc74164de /* SGMII_CTRL */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
154
target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
Normal file
154
target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
Normal file
@ -0,0 +1,154 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca956x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "tplink,tl-wr941hp-v1", "qca,tp9343";
|
||||
model = "TP-Link TL-WR941HP v1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &wmac;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
re {
|
||||
label = "blue:re";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "blue:wifi";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led_power: power {
|
||||
label = "blue:power";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "blue:wan";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wan_red {
|
||||
label = "red:wan";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan {
|
||||
label = "blue:lan";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "blue:wps";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
re {
|
||||
label = "range extender button";
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "wifi button";
|
||||
linux,code = <KEY_RFKILL>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps button";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
uboot: partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
compatible = "tplink,firmware";
|
||||
label = "firmware";
|
||||
reg = <0x020000 0x730000>;
|
||||
};
|
||||
|
||||
config: partition@750000 {
|
||||
label = "config";
|
||||
reg = <0x750000 0x0a0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@7f0000 {
|
||||
label = "art";
|
||||
reg = <0x7f0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&swphy0>;
|
||||
|
||||
mtd-mac-address = <&config 0x8>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&config 0x8>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
mtd-mac-address = <&config 0x8>;
|
||||
};
|
||||
@ -276,6 +276,10 @@ qihoo,c301)
|
||||
samsung,wam250)
|
||||
ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth0"
|
||||
;;
|
||||
teltonika,rut230-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x04"
|
||||
;;
|
||||
tplink,archer-a7-v5|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5)
|
||||
@ -370,6 +374,10 @@ tplink,tl-wr842n-v2)
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
tplink,tl-wr941hp-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" "link tx rx"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:planet" "eth0"
|
||||
;;
|
||||
@ -393,6 +401,7 @@ ubnt,nanostation-loco-m-xw|\
|
||||
ubnt,nanostation-m|\
|
||||
ubnt,nanostation-m-xw|\
|
||||
ubnt,picostation-m|\
|
||||
ubnt,powerbeam-m-xw|\
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
@ -417,6 +426,9 @@ wd,mynet-wifi-rangeextender)
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMED" "blue:rssi-med" "wlan0" "33" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIMAX" "blue:rssi-max" "wlan0" "66" "100"
|
||||
;;
|
||||
xiaomi,aiot-ac2350)
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
|
||||
;;
|
||||
xwrt,csac)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
|
||||
@ -85,6 +85,7 @@ ath79_setup_interfaces()
|
||||
ubnt,picostation-m|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,powerbeam-m-xw|\
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-5ac-lite|\
|
||||
ubnt,rocket-m|\
|
||||
@ -320,7 +321,8 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:wan"
|
||||
;;
|
||||
nec,wg800hp)
|
||||
nec,wg800hp|\
|
||||
xiaomi,aiot-ac2350)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:lan" "4:lan" "1:wan"
|
||||
;;
|
||||
@ -398,7 +400,8 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
|
||||
;;
|
||||
tplink,tl-wr842n-v2)
|
||||
tplink,tl-wr842n-v2|\
|
||||
tplink,tl-wr941hp-v1)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
||||
@ -678,6 +681,9 @@ ath79_setup_macs()
|
||||
wd,mynet-wifi-rangeextender)
|
||||
lan_mac=$(nvram get et0macaddr)
|
||||
;;
|
||||
xiaomi,aiot-ac2350)
|
||||
lan_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
;;
|
||||
xwrt,csac)
|
||||
wan_mac=$(mtd_get_mac_binary art 0)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
|
||||
@ -248,6 +248,11 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
|
||||
;;
|
||||
xiaomi,aiot-ac2350)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
|
||||
;;
|
||||
xwrt,csac|\
|
||||
yuncore,a782|\
|
||||
yuncore,xd4200)
|
||||
|
||||
@ -798,6 +798,16 @@ define Device/tplink_tl-wr902ac-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr902ac-v1
|
||||
|
||||
define Device/tplink_tl-wr941hp-v1
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := tp9343
|
||||
DEVICE_MODEL := TL-WR941HP
|
||||
DEVICE_VARIANT := v1
|
||||
TPLINK_BOARD_ID := TL-WR941HP-V1
|
||||
IMAGE_SIZE := 7360k
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr941hp-v1
|
||||
|
||||
define Device/tplink_wbs210-v1
|
||||
$(Device/tplink-safeloader-okli)
|
||||
SOC := ar9344
|
||||
|
||||
@ -328,6 +328,14 @@ define Device/ubnt_powerbeam-5ac-gen2
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
|
||||
|
||||
define Device/ubnt_powerbeam-m-xw
|
||||
$(Device/ubnt-xw)
|
||||
DEVICE_MODEL := PowerBeam M
|
||||
DEVICE_PACKAGES += rssileds
|
||||
SUPPORTED_DEVICES += loco-m-xw
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_powerbeam-m-xw
|
||||
|
||||
define Device/ubnt_powerbridge-m
|
||||
$(Device/ubnt-xm)
|
||||
SOC := ar7241
|
||||
|
||||
@ -142,11 +142,20 @@ define Build/teltonika-fw-fake-checksum
|
||||
# from begin of the firmware file) with 16 bytes stored just before
|
||||
# 0xdeadc0de marker. Values are only compared, MD5 sum is not verified.
|
||||
let \
|
||||
offs="$$(stat -c%s $@) - 20"; \
|
||||
offs="$$(stat -c%s $@) - $(1)"; \
|
||||
dd if=$@ bs=1 count=16 skip=76 |\
|
||||
dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
|
||||
endef
|
||||
|
||||
define Build/teltonika-v1-header
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||
-E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V "RUT2xx " \
|
||||
-k $@ -o $@.new $(1)
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/wrgg-pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
|
||||
endef
|
||||
@ -2209,6 +2218,28 @@ define Device/telco_t1
|
||||
endef
|
||||
TARGET_DEVICES += telco_t1
|
||||
|
||||
define Device/teltonika_rut230-v1
|
||||
SOC := ar9331
|
||||
DEVICE_VENDOR := Teltonika
|
||||
DEVICE_MODEL := RUT230
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-usb-acm kmod-usb-net-qmi-wwan \
|
||||
uqmi -uboot-envtools
|
||||
IMAGE_SIZE := 15552k
|
||||
TPLINK_HWID := 0x32200002
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HEADER_VERSION := 1
|
||||
KERNEL := kernel-bin | append-dtb | lzma | teltonika-v1-header
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
|
||||
pad-rootfs | pad-extra 64 | teltonika-fw-fake-checksum 54 | check-size
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
|
||||
append-rootfs | pad-rootfs | append-metadata |\
|
||||
check-size
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rut230-v1
|
||||
|
||||
define Device/teltonika_rut955
|
||||
SOC := ar9344
|
||||
DEVICE_VENDOR := Teltonika
|
||||
@ -2223,7 +2254,7 @@ define Device/teltonika_rut955
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
|
||||
pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
|
||||
pad-rootfs | teltonika-fw-fake-checksum 20 | append-string master |\
|
||||
append-md5sum-bin | check-size
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
|
||||
append-rootfs | pad-rootfs | append-metadata |\
|
||||
@ -2301,6 +2332,15 @@ define Device/winchannel_wb2000
|
||||
endef
|
||||
TARGET_DEVICES += winchannel_wb2000
|
||||
|
||||
define Device/xiaomi_aiot-ac2350
|
||||
SOC := qca9563
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := AIoT AC2350
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct
|
||||
IMAGE_SIZE := 14336k
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_aiot-ac2350
|
||||
|
||||
define Device/xiaomi_mi-router-4q
|
||||
SOC := qca9561
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
|
||||
@ -77,6 +77,17 @@
|
||||
qcom,mpll = <5>;
|
||||
};
|
||||
|
||||
&opp_table_l2 {
|
||||
/delete-node/opp-1200000000;
|
||||
|
||||
opp-1400000000 {
|
||||
opp-hz = /bits/ 64 <1400000000>;
|
||||
opp-microvolt = <1150000>;
|
||||
clock-latency-ns = <100000>;
|
||||
opp-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&opp_table0 {
|
||||
/*
|
||||
* On ipq8065 1.2 ghz freq is not present
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
##################################################################################
|
||||
--- /dev/null
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq-krait.c
|
||||
@@ -0,0 +1,601 @@
|
||||
@@ -0,0 +1,603 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+
|
||||
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
@ -115,9 +115,11 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ int cpu, ret;
|
||||
+
|
||||
+ if (l2_pdev) {
|
||||
+ int policy_cpu = policy->cpu;
|
||||
+
|
||||
+ /* find the max freq across all core */
|
||||
+ for_each_present_cpu(cpu)
|
||||
+ if (cpu != index)
|
||||
+ if (cpu != policy_cpu)
|
||||
+ target_freq = max(
|
||||
+ target_freq,
|
||||
+ (unsigned long)cpufreq_quick_get(cpu));
|
||||
@ -132,6 +134,18 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ level = dev_pm_opp_get_level(opp);
|
||||
+ dev_pm_opp_put(opp);
|
||||
+
|
||||
+ /*
|
||||
+ * Hardware constraint:
|
||||
+ * Krait CPU cannot operate at 384MHz with L2 at 1Ghz.
|
||||
+ * Assume index 0 with the idle freq and level > 0 as
|
||||
+ * any L2 freq > 384MHz.
|
||||
+ * Skip CPU freq change in this corner case.
|
||||
+ */
|
||||
+ if (unlikely(index == 0 && level != 0)) {
|
||||
+ dev_err(priv->cpu_dev, "Krait CPU can't operate at idle freq with L2 at 1GHz");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ opp = dev_pm_opp_find_level_exact(&l2_pdev->dev, level);
|
||||
+ if (IS_ERR(opp)) {
|
||||
+ dev_err(&l2_pdev->dev,
|
||||
@ -144,18 +158,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ ret = dev_pm_opp_set_rate(&l2_pdev->dev, target_freq);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /*
|
||||
+ * Hardware constraint:
|
||||
+ * Krait CPU cannot operate at 384MHz with L2 at 1Ghz.
|
||||
+ * Assume index 0 with the idle freq and level > 0 as
|
||||
+ * any L2 freq > 384MHz.
|
||||
+ * Skip CPU freq change in this corner case.
|
||||
+ */
|
||||
+ if (unlikely(index == 0 && level != 0)) {
|
||||
+ dev_err(priv->cpu_dev, "Krait CPU can't operate at idle freq with L2 at 1GHz");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ret = dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000);
|
||||
|
||||
@ -227,9 +227,9 @@
|
||||
|
||||
#include "cpufreq-dt.h"
|
||||
|
||||
@@ -54,6 +55,13 @@ static int set_target(struct cpufreq_pol
|
||||
level = dev_pm_opp_get_level(opp);
|
||||
dev_pm_opp_put(opp);
|
||||
@@ -68,6 +69,13 @@ static int set_target(struct cpufreq_pol
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Scale fabrics with max freq across all cores
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -38,11 +50,458 @@
|
||||
@@ -38,11 +50,476 @@
|
||||
next-level-cache = <&L2>;
|
||||
qcom,acc = <&acc1>;
|
||||
qcom,saw = <&saw1>;
|
||||
@ -42,19 +42,9 @@
|
||||
+ cpu-idle-states = <&CPU_SPC>;
|
||||
};
|
||||
|
||||
L2: l2-cache {
|
||||
compatible = "cache";
|
||||
cache-level = <2>;
|
||||
+ qcom,saw = <&saw_l2>;
|
||||
+ };
|
||||
+
|
||||
+ qcom,l2 {
|
||||
+ qcom,l2-rates = <384000000 1000000000 1200000000>;
|
||||
+ qcom,l2-cpufreq = <384000000 600000000 1200000000>;
|
||||
+ qcom,l2-volt = <1100000 1100000 1150000>;
|
||||
+ qcom,l2-supply = <&smb208_s1a>;
|
||||
+ };
|
||||
+
|
||||
- L2: l2-cache {
|
||||
- compatible = "cache";
|
||||
- cache-level = <2>;
|
||||
+ idle-states {
|
||||
+ CPU_SPC: spc {
|
||||
+ compatible = "qcom,idle-state-spc", "arm,idle-state";
|
||||
@ -66,6 +56,31 @@
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ opp_table_l2: opp_table_l2 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+
|
||||
+ opp-384000000 {
|
||||
+ opp-hz = /bits/ 64 <384000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1000000000 {
|
||||
+ opp-hz = /bits/ 64 <1000000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1150000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ opp_table0: opp_table0 {
|
||||
+ compatible = "operating-points-v2-kryo-cpu";
|
||||
+ nvmem-cells = <&speedbin_efuse>;
|
||||
@ -78,6 +93,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <800000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+
|
||||
+ opp-600000000 {
|
||||
@ -88,6 +104,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <850000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-800000000 {
|
||||
@ -98,6 +115,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <900000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1000000000 {
|
||||
@ -108,6 +126,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <950000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1200000000 {
|
||||
@ -118,6 +137,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1000000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1400000000 {
|
||||
@ -128,6 +148,7 @@
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1050000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
@ -485,7 +506,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,6 +552,15 @@
|
||||
@@ -93,6 +570,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -501,10 +522,21 @@
|
||||
firmware {
|
||||
scm {
|
||||
compatible = "qcom,scm-ipq806x", "qcom,scm";
|
||||
@@ -120,6 +588,84 @@
|
||||
@@ -120,6 +606,95 @@
|
||||
reg-names = "lpass-lpaif";
|
||||
};
|
||||
|
||||
+ L2: l2-cache {
|
||||
+ compatible = "qcom,krait-cache", "cache";
|
||||
+ cache-level = <2>;
|
||||
+ qcom,saw = <&saw_l2>;
|
||||
+
|
||||
+ clocks = <&kraitcc 4>;
|
||||
+ clock-names = "l2";
|
||||
+ l2-supply = <&smb208_s1a>;
|
||||
+ operating-points-v2 = <&opp_table_l2>;
|
||||
+ };
|
||||
+
|
||||
+ qfprom: qfprom@700000 {
|
||||
+ compatible = "qcom,qfprom", "syscon";
|
||||
+ reg = <0x700000 0x1000>;
|
||||
@ -586,7 +618,7 @@
|
||||
qcom_pinmux: pinmux@800000 {
|
||||
compatible = "qcom,ipq8064-pinctrl";
|
||||
reg = <0x800000 0x4000>;
|
||||
@@ -159,6 +705,15 @@
|
||||
@@ -159,6 +734,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -602,7 +634,7 @@
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
@@ -168,6 +723,53 @@
|
||||
@@ -168,6 +752,53 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -656,7 +688,7 @@
|
||||
leds_pins: leds_pins {
|
||||
mux {
|
||||
pins = "gpio7", "gpio8", "gpio9",
|
||||
@@ -229,6 +831,17 @@
|
||||
@@ -229,6 +860,17 @@
|
||||
clock-output-names = "acpu1_aux";
|
||||
};
|
||||
|
||||
@ -674,7 +706,7 @@
|
||||
saw0: regulator@2089000 {
|
||||
compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
|
||||
reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
|
||||
@@ -241,6 +854,17 @@
|
||||
@@ -241,6 +883,17 @@
|
||||
regulator;
|
||||
};
|
||||
|
||||
@ -692,7 +724,7 @@
|
||||
gsbi2: gsbi@12480000 {
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
cell-index = <2>;
|
||||
@@ -436,6 +1060,15 @@
|
||||
@@ -436,6 +1089,15 @@
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
@ -708,7 +740,7 @@
|
||||
tcsr: syscon@1a400000 {
|
||||
compatible = "qcom,tcsr-ipq8064", "syscon";
|
||||
reg = <0x1a400000 0x100>;
|
||||
@@ -448,6 +1081,95 @@
|
||||
@@ -448,6 +1110,95 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
@ -804,7 +836,7 @@
|
||||
pcie0: pci@1b500000 {
|
||||
compatible = "qcom,pcie-ipq8064";
|
||||
reg = <0x1b500000 0x1000
|
||||
@@ -601,6 +1323,167 @@
|
||||
@@ -601,6 +1352,167 @@
|
||||
perst-gpio = <&qcom_pinmux 63 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
@ -972,7 +1004,7 @@
|
||||
vsdcc_fixed: vsdcc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "SDCC Power";
|
||||
@@ -676,4 +1559,17 @@
|
||||
@@ -676,4 +1588,17 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
##################################################################################
|
||||
--- /dev/null
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq-krait.c
|
||||
@@ -0,0 +1,601 @@
|
||||
@@ -0,0 +1,603 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+
|
||||
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
@ -115,9 +115,11 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ int cpu, ret;
|
||||
+
|
||||
+ if (l2_pdev) {
|
||||
+ int policy_cpu = policy->cpu;
|
||||
+
|
||||
+ /* find the max freq across all core */
|
||||
+ for_each_present_cpu(cpu)
|
||||
+ if (cpu != index)
|
||||
+ if (cpu != policy_cpu)
|
||||
+ target_freq = max(
|
||||
+ target_freq,
|
||||
+ (unsigned long)cpufreq_quick_get(cpu));
|
||||
@ -132,6 +134,18 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ level = dev_pm_opp_get_level(opp);
|
||||
+ dev_pm_opp_put(opp);
|
||||
+
|
||||
+ /*
|
||||
+ * Hardware constraint:
|
||||
+ * Krait CPU cannot operate at 384MHz with L2 at 1Ghz.
|
||||
+ * Assume index 0 with the idle freq and level > 0 as
|
||||
+ * any L2 freq > 384MHz.
|
||||
+ * Skip CPU freq change in this corner case.
|
||||
+ */
|
||||
+ if (unlikely(index == 0 && level != 0)) {
|
||||
+ dev_err(priv->cpu_dev, "Krait CPU can't operate at idle freq with L2 at 1GHz");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ opp = dev_pm_opp_find_level_exact(&l2_pdev->dev, level);
|
||||
+ if (IS_ERR(opp)) {
|
||||
+ dev_err(&l2_pdev->dev,
|
||||
@ -144,18 +158,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+ ret = dev_pm_opp_set_rate(&l2_pdev->dev, target_freq);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /*
|
||||
+ * Hardware constraint:
|
||||
+ * Krait CPU cannot operate at 384MHz with L2 at 1Ghz.
|
||||
+ * Assume index 0 with the idle freq and level > 0 as
|
||||
+ * any L2 freq > 384MHz.
|
||||
+ * Skip CPU freq change in this corner case.
|
||||
+ */
|
||||
+ if (unlikely(index == 0 && level != 0)) {
|
||||
+ dev_err(priv->cpu_dev, "Krait CPU can't operate at idle freq with L2 at 1GHz");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ret = dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000);
|
||||
|
||||
@ -227,9 +227,9 @@
|
||||
|
||||
#include "cpufreq-dt.h"
|
||||
|
||||
@@ -54,6 +55,13 @@ static int set_target(struct cpufreq_pol
|
||||
level = dev_pm_opp_get_level(opp);
|
||||
dev_pm_opp_put(opp);
|
||||
@@ -68,6 +69,13 @@ static int set_target(struct cpufreq_pol
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Scale fabrics with max freq across all cores
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -865,6 +865,41 @@
|
||||
@@ -894,6 +894,41 @@
|
||||
reg = <0x12100000 0x10000>;
|
||||
};
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ define Device/avm_fritz7312
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ltq-deu-ar9 -swconfig
|
||||
-swconfig
|
||||
endef
|
||||
TARGET_DEVICES += avm_fritz7312
|
||||
|
||||
@ -22,7 +22,7 @@ define Device/avm_fritz7320
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig
|
||||
kmod-usb-dwc2 -swconfig
|
||||
SUPPORTED_DEVICES += FRITZ7320
|
||||
endef
|
||||
TARGET_DEVICES += avm_fritz7320
|
||||
@ -38,7 +38,6 @@ define Device/bt_homehub-v3a
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 \
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
|
||||
kmod-ltq-deu-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
|
||||
uboot-envtools
|
||||
@ -107,8 +106,7 @@ define Device/netgear_dgn3500
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ltq-deu-ar9
|
||||
ltq-adsl-app ppp-mod-pppoa
|
||||
SUPPORTED_DEVICES += DGN3500
|
||||
endef
|
||||
TARGET_DEVICES += netgear_dgn3500
|
||||
@ -130,8 +128,7 @@ define Device/netgear_dgn3500b
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ltq-deu-ar9
|
||||
ltq-adsl-app ppp-mod-pppoa
|
||||
SUPPORTED_DEVICES += DGN3500B
|
||||
endef
|
||||
TARGET_DEVICES += netgear_dgn3500b
|
||||
@ -145,7 +142,7 @@ define Device/zte_h201l
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoe \
|
||||
kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
|
||||
kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
|
||||
kmod-ltq-tapi kmod-ltq-vmmc
|
||||
SUPPORTED_DEVICES += H201L
|
||||
endef
|
||||
@ -161,7 +158,7 @@ define Device/zyxel_p-2601hn
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
|
||||
ltq-adsl-app ppp-mod-pppoe \
|
||||
kmod-ltq-deu-ar9 kmod-usb-dwc2
|
||||
kmod-usb-dwc2
|
||||
SUPPORTED_DEVICES += P2601HNFX
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_p-2601hn
|
||||
|
||||
@ -192,7 +192,6 @@ define Device/bt_homehub-v2b
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 \
|
||||
kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
|
||||
kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
|
||||
kmod-ltq-deu-danube \
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl
|
||||
SUPPORTED_DEVICES += BTHOMEHUBV2B
|
||||
|
||||
@ -11,7 +11,6 @@ DEFAULT_PACKAGES+=kmod-leds-gpio \
|
||||
kmod-ltq-vdsl-vr9 \
|
||||
kmod-ltq-atm-vr9 \
|
||||
kmod-ltq-ptm-vr9 \
|
||||
kmod-ltq-deu-vr9 \
|
||||
ltq-vdsl-app \
|
||||
dsl-vrx200-firmware-xdsl-a \
|
||||
dsl-vrx200-firmware-xdsl-b-patch \
|
||||
|
||||
@ -1930,6 +1930,37 @@ static struct device_info boards[] = {
|
||||
.last_sysupgrade_partition = "file-system",
|
||||
},
|
||||
|
||||
/** Firmware layout for the TL-WR941HP v1 */
|
||||
{
|
||||
.id = "TL-WR941HP-V1",
|
||||
.vendor = "",
|
||||
.support_list =
|
||||
"SupportList:\n"
|
||||
"{product_name:TL-WR941HP,product_ver:1.0.0,special_id:00000000}\n",
|
||||
.part_trail = 0x00,
|
||||
.soft_ver = NULL,
|
||||
|
||||
.partitions = {
|
||||
{"fs-uboot", 0x00000, 0x20000},
|
||||
{"firmware", 0x20000, 0x730000},
|
||||
{"default-mac", 0x750000, 0x00200},
|
||||
{"pin", 0x750200, 0x00200},
|
||||
{"product-info", 0x750400, 0x0fc00},
|
||||
{"soft-version", 0x760000, 0x0b000},
|
||||
{"support-list", 0x76b000, 0x04000},
|
||||
{"profile", 0x770000, 0x04000},
|
||||
{"default-config", 0x774000, 0x0b000},
|
||||
{"user-config", 0x780000, 0x40000},
|
||||
{"partition-table", 0x7c0000, 0x10000},
|
||||
{"log", 0x7d0000, 0x20000},
|
||||
{"radio", 0x7f0000, 0x10000},
|
||||
{NULL, 0, 0}
|
||||
},
|
||||
|
||||
.first_sysupgrade_partition = "os-image",
|
||||
.last_sysupgrade_partition = "file-system",
|
||||
},
|
||||
|
||||
/** Firmware layout for the TL-WR942N V1 */
|
||||
{
|
||||
.id = "TLWR942NV1",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user