Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
12be24a160
@ -130,10 +130,12 @@ wifi_updown() {
|
||||
ubus_wifi_cmd "$cmd" "$2"
|
||||
scan_wifi
|
||||
cmd=up
|
||||
ubus call network reload
|
||||
}
|
||||
[ reconf = "$1" ] && {
|
||||
scan_wifi
|
||||
cmd=reconf
|
||||
ubus call network reload
|
||||
}
|
||||
ubus_wifi_cmd "$cmd" "$2"
|
||||
_wifi_updown "$@"
|
||||
@ -246,7 +248,7 @@ case "$1" in
|
||||
reload) wifi_reload "$2";;
|
||||
reload_legacy) wifi_reload_legacy "$2";;
|
||||
--help|help) usage;;
|
||||
reconf) ubus call network reload; wifi_updown "reconf" "$2";;
|
||||
''|up) ubus call network reload; wifi_updown "enable" "$2";;
|
||||
reconf) wifi_updown "reconf" "$2";;
|
||||
''|up) wifi_updown "enable" "$2";;
|
||||
*) usage; exit 1;;
|
||||
esac
|
||||
|
@ -1021,10 +1021,8 @@ drv_mac80211_setup() {
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -z "$(uci -q -P /var/state show wireless._${phy})" ] && {
|
||||
uci -q -P /var/state set wireless._${phy}=phy
|
||||
wireless_set_data phy="$phy"
|
||||
}
|
||||
wireless_set_data phy="$phy"
|
||||
[ -z "$(uci -q -P /var/state show wireless._${phy})" ] && uci -q -P /var/state set wireless._${phy}=phy
|
||||
|
||||
OLDAPLIST=$(uci -q -P /var/state get wireless._${phy}.aplist)
|
||||
OLDSPLIST=$(uci -q -P /var/state get wireless._${phy}.splist)
|
||||
@ -1117,6 +1115,7 @@ drv_mac80211_setup() {
|
||||
[ -n "$hostapd_ctrl" ] && {
|
||||
local no_reload=1
|
||||
if [ -n "$(ubus list | grep hostapd.$primary_ap)" ]; then
|
||||
no_reload=0
|
||||
[ "${NEW_MD5}" = "${OLD_MD5}" ] || {
|
||||
ubus call hostapd.$primary_ap reload
|
||||
no_reload=$?
|
||||
@ -1191,6 +1190,10 @@ drv_mac80211_teardown() {
|
||||
json_select data
|
||||
json_get_vars phy
|
||||
json_select ..
|
||||
[ -n "$phy" ] || {
|
||||
echo "Bug: PHY is undefined for device '$1'"
|
||||
return 1
|
||||
}
|
||||
|
||||
mac80211_interface_cleanup "$phy"
|
||||
uci -q -P /var/state revert wireless._${phy}
|
||||
|
@ -0,0 +1,112 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 29 Jun 2021 13:25:09 +0200
|
||||
Subject: [PATCH] mac80211: fix starting aggregation sessions on mesh
|
||||
interfaces
|
||||
|
||||
The logic for starting aggregation sessions was recently moved from minstrel_ht
|
||||
to mac80211, into the subif tx handler just after the sta lookup.
|
||||
Unfortunately this didn't work for mesh interfaces, since the sta lookup is
|
||||
deferred until a much later point in time on those.
|
||||
Fix this by also calling the aggregation check right after the deferred sta
|
||||
lookup.
|
||||
|
||||
Fixes: 08a46c642001 ("mac80211: move A-MPDU session check from minstrel_ht to mac80211")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1159,6 +1159,29 @@ 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)
|
||||
+{
|
||||
+ struct rate_control_ref *ref = sdata->local->rate_ctrl;
|
||||
+ u16 tid;
|
||||
+
|
||||
+ if (!ref || !(ref->ops->capa & RATE_CTRL_CAPA_AMPDU_TRIGGER))
|
||||
+ return;
|
||||
+
|
||||
+ if (!sta || !sta->sta.ht_cap.ht_supported ||
|
||||
+ !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO ||
|
||||
+ skb->protocol == sdata->control_port_protocol)
|
||||
+ return;
|
||||
+
|
||||
+ tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
+ if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
+ return;
|
||||
+
|
||||
+ ieee80211_start_tx_ba_session(&sta->sta, tid, 0);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* initialises @tx
|
||||
* pass %NULL for the station if unknown, a valid pointer if known
|
||||
@@ -1172,6 +1195,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
+ bool aggr_check = false;
|
||||
int tid;
|
||||
|
||||
memset(tx, 0, sizeof(*tx));
|
||||
@@ -1202,8 +1226,10 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->sdata->control_port_protocol == tx->skb->protocol) {
|
||||
tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
- if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
|
||||
+ if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) {
|
||||
tx->sta = sta_info_get(sdata, hdr->addr1);
|
||||
+ aggr_check = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
|
||||
@@ -1213,8 +1239,12 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
struct tid_ampdu_tx *tid_tx;
|
||||
|
||||
tid = ieee80211_get_tid(hdr);
|
||||
-
|
||||
tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]);
|
||||
+ if (!tid_tx && aggr_check) {
|
||||
+ ieee80211_aggr_check(sdata, tx->sta, skb);
|
||||
+ tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]);
|
||||
+ }
|
||||
+
|
||||
if (tid_tx) {
|
||||
bool queued;
|
||||
|
||||
@@ -3949,29 +3979,6 @@ void ieee80211_txq_schedule_start(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_txq_schedule_start);
|
||||
|
||||
-static 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;
|
||||
-
|
||||
- if (!ref || !(ref->ops->capa & RATE_CTRL_CAPA_AMPDU_TRIGGER))
|
||||
- return;
|
||||
-
|
||||
- if (!sta || !sta->sta.ht_cap.ht_supported ||
|
||||
- !sta->sta.wme || skb_get_queue_mapping(skb) == IEEE80211_AC_VO ||
|
||||
- skb->protocol == sdata->control_port_protocol)
|
||||
- return;
|
||||
-
|
||||
- tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
- if (likely(sta->ampdu_mlme.tid_tx[tid]))
|
||||
- return;
|
||||
-
|
||||
- ieee80211_start_tx_ba_session(&sta->sta, tid, 0);
|
||||
-}
|
||||
-
|
||||
void __ieee80211_subif_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
u32 info_flags,
|
@ -161,7 +161,7 @@ append_server() {
|
||||
}
|
||||
|
||||
append_rev_server() {
|
||||
xappend "--rev-server=$1"
|
||||
xappend "--rev-server=$1"
|
||||
}
|
||||
|
||||
append_address() {
|
||||
@ -878,8 +878,16 @@ dnsmasq_start()
|
||||
append_bool "$cfg" noresolv "--no-resolv"
|
||||
append_bool "$cfg" localise_queries "--localise-queries"
|
||||
append_bool "$cfg" readethers "--read-ethers"
|
||||
append_bool "$cfg" dbus "--enable-dbus"
|
||||
append_bool "$cfg" ubus "--enable-ubus" 1
|
||||
|
||||
local instance_name="dnsmasq.$cfg"
|
||||
if [ "$cfg" = "$DEFAULT_INSTANCE" ]; then
|
||||
instance_name="dnsmasq"
|
||||
fi
|
||||
config_get_bool dbus "$cfg" "dbus" 0
|
||||
[ $dbus -gt 0 ] && xappend "--enable-dbus=uk.org.thekelleys.$instance_name"
|
||||
config_get_bool ubus "$cfg" "ubus" 1
|
||||
[ $ubus -gt 0 ] && xappend "--enable-ubus=$instance_name"
|
||||
|
||||
append_bool "$cfg" expandhosts "--expand-hosts"
|
||||
config_get tftp_root "$cfg" "tftp_root"
|
||||
[ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp"
|
||||
@ -1178,6 +1186,7 @@ boot()
|
||||
start_service() {
|
||||
local instance="$1"
|
||||
local instance_found=0
|
||||
local first_instance=""
|
||||
|
||||
. /lib/functions/network.sh
|
||||
|
||||
@ -1188,10 +1197,27 @@ start_service() {
|
||||
if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
|
||||
instance_found=1
|
||||
fi
|
||||
if [ -z "$DEFAULT_INSTANCE" ]; then
|
||||
local disabled
|
||||
config_get_bool disabled "$name" disabled 0
|
||||
if [ "$disabled" -eq 0 ]; then
|
||||
# First enabled section will be assigned default instance name.
|
||||
# Unnamed sections get precedence over named sections.
|
||||
if expr "$cfg" : 'cfg[0-9a-f]*$' >/dev/null = "9"; then # See uci_fixup_section.
|
||||
DEFAULT_INSTANCE="$name" # Unnamed config section.
|
||||
elif [ -z "$first_instance" ]; then
|
||||
first_instance="$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
DEFAULT_INSTANCE=""
|
||||
config_load dhcp
|
||||
if [ -z "$DEFAULT_INSTANCE" ]; then
|
||||
DEFAULT_INSTANCE="$first_instance" # No unnamed config section was found.
|
||||
fi
|
||||
|
||||
if [ -n "$instance" ]; then
|
||||
[ "$instance_found" -gt 0 ] || return
|
||||
|
@ -11,9 +11,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
PKG_SOURCE_DATE:=2021-06-09
|
||||
PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a
|
||||
PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea
|
||||
PKG_SOURCE_DATE:=2021-06-28
|
||||
PKG_SOURCE_VERSION:=c9b1672f5a83c8dcb14fdbaee651f775a7defe52
|
||||
PKG_MIRROR_HASH:=f33779035153da6bd0b2f100f402f62f1554ab87ed6fbbd938d41df6b9947a1f
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
START=15
|
||||
|
||||
extra_command "compact" "Trigger compaction for all Z-RAM swap dev's"
|
||||
extra_command "status" "Print out information & statistics about Z-RAM swap devices"
|
||||
extra_command "compact" "Trigger compaction for all zram swap devices"
|
||||
extra_command "status" "Print out information & statistics about zram swap devices"
|
||||
|
||||
ram_getsize()
|
||||
{
|
||||
@ -60,15 +60,15 @@ zram_comp_algo()
|
||||
local zram_comp_algo="$( uci -q get system.@system[0].zram_comp_algo )"
|
||||
|
||||
if [ -z "$zram_comp_algo" ]; then
|
||||
# lzo-rle fails on small RAM devices, default to lzo, which is always available
|
||||
# default to lzo, which is always available
|
||||
zram_comp_algo="lzo"
|
||||
fi
|
||||
|
||||
if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then
|
||||
logger -s -t zram_comp_algo -p daemon.debug "Set compression algorithm '$zram_comp_algo' for zram '$dev'"
|
||||
logger -s -t zram_comp_algo -p daemon.debug "set compression algorithm '$zram_comp_algo' for zram '$dev'"
|
||||
echo $zram_comp_algo > "/sys/block/$( basename $dev )/comp_algorithm"
|
||||
else
|
||||
logger -s -t zram_comp_algo -p daemon.debug "Compression algorithm '$zram_comp_algo' is not supported for '$dev'"
|
||||
logger -s -t zram_comp_algo -p daemon.debug "compression algorithm '$zram_comp_algo' is not supported for '$dev'"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ zram_stats()
|
||||
|
||||
printf "\nGathering stats info for zram device \"$( basename "$1" )\"\n\n"
|
||||
|
||||
printf "Z-RAM\n-----\n"
|
||||
printf "ZRAM\n----\n"
|
||||
printf "%-25s - %s\n" "Block device" $zdev
|
||||
awk '{ printf "%-25s - %d MiB\n", "Device size", $1/1024/1024 }' <$zdev/disksize
|
||||
printf "%-25s - %s\n" "Compression algo" "$(cat $zdev/comp_algorithm)"
|
||||
@ -131,7 +131,7 @@ start()
|
||||
}
|
||||
|
||||
if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then
|
||||
logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted"
|
||||
logger -s -t zram_start -p daemon.notice "zram swap is already mounted"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -144,15 +144,18 @@ start()
|
||||
|
||||
local zram_size="$( zram_getsize )"
|
||||
local zram_priority="$( uci -q get system.@system[0].zram_priority )"
|
||||
zram_priority=${zram_priority:+-p $zram_priority}
|
||||
|
||||
logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MegaBytes)"
|
||||
if [ -z "$zram_priority" ]; then
|
||||
zram_priority="100"
|
||||
fi
|
||||
|
||||
logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MiB)"
|
||||
|
||||
zram_reset "$zram_dev" "enforcing defaults"
|
||||
zram_comp_algo "$zram_dev"
|
||||
echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize"
|
||||
busybox mkswap "$zram_dev"
|
||||
busybox swapon -d $zram_priority "$zram_dev"
|
||||
busybox swapon -d -p $zram_priority "$zram_dev"
|
||||
}
|
||||
|
||||
stop()
|
||||
|
@ -56,7 +56,14 @@ start_ntpd_instance() {
|
||||
procd_set_param command "$PROG" -n -N
|
||||
if [ "$enable_server" = "1" ]; then
|
||||
procd_append_param command -l
|
||||
[ -n "$interface" ] && procd_append_param command -I $interface
|
||||
[ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_append_param command -I "$ifname"
|
||||
procd_append_param netdev "$ifname"
|
||||
}
|
||||
fi
|
||||
[ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S "$HOTPLUG_SCRIPT"
|
||||
for peer in $server; do
|
||||
@ -79,11 +86,12 @@ start_ntpd_instance() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
. /lib/functions/network.sh
|
||||
validate_ntp_section ntp start_ntpd_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
local script name use_dhcp
|
||||
local script name use_dhcp enable_server interface
|
||||
|
||||
script=$(readlink -f "$initscript")
|
||||
name=$(basename ${script:-$initscript})
|
||||
@ -106,5 +114,17 @@ service_triggers() {
|
||||
fi
|
||||
}
|
||||
|
||||
config_get_bool enable_server ntp enable_server 0
|
||||
config_get interface ntp interface
|
||||
|
||||
[ $enable_server -eq 1 ] && [ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_add_interface_trigger "interface.*" "$ifname" \
|
||||
/etc/init.d/"$name" reload
|
||||
}
|
||||
|
||||
procd_add_validation validate_ntp_section
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ define Device/mikrotik_routerboard-912uag-2hpnd
|
||||
$(Device/mikrotik_nand)
|
||||
SOC := ar9342
|
||||
DEVICE_MODEL := RouterBOARD 912UAG-2HPnD
|
||||
DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2 kmod-gpio-beeper
|
||||
DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
|
||||
SUPPORTED_DEVICES += rb-912uag-2hpnd
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
|
||||
|
@ -29,6 +29,7 @@ preinit_set_mac_address() {
|
||||
base_mac=$(cat /sys/class/net/eth0/address)
|
||||
ip link set dev eth0 address $(macaddr_add "$base_mac" 2)
|
||||
ip link set dev eth1 address $(macaddr_add "$base_mac" 3)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -4,22 +4,6 @@ CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_AR8216_PHY=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_HAS_BINFMT_FLAT=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_ARCH_HAS_KEEPINITRD=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_ARCH_HAS_PHYS_TO_DMA=y
|
||||
CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
# CONFIG_ARCH_MDM9615 is not set
|
||||
@ -34,15 +18,7 @@ CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
@ -75,7 +51,6 @@ CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_QCOM=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
@ -196,48 +171,7 @@ CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_BITREVERSE=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_COPY_THREAD_TLS=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_OPTPROBES=y
|
||||
CONFIG_HAVE_PCI=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_PROC_CPU=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HIGHMEM=y
|
||||
# CONFIG_HIGHPTE is not set
|
||||
CONFIG_HWMON=y
|
||||
@ -340,6 +274,7 @@ CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
# CONFIG_NVME_TCP is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
@ -372,6 +307,7 @@ CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
CONFIG_PHY_QCOM_IPQ806X_SATA=y
|
||||
# CONFIG_PHY_QCOM_IPQ806X_USB is not set
|
||||
# CONFIG_PHY_QCOM_PCIE2 is not set
|
||||
# CONFIG_PHY_QCOM_QMP is not set
|
||||
# CONFIG_PHY_QCOM_QUSB2 is not set
|
||||
|
196
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
Normal file
196
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
Normal file
@ -0,0 +1,196 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "tenbay,t-mb5eu-v01", "mediatek,mt7621-soc";
|
||||
model = "Tenbay T-MB5EU-V01";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_green;
|
||||
led-failsafe = &led_red;
|
||||
led-running = &led_blue;
|
||||
led-upgrade = &led_red;
|
||||
label-mac-device = &wan_port;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
bootargs-override = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
|
||||
led_blue: blue {
|
||||
label = "blue";
|
||||
gpios = <&aw9523 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_red: red {
|
||||
label = "red";
|
||||
gpios = <&aw9523 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_green: green {
|
||||
label = "green";
|
||||
gpios = <&aw9523 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <50>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&aw9523 9 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&aw9523 8 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c-gpio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compatible = "i2c-gpio";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH &gpio 8 GPIO_ACTIVE_HIGH>;
|
||||
i2c-gpio,delay-us = <10>;
|
||||
|
||||
aw9523: gpio-expander@5b {
|
||||
compatible = "awinic,aw9523-pinctrl";
|
||||
reg = <0x5b>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&aw9523 0 0 16>;
|
||||
|
||||
reset-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
button_pins: button-pins {
|
||||
pins = "gpio8", "gpio9";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
drive-open-drain;
|
||||
input-enable;
|
||||
};
|
||||
|
||||
led_pins: led-pins {
|
||||
pins = "gpio0", "gpio1", "gpio11";
|
||||
function = "gpio";
|
||||
input-disable;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
wan_port: port@0 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "uart3";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "product";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@50000 {
|
||||
label = "factory";
|
||||
reg = <0x50000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@90000 {
|
||||
compatible = "denx,fit";
|
||||
label = "firmware";
|
||||
reg = <0x90000 0xf70000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
1135
target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
Normal file
1135
target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -1200,6 +1200,18 @@ define Device/telco-electronics_x1
|
||||
endef
|
||||
TARGET_DEVICES += telco-electronics_x1
|
||||
|
||||
define Device/tenbay_t-mb5eu-v01
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := Tenbay
|
||||
DEVICE_MODEL := T-MB5EU-V01
|
||||
DEVICE_DTS_CONFIG := config@1
|
||||
DEVICE_PACKAGES += kmod-mt7915e kmod-usb3
|
||||
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
IMAGE_SIZE := 15808k
|
||||
SUPPORTED_DEVICES += mt7621-dm2-t-mb5eu-v01-nor
|
||||
endef
|
||||
TARGET_DEVICES += tenbay_t-mb5eu-v01
|
||||
|
||||
define Device/thunder_timecloud
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
|
@ -148,6 +148,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -150,6 +150,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -102,6 +102,7 @@ CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_I2C_MT7621=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
@ -212,6 +213,7 @@ CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_RALINK_USB is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AW9523=y
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PINCTRL_SX150X=y
|
||||
|
@ -100,6 +100,7 @@ CONFIG_HIGHMEM=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_I2C_MT7621=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
@ -202,6 +203,7 @@ CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_RALINK_USB is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_AW9523=y
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PINCTRL_SX150X=y
|
||||
|
@ -143,6 +143,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -143,6 +143,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -0,0 +1,75 @@
|
||||
From 52d14545d2fc276b1bf9ccf48d4612fab6edfb6a Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 6 May 2021 17:49:55 +0200
|
||||
Subject: [PATCH] mtd: spi-nor: Add support for BoHong bh25q128as
|
||||
|
||||
Add MTD support for the BoHong bh25q128as SPI NOR chip.
|
||||
The chip has 16MB of total capacity, divided into a total of 256
|
||||
sectors, each 64KB sized. The chip also supports 4KB sectors.
|
||||
Additionally, it supports dual and quad read modes.
|
||||
|
||||
Functionality was verified on an Tenbay WR1800K / MTK MT7621 board.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
drivers/mtd/spi-nor/Makefile | 1 +
|
||||
drivers/mtd/spi-nor/bohong.c | 21 +++++++++++++++++++++
|
||||
drivers/mtd/spi-nor/core.c | 1 +
|
||||
drivers/mtd/spi-nor/core.h | 1 +
|
||||
4 files changed, 24 insertions(+)
|
||||
create mode 100644 drivers/mtd/spi-nor/bohong.c
|
||||
|
||||
--- a/drivers/mtd/spi-nor/Makefile
|
||||
+++ b/drivers/mtd/spi-nor/Makefile
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
spi-nor-objs := core.o sfdp.o
|
||||
spi-nor-objs += atmel.o
|
||||
+spi-nor-objs += bohong.o
|
||||
spi-nor-objs += catalyst.o
|
||||
spi-nor-objs += eon.o
|
||||
spi-nor-objs += esmt.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/spi-nor/bohong.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (C) 2005, Intec Automation Inc.
|
||||
+ * Copyright (C) 2014, Freescale Semiconductor, Inc.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/mtd/spi-nor.h>
|
||||
+
|
||||
+#include "core.h"
|
||||
+
|
||||
+static const struct flash_info bohong_parts[] = {
|
||||
+ /* BoHong Microelectronics */
|
||||
+ { "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256,
|
||||
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
+};
|
||||
+
|
||||
+const struct spi_nor_manufacturer spi_nor_bohong = {
|
||||
+ .name = "bohong",
|
||||
+ .parts = bohong_parts,
|
||||
+ .nparts = ARRAY_SIZE(bohong_parts),
|
||||
+};
|
||||
--- a/drivers/mtd/spi-nor/core.c
|
||||
+++ b/drivers/mtd/spi-nor/core.c
|
||||
@@ -2038,6 +2038,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
|
||||
|
||||
static const struct spi_nor_manufacturer *manufacturers[] = {
|
||||
&spi_nor_atmel,
|
||||
+ &spi_nor_bohong,
|
||||
&spi_nor_catalyst,
|
||||
&spi_nor_eon,
|
||||
&spi_nor_esmt,
|
||||
--- a/drivers/mtd/spi-nor/core.h
|
||||
+++ b/drivers/mtd/spi-nor/core.h
|
||||
@@ -382,6 +382,7 @@ struct spi_nor_manufacturer {
|
||||
|
||||
/* Manufacturer drivers. */
|
||||
extern const struct spi_nor_manufacturer spi_nor_atmel;
|
||||
+extern const struct spi_nor_manufacturer spi_nor_bohong;
|
||||
extern const struct spi_nor_manufacturer spi_nor_catalyst;
|
||||
extern const struct spi_nor_manufacturer spi_nor_eon;
|
||||
extern const struct spi_nor_manufacturer spi_nor_esmt;
|
72
target/linux/ramips/patches-5.10/805-pinctrl-AW9523.patch
Normal file
72
target/linux/ramips/patches-5.10/805-pinctrl-AW9523.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From: AngeloGioacchino Del Regno
|
||||
<angelogioacchino.delregno@somainline.org>
|
||||
To: linus.walleij@linaro.org
|
||||
Cc: linux-kernel@vger.kernel.org, konrad.dybcio@somainline.org,
|
||||
marijn.suijten@somainline.org, martin.botka@somainline.org,
|
||||
phone-devel@vger.kernel.org, linux-gpio@vger.kernel.org,
|
||||
devicetree@vger.kernel.org, robh+dt@kernel.org,
|
||||
AngeloGioacchino Del Regno
|
||||
<angelogioacchino.delregno@somainline.org>
|
||||
Subject: [PATCH v5 1/2] pinctrl: Add driver for Awinic AW9523/B I2C GPIO
|
||||
Expander
|
||||
Date: Mon, 25 Jan 2021 19:22:18 +0100
|
||||
|
||||
The Awinic AW9523(B) is a multi-function I2C gpio expander in a
|
||||
TQFN-24L package, featuring PWM (max 37mA per pin, or total max
|
||||
power 3.2Watts) for LED driving capability.
|
||||
|
||||
It has two ports with 8 pins per port (for a total of 16 pins),
|
||||
configurable as either PWM with 1/256 stepping or GPIO input/output,
|
||||
1.8V logic input; each GPIO can be configured as input or output
|
||||
independently from each other.
|
||||
|
||||
This IC also has an internal interrupt controller, which is capable
|
||||
of generating an interrupt for each GPIO, depending on the
|
||||
configuration, and will raise an interrupt on the INTN pin to
|
||||
advertise this to an external interrupt controller.
|
||||
|
||||
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
|
||||
---
|
||||
drivers/pinctrl/Kconfig | 17 +
|
||||
drivers/pinctrl/Makefile | 1 +
|
||||
drivers/pinctrl/pinctrl-aw9523.c | 1122 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 1140 insertions(+)
|
||||
create mode 100644 drivers/pinctrl/pinctrl-aw9523.c
|
||||
|
||||
--- a/drivers/pinctrl/Kconfig
|
||||
+++ b/drivers/pinctrl/Kconfig
|
||||
@@ -110,6 +110,24 @@ config PINCTRL_AMD
|
||||
Requires ACPI/FDT device enumeration code to set up a platform
|
||||
device.
|
||||
|
||||
+config PINCTRL_AW9523
|
||||
+ bool "Awinic AW9523/AW9523B I2C GPIO expander pinctrl driver"
|
||||
+ depends on OF && I2C
|
||||
+ select PINMUX
|
||||
+ select PINCONF
|
||||
+ select GENERIC_PINCONF
|
||||
+ select GPIOLIB
|
||||
+ select GPIOLIB_IRQCHIP
|
||||
+ select REGMAP
|
||||
+ select REGMAP_I2C
|
||||
+ help
|
||||
+ The Awinic AW9523/AW9523B is a multi-function I2C GPIO
|
||||
+ expander with PWM functionality. This driver bundles a
|
||||
+ pinctrl driver to select the function muxing and a GPIO
|
||||
+ driver to handle GPIO, when the GPIO function is selected.
|
||||
+
|
||||
+ Say yes to enable pinctrl and GPIO support for the AW9523(B).
|
||||
+
|
||||
config PINCTRL_BM1880
|
||||
bool "Bitmain BM1880 Pinctrl driver"
|
||||
depends on OF && (ARCH_BITMAIN || COMPILE_TEST)
|
||||
--- a/drivers/pinctrl/Makefile
|
||||
+++ b/drivers/pinctrl/Makefile
|
||||
@@ -14,6 +14,7 @@ obj-$(CONFIG_PINCTRL_AXP209) += pinctrl-
|
||||
obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
|
||||
obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o
|
||||
obj-$(CONFIG_PINCTRL_AMD) += pinctrl-amd.o
|
||||
+obj-$(CONFIG_PINCTRL_AW9523) += pinctrl-aw9523.o
|
||||
obj-$(CONFIG_PINCTRL_BM1880) += pinctrl-bm1880.o
|
||||
obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o
|
||||
obj-$(CONFIG_PINCTRL_DA9062) += pinctrl-da9062.o
|
@ -0,0 +1,34 @@
|
||||
From 52d14545d2fc276b1bf9ccf48d4612fab6edfb6a Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 6 May 2021 17:49:55 +0200
|
||||
Subject: [PATCH] mtd: spi-nor: Add support for BoHong bh25q128as
|
||||
|
||||
Add MTD support for the BoHong bh25q128as SPI NOR chip.
|
||||
The chip has 16MB of total capacity, divided into a total of 256
|
||||
sectors, each 64KB sized. The chip also supports 4KB sectors.
|
||||
Additionally, it supports dual and quad read modes.
|
||||
|
||||
Functionality was verified on an Tenbay WR1800K / MTK MT7621 board.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
drivers/mtd/spi-nor/Makefile | 1 +
|
||||
drivers/mtd/spi-nor/bohong.c | 21 +++++++++++++++++++++
|
||||
drivers/mtd/spi-nor/core.c | 1 +
|
||||
drivers/mtd/spi-nor/core.h | 1 +
|
||||
4 files changed, 24 insertions(+)
|
||||
create mode 100644 drivers/mtd/spi-nor/bohong.c
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -2233,6 +2233,10 @@ static const struct flash_info spi_nor_i
|
||||
|
||||
{ "at45db081d", INFO(0x1f2500, 0, 64 * 1024, 16, SECT_4K) },
|
||||
|
||||
+ /* BoHong Microelectronics */
|
||||
+ { "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256,
|
||||
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
+
|
||||
/* EON -- en25xxx */
|
||||
{ "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
|
72
target/linux/ramips/patches-5.4/805-pinctrl-AW9523.patch
Normal file
72
target/linux/ramips/patches-5.4/805-pinctrl-AW9523.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From: AngeloGioacchino Del Regno
|
||||
<angelogioacchino.delregno@somainline.org>
|
||||
To: linus.walleij@linaro.org
|
||||
Cc: linux-kernel@vger.kernel.org, konrad.dybcio@somainline.org,
|
||||
marijn.suijten@somainline.org, martin.botka@somainline.org,
|
||||
phone-devel@vger.kernel.org, linux-gpio@vger.kernel.org,
|
||||
devicetree@vger.kernel.org, robh+dt@kernel.org,
|
||||
AngeloGioacchino Del Regno
|
||||
<angelogioacchino.delregno@somainline.org>
|
||||
Subject: [PATCH v5 1/2] pinctrl: Add driver for Awinic AW9523/B I2C GPIO
|
||||
Expander
|
||||
Date: Mon, 25 Jan 2021 19:22:18 +0100
|
||||
|
||||
The Awinic AW9523(B) is a multi-function I2C gpio expander in a
|
||||
TQFN-24L package, featuring PWM (max 37mA per pin, or total max
|
||||
power 3.2Watts) for LED driving capability.
|
||||
|
||||
It has two ports with 8 pins per port (for a total of 16 pins),
|
||||
configurable as either PWM with 1/256 stepping or GPIO input/output,
|
||||
1.8V logic input; each GPIO can be configured as input or output
|
||||
independently from each other.
|
||||
|
||||
This IC also has an internal interrupt controller, which is capable
|
||||
of generating an interrupt for each GPIO, depending on the
|
||||
configuration, and will raise an interrupt on the INTN pin to
|
||||
advertise this to an external interrupt controller.
|
||||
|
||||
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
|
||||
---
|
||||
drivers/pinctrl/Kconfig | 17 +
|
||||
drivers/pinctrl/Makefile | 1 +
|
||||
drivers/pinctrl/pinctrl-aw9523.c | 1122 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 1140 insertions(+)
|
||||
create mode 100644 drivers/pinctrl/pinctrl-aw9523.c
|
||||
|
||||
--- a/drivers/pinctrl/Kconfig
|
||||
+++ b/drivers/pinctrl/Kconfig
|
||||
@@ -109,6 +109,24 @@ config PINCTRL_AMD
|
||||
Requires ACPI/FDT device enumeration code to set up a platform
|
||||
device.
|
||||
|
||||
+config PINCTRL_AW9523
|
||||
+ bool "Awinic AW9523/AW9523B I2C GPIO expander pinctrl driver"
|
||||
+ depends on OF && I2C
|
||||
+ select PINMUX
|
||||
+ select PINCONF
|
||||
+ select GENERIC_PINCONF
|
||||
+ select GPIOLIB
|
||||
+ select GPIOLIB_IRQCHIP
|
||||
+ select REGMAP
|
||||
+ select REGMAP_I2C
|
||||
+ help
|
||||
+ The Awinic AW9523/AW9523B is a multi-function I2C GPIO
|
||||
+ expander with PWM functionality. This driver bundles a
|
||||
+ pinctrl driver to select the function muxing and a GPIO
|
||||
+ driver to handle GPIO, when the GPIO function is selected.
|
||||
+
|
||||
+ Say yes to enable pinctrl and GPIO support for the AW9523(B).
|
||||
+
|
||||
config PINCTRL_BM1880
|
||||
bool "Bitmain BM1880 Pinctrl driver"
|
||||
depends on OF && (ARCH_BITMAIN || COMPILE_TEST)
|
||||
--- a/drivers/pinctrl/Makefile
|
||||
+++ b/drivers/pinctrl/Makefile
|
||||
@@ -14,6 +14,7 @@ obj-$(CONFIG_PINCTRL_AXP209) += pinctrl-
|
||||
obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
|
||||
obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o
|
||||
obj-$(CONFIG_PINCTRL_AMD) += pinctrl-amd.o
|
||||
+obj-$(CONFIG_PINCTRL_AW9523) += pinctrl-aw9523.o
|
||||
obj-$(CONFIG_PINCTRL_BM1880) += pinctrl-bm1880.o
|
||||
obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o
|
||||
obj-$(CONFIG_PINCTRL_DIGICOLOR) += pinctrl-digicolor.o
|
@ -131,6 +131,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_RALINK_USB is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -131,6 +131,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_RALINK_USB is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -131,6 +131,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -131,6 +131,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -132,6 +132,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
@ -133,6 +133,7 @@ CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHY_RALINK_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
CONFIG_PINCTRL_RT2880=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_RALINK=y
|
||||
|
Loading…
x
Reference in New Issue
Block a user