Merge branch 'openwrt:master' into master
This commit is contained in:
commit
e4dcf640fb
105 changed files with 1940 additions and 1976 deletions
|
@ -284,6 +284,7 @@ menu "Target Images"
|
||||||
comment "Image Options"
|
comment "Image Options"
|
||||||
|
|
||||||
source "target/linux/*/image/Config.in"
|
source "target/linux/*/image/Config.in"
|
||||||
|
source "target/linux/*/*/image/Config.in"
|
||||||
|
|
||||||
config TARGET_KERNEL_PARTSIZE
|
config TARGET_KERNEL_PARTSIZE
|
||||||
int "Kernel partition size (in MiB)"
|
int "Kernel partition size (in MiB)"
|
||||||
|
|
|
@ -90,6 +90,13 @@ network_get_prefix6() {
|
||||||
__network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/"
|
__network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# determine first IPv6 prefix assignment of given logical interface
|
||||||
|
# 1: destination variable
|
||||||
|
# 2: interface
|
||||||
|
network_get_prefix_assignment6() {
|
||||||
|
__network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['address','mask']" "/"
|
||||||
|
}
|
||||||
|
|
||||||
# determine all IPv4 addresses of given logical interface
|
# determine all IPv4 addresses of given logical interface
|
||||||
# 1: destination variable
|
# 1: destination variable
|
||||||
# 2: interface
|
# 2: interface
|
||||||
|
@ -187,6 +194,13 @@ network_get_prefixes6() {
|
||||||
__network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ "
|
__network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# determine all IPv6 prefix assignments of given logical interface
|
||||||
|
# 1: destination variable
|
||||||
|
# 2: interface
|
||||||
|
network_get_prefix_assignments6() {
|
||||||
|
__network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][*]['address','mask']" "/ "
|
||||||
|
}
|
||||||
|
|
||||||
# determine IPv4 gateway of given logical interface
|
# determine IPv4 gateway of given logical interface
|
||||||
# 1: destination variable
|
# 1: destination variable
|
||||||
# 2: interface
|
# 2: interface
|
||||||
|
|
|
@ -122,14 +122,14 @@ define Package/grub2/install
|
||||||
-O i386-pc \
|
-O i386-pc \
|
||||||
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
||||||
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
|
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
|
||||||
at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial vga
|
at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial test vga
|
||||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||||
-d $(PKG_BUILD_DIR)/grub-core \
|
-d $(PKG_BUILD_DIR)/grub-core \
|
||||||
-p /boot/grub \
|
-p /boot/grub \
|
||||||
-O i386-pc \
|
-O i386-pc \
|
||||||
-c ./files/grub-early.cfg \
|
-c ./files/grub-early.cfg \
|
||||||
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
|
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
|
||||||
at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga
|
at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial test vga
|
||||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||||
-d $(PKG_BUILD_DIR)/grub-core \
|
-d $(PKG_BUILD_DIR)/grub-core \
|
||||||
-p /boot/grub \
|
-p /boot/grub \
|
||||||
|
@ -154,7 +154,7 @@ define Package/grub2-efi/install
|
||||||
-O $(CONFIG_ARCH)-efi \
|
-O $(CONFIG_ARCH)-efi \
|
||||||
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
||||||
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
||||||
at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga
|
at_keyboard boot chain configfile fat linux ls part_gpt reboot serial test efi_gop efi_uga
|
||||||
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||||
-d $(PKG_BUILD_DIR)/grub-core \
|
-d $(PKG_BUILD_DIR)/grub-core \
|
||||||
-p /boot/grub \
|
-p /boot/grub \
|
||||||
|
|
|
@ -13,6 +13,7 @@ touch /etc/config/ubootenv
|
||||||
board=$(board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
buffalo,ls220de|\
|
||||||
buffalo,ls421de)
|
buffalo,ls421de)
|
||||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000"
|
||||||
;;
|
;;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,40 +3,92 @@ Date: Thu, 16 Feb 2023 11:07:30 +0100
|
||||||
Subject: [PATCH] wifi: mac80211: use mesh header cache to speed up mesh
|
Subject: [PATCH] wifi: mac80211: use mesh header cache to speed up mesh
|
||||||
forwarding
|
forwarding
|
||||||
|
|
||||||
Use it to look up the next hop address + sta pointer + key and call
|
|
||||||
__ieee80211_mesh_xmit_fast to queue the tx frame.
|
|
||||||
|
|
||||||
Significantly reduces mesh forwarding path CPU usage and enables the
|
Significantly reduces mesh forwarding path CPU usage and enables the
|
||||||
use of iTXQ.
|
direct use of iTXQ.
|
||||||
|
|
||||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
---
|
---
|
||||||
|
|
||||||
--- a/net/mac80211/rx.c
|
--- a/net/mac80211/rx.c
|
||||||
+++ b/net/mac80211/rx.c
|
+++ b/net/mac80211/rx.c
|
||||||
@@ -2731,6 +2731,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
@@ -2720,6 +2720,65 @@ ieee80211_deliver_skb(struct ieee80211_r
|
||||||
struct ieee80211_hdr hdr = {
|
}
|
||||||
.frame_control = cpu_to_le16(fc)
|
|
||||||
};
|
|
||||||
+ struct mhdr_cache_entry *entry = NULL;
|
|
||||||
struct ieee80211_hdr *fwd_hdr;
|
|
||||||
struct ieee80211s_hdr *mesh_hdr;
|
|
||||||
struct ieee80211_tx_info *info;
|
|
||||||
@@ -2788,7 +2789,12 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
|
||||||
return RX_DROP_MONITOR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
+#ifdef CPTCFG_MAC80211_MESH
|
||||||
+ if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6)
|
+static bool
|
||||||
+ entry = mesh_get_cached_hdr(sdata, mesh_hdr->eaddr1);
|
+ieee80211_rx_mesh_fast_forward(struct ieee80211_sub_if_data *sdata,
|
||||||
+ else if (!(mesh_hdr->flags & MESH_FLAGS_AE))
|
+ struct sk_buff *skb, int hdrlen)
|
||||||
+ entry = mesh_get_cached_hdr(sdata, eth->h_dest);
|
+{
|
||||||
|
+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||||
|
+ struct ieee80211_mesh_fast_tx *entry = NULL;
|
||||||
|
+ struct ieee80211s_hdr *mesh_hdr;
|
||||||
|
+ struct tid_ampdu_tx *tid_tx;
|
||||||
|
+ struct sta_info *sta;
|
||||||
|
+ struct ethhdr eth;
|
||||||
|
+ u8 tid;
|
||||||
+
|
+
|
||||||
+ if (!entry && (mesh_hdr->flags & MESH_FLAGS_AE)) {
|
+ mesh_hdr = (struct ieee80211s_hdr *)(skb->data + sizeof(eth));
|
||||||
struct mesh_path *mppath;
|
+ if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6)
|
||||||
char *proxied_addr;
|
+ entry = mesh_fast_tx_get(sdata, mesh_hdr->eaddr1);
|
||||||
bool update = false;
|
+ else if (!(mesh_hdr->flags & MESH_FLAGS_AE))
|
||||||
@@ -2862,11 +2868,23 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
+ entry = mesh_fast_tx_get(sdata, skb->data);
|
||||||
|
+ if (!entry)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ sta = rcu_dereference(entry->mpath->next_hop);
|
||||||
|
+ if (!sta)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ if (skb_linearize(skb))
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
|
||||||
|
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
|
||||||
|
+ if (tid_tx) {
|
||||||
|
+ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state))
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ if (tid_tx->timeout)
|
||||||
|
+ tid_tx->last_tx = jiffies;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ieee80211_aggr_check(sdata, sta, skb);
|
||||||
|
+
|
||||||
|
+ if (ieee80211_get_8023_tunnel_proto(skb->data + hdrlen,
|
||||||
|
+ &skb->protocol))
|
||||||
|
+ hdrlen += ETH_ALEN;
|
||||||
|
+ else
|
||||||
|
+ skb->protocol = htons(skb->len - hdrlen);
|
||||||
|
+ skb_set_network_header(skb, hdrlen + 2);
|
||||||
|
+
|
||||||
|
+ skb->dev = sdata->dev;
|
||||||
|
+ memcpy(ð, skb->data, ETH_HLEN - 2);
|
||||||
|
+ skb_pull(skb, sizeof(eth));
|
||||||
|
+ __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx,
|
||||||
|
+ eth.h_dest, eth.h_source);
|
||||||
|
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||||
|
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static ieee80211_rx_result
|
||||||
|
ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta,
|
||||||
|
struct sk_buff *skb)
|
||||||
|
@@ -2824,6 +2883,10 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
|
|
||||||
|
skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||||
|
|
||||||
|
+ if (!multicast &&
|
||||||
|
+ ieee80211_rx_mesh_fast_forward(sdata, skb, mesh_hdrlen))
|
||||||
|
+ return RX_QUEUED;
|
||||||
|
+
|
||||||
|
ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
|
||||||
|
eth->h_dest, eth->h_source);
|
||||||
|
hdrlen = ieee80211_hdrlen(hdr.frame_control);
|
||||||
|
@@ -2862,6 +2925,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||||
info->control.vif = &sdata->vif;
|
info->control.vif = &sdata->vif;
|
||||||
info->control.jiffies = jiffies;
|
info->control.jiffies = jiffies;
|
||||||
|
@ -44,23 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (multicast) {
|
if (multicast) {
|
||||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||||
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||||
/* update power mode indication when forwarding */
|
@@ -2883,7 +2947,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr);
|
|
||||||
+ } else if (entry) {
|
|
||||||
+ struct ieee80211_hdr *ehdr = (struct ieee80211_hdr *)entry->hdr;
|
|
||||||
+
|
|
||||||
+ ether_addr_copy(fwd_hdr->addr1, ehdr->addr1);
|
|
||||||
+ ether_addr_copy(fwd_hdr->addr2, sdata->vif.addr);
|
|
||||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
|
||||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
|
||||||
+ qos[0] = fwd_skb->priority;
|
|
||||||
+ qos[1] = ieee80211_get_qos_ctl(ehdr)[1];
|
|
||||||
+ __ieee80211_mesh_xmit_fast(sdata, entry, fwd_skb);
|
|
||||||
+ return RX_QUEUED;
|
|
||||||
} else if (!mesh_nexthop_lookup(sdata, fwd_skb)) {
|
|
||||||
/* mesh power mode flags updated in mesh_nexthop_lookup */
|
|
||||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
|
||||||
@@ -2883,7 +2901,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||||
|
@ -68,3 +104,29 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
ieee80211_add_pending_skb(local, fwd_skb);
|
ieee80211_add_pending_skb(local, fwd_skb);
|
||||||
|
|
||||||
rx_accept:
|
rx_accept:
|
||||||
|
--- a/net/mac80211/ieee80211_i.h
|
||||||
|
+++ b/net/mac80211/ieee80211_i.h
|
||||||
|
@@ -2018,6 +2018,8 @@ void __ieee80211_xmit_fast(struct ieee80
|
||||||
|
struct ieee80211_fast_tx *fast_tx,
|
||||||
|
struct sk_buff *skb, bool ampdu,
|
||||||
|
const u8 *da, const u8 *sa);
|
||||||
|
+void ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||||
|
+ struct sta_info *sta, struct sk_buff *skb);
|
||||||
|
|
||||||
|
/* HT */
|
||||||
|
void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
|
||||||
|
--- a/net/mac80211/tx.c
|
||||||
|
+++ b/net/mac80211/tx.c
|
||||||
|
@@ -1191,10 +1191,8 @@ static bool ieee80211_tx_prep_agg(struct
|
||||||
|
return queued;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void
|
||||||
|
-ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||||
|
- struct sta_info *sta,
|
||||||
|
- struct sk_buff *skb)
|
||||||
|
+void ieee80211_aggr_check(struct ieee80211_sub_if_data *sdata,
|
||||||
|
+ struct sta_info *sta, struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
struct rate_control_ref *ref = sdata->local->rate_ctrl;
|
||||||
|
u16 tid;
|
||||||
|
|
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/net/mac80211/rx.c
|
--- a/net/mac80211/rx.c
|
||||||
+++ b/net/mac80211/rx.c
|
+++ b/net/mac80211/rx.c
|
||||||
@@ -2847,6 +2847,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
@@ -2904,6 +2904,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
|
|
||||||
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||||||
return RX_DROP_UNUSABLE;
|
return RX_DROP_UNUSABLE;
|
||||||
|
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||||||
@@ -2861,7 +2864,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
@@ -2918,7 +2921,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
hdrlen += ETH_ALEN;
|
hdrlen += ETH_ALEN;
|
||||||
else
|
else
|
||||||
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
From: Felix Fietkau <nbd@nbd.name>
|
||||||
|
Date: Sun, 26 Feb 2023 20:30:20 +0100
|
||||||
|
Subject: [PATCH] wifi: mac80211: fix mesh path discovery based on unicast
|
||||||
|
packets
|
||||||
|
|
||||||
|
If a packet has reached its intended destination, it was bumped to the code
|
||||||
|
that accepts it, without first checking if a mesh_path needs to be created
|
||||||
|
based on the discovered source.
|
||||||
|
Fix this by moving the destination address check further down
|
||||||
|
|
||||||
|
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||||
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/net/mac80211/rx.c
|
||||||
|
+++ b/net/mac80211/rx.c
|
||||||
|
@@ -2824,17 +2824,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
|
mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
|
||||||
|
return RX_DROP_MONITOR;
|
||||||
|
|
||||||
|
- /* Frame has reached destination. Don't forward */
|
||||||
|
- if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||||
|
- goto rx_accept;
|
||||||
|
-
|
||||||
|
- if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||||
|
- if (is_multicast_ether_addr(eth->h_dest))
|
||||||
|
- goto rx_accept;
|
||||||
|
-
|
||||||
|
- return RX_DROP_MONITOR;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* forward packet */
|
||||||
|
if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||||
|
tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||||
|
@@ -2881,6 +2870,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||||
|
rcu_read_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* Frame has reached destination. Don't forward */
|
||||||
|
+ if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||||
|
+ goto rx_accept;
|
||||||
|
+
|
||||||
|
+ if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||||
|
+ if (is_multicast_ether_addr(eth->h_dest))
|
||||||
|
+ goto rx_accept;
|
||||||
|
+
|
||||||
|
+ return RX_DROP_MONITOR;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||||
|
|
||||||
|
if (!multicast &&
|
|
@ -87,7 +87,7 @@
|
||||||
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
||||||
--- a/net/mac80211/ieee80211_i.h
|
--- a/net/mac80211/ieee80211_i.h
|
||||||
+++ b/net/mac80211/ieee80211_i.h
|
+++ b/net/mac80211/ieee80211_i.h
|
||||||
@@ -1536,6 +1536,7 @@ struct ieee80211_local {
|
@@ -1535,6 +1535,7 @@ struct ieee80211_local {
|
||||||
int dynamic_ps_forced_timeout;
|
int dynamic_ps_forced_timeout;
|
||||||
|
|
||||||
int user_power_level; /* in dBm, for all interfaces */
|
int user_power_level; /* in dBm, for all interfaces */
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libcap
|
PKG_NAME:=libcap
|
||||||
PKG_VERSION:=2.66
|
PKG_VERSION:=2.67
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
|
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
|
||||||
PKG_HASH:=15c40ededb3003d70a283fe587a36b7d19c8b3b554e33f86129c059a4bb466b2
|
PKG_HASH:=ce9b22fdc271beb6dae7543da5f74cf24cb82e6848cfd088a5a069dec5ea5198
|
||||||
|
|
||||||
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
|
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
|
||||||
PKG_LICENSE:=GPL-2.0-only
|
PKG_LICENSE:=GPL-2.0-only
|
||||||
|
|
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
PKG_NAME:=ncurses
|
PKG_NAME:=ncurses
|
||||||
PKG_CPE_ID:=cpe:/a:gnu:ncurses
|
PKG_CPE_ID:=cpe:/a:gnu:ncurses
|
||||||
PKG_VERSION:=6.4
|
PKG_VERSION:=6.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
||||||
|
@ -123,6 +123,7 @@ ifneq ($(HOST_OS),FreeBSD)
|
||||||
)
|
)
|
||||||
for file in \
|
for file in \
|
||||||
a/ansi \
|
a/ansi \
|
||||||
|
a/alacritty \
|
||||||
d/dumb \
|
d/dumb \
|
||||||
l/linux \
|
l/linux \
|
||||||
r/rxvt \
|
r/rxvt \
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ustream-ssl
|
PKG_NAME:=ustream-ssl
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
|
||||||
PKG_SOURCE_DATE:=2022-12-08
|
PKG_SOURCE_DATE:=2023-02-25
|
||||||
PKG_SOURCE_VERSION:=9217ab46536353c7c792951b57163063f5ec7a3b
|
PKG_SOURCE_VERSION:=498f6e268d4d2b0ad33b430f4ba1abe397d31496
|
||||||
PKG_MIRROR_HASH:=cd4dc6a6c18290348b1f8b1c01df3320e4954dc46d714c797bef066f7a91248d
|
PKG_MIRROR_HASH:=a201d065dd613e30886c9f13a0851cec79538192cfe591b6f8ecd88724d55fb1
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=ISC
|
PKG_LICENSE:=ISC
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=netifd
|
PKG_NAME:=netifd
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||||
PKG_SOURCE_DATE:=2022-12-30
|
PKG_SOURCE_DATE:=2023-02-25
|
||||||
PKG_SOURCE_VERSION:=81c1fbcba2f27f687c2a471f341502d47679f401
|
PKG_SOURCE_VERSION:=463a1207f0766417866e2c28316e58a96f84370b
|
||||||
PKG_MIRROR_HASH:=41d19f2804759aa42708942e27116bec78b169abee639d97c2ec7f0f62fa7739
|
PKG_MIRROR_HASH:=1d407847282637f6e069b482368f2f8fc0126e66f3b37e4258e1fc1d19dd1ce5
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=dnsmasq
|
PKG_NAME:=dnsmasq
|
||||||
PKG_UPSTREAM_VERSION:=2.88
|
PKG_UPSTREAM_VERSION:=2.89
|
||||||
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
|
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
|
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
|
||||||
PKG_HASH:=23544deda10340c053bea6f15a93fed6ea7f5aaa85316bfc671ffa6d22fbc1b3
|
PKG_HASH:=02bd230346cf0b9d5909f5e151df168b2707103785eb616b56685855adebb609
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||||
|
|
||||||
--- a/src/dnsmasq.h
|
--- a/src/dnsmasq.h
|
||||||
+++ b/src/dnsmasq.h
|
+++ b/src/dnsmasq.h
|
||||||
@@ -1247,7 +1247,7 @@ extern struct daemon {
|
@@ -1248,7 +1248,7 @@ extern struct daemon {
|
||||||
int inotifyfd;
|
int inotifyfd;
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_LINUX_NETWORK)
|
#if defined(HAVE_LINUX_NETWORK)
|
||||||
|
@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||||
#elif defined(HAVE_BSD_NETWORK)
|
#elif defined(HAVE_BSD_NETWORK)
|
||||||
int dhcp_raw_fd, dhcp_icmp_fd, routefd;
|
int dhcp_raw_fd, dhcp_icmp_fd, routefd;
|
||||||
#endif
|
#endif
|
||||||
@@ -1452,9 +1452,6 @@ int read_write(int fd, unsigned char *pa
|
@@ -1453,9 +1453,6 @@ int read_write(int fd, unsigned char *pa
|
||||||
void close_fds(long max_fd, int spare1, int spare2, int spare3);
|
void close_fds(long max_fd, int spare1, int spare2, int spare3);
|
||||||
int wildcard_match(const char* wildcard, const char* match);
|
int wildcard_match(const char* wildcard, const char* match);
|
||||||
int wildcard_matchn(const char* wildcard, const char* match, int num);
|
int wildcard_matchn(const char* wildcard, const char* match, int num);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/dnsmasq.h
|
--- a/src/dnsmasq.h
|
||||||
+++ b/src/dnsmasq.h
|
+++ b/src/dnsmasq.h
|
||||||
@@ -1630,14 +1630,26 @@ void emit_dbus_signal(int action, struct
|
@@ -1631,14 +1631,26 @@ void emit_dbus_signal(int action, struct
|
||||||
|
|
||||||
/* ubus.c */
|
/* ubus.c */
|
||||||
#ifdef HAVE_UBUS
|
#ifdef HAVE_UBUS
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ethtool
|
PKG_NAME:=ethtool
|
||||||
PKG_VERSION:=6.1
|
PKG_VERSION:=6.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
|
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
|
||||||
PKG_HASH:=c41fc881ffa5a40432d2dd829eb44c64a49dee482e716baacf9262c64daa8f90
|
PKG_HASH:=86df0114064d4d73f6bf72bf03e85c33964a519ee0c1d1ba65005ad2d0e570e1
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
|
@ -1,465 +0,0 @@
|
||||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
To: netdev@vger.kernel.org
|
|
||||||
Subject: [PATCH ethtool v2 1/3] uapi: Bring in if.h
|
|
||||||
Date: Sat, 14 Jan 2023 08:34:09 -0800
|
|
||||||
|
|
||||||
Bring in if.h from commit eec517cdb481 ("net: Add IF_OPER_TESTING") as
|
|
||||||
well as uapi/linux/hdlc/ioctl.h. Ensure that we define all of the
|
|
||||||
necessary guards to provide updated definitions of ifmap, ifreq and
|
|
||||||
IFNAMSIZ. This resolves build issues with kernel headers < 4.11 which
|
|
||||||
lacked 2618be7dccf8739b89e1906b64bd8d551af351e6 ("uapi: fix linux/if.h
|
|
||||||
userspace compilation errors").
|
|
||||||
|
|
||||||
Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
|
|
||||||
Reported-by: Markus Mayer <mmayer@broadcom.com>
|
|
||||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
---
|
|
||||||
Makefile.am | 6 +-
|
|
||||||
internal.h | 7 +-
|
|
||||||
uapi/linux/hdlc/ioctl.h | 94 +++++++++++++
|
|
||||||
uapi/linux/if.h | 296 ++++++++++++++++++++++++++++++++++++++++
|
|
||||||
4 files changed, 397 insertions(+), 6 deletions(-)
|
|
||||||
create mode 100644 uapi/linux/hdlc/ioctl.h
|
|
||||||
create mode 100644 uapi/linux/if.h
|
|
||||||
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -7,7 +7,8 @@ EXTRA_DIST = LICENSE ethtool.8 ethtool.s
|
|
||||||
|
|
||||||
sbin_PROGRAMS = ethtool
|
|
||||||
ethtool_SOURCES = ethtool.c uapi/linux/ethtool.h internal.h \
|
|
||||||
- uapi/linux/net_tstamp.h rxclass.c common.c common.h \
|
|
||||||
+ uapi/linux/net_tstamp.h uapi/linux/if.h uapi/linux/hdlc/ioctl.h \
|
|
||||||
+ rxclass.c common.c common.h \
|
|
||||||
json_writer.c json_writer.h json_print.c json_print.h \
|
|
||||||
list.h
|
|
||||||
if ETHTOOL_ENABLE_PRETTY_DUMP
|
|
||||||
@@ -43,7 +44,8 @@ ethtool_SOURCES += \
|
|
||||||
netlink/desc-rtnl.c netlink/cable_test.c netlink/tunnels.c \
|
|
||||||
uapi/linux/ethtool_netlink.h \
|
|
||||||
uapi/linux/netlink.h uapi/linux/genetlink.h \
|
|
||||||
- uapi/linux/rtnetlink.h uapi/linux/if_link.h
|
|
||||||
+ uapi/linux/rtnetlink.h uapi/linux/if_link.h \
|
|
||||||
+ uapi/linux/if.h uapi/linux/hdlc/ioctl.h
|
|
||||||
AM_CPPFLAGS += @MNL_CFLAGS@
|
|
||||||
LDADD += @MNL_LIBS@
|
|
||||||
endif
|
|
||||||
--- a/internal.h
|
|
||||||
+++ b/internal.h
|
|
||||||
@@ -21,6 +21,9 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <endian.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
+#define __UAPI_DEF_IF_IFNAMSIZ 1
|
|
||||||
+#define __UAPI_DEF_IF_IFMAP 1
|
|
||||||
+#define __UAPI_DEF_IF_IFREQ 1
|
|
||||||
#include <linux/if.h>
|
|
||||||
|
|
||||||
#include "json_writer.h"
|
|
||||||
@@ -52,10 +55,6 @@ typedef int32_t s32;
|
|
||||||
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifndef ALTIFNAMSIZ
|
|
||||||
-#define ALTIFNAMSIZ 128
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#include <linux/ethtool.h>
|
|
||||||
#include <linux/net_tstamp.h>
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/uapi/linux/hdlc/ioctl.h
|
|
||||||
@@ -0,0 +1,94 @@
|
|
||||||
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
||||||
+#ifndef __HDLC_IOCTL_H__
|
|
||||||
+#define __HDLC_IOCTL_H__
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */
|
|
||||||
+
|
|
||||||
+#define CLOCK_DEFAULT 0 /* Default setting */
|
|
||||||
+#define CLOCK_EXT 1 /* External TX and RX clock - DTE */
|
|
||||||
+#define CLOCK_INT 2 /* Internal TX and RX clock - DCE */
|
|
||||||
+#define CLOCK_TXINT 3 /* Internal TX and external RX clock */
|
|
||||||
+#define CLOCK_TXFROMRX 4 /* TX clock derived from external RX clock */
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#define ENCODING_DEFAULT 0 /* Default setting */
|
|
||||||
+#define ENCODING_NRZ 1
|
|
||||||
+#define ENCODING_NRZI 2
|
|
||||||
+#define ENCODING_FM_MARK 3
|
|
||||||
+#define ENCODING_FM_SPACE 4
|
|
||||||
+#define ENCODING_MANCHESTER 5
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#define PARITY_DEFAULT 0 /* Default setting */
|
|
||||||
+#define PARITY_NONE 1 /* No parity */
|
|
||||||
+#define PARITY_CRC16_PR0 2 /* CRC16, initial value 0x0000 */
|
|
||||||
+#define PARITY_CRC16_PR1 3 /* CRC16, initial value 0xFFFF */
|
|
||||||
+#define PARITY_CRC16_PR0_CCITT 4 /* CRC16, initial 0x0000, ITU-T version */
|
|
||||||
+#define PARITY_CRC16_PR1_CCITT 5 /* CRC16, initial 0xFFFF, ITU-T version */
|
|
||||||
+#define PARITY_CRC32_PR0_CCITT 6 /* CRC32, initial value 0x00000000 */
|
|
||||||
+#define PARITY_CRC32_PR1_CCITT 7 /* CRC32, initial value 0xFFFFFFFF */
|
|
||||||
+
|
|
||||||
+#define LMI_DEFAULT 0 /* Default setting */
|
|
||||||
+#define LMI_NONE 1 /* No LMI, all PVCs are static */
|
|
||||||
+#define LMI_ANSI 2 /* ANSI Annex D */
|
|
||||||
+#define LMI_CCITT 3 /* ITU-T Annex A */
|
|
||||||
+#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */
|
|
||||||
+
|
|
||||||
+#ifndef __ASSEMBLY__
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int clock_rate; /* bits per second */
|
|
||||||
+ unsigned int clock_type; /* internal, external, TX-internal etc. */
|
|
||||||
+ unsigned short loopback;
|
|
||||||
+} sync_serial_settings; /* V.35, V.24, X.21 */
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int clock_rate; /* bits per second */
|
|
||||||
+ unsigned int clock_type; /* internal, external, TX-internal etc. */
|
|
||||||
+ unsigned short loopback;
|
|
||||||
+ unsigned int slot_map;
|
|
||||||
+} te1_settings; /* T1, E1 */
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned short encoding;
|
|
||||||
+ unsigned short parity;
|
|
||||||
+} raw_hdlc_proto;
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int t391;
|
|
||||||
+ unsigned int t392;
|
|
||||||
+ unsigned int n391;
|
|
||||||
+ unsigned int n392;
|
|
||||||
+ unsigned int n393;
|
|
||||||
+ unsigned short lmi;
|
|
||||||
+ unsigned short dce; /* 1 for DCE (network side) operation */
|
|
||||||
+} fr_proto;
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int dlci;
|
|
||||||
+} fr_proto_pvc; /* for creating/deleting FR PVCs */
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int dlci;
|
|
||||||
+ char master[IFNAMSIZ]; /* Name of master FRAD device */
|
|
||||||
+}fr_proto_pvc_info; /* for returning PVC information only */
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned int interval;
|
|
||||||
+ unsigned int timeout;
|
|
||||||
+} cisco_proto;
|
|
||||||
+
|
|
||||||
+typedef struct {
|
|
||||||
+ unsigned short dce; /* 1 for DCE (network side) operation */
|
|
||||||
+ unsigned int modulo; /* modulo (8 = basic / 128 = extended) */
|
|
||||||
+ unsigned int window; /* frame window size */
|
|
||||||
+ unsigned int t1; /* timeout t1 */
|
|
||||||
+ unsigned int t2; /* timeout t2 */
|
|
||||||
+ unsigned int n2; /* frame retry counter */
|
|
||||||
+} x25_hdlc_proto;
|
|
||||||
+
|
|
||||||
+/* PPP doesn't need any info now - supply length = 0 to ioctl */
|
|
||||||
+
|
|
||||||
+#endif /* __ASSEMBLY__ */
|
|
||||||
+#endif /* __HDLC_IOCTL_H__ */
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/uapi/linux/if.h
|
|
||||||
@@ -0,0 +1,296 @@
|
|
||||||
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
|
||||||
+/*
|
|
||||||
+ * INET An implementation of the TCP/IP protocol suite for the LINUX
|
|
||||||
+ * operating system. INET is implemented using the BSD Socket
|
|
||||||
+ * interface as the means of communication with the user level.
|
|
||||||
+ *
|
|
||||||
+ * Global definitions for the INET interface module.
|
|
||||||
+ *
|
|
||||||
+ * Version: @(#)if.h 1.0.2 04/18/93
|
|
||||||
+ *
|
|
||||||
+ * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988
|
|
||||||
+ * Ross Biro
|
|
||||||
+ * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License
|
|
||||||
+ * as published by the Free Software Foundation; either version
|
|
||||||
+ * 2 of the License, or (at your option) any later version.
|
|
||||||
+ */
|
|
||||||
+#ifndef _LINUX_IF_H
|
|
||||||
+#define _LINUX_IF_H
|
|
||||||
+
|
|
||||||
+#include <linux/libc-compat.h> /* for compatibility with glibc */
|
|
||||||
+#include <linux/types.h> /* for "__kernel_caddr_t" et al */
|
|
||||||
+#include <linux/socket.h> /* for "struct sockaddr" et al */
|
|
||||||
+ /* for "__user" et al */
|
|
||||||
+
|
|
||||||
+#include <sys/socket.h> /* for struct sockaddr. */
|
|
||||||
+
|
|
||||||
+#if __UAPI_DEF_IF_IFNAMSIZ
|
|
||||||
+#define IFNAMSIZ 16
|
|
||||||
+#endif /* __UAPI_DEF_IF_IFNAMSIZ */
|
|
||||||
+#define IFALIASZ 256
|
|
||||||
+#define ALTIFNAMSIZ 128
|
|
||||||
+#include <linux/hdlc/ioctl.h>
|
|
||||||
+
|
|
||||||
+/* For glibc compatibility. An empty enum does not compile. */
|
|
||||||
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \
|
|
||||||
+ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0
|
|
||||||
+/**
|
|
||||||
+ * enum net_device_flags - &struct net_device flags
|
|
||||||
+ *
|
|
||||||
+ * These are the &struct net_device flags, they can be set by drivers, the
|
|
||||||
+ * kernel and some can be triggered by userspace. Userspace can query and
|
|
||||||
+ * set these flags using userspace utilities but there is also a sysfs
|
|
||||||
+ * entry available for all dev flags which can be queried and set. These flags
|
|
||||||
+ * are shared for all types of net_devices. The sysfs entries are available
|
|
||||||
+ * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
|
|
||||||
+ * are annotated below, note that only a few flags can be toggled and some
|
|
||||||
+ * other flags are always preserved from the original net_device flags
|
|
||||||
+ * even if you try to set them via sysfs. Flags which are always preserved
|
|
||||||
+ * are kept under the flag grouping @IFF_VOLATILE. Flags which are __volatile__
|
|
||||||
+ * are annotated below as such.
|
|
||||||
+ *
|
|
||||||
+ * You should have a pretty good reason to be extending these flags.
|
|
||||||
+ *
|
|
||||||
+ * @IFF_UP: interface is up. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_BROADCAST: broadcast address valid. Volatile.
|
|
||||||
+ * @IFF_DEBUG: turn on debugging. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_LOOPBACK: is a loopback net. Volatile.
|
|
||||||
+ * @IFF_POINTOPOINT: interface is has p-p link. Volatile.
|
|
||||||
+ * @IFF_NOTRAILERS: avoid use of trailers. Can be toggled through sysfs.
|
|
||||||
+ * Volatile.
|
|
||||||
+ * @IFF_RUNNING: interface RFC2863 OPER_UP. Volatile.
|
|
||||||
+ * @IFF_NOARP: no ARP protocol. Can be toggled through sysfs. Volatile.
|
|
||||||
+ * @IFF_PROMISC: receive all packets. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_ALLMULTI: receive all multicast packets. Can be toggled through
|
|
||||||
+ * sysfs.
|
|
||||||
+ * @IFF_MASTER: master of a load balancer. Volatile.
|
|
||||||
+ * @IFF_SLAVE: slave of a load balancer. Volatile.
|
|
||||||
+ * @IFF_MULTICAST: Supports multicast. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_PORTSEL: can set media type. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_AUTOMEDIA: auto media select active. Can be toggled through sysfs.
|
|
||||||
+ * @IFF_DYNAMIC: dialup device with changing addresses. Can be toggled
|
|
||||||
+ * through sysfs.
|
|
||||||
+ * @IFF_LOWER_UP: driver signals L1 up. Volatile.
|
|
||||||
+ * @IFF_DORMANT: driver signals dormant. Volatile.
|
|
||||||
+ * @IFF_ECHO: echo sent packets. Volatile.
|
|
||||||
+ */
|
|
||||||
+enum net_device_flags {
|
|
||||||
+/* for compatibility with glibc net/if.h */
|
|
||||||
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
|
|
||||||
+ IFF_UP = 1<<0, /* sysfs */
|
|
||||||
+ IFF_BROADCAST = 1<<1, /* __volatile__ */
|
|
||||||
+ IFF_DEBUG = 1<<2, /* sysfs */
|
|
||||||
+ IFF_LOOPBACK = 1<<3, /* __volatile__ */
|
|
||||||
+ IFF_POINTOPOINT = 1<<4, /* __volatile__ */
|
|
||||||
+ IFF_NOTRAILERS = 1<<5, /* sysfs */
|
|
||||||
+ IFF_RUNNING = 1<<6, /* __volatile__ */
|
|
||||||
+ IFF_NOARP = 1<<7, /* sysfs */
|
|
||||||
+ IFF_PROMISC = 1<<8, /* sysfs */
|
|
||||||
+ IFF_ALLMULTI = 1<<9, /* sysfs */
|
|
||||||
+ IFF_MASTER = 1<<10, /* __volatile__ */
|
|
||||||
+ IFF_SLAVE = 1<<11, /* __volatile__ */
|
|
||||||
+ IFF_MULTICAST = 1<<12, /* sysfs */
|
|
||||||
+ IFF_PORTSEL = 1<<13, /* sysfs */
|
|
||||||
+ IFF_AUTOMEDIA = 1<<14, /* sysfs */
|
|
||||||
+ IFF_DYNAMIC = 1<<15, /* sysfs */
|
|
||||||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
|
|
||||||
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
|
|
||||||
+ IFF_LOWER_UP = 1<<16, /* __volatile__ */
|
|
||||||
+ IFF_DORMANT = 1<<17, /* __volatile__ */
|
|
||||||
+ IFF_ECHO = 1<<18, /* __volatile__ */
|
|
||||||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
|
|
||||||
+};
|
|
||||||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */
|
|
||||||
+
|
|
||||||
+/* for compatibility with glibc net/if.h */
|
|
||||||
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
|
|
||||||
+#define IFF_UP IFF_UP
|
|
||||||
+#define IFF_BROADCAST IFF_BROADCAST
|
|
||||||
+#define IFF_DEBUG IFF_DEBUG
|
|
||||||
+#define IFF_LOOPBACK IFF_LOOPBACK
|
|
||||||
+#define IFF_POINTOPOINT IFF_POINTOPOINT
|
|
||||||
+#define IFF_NOTRAILERS IFF_NOTRAILERS
|
|
||||||
+#define IFF_RUNNING IFF_RUNNING
|
|
||||||
+#define IFF_NOARP IFF_NOARP
|
|
||||||
+#define IFF_PROMISC IFF_PROMISC
|
|
||||||
+#define IFF_ALLMULTI IFF_ALLMULTI
|
|
||||||
+#define IFF_MASTER IFF_MASTER
|
|
||||||
+#define IFF_SLAVE IFF_SLAVE
|
|
||||||
+#define IFF_MULTICAST IFF_MULTICAST
|
|
||||||
+#define IFF_PORTSEL IFF_PORTSEL
|
|
||||||
+#define IFF_AUTOMEDIA IFF_AUTOMEDIA
|
|
||||||
+#define IFF_DYNAMIC IFF_DYNAMIC
|
|
||||||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
|
|
||||||
+
|
|
||||||
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
|
|
||||||
+#define IFF_LOWER_UP IFF_LOWER_UP
|
|
||||||
+#define IFF_DORMANT IFF_DORMANT
|
|
||||||
+#define IFF_ECHO IFF_ECHO
|
|
||||||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
|
|
||||||
+
|
|
||||||
+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
|
|
||||||
+ IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
|
||||||
+
|
|
||||||
+#define IF_GET_IFACE 0x0001 /* for querying only */
|
|
||||||
+#define IF_GET_PROTO 0x0002
|
|
||||||
+
|
|
||||||
+/* For definitions see hdlc.h */
|
|
||||||
+#define IF_IFACE_V35 0x1000 /* V.35 serial interface */
|
|
||||||
+#define IF_IFACE_V24 0x1001 /* V.24 serial interface */
|
|
||||||
+#define IF_IFACE_X21 0x1002 /* X.21 serial interface */
|
|
||||||
+#define IF_IFACE_T1 0x1003 /* T1 telco serial interface */
|
|
||||||
+#define IF_IFACE_E1 0x1004 /* E1 telco serial interface */
|
|
||||||
+#define IF_IFACE_SYNC_SERIAL 0x1005 /* can't be set by software */
|
|
||||||
+#define IF_IFACE_X21D 0x1006 /* X.21 Dual Clocking (FarSite) */
|
|
||||||
+
|
|
||||||
+/* For definitions see hdlc.h */
|
|
||||||
+#define IF_PROTO_HDLC 0x2000 /* raw HDLC protocol */
|
|
||||||
+#define IF_PROTO_PPP 0x2001 /* PPP protocol */
|
|
||||||
+#define IF_PROTO_CISCO 0x2002 /* Cisco HDLC protocol */
|
|
||||||
+#define IF_PROTO_FR 0x2003 /* Frame Relay protocol */
|
|
||||||
+#define IF_PROTO_FR_ADD_PVC 0x2004 /* Create FR PVC */
|
|
||||||
+#define IF_PROTO_FR_DEL_PVC 0x2005 /* Delete FR PVC */
|
|
||||||
+#define IF_PROTO_X25 0x2006 /* X.25 */
|
|
||||||
+#define IF_PROTO_HDLC_ETH 0x2007 /* raw HDLC, Ethernet emulation */
|
|
||||||
+#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 /* Create FR Ethernet-bridged PVC */
|
|
||||||
+#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 /* Delete FR Ethernet-bridged PVC */
|
|
||||||
+#define IF_PROTO_FR_PVC 0x200A /* for reading PVC status */
|
|
||||||
+#define IF_PROTO_FR_ETH_PVC 0x200B
|
|
||||||
+#define IF_PROTO_RAW 0x200C /* RAW Socket */
|
|
||||||
+
|
|
||||||
+/* RFC 2863 operational status */
|
|
||||||
+enum {
|
|
||||||
+ IF_OPER_UNKNOWN,
|
|
||||||
+ IF_OPER_NOTPRESENT,
|
|
||||||
+ IF_OPER_DOWN,
|
|
||||||
+ IF_OPER_LOWERLAYERDOWN,
|
|
||||||
+ IF_OPER_TESTING,
|
|
||||||
+ IF_OPER_DORMANT,
|
|
||||||
+ IF_OPER_UP,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* link modes */
|
|
||||||
+enum {
|
|
||||||
+ IF_LINK_MODE_DEFAULT,
|
|
||||||
+ IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
|
|
||||||
+ IF_LINK_MODE_TESTING, /* limit upward transition to testing */
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Device mapping structure. I'd just gone off and designed a
|
|
||||||
+ * beautiful scheme using only loadable modules with arguments
|
|
||||||
+ * for driver options and along come the PCMCIA people 8)
|
|
||||||
+ *
|
|
||||||
+ * Ah well. The get() side of this is good for WDSETUP, and it'll
|
|
||||||
+ * be handy for debugging things. The set side is fine for now and
|
|
||||||
+ * being very small might be worth keeping for clean configuration.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* for compatibility with glibc net/if.h */
|
|
||||||
+#if __UAPI_DEF_IF_IFMAP
|
|
||||||
+struct ifmap {
|
|
||||||
+ unsigned long mem_start;
|
|
||||||
+ unsigned long mem_end;
|
|
||||||
+ unsigned short base_addr;
|
|
||||||
+ unsigned char irq;
|
|
||||||
+ unsigned char dma;
|
|
||||||
+ unsigned char port;
|
|
||||||
+ /* 3 bytes spare */
|
|
||||||
+};
|
|
||||||
+#endif /* __UAPI_DEF_IF_IFMAP */
|
|
||||||
+
|
|
||||||
+struct if_settings {
|
|
||||||
+ unsigned int type; /* Type of physical device or protocol */
|
|
||||||
+ unsigned int size; /* Size of the data allocated by the caller */
|
|
||||||
+ union {
|
|
||||||
+ /* {atm/eth/dsl}_settings anyone ? */
|
|
||||||
+ raw_hdlc_proto *raw_hdlc;
|
|
||||||
+ cisco_proto *cisco;
|
|
||||||
+ fr_proto *fr;
|
|
||||||
+ fr_proto_pvc *fr_pvc;
|
|
||||||
+ fr_proto_pvc_info *fr_pvc_info;
|
|
||||||
+ x25_hdlc_proto *x25;
|
|
||||||
+
|
|
||||||
+ /* interface settings */
|
|
||||||
+ sync_serial_settings *sync;
|
|
||||||
+ te1_settings *te1;
|
|
||||||
+ } ifs_ifsu;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Interface request structure used for socket
|
|
||||||
+ * ioctl's. All interface ioctl's must have parameter
|
|
||||||
+ * definitions which begin with ifr_name. The
|
|
||||||
+ * remainder may be interface specific.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* for compatibility with glibc net/if.h */
|
|
||||||
+#if __UAPI_DEF_IF_IFREQ
|
|
||||||
+struct ifreq {
|
|
||||||
+#define IFHWADDRLEN 6
|
|
||||||
+ union
|
|
||||||
+ {
|
|
||||||
+ char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
|
|
||||||
+ } ifr_ifrn;
|
|
||||||
+
|
|
||||||
+ union {
|
|
||||||
+ struct sockaddr ifru_addr;
|
|
||||||
+ struct sockaddr ifru_dstaddr;
|
|
||||||
+ struct sockaddr ifru_broadaddr;
|
|
||||||
+ struct sockaddr ifru_netmask;
|
|
||||||
+ struct sockaddr ifru_hwaddr;
|
|
||||||
+ short ifru_flags;
|
|
||||||
+ int ifru_ivalue;
|
|
||||||
+ int ifru_mtu;
|
|
||||||
+ struct ifmap ifru_map;
|
|
||||||
+ char ifru_slave[IFNAMSIZ]; /* Just fits the size */
|
|
||||||
+ char ifru_newname[IFNAMSIZ];
|
|
||||||
+ void * ifru_data;
|
|
||||||
+ struct if_settings ifru_settings;
|
|
||||||
+ } ifr_ifru;
|
|
||||||
+};
|
|
||||||
+#endif /* __UAPI_DEF_IF_IFREQ */
|
|
||||||
+
|
|
||||||
+#define ifr_name ifr_ifrn.ifrn_name /* interface name */
|
|
||||||
+#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
|
|
||||||
+#define ifr_addr ifr_ifru.ifru_addr /* address */
|
|
||||||
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */
|
|
||||||
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
|
|
||||||
+#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
|
|
||||||
+#define ifr_flags ifr_ifru.ifru_flags /* flags */
|
|
||||||
+#define ifr_metric ifr_ifru.ifru_ivalue /* metric */
|
|
||||||
+#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
|
|
||||||
+#define ifr_map ifr_ifru.ifru_map /* device map */
|
|
||||||
+#define ifr_slave ifr_ifru.ifru_slave /* slave device */
|
|
||||||
+#define ifr_data ifr_ifru.ifru_data /* for use by interface */
|
|
||||||
+#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */
|
|
||||||
+#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */
|
|
||||||
+#define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */
|
|
||||||
+#define ifr_newname ifr_ifru.ifru_newname /* New name */
|
|
||||||
+#define ifr_settings ifr_ifru.ifru_settings /* Device/proto settings*/
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Structure used in SIOCGIFCONF request.
|
|
||||||
+ * Used to retrieve interface configuration
|
|
||||||
+ * for machine (useful for programs which
|
|
||||||
+ * must know all networks accessible).
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* for compatibility with glibc net/if.h */
|
|
||||||
+#if __UAPI_DEF_IF_IFCONF
|
|
||||||
+struct ifconf {
|
|
||||||
+ int ifc_len; /* size of buffer */
|
|
||||||
+ union {
|
|
||||||
+ char *ifcu_buf;
|
|
||||||
+ struct ifreq *ifcu_req;
|
|
||||||
+ } ifc_ifcu;
|
|
||||||
+};
|
|
||||||
+#endif /* __UAPI_DEF_IF_IFCONF */
|
|
||||||
+
|
|
||||||
+#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
|
|
||||||
+#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
|
|
||||||
+
|
|
||||||
+#endif /* _LINUX_IF_H */
|
|
|
@ -1,25 +0,0 @@
|
||||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
To: netdev@vger.kernel.org
|
|
||||||
Subject: [PATCH ethtool v2 2/3] netlink: Fix maybe uninitialized 'meters' variable
|
|
||||||
Date: Sat, 14 Jan 2023 08:34:10 -0800
|
|
||||||
|
|
||||||
GCC12 warns that 'meters' may be uninitialized, initialize it
|
|
||||||
accordingly.
|
|
||||||
|
|
||||||
Fixes: 9561db9b76f4 ("Add cable test TDR support")
|
|
||||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
---
|
|
||||||
netlink/parser.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/netlink/parser.c
|
|
||||||
+++ b/netlink/parser.c
|
|
||||||
@@ -237,7 +237,7 @@ int nl_parse_direct_m2cm(struct nl_conte
|
|
||||||
struct nl_msg_buff *msgbuff, void *dest)
|
|
||||||
{
|
|
||||||
const char *arg = *nlctx->argp;
|
|
||||||
- float meters;
|
|
||||||
+ float meters = 0.0;
|
|
||||||
uint32_t cm;
|
|
||||||
int ret;
|
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
To: netdev@vger.kernel.org
|
|
||||||
Subject: [PATCH ethtool v2 3/3] marvell.c: Fix build with musl-libc
|
|
||||||
Date: Sat, 14 Jan 2023 08:34:11 -0800
|
|
||||||
|
|
||||||
After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped
|
|
||||||
including net/if.h which resolved the proper defines to pull in
|
|
||||||
sys/types.h and provide a definition for u_int32_t. With musl-libc we
|
|
||||||
would need to define _GNU_SOURCE to ensure that sys/types.h does provide a
|
|
||||||
definition for u_int32_t.
|
|
||||||
|
|
||||||
Rather, just replace u_uint{16,32}_t with the more standard
|
|
||||||
uint{16,32}_t types from stdint.h
|
|
||||||
|
|
||||||
Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
|
|
||||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
---
|
|
||||||
marvell.c | 34 +++++++++++++++++-----------------
|
|
||||||
1 file changed, 17 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
--- a/marvell.c
|
|
||||||
+++ b/marvell.c
|
|
||||||
@@ -31,23 +31,23 @@ static void dump_timer(const char *name,
|
|
||||||
static void dump_queue(const char *name, const void *a, int rx)
|
|
||||||
{
|
|
||||||
struct desc {
|
|
||||||
- u_int32_t ctl;
|
|
||||||
- u_int32_t next;
|
|
||||||
- u_int32_t data_lo;
|
|
||||||
- u_int32_t data_hi;
|
|
||||||
- u_int32_t status;
|
|
||||||
- u_int32_t timestamp;
|
|
||||||
- u_int16_t csum2;
|
|
||||||
- u_int16_t csum1;
|
|
||||||
- u_int16_t csum2_start;
|
|
||||||
- u_int16_t csum1_start;
|
|
||||||
- u_int32_t addr_lo;
|
|
||||||
- u_int32_t addr_hi;
|
|
||||||
- u_int32_t count_lo;
|
|
||||||
- u_int32_t count_hi;
|
|
||||||
- u_int32_t byte_count;
|
|
||||||
- u_int32_t csr;
|
|
||||||
- u_int32_t flag;
|
|
||||||
+ uint32_t ctl;
|
|
||||||
+ uint32_t next;
|
|
||||||
+ uint32_t data_lo;
|
|
||||||
+ uint32_t data_hi;
|
|
||||||
+ uint32_t status;
|
|
||||||
+ uint32_t timestamp;
|
|
||||||
+ uint16_t csum2;
|
|
||||||
+ uint16_t csum1;
|
|
||||||
+ uint16_t csum2_start;
|
|
||||||
+ uint16_t csum1_start;
|
|
||||||
+ uint32_t addr_lo;
|
|
||||||
+ uint32_t addr_hi;
|
|
||||||
+ uint32_t count_lo;
|
|
||||||
+ uint32_t count_hi;
|
|
||||||
+ uint32_t byte_count;
|
|
||||||
+ uint32_t csr;
|
|
||||||
+ uint32_t flag;
|
|
||||||
};
|
|
||||||
const struct desc *d = a;
|
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=iproute2
|
PKG_NAME:=iproute2
|
||||||
PKG_VERSION:=6.1.0
|
PKG_VERSION:=6.2.0
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
||||||
PKG_HASH:=5ce12a0fec6b212725ef218735941b2dab76244db7e72646a76021b0537b43ab
|
PKG_HASH:=4d72730200ec5b2aabaa1a2f20553c6748292f065d9a154c7d5e22559df9fd62
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_BUILD_DEPENDS:=iptables
|
PKG_BUILD_DEPENDS:=iptables
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/netem/maketable.c
|
--- a/netem/maketable.c
|
||||||
+++ b/netem/maketable.c
|
+++ b/netem/maketable.c
|
||||||
@@ -10,7 +10,9 @@
|
@@ -11,7 +11,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
--- a/netem/normal.c
|
--- a/netem/normal.c
|
||||||
+++ b/netem/normal.c
|
+++ b/netem/normal.c
|
||||||
@@ -8,8 +8,12 @@
|
@@ -9,8 +9,12 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#define TABLEFACTOR NETEM_DIST_SCALE
|
#define TABLEFACTOR NETEM_DIST_SCALE
|
||||||
--- a/netem/pareto.c
|
--- a/netem/pareto.c
|
||||||
+++ b/netem/pareto.c
|
+++ b/netem/pareto.c
|
||||||
@@ -7,8 +7,12 @@
|
@@ -8,8 +8,12 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
#define TABLESIZE 16384
|
#define TABLESIZE 16384
|
||||||
--- a/netem/paretonormal.c
|
--- a/netem/paretonormal.c
|
||||||
+++ b/netem/paretonormal.c
|
+++ b/netem/paretonormal.c
|
||||||
@@ -14,10 +14,13 @@
|
@@ -15,10 +15,13 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/tc/Makefile
|
--- a/tc/Makefile
|
||||||
+++ b/tc/Makefile
|
+++ b/tc/Makefile
|
||||||
@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
|
@@ -127,6 +127,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
|
||||||
ifneq ($(IPT_LIB_DIR),)
|
ifneq ($(IPT_LIB_DIR),)
|
||||||
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
|
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/tc/q_fifo.c
|
--- a/tc/q_fifo.c
|
||||||
+++ b/tc/q_fifo.c
|
+++ b/tc/q_fifo.c
|
||||||
@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
@@ -90,5 +90,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
||||||
|
|
||||||
struct qdisc_util pfifo_fast_qdisc_util = {
|
struct qdisc_util pfifo_fast_qdisc_util = {
|
||||||
.id = "pfifo_fast",
|
.id = "pfifo_fast",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -412,7 +412,7 @@ check_tirpc()
|
@@ -411,7 +411,7 @@ check_tirpc()
|
||||||
|
|
||||||
check_mnl()
|
check_mnl()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -267,7 +267,7 @@ EOF
|
@@ -266,7 +266,7 @@ EOF
|
||||||
|
|
||||||
check_elf()
|
check_elf()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -470,7 +470,7 @@ EOF
|
@@ -469,7 +469,7 @@ EOF
|
||||||
|
|
||||||
check_cap()
|
check_cap()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -399,7 +399,7 @@ check_selinux()
|
@@ -398,7 +398,7 @@ check_selinux()
|
||||||
|
|
||||||
check_tirpc()
|
check_tirpc()
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
||||||
--- a/ip/ip.c
|
--- a/ip/ip.c
|
||||||
+++ b/ip/ip.c
|
+++ b/ip/ip.c
|
||||||
@@ -65,11 +65,17 @@ static void usage(void)
|
@@ -61,11 +61,17 @@ static void usage(void)
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
|
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
|
||||||
" ip [ -force ] -batch filename\n"
|
" ip [ -force ] -batch filename\n"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
||||||
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
||||||
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
||||||
@@ -92,37 +98,49 @@ static const struct cmd {
|
@@ -88,37 +94,49 @@ static const struct cmd {
|
||||||
int (*func)(int argc, char **argv);
|
int (*func)(int argc, char **argv);
|
||||||
} cmds[] = {
|
} cmds[] = {
|
||||||
{ "address", do_ipaddr },
|
{ "address", do_ipaddr },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/tc/Makefile
|
--- a/tc/Makefile
|
||||||
+++ b/tc/Makefile
|
+++ b/tc/Makefile
|
||||||
@@ -114,7 +114,7 @@ LDLIBS += -L. -lm
|
@@ -113,7 +113,7 @@ LDLIBS += -L. -lm
|
||||||
|
|
||||||
ifeq ($(SHARED_LIBS),y)
|
ifeq ($(SHARED_LIBS),y)
|
||||||
LDLIBS += -ldl
|
LDLIBS += -ldl
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TCLIB := tc_core.o
|
TCLIB := tc_core.o
|
||||||
@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
@@ -143,7 +143,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
||||||
all: tc $(TCSO)
|
all: tc $(TCSO)
|
||||||
|
|
||||||
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
libtc.a: $(TCLIB)
|
libtc.a: $(TCLIB)
|
||||||
$(QUIET_AR)$(AR) rcs $@ $^
|
$(QUIET_AR)$(AR) rcs $@ $^
|
||||||
@@ -166,6 +166,7 @@ install: all
|
@@ -165,6 +165,7 @@ install: all
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
|
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
|
||||||
rm -f emp_ematch.tab.*
|
rm -f emp_ematch.tab.*
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
q_atm.so: q_atm.c
|
q_atm.so: q_atm.c
|
||||||
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
||||||
@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
|
@@ -204,4 +205,16 @@ static-syms.h: $(wildcard *.c)
|
||||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
||||||
done > $@
|
done > $@
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY
|
||||||
|
|
||||||
--- a/ip/rtm_map.c
|
--- a/ip/rtm_map.c
|
||||||
+++ b/ip/rtm_map.c
|
+++ b/ip/rtm_map.c
|
||||||
@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf
|
@@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf
|
||||||
return "nat";
|
return "nat";
|
||||||
case RTN_XRESOLVE:
|
case RTN_XRESOLVE:
|
||||||
return "xresolve";
|
return "xresolve";
|
||||||
|
@ -20,7 +20,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY
|
||||||
default:
|
default:
|
||||||
snprintf(buf, len, "%d", id);
|
snprintf(buf, len, "%d", id);
|
||||||
return buf;
|
return buf;
|
||||||
@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg)
|
@@ -84,6 +86,8 @@ int rtnl_rtntype_a2n(int *id, char *arg)
|
||||||
res = RTN_UNICAST;
|
res = RTN_UNICAST;
|
||||||
else if (strcmp(arg, "throw") == 0)
|
else if (strcmp(arg, "throw") == 0)
|
||||||
res = RTN_THROW;
|
res = RTN_THROW;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -291,7 +291,7 @@ int main(int argc, char **argv) {
|
@@ -290,7 +290,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
local ret=$?
|
local ret=$?
|
||||||
|
|
||||||
rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
|
rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
|
||||||
@@ -309,7 +309,7 @@ int main(int argc, char **argv) {
|
@@ -308,7 +308,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
--- a/tc/Makefile
|
--- a/tc/Makefile
|
||||||
+++ b/tc/Makefile
|
+++ b/tc/Makefile
|
||||||
@@ -141,7 +141,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
@@ -140,7 +140,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
||||||
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -456,14 +456,8 @@ EOF
|
@@ -455,14 +455,8 @@ EOF
|
||||||
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
||||||
echo "no"
|
echo "no"
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -386,7 +386,7 @@ check_libbpf()
|
@@ -385,7 +385,7 @@ check_libbpf()
|
||||||
check_selinux()
|
check_selinux()
|
||||||
# SELinux is a compile time option in the ss utility
|
# SELinux is a compile time option in the ss utility
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
Date: Wed, 21 Dec 2022 23:26:28 +0100
|
|
||||||
Subject: [PATCH iproute2 v2] configure: Remove include <sys/stat.h>
|
|
||||||
|
|
||||||
The check_name_to_handle_at() function in the configure script is
|
|
||||||
including sys/stat.h. This include fails with glibc 2.36 like this:
|
|
||||||
````
|
|
||||||
In file included from /linux-5.15.84/include/uapi/linux/stat.h:5,
|
|
||||||
from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31,
|
|
||||||
from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465,
|
|
||||||
from config.YExfMc/name_to_handle_at_test.c:3:
|
|
||||||
/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp]
|
|
||||||
10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
|
|
||||||
| ^~~~~~~
|
|
||||||
In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5,
|
|
||||||
from /linux-5.15.84/include/uapi/linux/types.h:14:
|
|
||||||
/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
|
|
||||||
5 | #include <linux/compiler_types.h>
|
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
compilation terminated.
|
|
||||||
````
|
|
||||||
|
|
||||||
Just removing the include works, the manpage of name_to_handle_at() says
|
|
||||||
only fcntl.h is needed.
|
|
||||||
|
|
||||||
Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented")
|
|
||||||
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
|
|
||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
---
|
|
||||||
configure | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -215,7 +215,6 @@ check_name_to_handle_at()
|
|
||||||
cat >$TMPDIR/name_to_handle_at_test.c <<EOF
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include <sys/types.h>
|
|
||||||
-#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
|
@ -160,7 +160,6 @@
|
||||||
|
|
||||||
phy0: port8@8 {
|
phy0: port8@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <ð0>;
|
ethernet = <ð0>;
|
||||||
|
|
||||||
fixed-link {
|
fixed-link {
|
||||||
|
|
|
@ -99,7 +99,6 @@
|
||||||
|
|
||||||
port@5 {
|
port@5 {
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <ð0>;
|
ethernet = <ð0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
#include "ar9344.dtsi"
|
|
||||||
|
|
||||||
&spi {
|
&spi {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
@ -55,9 +53,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&wmac {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
qca,no-eeprom;
|
|
||||||
};
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "ar9344_mikrotik_routerboard.dtsi"
|
||||||
|
#include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "MikroTik RouterBOARD 911-2Hn/5Hn (Lite2/Lite5)";
|
||||||
|
compatible = "mikrotik,routerboard-911-lite", "qca,ar9344";
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&enable_gpio_20>;
|
||||||
|
|
||||||
|
lan {
|
||||||
|
label = "green:lan";
|
||||||
|
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
power {
|
||||||
|
label = "green:power";
|
||||||
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_user: user {
|
||||||
|
label = "green:user";
|
||||||
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinmux {
|
||||||
|
enable_gpio_20: pinmux_gpio_out_function5 {
|
||||||
|
pinctrl-single,bits = <0x14 0x0 0xff>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,55 +1,20 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "ar9344_mikrotik_routerboard.dtsi"
|
||||||
#include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
|
#include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
|
||||||
#include <dt-bindings/input/input.h>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "mikrotik,routerboard-lhg-5nd", "qca,ar9344";
|
compatible = "mikrotik,routerboard-lhg-5nd", "qca,ar9344";
|
||||||
model = "MikroTik RouterBOARD LHG 5nD";
|
model = "MikroTik RouterBOARD LHG 5nD";
|
||||||
|
};
|
||||||
|
|
||||||
aliases {
|
&leds {
|
||||||
led-boot = &led_user;
|
|
||||||
led-failsafe = &led_user;
|
|
||||||
led-running = &led_user;
|
|
||||||
led-upgrade = &led_user;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
power {
|
power {
|
||||||
label = "blue:power";
|
label = "blue:power";
|
||||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "on";
|
default-state = "on";
|
||||||
};
|
};
|
||||||
|
|
||||||
rssilow {
|
|
||||||
label = "green:rssilow";
|
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimediumlow {
|
|
||||||
label = "green:rssimediumlow";
|
|
||||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimedium {
|
|
||||||
label = "green:rssimedium";
|
|
||||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimediumhigh {
|
|
||||||
label = "green:rssimediumhigh";
|
|
||||||
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssihigh {
|
|
||||||
label = "green:rssihigh";
|
|
||||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led_user: user {
|
led_user: user {
|
||||||
label = "white:user";
|
label = "white:user";
|
||||||
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||||
|
@ -59,33 +24,4 @@
|
||||||
label = "green:lan";
|
label = "green:lan";
|
||||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
keys {
|
|
||||||
compatible = "gpio-keys";
|
|
||||||
|
|
||||||
reset {
|
|
||||||
label = "reset";
|
|
||||||
linux,code = <KEY_RESTART>;
|
|
||||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
|
||||||
debounce-interval = <60>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ð0 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
phy-handle = <&swphy0>;
|
|
||||||
|
|
||||||
gmac-config {
|
|
||||||
device = <&gmac>;
|
|
||||||
switch-phy-swap = <1>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ð1 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
compatible = "syscon", "simple-mfd";
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,185 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
|
||||||
|
|
||||||
#include "ar9344.dtsi"
|
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
|
||||||
#include <dt-bindings/input/input.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "mikrotik,routerboard-sxt-5n", "qca,ar9344";
|
|
||||||
model = "MikroTik SXT 5N platform";
|
|
||||||
|
|
||||||
aliases {
|
|
||||||
led-boot = &led_user;
|
|
||||||
led-failsafe = &led_user;
|
|
||||||
led-running = &led_user;
|
|
||||||
led-upgrade = &led_user;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
power {
|
|
||||||
label = "green:power";
|
|
||||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
|
||||||
default-state = "on";
|
|
||||||
};
|
|
||||||
|
|
||||||
rssilow {
|
|
||||||
label = "green:rssilow";
|
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimediumlow {
|
|
||||||
label = "green:rssimediumlow";
|
|
||||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimedium {
|
|
||||||
label = "green:rssimedium";
|
|
||||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssimediumhigh {
|
|
||||||
label = "green:rssimediumhigh";
|
|
||||||
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssihigh {
|
|
||||||
label = "green:rssihigh";
|
|
||||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led_user: user {
|
|
||||||
label = "green:user";
|
|
||||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keys {
|
|
||||||
compatible = "gpio-keys";
|
|
||||||
|
|
||||||
reset {
|
|
||||||
label = "reset";
|
|
||||||
linux,code = <KEY_RESTART>;
|
|
||||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
|
||||||
debounce-interval = <60>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gpio-export {
|
|
||||||
compatible = "gpio-export";
|
|
||||||
|
|
||||||
gpio_nand_power {
|
|
||||||
gpio-export,name = "sxt5n:power:nand";
|
|
||||||
gpio-export,output = <0>;
|
|
||||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
beeper {
|
|
||||||
compatible = "gpio-beeper";
|
|
||||||
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
flash@0 {
|
|
||||||
compatible = "jedec,spi-nor";
|
|
||||||
reg = <0>;
|
|
||||||
spi-max-frequency = <40000000>;
|
|
||||||
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
partition@0 {
|
|
||||||
label = "RouterBoot";
|
|
||||||
reg = <0x0 0x20000>;
|
|
||||||
compatible = "mikrotik,routerboot-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
partition@0 {
|
|
||||||
label = "bootloader1";
|
|
||||||
reg = <0x0 0x0>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
hard_config {
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
bios {
|
|
||||||
size = <0x1000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
soft_config {
|
|
||||||
};
|
|
||||||
|
|
||||||
partition@10000 {
|
|
||||||
label = "bootloader2";
|
|
||||||
reg = <0x10000 0x10000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&nand {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
nand-ecc-mode = "soft";
|
|
||||||
qca,nand-swap-dma;
|
|
||||||
qca,nand-scan-fixup;
|
|
||||||
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
partition@0 {
|
|
||||||
label = "booter";
|
|
||||||
reg = <0x0000000 0x0040000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
partition@40000 {
|
|
||||||
label = "kernel";
|
|
||||||
reg = <0x0040000 0x03c0000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
partition@400000 {
|
|
||||||
label = "ubi";
|
|
||||||
reg = <0x0400000 0x7c00000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ð0 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
phy-handle = <&swphy0>;
|
|
||||||
|
|
||||||
gmac-config {
|
|
||||||
device = <&gmac>;
|
|
||||||
switch-phy-swap = <1>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ð1 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
compatible = "syscon", "simple-mfd";
|
|
||||||
};
|
|
||||||
|
|
||||||
&wmac {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
qca,no-eeprom;
|
|
||||||
};
|
|
|
@ -1,8 +1,114 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
#include "ar9344_mikrotik_routerboard-sxt-5n.dtsi"
|
#include "ar9344_mikrotik_routerboard.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "mikrotik,routerboard-sxt-5nd-r2", "qca,ar9344";
|
compatible = "mikrotik,routerboard-sxt-5nd-r2", "qca,ar9344";
|
||||||
model = "MikroTik RouterBOARD SXT 5nD r2 (SXT Lite5)";
|
model = "MikroTik RouterBOARD SXT 5nD r2 (SXT Lite5)";
|
||||||
|
|
||||||
|
gpio-export {
|
||||||
|
compatible = "gpio-export";
|
||||||
|
|
||||||
|
gpio_nand_power {
|
||||||
|
gpio-export,name = "sxt5n:power:nand";
|
||||||
|
gpio-export,output = <0>;
|
||||||
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
beeper {
|
||||||
|
compatible = "gpio-beeper";
|
||||||
|
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&leds {
|
||||||
|
power {
|
||||||
|
label = "green:power";
|
||||||
|
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_user: user {
|
||||||
|
label = "green:user";
|
||||||
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <40000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "RouterBoot";
|
||||||
|
reg = <0x0 0x20000>;
|
||||||
|
compatible = "mikrotik,routerboot-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "bootloader1";
|
||||||
|
reg = <0x0 0x0>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
hard_config {
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
bios {
|
||||||
|
size = <0x1000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
soft_config {
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@10000 {
|
||||||
|
label = "bootloader2";
|
||||||
|
reg = <0x10000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&nand {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nand-ecc-mode = "soft";
|
||||||
|
qca,nand-swap-dma;
|
||||||
|
qca,nand-scan-fixup;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "booter";
|
||||||
|
reg = <0x0000000 0x0040000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "kernel";
|
||||||
|
reg = <0x0040000 0x03c0000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@400000 {
|
||||||
|
label = "ubi";
|
||||||
|
reg = <0x0400000 0x7c00000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
78
target/linux/ath79/dts/ar9344_mikrotik_routerboard.dtsi
Normal file
78
target/linux/ath79/dts/ar9344_mikrotik_routerboard.dtsi
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "ar9344.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_user;
|
||||||
|
led-failsafe = &led_user;
|
||||||
|
led-running = &led_user;
|
||||||
|
led-upgrade = &led_user;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds: leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
rssilow {
|
||||||
|
label = "green:rssilow";
|
||||||
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssimediumlow {
|
||||||
|
label = "green:rssimediumlow";
|
||||||
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssimedium {
|
||||||
|
label = "green:rssimedium";
|
||||||
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssimediumhigh {
|
||||||
|
label = "green:rssimediumhigh";
|
||||||
|
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssihigh {
|
||||||
|
label = "green:rssihigh";
|
||||||
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy-handle = <&swphy0>;
|
||||||
|
|
||||||
|
gmac-config {
|
||||||
|
device = <&gmac>;
|
||||||
|
switch-phy-swap = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð1 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
compatible = "syscon", "simple-mfd";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
qca,no-eeprom;
|
||||||
|
};
|
29
target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts
Normal file
29
target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor-nand.dts
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qca9563_glinet_gl-x1200.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "glinet,gl-x1200-nor-nand", "qca,qca9563";
|
||||||
|
model = "GL.iNet GL-X1200 (NOR/NAND)";
|
||||||
|
};
|
||||||
|
|
||||||
|
&nor_partitions {
|
||||||
|
partition@60000 {
|
||||||
|
label = "kernel";
|
||||||
|
reg = <0x060000 0x400000>;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* U-Boot bootcmd is "bootm 0x9f060000".
|
||||||
|
* So this might be possible to resize in the future.
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@460000 {
|
||||||
|
label = "nor_reserved";
|
||||||
|
reg = <0x460000 0xba0000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&nand_ubi {
|
||||||
|
label = "ubi";
|
||||||
|
};
|
16
target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts
Normal file
16
target/linux/ath79/dts/qca9563_glinet_gl-x1200-nor.dts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qca9563_glinet_gl-x1200.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "glinet,gl-x1200-nor", "qca,qca9563";
|
||||||
|
model = "GL.iNet GL-X1200 (NOR)";
|
||||||
|
};
|
||||||
|
|
||||||
|
&nor_partitions {
|
||||||
|
partition@60000 {
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x060000 0xfa0000>;
|
||||||
|
};
|
||||||
|
};
|
209
target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi
Normal file
209
target/linux/ath79/dts/qca9563_glinet_gl-x1200.dtsi
Normal file
|
@ -0,0 +1,209 @@
|
||||||
|
// 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>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_system;
|
||||||
|
led-failsafe = &led_system;
|
||||||
|
led-running = &led_system;
|
||||||
|
led-upgrade = &led_system;
|
||||||
|
label-mac-device = ð0;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&jtag_disable_pins>;
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_system: system {
|
||||||
|
label = "red:system";
|
||||||
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||||
|
default-state = "keep";
|
||||||
|
};
|
||||||
|
|
||||||
|
wlan2g {
|
||||||
|
label = "green:wlan2g";
|
||||||
|
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
wlan5g {
|
||||||
|
label = "green:wlan5g";
|
||||||
|
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio-export {
|
||||||
|
compatible = "gpio-export";
|
||||||
|
|
||||||
|
gpio_modem1_power {
|
||||||
|
gpio-export,name = "gl-x1200:4g1:power";
|
||||||
|
gpio-export,output = <0>;
|
||||||
|
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio_modem2_power {
|
||||||
|
gpio-export,name = "gl-x1200:4g2:power";
|
||||||
|
gpio-export,output = <0>;
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <25000000>;
|
||||||
|
|
||||||
|
nor_partitions: partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x000000 0x040000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x040000 0x010000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@50000 {
|
||||||
|
label = "art";
|
||||||
|
reg = <0x050000 0x010000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
calibration_ath9k: calibration@1000 {
|
||||||
|
reg = <0x1000 0x440>;
|
||||||
|
};
|
||||||
|
|
||||||
|
calibration_ath10k: calibration@5000 {
|
||||||
|
reg = <0x5000 0x2f20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_art_0: macaddr@0 {
|
||||||
|
reg = <0x0 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_art_1002: macaddr@1002 {
|
||||||
|
reg = <0x1002 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_art_5006: macaddr@5006 {
|
||||||
|
reg = <0x5006 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Firmware / Kernel flash type specific */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flash@1 {
|
||||||
|
compatible = "spi-nand";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <25000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
nand_ubi: partition@0 {
|
||||||
|
label = "nand_ubi";
|
||||||
|
reg = <0x000000 0x8000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy-handle = <&phy0>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio {
|
||||||
|
usb_vbus {
|
||||||
|
gpio-hog;
|
||||||
|
gpios = <7 GPIO_ACTIVE_HIGH>;
|
||||||
|
output-high;
|
||||||
|
line-name = "usb-vbus";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
phy-mode = "sgmii";
|
||||||
|
qca,ar8327-initvals = <
|
||||||
|
0x04 0x00080080 /* PORT0 PAD MODE CTRL */
|
||||||
|
0x7c 0x0000007e /* PORT0_STATUS */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
wifi@0,0 {
|
||||||
|
compatible = "qcom,ath10k";
|
||||||
|
reg = <0 0 0 0 0>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_5006>, <&calibration_ath10k>;
|
||||||
|
nvmem-cell-names = "mac-address", "pre-calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_phy0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_phy1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_art_1002>, <&calibration_ath9k>;
|
||||||
|
nvmem-cell-names = "mac-address", "calibration";
|
||||||
|
};
|
|
@ -9,6 +9,16 @@ define Device/mikrotik_routerboard-493g
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += mikrotik_routerboard-493g
|
TARGET_DEVICES += mikrotik_routerboard-493g
|
||||||
|
|
||||||
|
define Device/mikrotik_routerboard-911-lite
|
||||||
|
$(Device/mikrotik_nor)
|
||||||
|
SOC := ar9344
|
||||||
|
DEVICE_MODEL := RouterBOARD 911 Lite2/Lite5 (2Hn/5Hn)
|
||||||
|
DEVICE_PACKAGES += rssileds
|
||||||
|
IMAGE_SIZE := 16256k
|
||||||
|
SUPPORTED_DEVICES += rb-911-2hn rb-911-5hn
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += mikrotik_routerboard-911-lite
|
||||||
|
|
||||||
define Device/mikrotik_routerboard-912uag-2hpnd
|
define Device/mikrotik_routerboard-912uag-2hpnd
|
||||||
$(Device/mikrotik_nand)
|
$(Device/mikrotik_nand)
|
||||||
SOC := ar9342
|
SOC := ar9342
|
||||||
|
|
|
@ -212,6 +212,35 @@ define Device/glinet_gl-xe300
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += glinet_gl-xe300
|
TARGET_DEVICES += glinet_gl-xe300
|
||||||
|
|
||||||
|
define Device/glinet_gl-x1200-common
|
||||||
|
SOC := qca9563
|
||||||
|
DEVICE_VENDOR := GL.iNet
|
||||||
|
DEVICE_MODEL := GL-X1200
|
||||||
|
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct-htt kmod-usb2 \
|
||||||
|
kmod-usb-storage block-mount kmod-usb-net-qmi-wwan uqmi
|
||||||
|
IMAGE_SIZE := 16000k
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Device/glinet_gl-x1200-nor-nand
|
||||||
|
$(Device/glinet_gl-x1200-common)
|
||||||
|
DEVICE_VARIANT := NOR/NAND
|
||||||
|
KERNEL_SIZE := 4096k
|
||||||
|
IMAGE_SIZE := 131072k
|
||||||
|
PAGESIZE := 2048
|
||||||
|
VID_HDR_OFFSET := 2048
|
||||||
|
BLOCKSIZE := 128k
|
||||||
|
IMAGES += factory.img
|
||||||
|
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||||
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += glinet_gl-x1200-nor-nand
|
||||||
|
|
||||||
|
define Device/glinet_gl-x1200-nor
|
||||||
|
$(Device/glinet_gl-x1200-common)
|
||||||
|
DEVICE_VARIANT := NOR
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += glinet_gl-x1200-nor
|
||||||
|
|
||||||
define Device/linksys_ea4500-v3
|
define Device/linksys_ea4500-v3
|
||||||
SOC := qca9558
|
SOC := qca9558
|
||||||
DEVICE_VENDOR := Linksys
|
DEVICE_VENDOR := Linksys
|
||||||
|
|
|
@ -6,6 +6,16 @@ board_config_update
|
||||||
board=$(board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
mikrotik,routerboard-911-lite|\
|
||||||
|
mikrotik,routerboard-lhg-5nd)
|
||||||
|
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
||||||
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||||
|
ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100"
|
||||||
|
ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "20" "100"
|
||||||
|
ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "40" "100"
|
||||||
|
ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100"
|
||||||
|
ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100"
|
||||||
|
;;
|
||||||
mikrotik,routerboard-951ui-2nd|\
|
mikrotik,routerboard-951ui-2nd|\
|
||||||
mikrotik,routerboard-952ui-5ac2nd)
|
mikrotik,routerboard-952ui-5ac2nd)
|
||||||
ucidef_set_led_netdev "port1" "port1" "green:port1" "eth1"
|
ucidef_set_led_netdev "port1" "port1" "green:port1" "eth1"
|
||||||
|
@ -19,15 +29,6 @@ mikrotik,routerboard-mapl-2nd|\
|
||||||
mikrotik,routerboard-wap-2nd)
|
mikrotik,routerboard-wap-2nd)
|
||||||
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
||||||
;;
|
;;
|
||||||
mikrotik,routerboard-lhg-5nd)
|
|
||||||
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
|
||||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
||||||
ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100"
|
|
||||||
ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "20" "100"
|
|
||||||
ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "40" "100"
|
|
||||||
ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100"
|
|
||||||
ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100"
|
|
||||||
;;
|
|
||||||
mikrotik,routerboard-map-2nd)
|
mikrotik,routerboard-map-2nd)
|
||||||
ucidef_set_led_netdev "eth_1" "eth_1" "green:eth_1" "eth1"
|
ucidef_set_led_netdev "eth_1" "eth_1" "green:eth_1" "eth1"
|
||||||
ucidef_set_led_switch "eth_2" "eth_2" "green:eth_2" "switch0" "0x4"
|
ucidef_set_led_switch "eth_2" "eth_2" "green:eth_2" "switch0" "0x4"
|
||||||
|
|
|
@ -14,6 +14,7 @@ ath79_setup_interfaces()
|
||||||
ucidef_add_switch "switch1" \
|
ucidef_add_switch "switch1" \
|
||||||
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
||||||
;;
|
;;
|
||||||
|
mikrotik,routerboard-911-lite|\
|
||||||
mikrotik,routerboard-912uag-2hpnd|\
|
mikrotik,routerboard-912uag-2hpnd|\
|
||||||
mikrotik,routerboard-lhg-2nd|\
|
mikrotik,routerboard-lhg-2nd|\
|
||||||
mikrotik,routerboard-lhg-5nd|\
|
mikrotik,routerboard-lhg-5nd|\
|
||||||
|
@ -52,6 +53,7 @@ ath79_setup_macs()
|
||||||
local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
|
local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
mikrotik,routerboard-911-lite|\
|
||||||
mikrotik,routerboard-912uag-2hpnd|\
|
mikrotik,routerboard-912uag-2hpnd|\
|
||||||
mikrotik,routerboard-lhg-2nd|\
|
mikrotik,routerboard-lhg-2nd|\
|
||||||
mikrotik,routerboard-lhg-5nd|\
|
mikrotik,routerboard-lhg-5nd|\
|
||||||
|
|
|
@ -23,6 +23,7 @@ board=$(board_name)
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
||||||
case $board in
|
case $board in
|
||||||
|
mikrotik,routerboard-911-lite|\
|
||||||
mikrotik,routerboard-912uag-2hpnd|\
|
mikrotik,routerboard-912uag-2hpnd|\
|
||||||
mikrotik,routerboard-lhg-2nd|\
|
mikrotik,routerboard-lhg-2nd|\
|
||||||
mikrotik,routerboard-lhg-5nd|\
|
mikrotik,routerboard-lhg-5nd|\
|
||||||
|
|
|
@ -30,6 +30,11 @@ ath79_setup_interfaces()
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "4:lan"
|
"0@eth0" "4:lan"
|
||||||
;;
|
;;
|
||||||
|
glinet,gl-x1200-nor|\
|
||||||
|
glinet,gl-x1200-nor-nand)
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
|
||||||
|
;;
|
||||||
linksys,ea4500-v3)
|
linksys,ea4500-v3)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
|
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
|
||||||
|
@ -88,6 +93,11 @@ ath79_setup_macs()
|
||||||
wan_mac=$(mtd_get_mac_binary art 0x0)
|
wan_mac=$(mtd_get_mac_binary art 0x0)
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
|
glinet,gl-x1200-nor|\
|
||||||
|
glinet,gl-x1200-nor-nand)
|
||||||
|
wan_mac=$(mtd_get_mac_binary art 0x0)
|
||||||
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||||
|
;;
|
||||||
netgear,wndr3700-v4|\
|
netgear,wndr3700-v4|\
|
||||||
netgear,wndr4300|\
|
netgear,wndr4300|\
|
||||||
netgear,wndr4300sw|\
|
netgear,wndr4300sw|\
|
||||||
|
|
|
@ -19,7 +19,9 @@ platform_do_upgrade() {
|
||||||
glinet_nand_nor_do_upgrade "$1"
|
glinet_nand_nor_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
glinet,gl-ar750s-nor|\
|
glinet,gl-ar750s-nor|\
|
||||||
glinet,gl-ar750s-nor-nand)
|
glinet,gl-ar750s-nor-nand|\
|
||||||
|
glinet,gl-x1200-nor|\
|
||||||
|
glinet,gl-x1200-nor-nand)
|
||||||
nand_nor_do_upgrade "$1"
|
nand_nor_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -16,6 +16,9 @@ bcm53xx_setup_interfaces()
|
||||||
asus,rt-ac88u)
|
asus,rt-ac88u)
|
||||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
|
||||||
;;
|
;;
|
||||||
|
dlink,dwl-8610ap)
|
||||||
|
ucidef_set_interface_lan "eth0 eth1" "dhcp"
|
||||||
|
;;
|
||||||
linksys,panamera)
|
linksys,panamera)
|
||||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -105,6 +105,22 @@ define Build/seama-nand
|
||||||
-i $@.entity
|
-i $@.entity
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/dwl8610ap-image
|
||||||
|
mkdir -p $@.tmptar
|
||||||
|
# The DWL8610AP pretends to be a Broadcom reference design
|
||||||
|
echo "bcm953012er" > $@.tmptar/board
|
||||||
|
echo "LVL7" > $@.tmptar/model
|
||||||
|
# Something high beyond what D-Link has put out
|
||||||
|
echo "5.0.0.0" > $@.tmptar/version
|
||||||
|
# Create rootfs.bin, this is just a NAND image including everything
|
||||||
|
cp $@ $@.tmptar/rootfs.bin
|
||||||
|
# Hash the rootfs.bin
|
||||||
|
cat $@.tmptar/rootfs.bin | md5sum > $@.tmptar/rootfs.md5
|
||||||
|
cd $@.tmptar && tar -c -f $@.new *
|
||||||
|
rm -rf $@.tmptar
|
||||||
|
mv $@.new $@
|
||||||
|
endef
|
||||||
|
|
||||||
DEVICE_VARS += ASUS_PRODUCTID
|
DEVICE_VARS += ASUS_PRODUCTID
|
||||||
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
||||||
DEVICE_VARS += SIGNATURE
|
DEVICE_VARS += SIGNATURE
|
||||||
|
@ -250,6 +266,15 @@ define Device/dlink_dir-885l
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += dlink_dir-885l
|
TARGET_DEVICES += dlink_dir-885l
|
||||||
|
|
||||||
|
define Device/dlink_dwl-8610ap
|
||||||
|
DEVICE_VENDOR := D-Link
|
||||||
|
DEVICE_MODEL := DWL-8610AP
|
||||||
|
DEVICE_PACKAGES := $(B43)
|
||||||
|
IMAGES := factory.tar
|
||||||
|
IMAGE/factory.tar := append-ubi | trx-nand | dwl8610ap-image
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += dlink_dwl-8610ap
|
||||||
|
|
||||||
define Device/linksys_ea6300-v1
|
define Device/linksys_ea6300-v1
|
||||||
DEVICE_VENDOR := Linksys
|
DEVICE_VENDOR := Linksys
|
||||||
DEVICE_MODEL := EA6300
|
DEVICE_MODEL := EA6300
|
||||||
|
|
|
@ -400,7 +400,6 @@
|
||||||
|
|
||||||
port@8 {
|
port@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ðernet>;
|
ethernet = <ðernet>;
|
||||||
|
|
|
@ -521,7 +521,6 @@
|
||||||
|
|
||||||
port@8 {
|
port@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ðernet>;
|
ethernet = <ðernet>;
|
||||||
|
|
|
@ -418,7 +418,6 @@
|
||||||
|
|
||||||
port@8 {
|
port@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ðernet>;
|
ethernet = <ðernet>;
|
||||||
|
|
|
@ -515,7 +515,6 @@
|
||||||
|
|
||||||
port@8 {
|
port@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ðernet>;
|
ethernet = <ðernet>;
|
||||||
|
|
|
@ -529,7 +529,6 @@
|
||||||
|
|
||||||
port@8 {
|
port@8 {
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
label = "cpu";
|
|
||||||
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ðernet>;
|
ethernet = <ðernet>;
|
||||||
|
|
|
@ -100,6 +100,16 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
regulator-usb-vbus {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "USB_VBUS";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
gpio = <&tlmm 68 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,7 +278,7 @@
|
||||||
pins = "gpio55", "gpio56", "gpio57",
|
pins = "gpio55", "gpio56", "gpio57",
|
||||||
"gpio60", "gpio62", "gpio63",
|
"gpio60", "gpio62", "gpio63",
|
||||||
"gpio64", "gpio65", "gpio66",
|
"gpio64", "gpio65", "gpio66",
|
||||||
"gpio67", "gpio68", "gpio69";
|
"gpio67", "gpio69";
|
||||||
function = "qpic";
|
function = "qpic";
|
||||||
bias-pull-down;
|
bias-pull-down;
|
||||||
};
|
};
|
||||||
|
|
|
@ -112,7 +112,6 @@
|
||||||
|
|
||||||
port@5 {
|
port@5 {
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
label = "cpu";
|
|
||||||
phy-mode = "rgmii-id";
|
phy-mode = "rgmii-id";
|
||||||
ethernet = <ð0port>;
|
ethernet = <ð0port>;
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,6 @@
|
||||||
|
|
||||||
port@5 {
|
port@5 {
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <ð0port>;
|
ethernet = <ð0port>;
|
||||||
fixed-link {
|
fixed-link {
|
||||||
speed = <1000>;
|
speed = <1000>;
|
||||||
|
|
|
@ -447,7 +447,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <0x6>;
|
reg = <0x6>;
|
||||||
label = "cpu";
|
|
||||||
phy-mode = "internal";
|
phy-mode = "internal";
|
||||||
ethernet = <ð0>;
|
ethernet = <ð0>;
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
label = "cpu";
|
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,6 @@
|
||||||
|
|
||||||
cpu_port0: port@6 {
|
cpu_port0: port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "trgmii";
|
phy-mode = "trgmii";
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ mvebu_setup_macs()
|
||||||
local label_mac=""
|
local label_mac=""
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
buffalo,ls220de|\
|
||||||
buffalo,ls421de)
|
buffalo,ls421de)
|
||||||
lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
|
lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -25,6 +25,13 @@ platform_check_image() {
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
case "$(board_name)" in
|
case "$(board_name)" in
|
||||||
|
buffalo,ls220de)
|
||||||
|
# Kernel UBI volume name must be "boot"
|
||||||
|
CI_KERNPART=boot
|
||||||
|
CI_KERN_UBIPART=ubi_kernel
|
||||||
|
CI_ROOT_UBIPART=ubi
|
||||||
|
nand_do_upgrade "$1"
|
||||||
|
;;
|
||||||
buffalo,ls421de)
|
buffalo,ls421de)
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,380 @@
|
||||||
|
// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
|
||||||
|
/*
|
||||||
|
* Device Tree file for Buffalo LinkStation LS220DE
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "armada-370.dtsi"
|
||||||
|
#include "mvebu-linkstation-fan.dtsi"
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
#include <dt-bindings/thermal/thermal.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Buffalo LinkStation LS220DE";
|
||||||
|
compatible = "buffalo,ls220de", "marvell,armada370", "marvell,armada-370-xp";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_boot;
|
||||||
|
led-failsafe = &led_failsafe;
|
||||||
|
led-running = &led_power;
|
||||||
|
led-upgrade = &led_upgrade;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "earlycon";
|
||||||
|
stdout-path = "serial0:115200n8";
|
||||||
|
append-rootblock = "nullparameter="; /* override the bootloader args */
|
||||||
|
};
|
||||||
|
|
||||||
|
memory {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x00000000 0x10000000>; /* 256 MB */
|
||||||
|
};
|
||||||
|
|
||||||
|
soc {
|
||||||
|
ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
|
||||||
|
MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
|
||||||
|
MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
system_fan: gpio_fan {
|
||||||
|
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
|
||||||
|
&gpio0 14 GPIO_ACTIVE_HIGH>;
|
||||||
|
alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
#cooling-cells = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
thermal-zones {
|
||||||
|
hdd-thermal {
|
||||||
|
polling-delay = <20000>;
|
||||||
|
polling-delay-passive = <2000>;
|
||||||
|
|
||||||
|
thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
|
||||||
|
|
||||||
|
trips {
|
||||||
|
hdd_alert1: trip1 {
|
||||||
|
temperature = <34000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "active";
|
||||||
|
};
|
||||||
|
hdd_alert2: trip2 {
|
||||||
|
temperature = <40000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "active";
|
||||||
|
};
|
||||||
|
hdd_alert3: trip3 {
|
||||||
|
temperature = <45000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "passive";
|
||||||
|
};
|
||||||
|
hdd_hot {
|
||||||
|
temperature = <50000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "hot";
|
||||||
|
};
|
||||||
|
hdd_crit {
|
||||||
|
temperature = <60000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "critical";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cooling-maps {
|
||||||
|
map1 {
|
||||||
|
trip = <&hdd_alert1>;
|
||||||
|
cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
|
||||||
|
};
|
||||||
|
map2 {
|
||||||
|
trip = <&hdd_alert2>;
|
||||||
|
cooling-device = <&system_fan 2 2>;
|
||||||
|
};
|
||||||
|
map3 {
|
||||||
|
trip = <&hdd_alert3>;
|
||||||
|
cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio_keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-0 = <&pmx_buttons>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
power {
|
||||||
|
label = "Power Switch";
|
||||||
|
linux,code = <KEY_POWER>;
|
||||||
|
linux,input-type = <EV_SW>;
|
||||||
|
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function {
|
||||||
|
label = "Function Button";
|
||||||
|
linux,code = <KEY_CONFIG>;
|
||||||
|
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gpio_leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
|
||||||
|
|
||||||
|
indicator_red {
|
||||||
|
function = LED_FUNCTION_INDICATOR;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
|
||||||
|
panic-indicator;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_power: power_white {
|
||||||
|
label = "white:power";
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
|
||||||
|
led_failsafe: power_red {
|
||||||
|
label = "red:power";
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_upgrade: power_orange {
|
||||||
|
label = "amber:power";
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
color = <LED_COLOR_ID_AMBER>;
|
||||||
|
gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_boot: indicator_white {
|
||||||
|
label = "white:indicator";
|
||||||
|
function = LED_FUNCTION_INDICATOR;
|
||||||
|
color = <LED_COLOR_ID_WHITE>;
|
||||||
|
gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
hdd1_red {
|
||||||
|
function = LED_FUNCTION_DISK;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "ata1";
|
||||||
|
function-enumerator = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
hdd2_red {
|
||||||
|
function = LED_FUNCTION_DISK;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "ata2";
|
||||||
|
function-enumerator = <2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
regulators {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
pinctrl-0 = <&pmx_power_hdd1 &pmx_power_hdd2>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
sata1_power: regulator@1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
reg = <1>;
|
||||||
|
regulator-name = "HDD1";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
startup-delay-us = <2000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
sata2_power: regulator@2 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
reg = <2>;
|
||||||
|
regulator-name = "HDD2";
|
||||||
|
regulator-min-microvolt = <12000000>;
|
||||||
|
regulator-max-microvolt = <12000000>;
|
||||||
|
startup-delay-us = <4000000>;
|
||||||
|
enable-active-high;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&coherencyfab {
|
||||||
|
broken-idle;
|
||||||
|
};
|
||||||
|
|
||||||
|
ð1 {
|
||||||
|
pinctrl-0 = <&ge1_rgmii_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
phy-handle = <ðphy0>;
|
||||||
|
phy-connection-type = "rgmii-id";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio {
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
|
||||||
|
reg = <0>;
|
||||||
|
marvell,reg-init = <0x3 0x10 0xf000 0x091A>, /* LED function */
|
||||||
|
<0x3 0x11 0x0000 0x4401>, /* LED polarity */
|
||||||
|
<0x3 0x12 0x0000 0x4905>; /* LED timer */
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&nand_controller {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
nand@0 {
|
||||||
|
reg = <0>;
|
||||||
|
label = "pxa3xx_nand-0";
|
||||||
|
nand-rb = <0>;
|
||||||
|
marvell,nand-keep-config;
|
||||||
|
nand-on-flash-bbt;
|
||||||
|
nand-ecc-strength = <4>;
|
||||||
|
nand-ecc-step-size = <512>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "ubi_kernel";
|
||||||
|
reg = <0x00000000 0x02000000>; /* 32 MiB */
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@2000000 {
|
||||||
|
label = "ubi";
|
||||||
|
reg = <0x02000000 0x1df00000>; /* 479 MiB */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&sata {
|
||||||
|
nr-ports = <2>;
|
||||||
|
status = "okay";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
hdd0_temp: sata-port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
hdd1_temp: sata-port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&spi0_pins2>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
spi-flash@0 {
|
||||||
|
compatible = "mxicy,mx25l8005", "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
reg = <0x00000 0xf0000>; /* 960 KiB*/
|
||||||
|
label = "u-boot";
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
partition@f0000 {
|
||||||
|
reg = <0xf0000 0x10000>; /* 64 KiB */
|
||||||
|
label = "u-boot-env";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pmsu {
|
||||||
|
pinctrl-0 = <&pmx_power_cpu>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
pmx_power_hdd2: pmx-power-hdd2 {
|
||||||
|
marvell,pins = "mpp2";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_power_cpu: pmx-power-cpu {
|
||||||
|
marvell,pins = "mpp4";
|
||||||
|
marvell,function = "vdd";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_power_hdd1: pmx-power-hdd1 {
|
||||||
|
marvell,pins = "mpp8";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_fan_lock: pmx-fan-lock {
|
||||||
|
marvell,pins = "mpp10";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_hdd_present: pmx-hdd-present {
|
||||||
|
marvell,pins = "mpp11", "mpp12";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_fan_high: pmx-fan-high {
|
||||||
|
marvell,pins = "mpp13";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_fan_low: pmx-fan-low {
|
||||||
|
marvell,pins = "mpp14";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_buttons: pmx-buttons {
|
||||||
|
marvell,pins = "mpp15", "mpp16";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_leds1: pmx-leds {
|
||||||
|
marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
|
||||||
|
marvell,function = "gpo";
|
||||||
|
};
|
||||||
|
|
||||||
|
pmx_leds2: pmx-leds {
|
||||||
|
marvell,pins = "mpp55", "mpp57", "mpp62";
|
||||||
|
marvell,function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
|
@ -184,7 +184,6 @@
|
||||||
|
|
||||||
switch0port0: port@0 {
|
switch0port0: port@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <ð0>;
|
ethernet = <ð0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,6 @@
|
||||||
|
|
||||||
port@0 {
|
port@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <ð0>;
|
ethernet = <ð0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,6 @@
|
||||||
|
|
||||||
port@5 {
|
port@5 {
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&cp0_eth1>;
|
ethernet = <&cp0_eth1>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
managed = "in-band-status";
|
managed = "in-band-status";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cn9130.dtsi"
|
#include "cn9130.dtsi"
|
||||||
|
#include "puzzle-thermal.dtsi"
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
@ -109,26 +110,18 @@
|
||||||
chassis_fan_group0: fan-group@0 {
|
chassis_fan_group0: fan-group@0 {
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <2>;
|
||||||
reg = <0x00>;
|
reg = <0x00>;
|
||||||
cooling-levels = <64 102 170 230 250>;
|
cooling-levels = <80 102 170 230 255>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&ap_thermal_cpu1 {
|
&ap_thermal_ic {
|
||||||
trips {
|
PUZZLE_FAN_THERMAL(ic, &chassis_fan_group0);
|
||||||
cpu_active: cpu-active {
|
};
|
||||||
temperature = <44000>;
|
|
||||||
hysteresis = <2000>;
|
&cp0_thermal_ic {
|
||||||
type = "active";
|
PUZZLE_FAN_THERMAL(cp0, &chassis_fan_group0);
|
||||||
};
|
|
||||||
};
|
|
||||||
cooling-maps {
|
|
||||||
fan-map {
|
|
||||||
trip = <&cpu_active>;
|
|
||||||
cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* on-board eMMC - U9 */
|
/* on-board eMMC - U9 */
|
||||||
|
@ -396,6 +389,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&cp1_thermal_ic {
|
||||||
|
PUZZLE_FAN_THERMAL(cp1, &chassis_fan_group0);
|
||||||
|
};
|
||||||
|
|
||||||
&cp1_usb3_1 {
|
&cp1_usb3_1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phys = <&cp1_comphy3 1>;
|
phys = <&cp1_comphy3 1>;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cn9130.dtsi"
|
#include "cn9130.dtsi"
|
||||||
|
#include "puzzle-thermal.dtsi"
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
@ -154,28 +155,21 @@
|
||||||
chassis_fan_group0: fan-group@0 {
|
chassis_fan_group0: fan-group@0 {
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <2>;
|
||||||
reg = <0x00>;
|
reg = <0x00>;
|
||||||
cooling-levels = <64 102 170 230 250>;
|
cooling-levels = <80 102 170 230 255>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&ap_thermal_cpu1 {
|
&ap_thermal_ic {
|
||||||
trips {
|
PUZZLE_FAN_THERMAL(ic, &chassis_fan_group0);
|
||||||
cpu_active: cpu-active {
|
|
||||||
temperature = <44000>;
|
|
||||||
hysteresis = <2000>;
|
|
||||||
type = "active";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
cooling-maps {
|
|
||||||
fan-map {
|
|
||||||
trip = <&cpu_active>;
|
|
||||||
cooling-device = <&chassis_fan_group0 64 THERMAL_NO_LIMIT>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&cp0_thermal_ic {
|
||||||
|
PUZZLE_FAN_THERMAL(cp0, &chassis_fan_group0);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* on-board eMMC - U9 */
|
/* on-board eMMC - U9 */
|
||||||
&ap_sdhci0 {
|
&ap_sdhci0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
@ -447,6 +441,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&cp1_thermal_ic {
|
||||||
|
PUZZLE_FAN_THERMAL(cp1, &chassis_fan_group0);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Instantiate the second connected CP115
|
* Instantiate the second connected CP115
|
||||||
*/
|
*/
|
||||||
|
@ -562,3 +560,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&cp2_thermal_ic {
|
||||||
|
PUZZLE_FAN_THERMAL(cp2, &chassis_fan_group0);
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
#define PUZZLE_FAN_THERMAL(_cname, _fan) \
|
||||||
|
trips { \
|
||||||
|
_cname##_active_high: cpu-active-high { \
|
||||||
|
temperature = <80000>; \
|
||||||
|
hysteresis = <2000>; \
|
||||||
|
type = "active"; \
|
||||||
|
}; \
|
||||||
|
_cname##_active_med: cpu-active-med { \
|
||||||
|
temperature = <72000>; \
|
||||||
|
hysteresis = <2000>; \
|
||||||
|
type = "active"; \
|
||||||
|
}; \
|
||||||
|
_cname##_active_low: cpu-active-low { \
|
||||||
|
temperature = <65000>; \
|
||||||
|
hysteresis = <2000>; \
|
||||||
|
type = "active"; \
|
||||||
|
}; \
|
||||||
|
_cname##_active_idle: cpu-active-idle { \
|
||||||
|
temperature = <60000>; \
|
||||||
|
hysteresis = <2000>; \
|
||||||
|
type = "active"; \
|
||||||
|
}; \
|
||||||
|
}; \
|
||||||
|
cooling-maps { \
|
||||||
|
cpu-active-high { \
|
||||||
|
trip = <&_cname##_active_high>; \
|
||||||
|
cooling-device = <_fan 3 THERMAL_NO_LIMIT>; \
|
||||||
|
}; \
|
||||||
|
cpu-active-med { \
|
||||||
|
trip = <&_cname##_active_med>; \
|
||||||
|
cooling-device = <_fan 2 THERMAL_NO_LIMIT>; \
|
||||||
|
}; \
|
||||||
|
cpu-active-low { \
|
||||||
|
trip = <&_cname##_active_low>; \
|
||||||
|
cooling-device = <_fan 1 THERMAL_NO_LIMIT>; \
|
||||||
|
}; \
|
||||||
|
cpu-active-idle { \
|
||||||
|
trip = <&_cname##_active_idle>; \
|
||||||
|
cooling-device = <_fan 0 THERMAL_NO_LIMIT>; \
|
||||||
|
}; \
|
||||||
|
}
|
|
@ -53,6 +53,16 @@ define Build/buffalo-kernel-jffs2
|
||||||
rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
|
rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/buffalo-kernel-ubifs
|
||||||
|
rm -rf $@-ubidir
|
||||||
|
mkdir -p $@-ubidir
|
||||||
|
mv $@ $@-ubidir/uImage.buffalo
|
||||||
|
touch $@
|
||||||
|
$(call Build/append-uImage-fakehdr, ramdisk)
|
||||||
|
mv $@ $@-ubidir/initrd.buffalo
|
||||||
|
$(STAGING_DIR_HOST)/bin/mkfs.ubifs $(KERNEL_UBIFS_OPTS) -r $@-ubidir $@
|
||||||
|
endef
|
||||||
|
|
||||||
# Some info about Ctera firmware:
|
# Some info about Ctera firmware:
|
||||||
# 1. It's simple tar file (GNU standard), but it must have ".firm" suffix.
|
# 1. It's simple tar file (GNU standard), but it must have ".firm" suffix.
|
||||||
# 2. It contains two images: kernel and romdisk. Both are required.
|
# 2. It contains two images: kernel and romdisk. Both are required.
|
||||||
|
|
|
@ -14,6 +14,21 @@ define Device/kernel-size-migration
|
||||||
Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required.
|
Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Device/buffalo_ls220de
|
||||||
|
$(Device/NAND-128K)
|
||||||
|
DEVICE_VENDOR := Buffalo
|
||||||
|
DEVICE_MODEL := LinkStation LS220DE
|
||||||
|
KERNEL_UBIFS_OPTS = -m $$(PAGESIZE) -e 124KiB -c 172 -x none
|
||||||
|
KERNEL := kernel-bin | append-dtb | uImage none | buffalo-kernel-ubifs
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
|
||||||
|
DEVICE_DTS := armada-370-buffalo-ls220de
|
||||||
|
DEVICE_PACKAGES := \
|
||||||
|
kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-linkstation-poweroff \
|
||||||
|
kmod-md-mod kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-fs-xfs \
|
||||||
|
mdadm mkf2fs e2fsprogs partx-utils
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += buffalo_ls220de
|
||||||
|
|
||||||
define Device/buffalo_ls421de
|
define Device/buffalo_ls421de
|
||||||
$(Device/NAND-128K)
|
$(Device/NAND-128K)
|
||||||
DEVICE_VENDOR := Buffalo
|
DEVICE_VENDOR := Buffalo
|
||||||
|
|
|
@ -53,7 +53,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o
|
obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c
|
+++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c
|
||||||
@@ -0,0 +1,413 @@
|
@@ -0,0 +1,445 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0-only
|
+// SPDX-License-Identifier: GPL-2.0-only
|
||||||
+/* IEI WT61P803 PUZZLE MCU HWMON Driver
|
+/* IEI WT61P803 PUZZLE MCU HWMON Driver
|
||||||
+ *
|
+ *
|
||||||
|
@ -84,13 +84,17 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ * @name: Thermal cooling device name
|
+ * @name: Thermal cooling device name
|
||||||
+ * @pwm_channel: Controlled PWM channel (0 or 1)
|
+ * @pwm_channel: Controlled PWM channel (0 or 1)
|
||||||
+ * @cooling_levels: Thermal cooling device cooling levels (DT)
|
+ * @cooling_levels: Thermal cooling device cooling levels (DT)
|
||||||
|
+ * @cur_level: Current cooling level
|
||||||
|
+ * @num_levels: Number of cooling levels
|
||||||
+ */
|
+ */
|
||||||
+struct iei_wt61p803_puzzle_thermal_cooling_device {
|
+struct iei_wt61p803_puzzle_thermal_cooling_device {
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon;
|
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon;
|
||||||
+ struct thermal_cooling_device *tcdev;
|
+ struct thermal_cooling_device *tcdev;
|
||||||
+ char name[THERMAL_NAME_LENGTH];
|
+ char name[THERMAL_NAME_LENGTH];
|
||||||
+ int pwm_channel;
|
+ int pwm_channel;
|
||||||
+ u8 *cooling_levels;
|
+ u32 *cooling_levels;
|
||||||
|
+ int cur_level;
|
||||||
|
+ u8 num_levels;
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
|
@ -326,8 +330,12 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev,
|
+static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev,
|
||||||
+ unsigned long *state)
|
+ unsigned long *state)
|
||||||
+{
|
+{
|
||||||
+ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+
|
+
|
||||||
|
+ if (!cdev)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ *state = cdev->num_levels - 1;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -335,14 +343,14 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ unsigned long *state)
|
+ unsigned long *state)
|
||||||
+{
|
+{
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon;
|
|
||||||
+ long value;
|
|
||||||
+ int ret;
|
|
||||||
+
|
+
|
||||||
+ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value);
|
+ if (!cdev)
|
||||||
+ if (ret)
|
+ return -EINVAL;
|
||||||
+ return ret;
|
+
|
||||||
+ *state = value;
|
+ if (cdev->cur_level < 0)
|
||||||
|
+ return -EAGAIN;
|
||||||
|
+
|
||||||
|
+ *state = cdev->cur_level;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -350,9 +358,21 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ unsigned long state)
|
+ unsigned long state)
|
||||||
+{
|
+{
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon;
|
+ u8 pwm_level;
|
||||||
+
|
+
|
||||||
+ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state);
|
+ if (!cdev)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ if (state >= cdev->num_levels)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ if (state == cdev->cur_level)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ cdev->cur_level = state;
|
||||||
|
+ pwm_level = cdev->cooling_levels[state];
|
||||||
|
+
|
||||||
|
+ return iei_wt61p803_puzzle_write_pwm_channel(cdev->mcu_hwmon, cdev->pwm_channel, pwm_level);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = {
|
+static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = {
|
||||||
|
@ -369,7 +389,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev;
|
||||||
+ u32 pwm_channel;
|
+ u32 pwm_channel;
|
||||||
+ u8 num_levels;
|
+ u8 num_levels;
|
||||||
+ int ret;
|
+ int i, ret;
|
||||||
+
|
+
|
||||||
+ ret = fwnode_property_read_u32(child, "reg", &pwm_channel);
|
+ ret = fwnode_property_read_u32(child, "reg", &pwm_channel);
|
||||||
+ if (ret)
|
+ if (ret)
|
||||||
|
@ -377,7 +397,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+
|
+
|
||||||
+ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true;
|
+ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true;
|
||||||
+
|
+
|
||||||
+ num_levels = fwnode_property_count_u8(child, "cooling-levels");
|
+ num_levels = fwnode_property_count_u32(child, "cooling-levels");
|
||||||
+ if (!num_levels)
|
+ if (!num_levels)
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+
|
+
|
||||||
|
@ -385,11 +405,11 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ if (!cdev)
|
+ if (!cdev)
|
||||||
+ return -ENOMEM;
|
+ return -ENOMEM;
|
||||||
+
|
+
|
||||||
+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL);
|
+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u32), GFP_KERNEL);
|
||||||
+ if (!cdev->cooling_levels)
|
+ if (!cdev->cooling_levels)
|
||||||
+ return -ENOMEM;
|
+ return -ENOMEM;
|
||||||
+
|
+
|
||||||
+ ret = fwnode_property_read_u8_array(child, "cooling-levels",
|
+ ret = fwnode_property_read_u32_array(child, "cooling-levels",
|
||||||
+ cdev->cooling_levels,
|
+ cdev->cooling_levels,
|
||||||
+ num_levels);
|
+ num_levels);
|
||||||
+ if (ret) {
|
+ if (ret) {
|
||||||
|
@ -397,16 +417,28 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel);
|
+ for (i = 0; i < num_levels; i++) {
|
||||||
+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev,
|
+ if (cdev->cooling_levels[i] >
|
||||||
+ &iei_wt61p803_puzzle_cooling_ops);
|
+ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL) {
|
||||||
+ if (IS_ERR(cdev->tcdev))
|
+ dev_err(dev, "iei_wt61p803_fan state[%d]:%d > %d\n", i,
|
||||||
+ return PTR_ERR(cdev->tcdev);
|
+ cdev->cooling_levels[i],
|
||||||
|
+ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL);
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ cdev->mcu_hwmon = mcu_hwmon;
|
+ cdev->mcu_hwmon = mcu_hwmon;
|
||||||
+ cdev->pwm_channel = pwm_channel;
|
+ cdev->pwm_channel = pwm_channel;
|
||||||
|
+ cdev->num_levels = num_levels;
|
||||||
|
+ cdev->cur_level = -1;
|
||||||
+ mcu_hwmon->cdev[pwm_channel] = cdev;
|
+ mcu_hwmon->cdev[pwm_channel] = cdev;
|
||||||
+
|
+
|
||||||
|
+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel);
|
||||||
|
+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, to_of_node(child), cdev->name,
|
||||||
|
+ cdev, &iei_wt61p803_puzzle_cooling_ops);
|
||||||
|
+ if (IS_ERR(cdev->tcdev))
|
||||||
|
+ return PTR_ERR(cdev->tcdev);
|
||||||
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
--- a/drivers/power/reset/linkstation-poweroff.c
|
||||||
|
+++ b/drivers/power/reset/linkstation-poweroff.c
|
||||||
|
@@ -142,6 +142,12 @@ static void linkstation_poweroff(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id ls_poweroff_of_match[] = {
|
||||||
|
+ { .compatible = "buffalo,ls220d",
|
||||||
|
+ .data = &linkstation_power_off_cfg,
|
||||||
|
+ },
|
||||||
|
+ { .compatible = "buffalo,ls220de",
|
||||||
|
+ .data = &linkstation_power_off_cfg,
|
||||||
|
+ },
|
||||||
|
{ .compatible = "buffalo,ls421d",
|
||||||
|
.data = &linkstation_power_off_cfg,
|
||||||
|
},
|
|
@ -53,7 +53,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o
|
obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c
|
+++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c
|
||||||
@@ -0,0 +1,413 @@
|
@@ -0,0 +1,445 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0-only
|
+// SPDX-License-Identifier: GPL-2.0-only
|
||||||
+/* IEI WT61P803 PUZZLE MCU HWMON Driver
|
+/* IEI WT61P803 PUZZLE MCU HWMON Driver
|
||||||
+ *
|
+ *
|
||||||
|
@ -84,13 +84,17 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ * @name: Thermal cooling device name
|
+ * @name: Thermal cooling device name
|
||||||
+ * @pwm_channel: Controlled PWM channel (0 or 1)
|
+ * @pwm_channel: Controlled PWM channel (0 or 1)
|
||||||
+ * @cooling_levels: Thermal cooling device cooling levels (DT)
|
+ * @cooling_levels: Thermal cooling device cooling levels (DT)
|
||||||
|
+ * @cur_level: Current cooling level
|
||||||
|
+ * @num_levels: Number of cooling levels
|
||||||
+ */
|
+ */
|
||||||
+struct iei_wt61p803_puzzle_thermal_cooling_device {
|
+struct iei_wt61p803_puzzle_thermal_cooling_device {
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon;
|
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon;
|
||||||
+ struct thermal_cooling_device *tcdev;
|
+ struct thermal_cooling_device *tcdev;
|
||||||
+ char name[THERMAL_NAME_LENGTH];
|
+ char name[THERMAL_NAME_LENGTH];
|
||||||
+ int pwm_channel;
|
+ int pwm_channel;
|
||||||
+ u8 *cooling_levels;
|
+ u32 *cooling_levels;
|
||||||
|
+ int cur_level;
|
||||||
|
+ u8 num_levels;
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
|
@ -326,8 +330,12 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev,
|
+static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev,
|
||||||
+ unsigned long *state)
|
+ unsigned long *state)
|
||||||
+{
|
+{
|
||||||
+ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+
|
+
|
||||||
|
+ if (!cdev)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ *state = cdev->num_levels - 1;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -335,14 +343,14 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ unsigned long *state)
|
+ unsigned long *state)
|
||||||
+{
|
+{
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon;
|
|
||||||
+ long value;
|
|
||||||
+ int ret;
|
|
||||||
+
|
+
|
||||||
+ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value);
|
+ if (!cdev)
|
||||||
+ if (ret)
|
+ return -EINVAL;
|
||||||
+ return ret;
|
+
|
||||||
+ *state = value;
|
+ if (cdev->cur_level < 0)
|
||||||
|
+ return -EAGAIN;
|
||||||
|
+
|
||||||
|
+ *state = cdev->cur_level;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -350,9 +358,21 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ unsigned long state)
|
+ unsigned long state)
|
||||||
+{
|
+{
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata;
|
||||||
+ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon;
|
+ u8 pwm_level;
|
||||||
+
|
+
|
||||||
+ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state);
|
+ if (!cdev)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ if (state >= cdev->num_levels)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ if (state == cdev->cur_level)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ cdev->cur_level = state;
|
||||||
|
+ pwm_level = cdev->cooling_levels[state];
|
||||||
|
+
|
||||||
|
+ return iei_wt61p803_puzzle_write_pwm_channel(cdev->mcu_hwmon, cdev->pwm_channel, pwm_level);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = {
|
+static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = {
|
||||||
|
@ -369,7 +389,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev;
|
+ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev;
|
||||||
+ u32 pwm_channel;
|
+ u32 pwm_channel;
|
||||||
+ u8 num_levels;
|
+ u8 num_levels;
|
||||||
+ int ret;
|
+ int i, ret;
|
||||||
+
|
+
|
||||||
+ ret = fwnode_property_read_u32(child, "reg", &pwm_channel);
|
+ ret = fwnode_property_read_u32(child, "reg", &pwm_channel);
|
||||||
+ if (ret)
|
+ if (ret)
|
||||||
|
@ -377,7 +397,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+
|
+
|
||||||
+ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true;
|
+ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true;
|
||||||
+
|
+
|
||||||
+ num_levels = fwnode_property_count_u8(child, "cooling-levels");
|
+ num_levels = fwnode_property_count_u32(child, "cooling-levels");
|
||||||
+ if (!num_levels)
|
+ if (!num_levels)
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+
|
+
|
||||||
|
@ -385,11 +405,11 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ if (!cdev)
|
+ if (!cdev)
|
||||||
+ return -ENOMEM;
|
+ return -ENOMEM;
|
||||||
+
|
+
|
||||||
+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL);
|
+ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u32), GFP_KERNEL);
|
||||||
+ if (!cdev->cooling_levels)
|
+ if (!cdev->cooling_levels)
|
||||||
+ return -ENOMEM;
|
+ return -ENOMEM;
|
||||||
+
|
+
|
||||||
+ ret = fwnode_property_read_u8_array(child, "cooling-levels",
|
+ ret = fwnode_property_read_u32_array(child, "cooling-levels",
|
||||||
+ cdev->cooling_levels,
|
+ cdev->cooling_levels,
|
||||||
+ num_levels);
|
+ num_levels);
|
||||||
+ if (ret) {
|
+ if (ret) {
|
||||||
|
@ -397,16 +417,28 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel);
|
+ for (i = 0; i < num_levels; i++) {
|
||||||
+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev,
|
+ if (cdev->cooling_levels[i] >
|
||||||
+ &iei_wt61p803_puzzle_cooling_ops);
|
+ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL) {
|
||||||
+ if (IS_ERR(cdev->tcdev))
|
+ dev_err(dev, "iei_wt61p803_fan state[%d]:%d > %d\n", i,
|
||||||
+ return PTR_ERR(cdev->tcdev);
|
+ cdev->cooling_levels[i],
|
||||||
|
+ IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL);
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ cdev->mcu_hwmon = mcu_hwmon;
|
+ cdev->mcu_hwmon = mcu_hwmon;
|
||||||
+ cdev->pwm_channel = pwm_channel;
|
+ cdev->pwm_channel = pwm_channel;
|
||||||
|
+ cdev->num_levels = num_levels;
|
||||||
|
+ cdev->cur_level = -1;
|
||||||
+ mcu_hwmon->cdev[pwm_channel] = cdev;
|
+ mcu_hwmon->cdev[pwm_channel] = cdev;
|
||||||
+
|
+
|
||||||
|
+ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel);
|
||||||
|
+ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, to_of_node(child), cdev->name,
|
||||||
|
+ cdev, &iei_wt61p803_puzzle_cooling_ops);
|
||||||
|
+ if (IS_ERR(cdev->tcdev))
|
||||||
|
+ return PTR_ERR(cdev->tcdev);
|
||||||
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
|
@ -10,8 +10,7 @@ BOARDNAME:=Octeon-TX
|
||||||
FEATURES:=squashfs ramdisk targz pcie gpio rtc usb fpu
|
FEATURES:=squashfs ramdisk targz pcie gpio rtc usb fpu
|
||||||
SUBTARGETS:=generic
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.15
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
|
||||||
|
|
||||||
define Target/Description
|
define Target/Description
|
||||||
Build images for Octeon-TX CN80XX/CN81XX based boards
|
Build images for Octeon-TX CN80XX/CN81XX based boards
|
||||||
|
@ -21,4 +20,9 @@ include $(INCLUDE_DIR)/target.mk
|
||||||
|
|
||||||
KERNELNAME:=Image
|
KERNELNAME:=Image
|
||||||
|
|
||||||
|
DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid \
|
||||||
|
kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio \
|
||||||
|
kmod-gpio-button-hotplug kmod-input-evdev kmod-rtc-ds1672 \
|
||||||
|
kmod-can kmod-can-mcp251x
|
||||||
|
|
||||||
$(eval $(call BuildTarget))
|
$(eval $(call BuildTarget))
|
||||||
|
|
|
@ -1,413 +0,0 @@
|
||||||
CONFIG_64BIT=y
|
|
||||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
|
||||||
CONFIG_ARCH_HIBERNATION_HEADER=y
|
|
||||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
|
||||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
|
||||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
|
||||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=33
|
|
||||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
|
||||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
|
||||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
|
||||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
|
||||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
|
||||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
|
||||||
CONFIG_ARCH_STACKWALK=y
|
|
||||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
|
||||||
CONFIG_ARCH_THUNDER=y
|
|
||||||
CONFIG_ARM64=y
|
|
||||||
CONFIG_ARM64_4K_PAGES=y
|
|
||||||
CONFIG_ARM64_CNP=y
|
|
||||||
CONFIG_ARM64_CRYPTO=y
|
|
||||||
CONFIG_ARM64_ERRATUM_819472=y
|
|
||||||
CONFIG_ARM64_ERRATUM_824069=y
|
|
||||||
CONFIG_ARM64_ERRATUM_826319=y
|
|
||||||
CONFIG_ARM64_ERRATUM_827319=y
|
|
||||||
CONFIG_ARM64_ERRATUM_843419=y
|
|
||||||
CONFIG_ARM64_HW_AFDBM=y
|
|
||||||
CONFIG_ARM64_MODULE_PLTS=y
|
|
||||||
CONFIG_ARM64_PAGE_SHIFT=12
|
|
||||||
CONFIG_ARM64_PAN=y
|
|
||||||
CONFIG_ARM64_PA_BITS=48
|
|
||||||
CONFIG_ARM64_PA_BITS_48=y
|
|
||||||
CONFIG_ARM64_PTR_AUTH=y
|
|
||||||
CONFIG_ARM64_SVE=y
|
|
||||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
|
||||||
CONFIG_ARM64_UAO=y
|
|
||||||
CONFIG_ARM64_VA_BITS=48
|
|
||||||
# CONFIG_ARM64_VA_BITS_39 is not set
|
|
||||||
CONFIG_ARM64_VA_BITS_48=y
|
|
||||||
CONFIG_ARM64_VHE=y
|
|
||||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
|
||||||
CONFIG_ARM_AMBA=y
|
|
||||||
CONFIG_ARM_ARCH_TIMER=y
|
|
||||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
|
||||||
CONFIG_ARM_CPUIDLE=y
|
|
||||||
CONFIG_ARM_GIC=y
|
|
||||||
CONFIG_ARM_GIC_V2M=y
|
|
||||||
CONFIG_ARM_GIC_V3=y
|
|
||||||
CONFIG_ARM_GIC_V3_ITS=y
|
|
||||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
|
||||||
CONFIG_ARM_PSCI_FW=y
|
|
||||||
CONFIG_ARM_SBSA_WATCHDOG=y
|
|
||||||
CONFIG_ATA=y
|
|
||||||
# CONFIG_ATA_SFF is not set
|
|
||||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
|
||||||
CONFIG_BALLOON_COMPACTION=y
|
|
||||||
CONFIG_BLK_DEV_BSG=y
|
|
||||||
CONFIG_BLK_DEV_BSGLIB=y
|
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
|
||||||
CONFIG_BLK_MQ_PCI=y
|
|
||||||
CONFIG_BLK_MQ_VIRTIO=y
|
|
||||||
CONFIG_BLK_PM=y
|
|
||||||
CONFIG_BLK_SCSI_REQUEST=y
|
|
||||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
|
||||||
CONFIG_CAVIUM_ERRATUM_23144=y
|
|
||||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
|
||||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
|
||||||
CONFIG_CAVIUM_ERRATUM_30115=y
|
|
||||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
|
||||||
CONFIG_CLKDEV_LOOKUP=y
|
|
||||||
CONFIG_CLONE_BACKWARDS=y
|
|
||||||
CONFIG_CMA=y
|
|
||||||
CONFIG_CMA_ALIGNMENT=8
|
|
||||||
CONFIG_CMA_AREAS=7
|
|
||||||
# CONFIG_CMA_DEBUG is not set
|
|
||||||
# CONFIG_CMA_DEBUGFS is not set
|
|
||||||
CONFIG_CMA_SIZE_MBYTES=16
|
|
||||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
|
||||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
|
||||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
|
||||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
|
||||||
CONFIG_COMMON_CLK=y
|
|
||||||
CONFIG_COMMON_CLK_CS2000_CP=y
|
|
||||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
|
||||||
CONFIG_CONFIGFS_FS=y
|
|
||||||
CONFIG_CONTIG_ALLOC=y
|
|
||||||
CONFIG_CPU_IDLE=y
|
|
||||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
|
||||||
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
|
|
||||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
|
||||||
CONFIG_CPU_PM=y
|
|
||||||
CONFIG_CPU_RMAP=y
|
|
||||||
CONFIG_CRASH_CORE=y
|
|
||||||
CONFIG_CRASH_DUMP=y
|
|
||||||
CONFIG_CRC16=y
|
|
||||||
CONFIG_CRC7=y
|
|
||||||
CONFIG_CRC_ITU_T=y
|
|
||||||
CONFIG_CRC_T10DIF=y
|
|
||||||
CONFIG_CRYPTO_AES_ARM64=y
|
|
||||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
|
||||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
|
||||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
|
||||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
|
||||||
CONFIG_CRYPTO_BLAKE2S=y
|
|
||||||
CONFIG_CRYPTO_CRC32=y
|
|
||||||
CONFIG_CRYPTO_CRC32C=y
|
|
||||||
CONFIG_CRYPTO_CRCT10DIF=y
|
|
||||||
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
|
|
||||||
CONFIG_CRYPTO_CRYPTD=y
|
|
||||||
CONFIG_CRYPTO_DRBG=y
|
|
||||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
|
||||||
CONFIG_CRYPTO_DRBG_MENU=y
|
|
||||||
CONFIG_CRYPTO_ECHAINIV=y
|
|
||||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
|
||||||
CONFIG_CRYPTO_HMAC=y
|
|
||||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
|
||||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
|
||||||
CONFIG_CRYPTO_LIB_SHA256=y
|
|
||||||
CONFIG_CRYPTO_RNG=y
|
|
||||||
CONFIG_CRYPTO_RNG2=y
|
|
||||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
|
||||||
CONFIG_CRYPTO_SHA1=y
|
|
||||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
|
||||||
CONFIG_CRYPTO_SHA256=y
|
|
||||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
|
||||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
|
||||||
CONFIG_CRYPTO_SIMD=y
|
|
||||||
CONFIG_DCACHE_WORD_ACCESS=y
|
|
||||||
CONFIG_DMADEVICES=y
|
|
||||||
CONFIG_DMA_CMA=y
|
|
||||||
CONFIG_DMA_DIRECT_REMAP=y
|
|
||||||
CONFIG_DMA_ENGINE=y
|
|
||||||
CONFIG_DMA_OF=y
|
|
||||||
CONFIG_DMA_PERNUMA_CMA=y
|
|
||||||
CONFIG_DMA_REMAP=y
|
|
||||||
CONFIG_DMA_SHARED_BUFFER=y
|
|
||||||
CONFIG_DTC=y
|
|
||||||
CONFIG_DT_IDLE_STATES=y
|
|
||||||
CONFIG_EDAC=y
|
|
||||||
# CONFIG_EDAC_DEBUG is not set
|
|
||||||
# CONFIG_EDAC_DMC520 is not set
|
|
||||||
CONFIG_EDAC_LEGACY_SYSFS=y
|
|
||||||
CONFIG_EDAC_SUPPORT=y
|
|
||||||
CONFIG_EDAC_THUNDERX=y
|
|
||||||
# CONFIG_EDAC_XGENE is not set
|
|
||||||
CONFIG_EEPROM_AT24=y
|
|
||||||
CONFIG_FAT_FS=y
|
|
||||||
CONFIG_FIXED_PHY=y
|
|
||||||
CONFIG_FIX_EARLYCON_MEM=y
|
|
||||||
CONFIG_FRAME_POINTER=y
|
|
||||||
CONFIG_FREEZER=y
|
|
||||||
CONFIG_FW_CACHE=y
|
|
||||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
|
||||||
CONFIG_GENERIC_ALLOCATOR=y
|
|
||||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
|
||||||
CONFIG_GENERIC_BUG=y
|
|
||||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
|
||||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
|
||||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
|
||||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
|
||||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
|
||||||
CONFIG_GENERIC_CSUM=y
|
|
||||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
|
||||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
|
||||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
|
||||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
|
||||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
|
||||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
|
||||||
CONFIG_GENERIC_IRQ_SHOW=y
|
|
||||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
|
||||||
CONFIG_GENERIC_MSI_IRQ=y
|
|
||||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
|
||||||
CONFIG_GENERIC_PCI_IOMAP=y
|
|
||||||
CONFIG_GENERIC_PHY=y
|
|
||||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
|
||||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
|
||||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
|
||||||
CONFIG_GENERIC_STRNLEN_USER=y
|
|
||||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
|
||||||
CONFIG_GLOB=y
|
|
||||||
CONFIG_GPIOLIB_IRQCHIP=y
|
|
||||||
CONFIG_GPIO_PCA953X=y
|
|
||||||
CONFIG_GPIO_PCA953X_IRQ=y
|
|
||||||
CONFIG_GPIO_THUNDERX=y
|
|
||||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
|
||||||
CONFIG_HARDIRQS_SW_RESEND=y
|
|
||||||
CONFIG_HAS_DMA=y
|
|
||||||
CONFIG_HAS_IOMEM=y
|
|
||||||
CONFIG_HAS_IOPORT_MAP=y
|
|
||||||
CONFIG_HIBERNATE_CALLBACKS=y
|
|
||||||
CONFIG_HIBERNATION=y
|
|
||||||
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
|
|
||||||
CONFIG_HOLES_IN_ZONE=y
|
|
||||||
CONFIG_HOTPLUG_CPU=y
|
|
||||||
CONFIG_HUGETLBFS=y
|
|
||||||
CONFIG_HUGETLB_PAGE=y
|
|
||||||
CONFIG_HWSPINLOCK=y
|
|
||||||
CONFIG_HW_RANDOM=y
|
|
||||||
CONFIG_HW_RANDOM_CAVIUM=y
|
|
||||||
CONFIG_HW_RANDOM_OPTEE=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_ALGOBIT=y
|
|
||||||
CONFIG_I2C_BOARDINFO=y
|
|
||||||
CONFIG_I2C_CHARDEV=y
|
|
||||||
CONFIG_I2C_MUX=y
|
|
||||||
CONFIG_I2C_SMBUS=y
|
|
||||||
CONFIG_I2C_THUNDERX=y
|
|
||||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
|
||||||
CONFIG_IRQCHIP=y
|
|
||||||
CONFIG_IRQ_DOMAIN=y
|
|
||||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
|
||||||
CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
|
|
||||||
CONFIG_IRQ_FORCED_THREADING=y
|
|
||||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
|
||||||
CONFIG_IRQ_WORK=y
|
|
||||||
# CONFIG_ISDN is not set
|
|
||||||
CONFIG_JUMP_LABEL=y
|
|
||||||
CONFIG_KEXEC=y
|
|
||||||
CONFIG_KEXEC_CORE=y
|
|
||||||
CONFIG_KSM=y
|
|
||||||
CONFIG_LIBFDT=y
|
|
||||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
|
||||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
|
||||||
CONFIG_LZO_COMPRESS=y
|
|
||||||
CONFIG_LZO_DECOMPRESS=y
|
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
|
||||||
CONFIG_MAILBOX=y
|
|
||||||
# CONFIG_MAILBOX_TEST is not set
|
|
||||||
CONFIG_MDIO_BUS=y
|
|
||||||
CONFIG_MDIO_CAVIUM=y
|
|
||||||
CONFIG_MDIO_DEVICE=y
|
|
||||||
CONFIG_MDIO_DEVRES=y
|
|
||||||
CONFIG_MDIO_THUNDER=y
|
|
||||||
CONFIG_MEMFD_CREATE=y
|
|
||||||
CONFIG_MEMORY_BALLOON=y
|
|
||||||
CONFIG_MEMORY_ISOLATION=y
|
|
||||||
CONFIG_MEMTEST=y
|
|
||||||
CONFIG_MFD_SYSCON=y
|
|
||||||
CONFIG_MIGRATION=y
|
|
||||||
CONFIG_MMC=y
|
|
||||||
CONFIG_MMC_BLOCK=y
|
|
||||||
CONFIG_MMC_CAVIUM_THUNDERX=y
|
|
||||||
CONFIG_MODULES_USE_ELF_RELA=y
|
|
||||||
CONFIG_MSDOS_FS=y
|
|
||||||
# CONFIG_MTD is not set
|
|
||||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
|
||||||
CONFIG_NEED_DMA_MAP_STATE=y
|
|
||||||
CONFIG_NEED_MULTIPLE_NODES=y
|
|
||||||
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
|
|
||||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
|
||||||
CONFIG_NET_FLOW_LIMIT=y
|
|
||||||
CONFIG_NLS=y
|
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
|
||||||
CONFIG_NLS_ISO8859_1=y
|
|
||||||
CONFIG_NODES_SHIFT=2
|
|
||||||
CONFIG_NO_HZ_COMMON=y
|
|
||||||
CONFIG_NO_HZ_IDLE=y
|
|
||||||
CONFIG_NR_CPUS=64
|
|
||||||
CONFIG_NUMA=y
|
|
||||||
CONFIG_NUMA_BALANCING=y
|
|
||||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
|
||||||
CONFIG_NVMEM=y
|
|
||||||
CONFIG_NVMEM_SYSFS=y
|
|
||||||
CONFIG_OF=y
|
|
||||||
CONFIG_OF_ADDRESS=y
|
|
||||||
CONFIG_OF_EARLY_FLATTREE=y
|
|
||||||
CONFIG_OF_FLATTREE=y
|
|
||||||
CONFIG_OF_GPIO=y
|
|
||||||
CONFIG_OF_IRQ=y
|
|
||||||
CONFIG_OF_KOBJ=y
|
|
||||||
CONFIG_OF_MDIO=y
|
|
||||||
CONFIG_OF_NET=y
|
|
||||||
CONFIG_OF_NUMA=y
|
|
||||||
CONFIG_OPTEE=y
|
|
||||||
CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1
|
|
||||||
CONFIG_PADATA=y
|
|
||||||
CONFIG_PAGE_REPORTING=y
|
|
||||||
CONFIG_PARAVIRT=y
|
|
||||||
CONFIG_PARTITION_PERCPU=y
|
|
||||||
CONFIG_PCI=y
|
|
||||||
CONFIG_PCIEAER=y
|
|
||||||
CONFIG_PCIEPORTBUS=y
|
|
||||||
CONFIG_PCIE_PME=y
|
|
||||||
CONFIG_PCI_ATS=y
|
|
||||||
CONFIG_PCI_DOMAINS=y
|
|
||||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
|
||||||
CONFIG_PCI_ECAM=y
|
|
||||||
CONFIG_PCI_HOST_COMMON=y
|
|
||||||
CONFIG_PCI_HOST_GENERIC=y
|
|
||||||
CONFIG_PCI_HOST_THUNDER_ECAM=y
|
|
||||||
CONFIG_PCI_HOST_THUNDER_PEM=y
|
|
||||||
CONFIG_PCI_IOV=y
|
|
||||||
CONFIG_PCI_MSI=y
|
|
||||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
|
||||||
CONFIG_PGTABLE_LEVELS=4
|
|
||||||
CONFIG_PHYLIB=y
|
|
||||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
|
||||||
CONFIG_PM=y
|
|
||||||
CONFIG_PM_CLK=y
|
|
||||||
CONFIG_PM_SLEEP=y
|
|
||||||
CONFIG_PM_SLEEP_SMP=y
|
|
||||||
CONFIG_PM_STD_PARTITION=""
|
|
||||||
CONFIG_POSIX_MQUEUE=y
|
|
||||||
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
|
||||||
CONFIG_POWER_RESET=y
|
|
||||||
CONFIG_POWER_RESET_SYSCON=y
|
|
||||||
CONFIG_POWER_RESET_XGENE=y
|
|
||||||
CONFIG_POWER_SUPPLY=y
|
|
||||||
CONFIG_PROC_VMCORE=y
|
|
||||||
CONFIG_QUEUED_RWLOCKS=y
|
|
||||||
CONFIG_QUEUED_SPINLOCKS=y
|
|
||||||
CONFIG_RAS=y
|
|
||||||
CONFIG_RATIONAL=y
|
|
||||||
# CONFIG_RAVE_SP_CORE is not set
|
|
||||||
CONFIG_REBOOT_MODE=y
|
|
||||||
CONFIG_REGMAP=y
|
|
||||||
CONFIG_REGMAP_I2C=y
|
|
||||||
CONFIG_REGMAP_MMIO=y
|
|
||||||
CONFIG_RESET_CONTROLLER=y
|
|
||||||
CONFIG_RFS_ACCEL=y
|
|
||||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
|
||||||
CONFIG_RPS=y
|
|
||||||
CONFIG_RTC_CLASS=y
|
|
||||||
CONFIG_RTC_DRV_DS1672=y
|
|
||||||
CONFIG_RTC_I2C_AND_SPI=y
|
|
||||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
|
||||||
CONFIG_SATA_AHCI=y
|
|
||||||
CONFIG_SATA_AHCI_PLATFORM=y
|
|
||||||
CONFIG_SATA_HOST=y
|
|
||||||
CONFIG_SCHED_INFO=y
|
|
||||||
CONFIG_SCHED_MC=y
|
|
||||||
CONFIG_SCSI=y
|
|
||||||
# CONFIG_SCSI_LOWLEVEL is not set
|
|
||||||
# CONFIG_SCSI_PROC_FS is not set
|
|
||||||
CONFIG_SCSI_SAS_ATA=y
|
|
||||||
CONFIG_SCSI_SAS_ATTRS=y
|
|
||||||
CONFIG_SCSI_SAS_HOST_SMP=y
|
|
||||||
CONFIG_SCSI_SAS_LIBSAS=y
|
|
||||||
CONFIG_SECCOMP=y
|
|
||||||
CONFIG_SECCOMP_FILTER=y
|
|
||||||
CONFIG_SERIAL_8250_DW=y
|
|
||||||
CONFIG_SERIAL_8250_DWLIB=y
|
|
||||||
CONFIG_SERIAL_8250_EXTENDED=y
|
|
||||||
CONFIG_SERIAL_8250_FSL=y
|
|
||||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
|
||||||
CONFIG_SERIAL_AMBA_PL011=y
|
|
||||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
|
||||||
CONFIG_SERIAL_DEV_BUS=y
|
|
||||||
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
|
|
||||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
|
||||||
CONFIG_SERIAL_OF_PLATFORM=y
|
|
||||||
CONFIG_SERIAL_XILINX_PS_UART=y
|
|
||||||
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
|
||||||
CONFIG_SG_POOL=y
|
|
||||||
CONFIG_SMP=y
|
|
||||||
CONFIG_SPARSEMEM=y
|
|
||||||
CONFIG_SPARSEMEM_EXTREME=y
|
|
||||||
CONFIG_SPARSEMEM_MANUAL=y
|
|
||||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
|
||||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
|
||||||
CONFIG_SPARSE_IRQ=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
CONFIG_SPI_MASTER=y
|
|
||||||
CONFIG_SPI_THUNDERX=y
|
|
||||||
CONFIG_SRAM=y
|
|
||||||
CONFIG_SRCU=y
|
|
||||||
CONFIG_SWIOTLB=y
|
|
||||||
CONFIG_SWPHY=y
|
|
||||||
CONFIG_SYNC_FILE=y
|
|
||||||
CONFIG_SYSCON_REBOOT_MODE=y
|
|
||||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
|
||||||
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
|
||||||
CONFIG_TASKSTATS=y
|
|
||||||
CONFIG_TASK_DELAY_ACCT=y
|
|
||||||
CONFIG_TASK_IO_ACCOUNTING=y
|
|
||||||
CONFIG_TASK_XACCT=y
|
|
||||||
CONFIG_TEE=y
|
|
||||||
CONFIG_THREAD_INFO_IN_TASK=y
|
|
||||||
CONFIG_THUNDER_NIC_BGX=y
|
|
||||||
CONFIG_THUNDER_NIC_PF=y
|
|
||||||
CONFIG_THUNDER_NIC_RGX=y
|
|
||||||
CONFIG_THUNDER_NIC_VF=y
|
|
||||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
|
||||||
CONFIG_TIMER_OF=y
|
|
||||||
CONFIG_TIMER_PROBE=y
|
|
||||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
|
||||||
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
|
|
||||||
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
|
|
||||||
CONFIG_TREE_RCU=y
|
|
||||||
CONFIG_TREE_SRCU=y
|
|
||||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
|
||||||
CONFIG_USB=y
|
|
||||||
CONFIG_USB_COMMON=y
|
|
||||||
CONFIG_USB_PCI=y
|
|
||||||
CONFIG_USB_SUPPORT=y
|
|
||||||
# CONFIG_USB_UHCI_HCD is not set
|
|
||||||
CONFIG_USB_XHCI_HCD=y
|
|
||||||
CONFIG_USB_XHCI_PCI=y
|
|
||||||
CONFIG_USB_XHCI_PLATFORM=y
|
|
||||||
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
|
|
||||||
CONFIG_VIRTIO=y
|
|
||||||
CONFIG_VIRTIO_BALLOON=y
|
|
||||||
# CONFIG_VIRTIO_BLK is not set
|
|
||||||
CONFIG_VIRTIO_MMIO=y
|
|
||||||
# CONFIG_VIRTIO_NET is not set
|
|
||||||
CONFIG_VIRTIO_PCI=y
|
|
||||||
CONFIG_VIRTIO_PCI_LEGACY=y
|
|
||||||
CONFIG_VMAP_STACK=y
|
|
||||||
CONFIG_WATCHDOG_CORE=y
|
|
||||||
CONFIG_XARRAY_MULTI=y
|
|
||||||
CONFIG_XPS=y
|
|
||||||
CONFIG_XXHASH=y
|
|
||||||
CONFIG_ZONE_DMA32=y
|
|
|
@ -145,6 +145,8 @@ CONFIG_EDAC_SUPPORT=y
|
||||||
CONFIG_EDAC_THUNDERX=y
|
CONFIG_EDAC_THUNDERX=y
|
||||||
# CONFIG_EDAC_XGENE is not set
|
# CONFIG_EDAC_XGENE is not set
|
||||||
CONFIG_EEPROM_AT24=y
|
CONFIG_EEPROM_AT24=y
|
||||||
|
CONFIG_EXT4_FS=y
|
||||||
|
CONFIG_F2FS_FS=y
|
||||||
CONFIG_FAT_FS=y
|
CONFIG_FAT_FS=y
|
||||||
CONFIG_FIXED_PHY=y
|
CONFIG_FIXED_PHY=y
|
||||||
CONFIG_FIX_EARLYCON_MEM=y
|
CONFIG_FIX_EARLYCON_MEM=y
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
From d0ff7a1bcfe886cab1a237895b08ac51ecfe10e7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tim Harvey <tharvey@gateworks.com>
|
|
||||||
Date: Wed, 10 Apr 2019 08:00:47 -0700
|
|
||||||
Subject: [PATCH 04/12] PCI: add quirk for Gateworks PLX PEX860x switch with
|
|
||||||
GPIO PERST#
|
|
||||||
|
|
||||||
Gateworks boards use PLX PEX860x switches where downstream ports
|
|
||||||
have their PERST# driven from the PEX GPIO.
|
|
||||||
|
|
||||||
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
|
||||||
---
|
|
||||||
drivers/pci/quirks.c | 32 ++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 32 insertions(+)
|
|
||||||
|
|
||||||
--- a/drivers/pci/quirks.c
|
|
||||||
+++ b/drivers/pci/quirks.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include <linux/ktime.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/nvme.h>
|
|
||||||
+#include <linux/of.h>
|
|
||||||
#include <linux/platform_data/x86/apple.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
|
||||||
#include <linux/suspend.h>
|
|
||||||
@@ -5787,3 +5788,34 @@ static void nvidia_ion_ahci_fixup(struct
|
|
||||||
pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
|
|
||||||
}
|
|
||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
|
||||||
+/*
|
|
||||||
+ * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High
|
|
||||||
+ * as they are used for slots1-7 PERST#
|
|
||||||
+ */
|
|
||||||
+static void newport_pciesw_early_fixup(struct pci_dev *dev)
|
|
||||||
+{
|
|
||||||
+ u32 dw;
|
|
||||||
+
|
|
||||||
+ if (!of_machine_is_compatible("gw,newport"))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (dev->devfn != 0)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ dev_info(&dev->dev, "de-asserting PERST#\n");
|
|
||||||
+ pci_read_config_dword(dev, 0x62c, &dw);
|
|
||||||
+ dw |= 0xaaa8; /* GPIO1-7 outputs */
|
|
||||||
+ pci_write_config_dword(dev, 0x62c, dw);
|
|
||||||
+
|
|
||||||
+ pci_read_config_dword(dev, 0x644, &dw);
|
|
||||||
+ dw |= 0xfe; /* GPIO1-7 output high */
|
|
||||||
+ pci_write_config_dword(dev, 0x644, dw);
|
|
||||||
+
|
|
||||||
+ msleep(100);
|
|
||||||
+}
|
|
||||||
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, newport_pciesw_early_fixup);
|
|
||||||
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, newport_pciesw_early_fixup);
|
|
||||||
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, newport_pciesw_early_fixup);
|
|
||||||
+#endif /* CONFIG_PCI_HOST_THUNDER_PEM */
|
|
|
@ -269,7 +269,6 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
reg = "<5>";
|
reg = "<5>";
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&enet2>;
|
ethernet = <&enet2>;
|
||||||
phy-mode = "rgmii-id";
|
phy-mode = "rgmii-id";
|
||||||
|
|
||||||
|
@ -281,7 +280,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&enet3>;
|
ethernet = <&enet3>;
|
||||||
phy-mode = "rgmii-id";
|
phy-mode = "rgmii-id";
|
||||||
|
|
||||||
|
|
|
@ -558,7 +558,6 @@
|
||||||
|
|
||||||
port@6 {
|
port@6 {
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&gmac0>;
|
ethernet = <&gmac0>;
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii";
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie1 {
|
&pcie2 {
|
||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
compatible = "mediatek,mt76";
|
compatible = "mediatek,mt76";
|
||||||
reg = <0x0 0 0 0 0>;
|
reg = <0x0 0 0 0 0>;
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie1 {
|
&pcie2 {
|
||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
compatible = "mediatek,mt76";
|
compatible = "mediatek,mt76";
|
||||||
reg = <0x0 0 0 0 0>;
|
reg = <0x0 0 0 0 0>;
|
||||||
|
|
|
@ -55,6 +55,8 @@ define Device/asus_rt-ac1200-v2
|
||||||
DEVICE_VENDOR := ASUS
|
DEVICE_VENDOR := ASUS
|
||||||
DEVICE_MODEL := RT-AC1200
|
DEVICE_MODEL := RT-AC1200
|
||||||
DEVICE_VARIANT := V2
|
DEVICE_VARIANT := V2
|
||||||
|
DEVICE_ALT0_VENDOR := ASUS
|
||||||
|
DEVICE_ALT0_MODEL := RT-AC750L
|
||||||
IMAGES += factory.bin
|
IMAGES += factory.bin
|
||||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||||
append-rootfs | pad-rootfs
|
append-rootfs | pad-rootfs
|
||||||
|
|
|
@ -307,6 +307,7 @@ CONFIG_NO_HZ_IDLE=y
|
||||||
CONFIG_NR_CPUS=8
|
CONFIG_NR_CPUS=8
|
||||||
CONFIG_NVMEM=y
|
CONFIG_NVMEM=y
|
||||||
CONFIG_NVMEM_SUNXI_SID=y
|
CONFIG_NVMEM_SUNXI_SID=y
|
||||||
|
CONFIG_NVMEM_SYSFS=y
|
||||||
CONFIG_OF=y
|
CONFIG_OF=y
|
||||||
CONFIG_OF_ADDRESS=y
|
CONFIG_OF_ADDRESS=y
|
||||||
CONFIG_OF_EARLY_FLATTREE=y
|
CONFIG_OF_EARLY_FLATTREE=y
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue