mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
Compare commits
23 Commits
v2.4.0-rc1
...
v2.4.0-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
769e8c5c0b | ||
|
|
04c3325710 | ||
|
|
7c1fd79ceb | ||
|
|
1e950be127 | ||
|
|
5fc7ac166a | ||
|
|
87be030169 | ||
|
|
b0688f097b | ||
|
|
ae77be4e5c | ||
|
|
efac512c90 | ||
|
|
bcde3ee6d7 | ||
|
|
7b0ef7f265 | ||
|
|
670f9fee14 | ||
|
|
4c7ee4bf6d | ||
|
|
90868338c7 | ||
|
|
7a20f558e1 | ||
|
|
9b8c1f8449 | ||
|
|
002880c3fa | ||
|
|
3de5c91e6c | ||
|
|
679e20af39 | ||
|
|
191081e46f | ||
|
|
8f7a66f1ac | ||
|
|
c93b14ca7a | ||
|
|
16176a1cc3 |
2
.github/workflows/build-dev.yml
vendored
2
.github/workflows/build-dev.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: ['cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4.yml', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9' ]
|
||||
target: ['cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6718e9786f18dd1380e5977d224d13a5ff3df619 Mon Sep 17 00:00:00 2001
|
||||
From 3feca6da7b0571cf17afc9f0e40d0ede9059c271 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 4 Sep 2021 05:47:27 +0200
|
||||
Subject: [PATCH 02/58] mac80211: update to latest HEAD
|
||||
Subject: [PATCH 01/72] mac80211: update to latest HEAD
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
package/kernel/mac80211/ath.mk | 5 +-
|
||||
package/kernel/mac80211/broadcom.mk | 4 +-
|
||||
.../mac80211/files/lib/netifd/mac80211.sh | 36 -
|
||||
.../files/lib/netifd/wireless/mac80211.sh | 186 ++-
|
||||
.../files/lib/netifd/wireless/mac80211.sh | 214 ++-
|
||||
.../mac80211/files/lib/wifi/mac80211.sh | 110 +-
|
||||
.../patches/ath/120-owl-loader-compat.patch | 53 -
|
||||
.../patches/ath/402-ath_regd_optional.patch | 2 +-
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
...eck-per-vif-offload_flags-in-Tx-path.patch | 26 +
|
||||
.../500-mac80211_configure_antenna_gain.patch | 16 +-
|
||||
...the-dst-buffer-to-of_get_mac_address.patch | 237 +++
|
||||
70 files changed, 2752 insertions(+), 1160 deletions(-)
|
||||
70 files changed, 2777 insertions(+), 1163 deletions(-)
|
||||
delete mode 100644 package/kernel/mac80211/files/lib/netifd/mac80211.sh
|
||||
delete mode 100644 package/kernel/mac80211/patches/ath/120-owl-loader-compat.patch
|
||||
rename package/kernel/mac80211/patches/{ath => ath10k}/080-ath10k_thermal_config.patch (97%)
|
||||
@@ -286,7 +286,7 @@ index 92e5c0e395..0000000000
|
||||
- done
|
||||
-}
|
||||
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
index 9a9c35fb5f..97c567031e 100644
|
||||
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
@@ -1,7 +1,6 @@
|
||||
@@ -310,7 +310,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
config_add_boolean noscan ht_coex acs_exclude_dfs
|
||||
config_add_array ht_capab
|
||||
config_add_array channels
|
||||
@@ -44,11 +43,24 @@ drv_mac80211_init_device_config() {
|
||||
@@ -44,11 +43,26 @@ drv_mac80211_init_device_config() {
|
||||
su_beamformee \
|
||||
mu_beamformer \
|
||||
mu_beamformee \
|
||||
@@ -326,6 +326,8 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
+ he_spr_sr_control \
|
||||
+ he_twt_required
|
||||
+ config_add_int \
|
||||
+ beamformer_antennas \
|
||||
+ beamformee_antennas \
|
||||
+ vht_max_a_mpdu_len_exp \
|
||||
+ vht_max_mpdu \
|
||||
+ vht_link_adapt \
|
||||
@@ -337,7 +339,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
config_add_boolean \
|
||||
ldpc \
|
||||
greenfield \
|
||||
@@ -96,6 +108,23 @@ mac80211_add_capabilities() {
|
||||
@@ -96,6 +110,23 @@ mac80211_add_capabilities() {
|
||||
export -n -- "$__var=$__out"
|
||||
}
|
||||
|
||||
@@ -361,7 +363,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
mac80211_hostapd_setup_base() {
|
||||
local phy="$1"
|
||||
|
||||
@@ -119,6 +148,9 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -119,6 +150,9 @@ mac80211_hostapd_setup_base() {
|
||||
[ "$noscan" -gt 0 ] && hostapd_noscan=1
|
||||
[ "$tx_burst" = 0 ] && tx_burst=
|
||||
|
||||
@@ -371,7 +373,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
ieee80211n=1
|
||||
ht_capab=
|
||||
case "$htmode" in
|
||||
@@ -126,7 +158,7 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -126,7 +160,7 @@ mac80211_hostapd_setup_base() {
|
||||
HT40*|VHT40|VHT80|VHT160|HE40|HE80|HE160)
|
||||
case "$hwmode" in
|
||||
a)
|
||||
@@ -380,7 +382,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
1) ht_capab="[HT40+]";;
|
||||
0) ht_capab="[HT40-]";;
|
||||
esac
|
||||
@@ -200,7 +232,7 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -200,7 +234,7 @@ mac80211_hostapd_setup_base() {
|
||||
case "$htmode" in
|
||||
VHT20|HE20) enable_ac=1;;
|
||||
VHT40|HE40)
|
||||
@@ -389,7 +391,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
1) idx=$(($channel + 2));;
|
||||
0) idx=$(($channel - 2));;
|
||||
esac
|
||||
@@ -208,7 +240,7 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -208,7 +242,7 @@ mac80211_hostapd_setup_base() {
|
||||
vht_center_seg0=$idx
|
||||
;;
|
||||
VHT80|HE80)
|
||||
@@ -398,7 +400,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
1) idx=$(($channel + 6));;
|
||||
2) idx=$(($channel + 2));;
|
||||
3) idx=$(($channel - 2));;
|
||||
@@ -219,15 +251,35 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -219,15 +253,35 @@ mac80211_hostapd_setup_base() {
|
||||
vht_center_seg0=$idx
|
||||
;;
|
||||
VHT160|HE160)
|
||||
@@ -438,7 +440,35 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
[ "$hwmode" = "a" ] || enable_ac=0
|
||||
|
||||
if [ "$enable_ac" != "0" ]; then
|
||||
@@ -337,16 +389,62 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -242,6 +296,8 @@ mac80211_hostapd_setup_base() {
|
||||
mu_beamformee:1 \
|
||||
vht_txop_ps:1 \
|
||||
htc_vht:1 \
|
||||
+ beamformee_antennas:4 \
|
||||
+ beamformer_antennas:4 \
|
||||
rx_antenna_pattern:1 \
|
||||
tx_antenna_pattern:1 \
|
||||
vht_max_a_mpdu_len_exp:7 \
|
||||
@@ -282,6 +338,18 @@ mac80211_hostapd_setup_base() {
|
||||
RX-STBC-123:0x700:0x300:1 \
|
||||
RX-STBC-1234:0x700:0x400:1 \
|
||||
|
||||
+ [ "$(($vht_cap & 0x800))" -gt 0 -a "$su_beamformer" -gt 0 ] && {
|
||||
+ cap_ant="$(( ( ($vht_cap >> 16) & 3 ) + 1 ))"
|
||||
+ [ "$cap_ant" -gt "$beamformer_antennas" ] && cap_ant="$beamformer_antennas"
|
||||
+ [ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[SOUNDING-DIMENSION-$cap_ant]"
|
||||
+ }
|
||||
+
|
||||
+ [ "$(($vht_cap & 0x1000))" -gt 0 -a "$su_beamformee" -gt 0 ] && {
|
||||
+ cap_ant="$(( ( ($vht_cap >> 13) & 3 ) + 1 ))"
|
||||
+ [ "$cap_ant" -gt "$beamformee_antennas" ] && cap_ant="$beamformee_antennas"
|
||||
+ [ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[BF-ANTENNA-$cap_ant]"
|
||||
+ }
|
||||
+
|
||||
# supported Channel widths
|
||||
vht160_hw=0
|
||||
[ "$(($vht_cap & 12))" -eq 4 -a 1 -le "$vht160" ] && \
|
||||
@@ -337,16 +405,62 @@ mac80211_hostapd_setup_base() {
|
||||
esac
|
||||
|
||||
if [ "$enable_ax" != "0" ]; then
|
||||
@@ -504,9 +534,23 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
fi
|
||||
|
||||
hostapd_prepare_device_config "$hostapd_conf_file" nl80211
|
||||
@@ -426,7 +524,11 @@ mac80211_generate_mac() {
|
||||
local oIFS="$IFS"; IFS=":"; set -- $ref; IFS="$oIFS"
|
||||
@@ -401,6 +515,7 @@ mac80211_get_addr() {
|
||||
|
||||
mac80211_generate_mac() {
|
||||
local phy="$1"
|
||||
+ local multiple_bssid="$2"
|
||||
local id="${macidx:-0}"
|
||||
|
||||
local ref="$(cat /sys/class/ieee80211/${phy}/macaddress)"
|
||||
@@ -424,9 +539,16 @@ mac80211_generate_mac() {
|
||||
local mask6=$6
|
||||
|
||||
local oIFS="$IFS"; IFS=":"; set -- $ref; IFS="$oIFS"
|
||||
-
|
||||
+ [ "$multiple_bssid" -eq 1 ] && {
|
||||
+ printf "02:%s:%s:%s:%s:%02x" $b1 $2 $3 $4 $5 $macidx
|
||||
+ return
|
||||
+ }
|
||||
macidx=$(($id + 1))
|
||||
- [ "$((0x$mask1))" -gt 0 ] && {
|
||||
+
|
||||
@@ -517,7 +561,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
b1="0x$1"
|
||||
[ "$id" -gt 0 ] && \
|
||||
b1=$(($b1 ^ ((($id - !($b1 & 2)) << 2)) | 0x2))
|
||||
@@ -434,7 +536,7 @@ mac80211_generate_mac() {
|
||||
@@ -434,7 +556,7 @@ mac80211_generate_mac() {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -526,7 +570,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
printf "%s:%s:%s:%s:%s:%02x" $1 $2 $3 $4 $5 $(( 0x$6 ^ $id ))
|
||||
return
|
||||
}
|
||||
@@ -449,7 +551,7 @@ mac80211_generate_mac() {
|
||||
@@ -449,7 +571,7 @@ mac80211_generate_mac() {
|
||||
find_phy() {
|
||||
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
||||
[ -n "$path" ] && {
|
||||
@@ -535,7 +579,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
[ -n "$phy" ] && return 0
|
||||
}
|
||||
[ -n "$macaddr" ] && {
|
||||
@@ -528,7 +630,7 @@ mac80211_iw_interface_add() {
|
||||
@@ -528,11 +650,12 @@ mac80211_iw_interface_add() {
|
||||
rc="$?"
|
||||
}
|
||||
|
||||
@@ -544,7 +588,21 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
return $rc
|
||||
}
|
||||
|
||||
@@ -689,14 +791,8 @@ mac80211_prepare_iw_htmode() {
|
||||
mac80211_prepare_vif() {
|
||||
+ local multiple_bssid=$1
|
||||
json_select config
|
||||
|
||||
json_get_vars ifname mode ssid wds powersave macaddr enable wpa_psk_file vlan_file
|
||||
@@ -546,7 +669,7 @@ mac80211_prepare_vif() {
|
||||
json_select ..
|
||||
|
||||
[ -n "$macaddr" ] || {
|
||||
- macaddr="$(mac80211_generate_mac $phy)"
|
||||
+ macaddr="$(mac80211_generate_mac $phy $multiple_bssid)"
|
||||
macidx="$(($macidx + 1))"
|
||||
}
|
||||
|
||||
@@ -689,14 +812,8 @@ mac80211_prepare_iw_htmode() {
|
||||
case "$htmode" in
|
||||
VHT20|HT20) iw_htmode=HT20;;
|
||||
HT40*|VHT40|VHT160)
|
||||
@@ -561,7 +619,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
case "$htmode" in
|
||||
HT40+) iw_htmode="HT40+";;
|
||||
HT40-) iw_htmode="HT40-";;
|
||||
@@ -709,6 +805,12 @@ mac80211_prepare_iw_htmode() {
|
||||
@@ -709,6 +826,12 @@ mac80211_prepare_iw_htmode() {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -574,7 +632,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
esac
|
||||
[ "$auto_channel" -gt 0 ] && iw_htmode="HT40+"
|
||||
;;
|
||||
@@ -818,7 +920,6 @@ mac80211_setup_vif() {
|
||||
@@ -818,7 +941,6 @@ mac80211_setup_vif() {
|
||||
mesh)
|
||||
wireless_vif_parse_encryption
|
||||
[ -z "$htmode" ] && htmode="NOHT";
|
||||
@@ -582,7 +640,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ] || chan_is_dfs "$phy" "$channel"; then
|
||||
mac80211_setup_supplicant $vif_enable || failed=1
|
||||
else
|
||||
@@ -832,7 +933,6 @@ mac80211_setup_vif() {
|
||||
@@ -832,7 +954,6 @@ mac80211_setup_vif() {
|
||||
adhoc)
|
||||
wireless_vif_parse_encryption
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then
|
||||
@@ -590,7 +648,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
mac80211_setup_supplicant_noctl $vif_enable || failed=1
|
||||
else
|
||||
mac80211_setup_adhoc $vif_enable
|
||||
@@ -849,10 +949,30 @@ mac80211_setup_vif() {
|
||||
@@ -849,10 +970,30 @@ mac80211_setup_vif() {
|
||||
|
||||
get_freq() {
|
||||
local phy="$1"
|
||||
@@ -623,17 +681,18 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
chan_is_dfs() {
|
||||
local phy="$1"
|
||||
local chan="$2"
|
||||
@@ -896,7 +1016,8 @@ drv_mac80211_setup() {
|
||||
@@ -896,7 +1037,9 @@ drv_mac80211_setup() {
|
||||
country chanbw distance \
|
||||
txpower antenna_gain \
|
||||
rxantenna txantenna \
|
||||
- frag rts beacon_int:100 htmode
|
||||
+ frag rts beacon_int:100 htmode \
|
||||
+ multiple_bssid:0 \
|
||||
+ num_global_macaddr
|
||||
json_get_values basic_rate_list basic_rate
|
||||
json_get_values scan_list scan_list
|
||||
json_select ..
|
||||
@@ -933,7 +1054,7 @@ drv_mac80211_setup() {
|
||||
@@ -933,7 +1076,7 @@ drv_mac80211_setup() {
|
||||
done
|
||||
|
||||
# convert channel to frequency
|
||||
@@ -642,7 +701,7 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
|
||||
[ -n "$country" ] && {
|
||||
iw reg get | grep -q "^country $country:" || {
|
||||
@@ -958,6 +1079,7 @@ drv_mac80211_setup() {
|
||||
@@ -958,6 +1101,7 @@ drv_mac80211_setup() {
|
||||
set_default txantenna 0xffffffff
|
||||
set_default distance 0
|
||||
set_default antenna_gain 0
|
||||
@@ -650,6 +709,15 @@ index 9a9c35fb5f..a25e4ff9b2 100644
|
||||
|
||||
[ "$txantenna" = "all" ] && txantenna=0xffffffff
|
||||
[ "$rxantenna" = "all" ] && rxantenna=0xffffffff
|
||||
@@ -989,7 +1133,7 @@ drv_mac80211_setup() {
|
||||
mac80211_prepare_iw_htmode
|
||||
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
|
||||
NEWAPLIST=
|
||||
- for_each_interface "ap" mac80211_prepare_vif
|
||||
+ for_each_interface "ap" mac80211_prepare_vif ${multiple_bssid}
|
||||
NEW_MD5=$(test -e "${hostapd_conf_file}" && md5sum ${hostapd_conf_file})
|
||||
OLD_MD5=$(uci -q -P /var/state get wireless._${phy}.md5)
|
||||
if [ "${NEWAPLIST}" != "${OLDAPLIST}" ]; then
|
||||
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
index 3e99f06693..6aa46b0c74 100644
|
||||
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
|
||||
@@ -230,6 +230,8 @@ IN_SFP_PHY=TRUE
|
||||
IN_MALIBU_PHY=TRUE
|
||||
else ifeq (CPPE, $(CHIP_TYPE))
|
||||
IN_QCA808X_PHY=TRUE
|
||||
IN_QCA803X_PHY=TRUE
|
||||
IN_SFP_PHY=TRUE
|
||||
IN_PHY_I2C_MODE=TRUE
|
||||
IN_MALIBU_PHY=TRUE
|
||||
else ifeq (DESS, $(CHIP_TYPE))
|
||||
|
||||
@@ -43,6 +43,7 @@ return view.extend({
|
||||
o.value('dhcp', _('Address configuration via DHCP'));
|
||||
o.value('pppoe', _('Address configuration via PPPoE'));
|
||||
o.value('wwan', _('Cellular network connection'));
|
||||
o.value('wds', _('WiFi WDS uplink'));
|
||||
|
||||
o = s.option(form.ListValue, 'modem-type', _('Modem type'));
|
||||
o.depends('protocol', 'wwan');
|
||||
@@ -105,6 +106,25 @@ return view.extend({
|
||||
o.depends('protocol', 'static');
|
||||
o.datatype = 'ipaddr("nomask")';
|
||||
|
||||
o = s.option(form.Value, 'ssid', _('SSID'));
|
||||
o.depends('protocol', 'wds');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.option(form.Value, 'passphrase', _('Passphrase'));
|
||||
o.depends('protocol', 'wds');
|
||||
o.password = true;
|
||||
o.rmempty = false;
|
||||
o.datatype = "rangelength(8, 31)";
|
||||
|
||||
o = s.option(form.ListValue, 'encryption', _('Encryption'));
|
||||
o.depends('protocol', 'wds');
|
||||
o.value('psk', 'PSK');
|
||||
o.value('psk-mixed', 'PSK-Mixed');
|
||||
o.value('psk2', 'PSK2');
|
||||
o.value('sae', 'SAE');
|
||||
o.value('sae-mixed', 'SAE-Mixed');
|
||||
o.password = true;
|
||||
|
||||
for (var i = 0; i < s.children.length; i++)
|
||||
data.broadband[s.children[i].option] = profile.broadband[s.children[i].option];
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ addiface() {
|
||||
waitiface() {
|
||||
local iface=$1
|
||||
|
||||
ubus -t 75 wait_for hostapd.$1
|
||||
ubus -t 120 wait_for hostapd.$1
|
||||
|
||||
[ $? -eq 0 ] || exit 0
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-02-15
|
||||
PKG_SOURCE_VERSION:=a78cad29ffd3635d80d2dfc414051ec8a9dbb6b0
|
||||
PKG_SOURCE_VERSION:=6d321d65047e1582fffad6034679ecb7aeabed71
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
@@ -102,10 +102,6 @@
|
||||
"encryption": {
|
||||
"proto": "none",
|
||||
"ieee80211w": "optional"
|
||||
},
|
||||
"roaming": {
|
||||
"message-exchange": "ds",
|
||||
"generate-psk": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
"band": "2G",
|
||||
"country": "CA",
|
||||
"channel-mode": "HE",
|
||||
"channel-width": 40
|
||||
}, {
|
||||
"band": "5G",
|
||||
"country": "CA",
|
||||
"channel-mode": "HE",
|
||||
"channel-width": 80
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL=https://github.com/blogic/ucentral-wifi.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-04-13
|
||||
PKG_SOURCE_VERSION:=b6dd24f79b14346e767fdda7206ad8c9d851ab35
|
||||
PKG_SOURCE_VERSION:=b64cd4149388bd6b49852ba37296cb76acaff537
|
||||
#PKG_MIRROR_HASH:=a8000b3cf43ce9ebfa7305661475fec98ec1dba2dc7b062028c2e17d7c2ec50b
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
@@ -32,6 +32,7 @@ ALLWIFIBOARDS:= \
|
||||
sercomm-wallaby \
|
||||
edgecore-eap102 \
|
||||
wallys-dr6018 \
|
||||
wallys-dr6018-v4 \
|
||||
tplink-ex227 \
|
||||
tplink-ex447
|
||||
|
||||
@@ -134,6 +135,7 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
|
||||
$(eval $(call generate-ath11k-wifi-package,sercomm-wallaby,Sercomm Kiwi))
|
||||
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018,Wallys DR6018))
|
||||
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018-v4,Wallys DR6018 V4))
|
||||
$(eval $(call generate-ath11k-wifi-package,edgecore-eap101,EdgeCore EAP101))
|
||||
$(eval $(call generate-ath11k-wifi-package,edgecore-eap102,Edgecore EAP102))
|
||||
$(eval $(call generate-ath11k-wifi-package,tplink-ex227,TP-Link EX227))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
feeds/wifi-ax/ath11k-wifi/board-cig-wf196.bin.IPQ8074
Normal file
BIN
feeds/wifi-ax/ath11k-wifi/board-cig-wf196.bin.IPQ8074
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
feeds/wifi-ax/ath11k-wifi/board-wallys-dr6018-v4.bin.IPQ6018
Normal file
BIN
feeds/wifi-ax/ath11k-wifi/board-wallys-dr6018-v4.bin.IPQ6018
Normal file
Binary file not shown.
Binary file not shown.
@@ -114,7 +114,7 @@ hostapd_common_add_device_config() {
|
||||
|
||||
config_add_int airtime_mode
|
||||
|
||||
config_add_boolean rnr_beacon he_co_locate
|
||||
config_add_boolean multiple_bssid rnr_beacon he_co_locate ema
|
||||
hostapd_add_log_config
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ hostapd_prepare_device_config() {
|
||||
json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
|
||||
acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
|
||||
rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \
|
||||
he_co_locate rnr_beacon
|
||||
multiple_bssid he_co_locate rnr_beacon ema
|
||||
|
||||
hostapd_set_log_options base_cfg
|
||||
|
||||
@@ -139,6 +139,8 @@ hostapd_prepare_device_config() {
|
||||
set_default cell_density 0
|
||||
set_default he_co_locate 0
|
||||
set_default rnr_beacon 0
|
||||
set_default multiple_bssid 0
|
||||
set_default ema 0
|
||||
|
||||
[ -n "$country" ] && {
|
||||
append base_cfg "country_code=$country" "$N"
|
||||
@@ -233,6 +235,8 @@ hostapd_prepare_device_config() {
|
||||
[ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N"
|
||||
[ "$rnr_beacon" -gt 0 ] && append base_cfg "rnr_beacon=$rnr_beacon" "$N"
|
||||
[ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N"
|
||||
[ "$multiple_bssid" -gt 0 ] && append base_cfg "multiple_bssid=$multiple_bssid" "$N"
|
||||
[ "$ema" -gt 0 ] && append base_cfg "ema=$ema" "$N"
|
||||
|
||||
json_get_values opts hostapd_options
|
||||
for val in $opts; do
|
||||
|
||||
@@ -59,9 +59,9 @@ config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||
config-$(call config_package,ath11k) += ATH11K ATH11K_AHB ATH11K_SPECTRAL ATH11K_DEBUG
|
||||
config-$(call config_package,ath11k-pci) += ATH11K_PCI
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512)
|
||||
#config-y += ATH11K_MEM_PROFILE_512M
|
||||
endif
|
||||
#ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512)
|
||||
config-y += ATH11K_MEM_PROFILE_512M
|
||||
#endif
|
||||
|
||||
config-$(call config_package,ath5k) += ATH5K
|
||||
ifdef CONFIG_TARGET_ath25
|
||||
|
||||
@@ -53,6 +53,8 @@ drv_mac80211_init_device_config() {
|
||||
he_spr_sr_control \
|
||||
he_twt_required
|
||||
config_add_int \
|
||||
beamformer_antennas \
|
||||
beamformee_antennas \
|
||||
vht_max_a_mpdu_len_exp \
|
||||
vht_max_mpdu \
|
||||
vht_link_adapt \
|
||||
@@ -294,6 +296,8 @@ mac80211_hostapd_setup_base() {
|
||||
mu_beamformee:1 \
|
||||
vht_txop_ps:1 \
|
||||
htc_vht:1 \
|
||||
beamformee_antennas:4 \
|
||||
beamformer_antennas:4 \
|
||||
rx_antenna_pattern:1 \
|
||||
tx_antenna_pattern:1 \
|
||||
vht_max_a_mpdu_len_exp:7 \
|
||||
@@ -334,6 +338,18 @@ mac80211_hostapd_setup_base() {
|
||||
RX-STBC-123:0x700:0x300:1 \
|
||||
RX-STBC-1234:0x700:0x400:1 \
|
||||
|
||||
[ "$(($vht_cap & 0x800))" -gt 0 -a "$su_beamformer" -gt 0 ] && {
|
||||
cap_ant="$(( ( ($vht_cap >> 16) & 3 ) + 1 ))"
|
||||
[ "$cap_ant" -gt "$beamformer_antennas" ] && cap_ant="$beamformer_antennas"
|
||||
[ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[SOUNDING-DIMENSION-$cap_ant]"
|
||||
}
|
||||
|
||||
[ "$(($vht_cap & 0x1000))" -gt 0 -a "$su_beamformee" -gt 0 ] && {
|
||||
cap_ant="$(( ( ($vht_cap >> 13) & 3 ) + 1 ))"
|
||||
[ "$cap_ant" -gt "$beamformee_antennas" ] && cap_ant="$beamformee_antennas"
|
||||
[ "$cap_ant" -gt 1 ] && vht_capab="$vht_capab[BF-ANTENNA-$cap_ant]"
|
||||
}
|
||||
|
||||
# supported Channel widths
|
||||
vht160_hw=0
|
||||
[ "$(($vht_cap & 12))" -eq 4 -a 1 -le "$vht160" ] && \
|
||||
@@ -499,6 +515,7 @@ mac80211_get_addr() {
|
||||
|
||||
mac80211_generate_mac() {
|
||||
local phy="$1"
|
||||
local multiple_bssid="$2"
|
||||
local id="${macidx:-0}"
|
||||
|
||||
local ref="$(cat /sys/class/ieee80211/${phy}/macaddress)"
|
||||
@@ -522,7 +539,10 @@ mac80211_generate_mac() {
|
||||
local mask6=$6
|
||||
|
||||
local oIFS="$IFS"; IFS=":"; set -- $ref; IFS="$oIFS"
|
||||
|
||||
[ "$multiple_bssid" -eq 1 ] && {
|
||||
printf "02:%s:%s:%s:%s:%02x" $b1 $2 $3 $4 $5 $macidx
|
||||
return
|
||||
}
|
||||
macidx=$(($id + 1))
|
||||
|
||||
local use_global=0
|
||||
@@ -635,6 +655,7 @@ mac80211_iw_interface_add() {
|
||||
}
|
||||
|
||||
mac80211_prepare_vif() {
|
||||
local multiple_bssid=$1
|
||||
json_select config
|
||||
|
||||
json_get_vars ifname mode ssid wds powersave macaddr enable wpa_psk_file vlan_file
|
||||
@@ -648,7 +669,7 @@ mac80211_prepare_vif() {
|
||||
json_select ..
|
||||
|
||||
[ -n "$macaddr" ] || {
|
||||
macaddr="$(mac80211_generate_mac $phy)"
|
||||
macaddr="$(mac80211_generate_mac $phy $multiple_bssid)"
|
||||
macidx="$(($macidx + 1))"
|
||||
}
|
||||
|
||||
@@ -1017,6 +1038,7 @@ drv_mac80211_setup() {
|
||||
txpower antenna_gain \
|
||||
rxantenna txantenna \
|
||||
frag rts beacon_int:100 htmode \
|
||||
multiple_bssid:0 \
|
||||
num_global_macaddr
|
||||
json_get_values basic_rate_list basic_rate
|
||||
json_get_values scan_list scan_list
|
||||
@@ -1111,7 +1133,7 @@ drv_mac80211_setup() {
|
||||
mac80211_prepare_iw_htmode
|
||||
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
|
||||
NEWAPLIST=
|
||||
for_each_interface "ap" mac80211_prepare_vif
|
||||
for_each_interface "ap" mac80211_prepare_vif ${multiple_bssid}
|
||||
NEW_MD5=$(test -e "${hostapd_conf_file}" && md5sum ${hostapd_conf_file})
|
||||
OLD_MD5=$(uci -q -P /var/state get wireless._${phy}.md5)
|
||||
if [ "${NEWAPLIST}" != "${OLDAPLIST}" ]; then
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Tue, 22 Sep 2020 11:05:12 +0200
|
||||
Subject: ath11k: Disable intersection of regd from BDF/firmware
|
||||
|
||||
We definitely don't want to use an arbitrary default domain which is
|
||||
intersected with each other. Instead, the each reported regulary domain
|
||||
from the device should be handled independently.
|
||||
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
index 54617c0e5484700939417abaa6652524dda29c36..ad31e709fc78978376178a38ef4ca51d6b6c8ebe 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -7207,16 +7207,6 @@ static int ath11k_reg_chan_list_event(struct ath11k_base *ab, struct sk_buff *sk
|
||||
(char *)reg_info->alpha2, 2))
|
||||
goto mem_free;
|
||||
|
||||
- /* Intersect new rules with default regd if a new country setting was
|
||||
- * requested, i.e a default regd was already set during initialization
|
||||
- * and the regd coming from this event has a valid country info.
|
||||
- */
|
||||
- if (ab->default_regd[pdev_idx] &&
|
||||
- !ath11k_reg_is_world_alpha((char *)
|
||||
- ab->default_regd[pdev_idx]->alpha2) &&
|
||||
- !ath11k_reg_is_world_alpha((char *)reg_info->alpha2))
|
||||
- intersect = true;
|
||||
-
|
||||
regd = ath11k_reg_build_regd(ab, reg_info, intersect);
|
||||
if (!regd) {
|
||||
ath11k_warn(ab, "failed to build regd from reg_info\n");
|
||||
@@ -0,0 +1,85 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Fri, 30 Oct 2020 12:02:21 +0100
|
||||
Subject: ath11k: Accept new regdomain during initialization
|
||||
|
||||
The driver is registering as iee80211_hw with its OPs and is then able to
|
||||
be called by the upper layer. This for example happens early in the phase
|
||||
when the correct regulary domain should be set. But the regulary domain
|
||||
will only be accepted when the ATH11K_FLAG_REGISTERED flag was set after
|
||||
the ATH11K_QMI_EVENT_FW_READY was processed. So it can easily happen that
|
||||
the regularly domain is not correctly processed when
|
||||
ATH11K_QMI_EVENT_FW_READY isn't handled immediately:
|
||||
|
||||
$ iw reg set CA
|
||||
$ iw reg get|grep country
|
||||
country CA: DFS-FCC
|
||||
country CA: DFS-FCC
|
||||
country CA: DFS-FCC
|
||||
|
||||
$ echo "c000000.wifi1" > /sys/bus/platform/drivers/ath11k/unbind
|
||||
$ echo "c000000.wifi1" > /sys/bus/platform/drivers/ath11k/bind
|
||||
$ iw reg get|grep country
|
||||
country CA: DFS-FCC
|
||||
country US: DFS-FCC
|
||||
country US: DFS-FCC
|
||||
|
||||
It is therefore essential to accept the regulatory changes without having
|
||||
seen the ATH11K_QMI_EVENT_FW_READY. And since there are also potentially
|
||||
more problems in ath11k_debug_pdev_create, ath11k_mac_register and
|
||||
ath11k_mac_allocate with their use of ATH11K_FLAG_REGISTERED, it is better
|
||||
to move the ATH11K_QMI_EVENT_FW_READY. to a new flag.
|
||||
|
||||
Tested with WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
Forwarded: https://lore.kernel.org/all/1829665.1PRlr7bOQj@ripper/
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
|
||||
index 63a9f47146fe6dec0942176c04437e7900b05efe..2585518cb1a853bbae3b59af93a3bd3e1310f646 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -208,7 +208,7 @@ enum ath11k_scan_state {
|
||||
|
||||
enum ath11k_dev_flags {
|
||||
ATH11K_CAC_RUNNING,
|
||||
- ATH11K_FLAG_CORE_REGISTERED,
|
||||
+ ATH11K_FLAG_FW_READY,
|
||||
ATH11K_FLAG_CRASH_FLUSH,
|
||||
ATH11K_FLAG_RAW_MODE,
|
||||
ATH11K_FLAG_HW_CRYPTO_DISABLED,
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
index 9beda3b94da5d28af53eb25c287a24c41bc6285c..6f0d830dc7c946351b642af9444b12ed82bec558 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9385,6 +9385,8 @@ static int __ath11k_mac_register(struct ath11k *ar)
|
||||
goto err_free_if_combs;
|
||||
}
|
||||
|
||||
+ set_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags);
|
||||
+
|
||||
if (!ab->hw_params.supports_monitor)
|
||||
/* There's a race between calling ieee80211_register_hw()
|
||||
* and here where the monitor mode is enabled for a little
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
index f9a8f96e7d31b404d6b47d12cc37a885fb55f764..f3dd4604db2e4c834238e306ad20194f253fe432 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -4465,7 +4465,7 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
|
||||
break;
|
||||
case ATH11K_QMI_EVENT_FW_READY:
|
||||
clear_bit(ATH11K_FLAG_QMI_FAIL, &ab->dev_flags);
|
||||
- if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) {
|
||||
+ if (test_bit(ATH11K_FLAG_FW_READY, &ab->dev_flags)) {
|
||||
ath11k_hal_dump_srng_stats(ab);
|
||||
queue_work(ab->workqueue, &ab->restart_work);
|
||||
break;
|
||||
@@ -4487,7 +4487,7 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
ath11k_core_qmi_firmware_ready(ab);
|
||||
- set_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags);
|
||||
+ set_bit(ATH11K_FLAG_FW_READY, &ab->dev_flags);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -0,0 +1,60 @@
|
||||
From: Joe Stefek <jstefek@datto.com>
|
||||
Date: Tue, 15 Sep 2020 08:44:21 -0700
|
||||
Subject: Drop regd patch which prevents changing reg domain on system with vdevs.
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
|
||||
index 03e2a5ca60dcde2173f1abf10d10d1648f0ba29d..b83d89c1af33073c25e2877557d947895ef9537d 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/reg.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/reg.c
|
||||
@@ -41,37 +41,6 @@ static bool ath11k_regdom_changes(struct ath11k *ar, char *alpha2)
|
||||
return memcmp(regd->alpha2, alpha2, 2) != 0;
|
||||
}
|
||||
|
||||
-static bool ath11k_reg_validate_pdev_state(struct ath11k* ar)
|
||||
-{
|
||||
- struct ath11k_base *ab = ar->ab;
|
||||
- struct ath11k_pdev *pdev;
|
||||
- struct ath11k* tmp_ar;
|
||||
- int i;
|
||||
-
|
||||
- rcu_read_lock();
|
||||
- for (i = 0; i < ab->num_radios; i++) {
|
||||
- pdev = rcu_dereference(ab->pdevs_active[i]);
|
||||
- if (!pdev)
|
||||
- continue;
|
||||
-
|
||||
- tmp_ar = pdev->ar;
|
||||
- if (tmp_ar) {
|
||||
- mutex_lock(&tmp_ar->conf_mutex);
|
||||
- if (tmp_ar->num_started_vdevs) {
|
||||
- if (tmp_ar == ar)
|
||||
- ath11k_warn(ab, "%s has active interface, please bring down to set country code",
|
||||
- wiphy_name(ar->hw->wiphy));
|
||||
- mutex_unlock(&tmp_ar->conf_mutex);
|
||||
- rcu_read_unlock();
|
||||
- return false;
|
||||
- }
|
||||
- mutex_unlock(&tmp_ar->conf_mutex);
|
||||
- }
|
||||
- }
|
||||
- rcu_read_unlock();
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
static void
|
||||
ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
|
||||
{
|
||||
@@ -105,13 +74,6 @@ ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
|
||||
return;
|
||||
}
|
||||
|
||||
- /* The SET_INIT_COUNTRY command should not be sent to firmware while any vdev is active.
|
||||
- * Also it does not make sense to give the command for certain pdev's alone.
|
||||
- * Hence check all the pdev's if any have an active vdev before sending the command.
|
||||
- */
|
||||
- if (!ath11k_reg_validate_pdev_state(ar))
|
||||
- return;
|
||||
-
|
||||
/* Set the country code to the firmware and wait for
|
||||
* the WMI_REG_CHAN_LIST_CC EVENT for updating the
|
||||
* reg info
|
||||
278
feeds/wifi-ax/mac80211/patches/pending/0009-regdb.patch
Normal file
278
feeds/wifi-ax/mac80211/patches/pending/0009-regdb.patch
Normal file
@@ -0,0 +1,278 @@
|
||||
From patchwork Fri Nov 12 15:31:16 2021
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Sven Eckelmann <sven@narfation.org>
|
||||
X-Patchwork-Id: 12616993
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <linux-wireless-owner@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 721EAC433F5
|
||||
for <linux-wireless@archiver.kernel.org>;
|
||||
Fri, 12 Nov 2021 15:32:26 +0000 (UTC)
|
||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
||||
by mail.kernel.org (Postfix) with ESMTP id 4E73F60C40
|
||||
for <linux-wireless@archiver.kernel.org>;
|
||||
Fri, 12 Nov 2021 15:32:26 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S230182AbhKLPfQ (ORCPT
|
||||
<rfc822;linux-wireless@archiver.kernel.org>);
|
||||
Fri, 12 Nov 2021 10:35:16 -0500
|
||||
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56078 "EHLO
|
||||
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S229509AbhKLPfP (ORCPT
|
||||
<rfc822;linux-wireless@vger.kernel.org>);
|
||||
Fri, 12 Nov 2021 10:35:15 -0500
|
||||
Received: from dvalin.narfation.org (dvalin.narfation.org
|
||||
[IPv6:2a00:17d8:100::8b1])
|
||||
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3035C061766
|
||||
for <linux-wireless@vger.kernel.org>;
|
||||
Fri, 12 Nov 2021 07:32:24 -0800 (PST)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org;
|
||||
s=20121; t=1636731141;
|
||||
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
|
||||
to:to:cc:cc:mime-version:mime-version:
|
||||
content-transfer-encoding:content-transfer-encoding;
|
||||
bh=oHqfDu/AzlIIJ7kJWRvWS79eoKm0cbRICNb1jk+xitA=;
|
||||
b=QcxgTgtUlyXNy5WQL+HLDH08b/xtVIevhpQATuhOx1ydUSKdszhvhpZwXwoQO6YajcE44M
|
||||
ZxrForTEDSbDg0ewdn/v6X0/tUqzAFbLruW76huN+w/XEO2/egNP0LiAxknVbhFwgf0rX8
|
||||
s4RipvwxFT/ecJd/iL80lK1oLkTVeSg=
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
To: ath11k@lists.infradead.org
|
||||
Cc: linux-wireless@vger.kernel.org, Sven Eckelmann <sven@narfation.org>
|
||||
Subject: [PATCH] ath11k: Fix ETSI regd with weather radar overlap
|
||||
Date: Fri, 12 Nov 2021 16:31:16 +0100
|
||||
Message-Id: <20211112153116.1214421-1-sven@narfation.org>
|
||||
X-Mailer: git-send-email 2.30.2
|
||||
MIME-Version: 1.0
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
Some ETSI countries have a small overlap in the wireless-regdb with an ETSI
|
||||
channel (5590-5650). A good example is Australia:
|
||||
|
||||
country AU: DFS-ETSI
|
||||
(2400 - 2483.5 @ 40), (36)
|
||||
(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW
|
||||
(5250 - 5350 @ 80), (20), NO-OUTDOOR, AUTO-BW, DFS
|
||||
(5470 - 5600 @ 80), (27), DFS
|
||||
(5650 - 5730 @ 80), (27), DFS
|
||||
(5730 - 5850 @ 80), (36)
|
||||
(57000 - 66000 @ 2160), (43), NO-OUTDOOR
|
||||
|
||||
If the firmware (or the BDF) is shipped with these rules then there is only
|
||||
a 10 MHz overlap with the weather radar:
|
||||
|
||||
* below: 5470 - 5590
|
||||
* weather radar: 5590 - 5600
|
||||
* above: (none for the rule "5470 - 5600 @ 80")
|
||||
|
||||
There are several wrong assumption in the ath11k code:
|
||||
|
||||
* there is always a valid range below the weather radar
|
||||
(actually: there could be no range below the weather radar range OR range
|
||||
could be smaller than 20 MHz)
|
||||
* intersected range in the weather radar range is valid
|
||||
(actually: the range could be smaller than 20 MHz)
|
||||
* range above weather radar is either empty or valid
|
||||
(actually: the range could be smaller than 20 MHz)
|
||||
|
||||
These wrong assumption will lead in this example to a rule
|
||||
|
||||
(5590 - 5600 @ 20), (N/A, 27), (600000 ms), DFS, AUTO-BW
|
||||
|
||||
which is invalid according to is_valid_reg_rule() because the freq_diff is
|
||||
only 10 MHz but the max_bandwidth is set to 20 MHz. Which results in a
|
||||
rejection like:
|
||||
|
||||
WARNING: at backports-20210222_001-4.4.60-b157d2276/net/wireless/reg.c:3984
|
||||
[...]
|
||||
Call trace:
|
||||
[<ffffffbffc3d2e50>] reg_get_max_bandwidth+0x300/0x3a8 [cfg80211]
|
||||
[<ffffffbffc3d3d0c>] regulatory_set_wiphy_regd_sync+0x3c/0x98 [cfg80211]
|
||||
[<ffffffbffc651598>] ath11k_regd_update+0x1a8/0x210 [ath11k]
|
||||
[<ffffffbffc652108>] ath11k_regd_update_work+0x18/0x20 [ath11k]
|
||||
[<ffffffc0000a93e0>] process_one_work+0x1f8/0x340
|
||||
[<ffffffc0000a9784>] worker_thread+0x25c/0x448
|
||||
[<ffffffc0000aedc8>] kthread+0xd0/0xd8
|
||||
[<ffffffc000085550>] ret_from_fork+0x10/0x40
|
||||
ath11k c000000.wifi: failed to perform regd update : -22
|
||||
Invalid regulatory domain detected
|
||||
|
||||
To avoid this, the algorithm has to be changed slightly. Instead of
|
||||
splitting a rule which overlaps with the weather radar range into 3 pieces
|
||||
and accepting the first two parts blindly, it must actually be checked for
|
||||
each piece whether it is a valid range. And only if it is valid, add it to
|
||||
the output array.
|
||||
|
||||
When these checks are in place, the processed rules for AU would end up as
|
||||
|
||||
country AU: DFS-ETSI
|
||||
(2400 - 2483 @ 40), (N/A, 36), (N/A)
|
||||
(5150 - 5250 @ 80), (6, 23), (N/A), NO-OUTDOOR, AUTO-BW
|
||||
(5250 - 5350 @ 80), (6, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
|
||||
(5470 - 5590 @ 80), (6, 27), (0 ms), DFS, AUTO-BW
|
||||
(5650 - 5730 @ 80), (6, 27), (0 ms), DFS, AUTO-BW
|
||||
(5730 - 5850 @ 80), (6, 36), (N/A), AUTO-BW
|
||||
|
||||
and will be accepted by the wireless regulatory code.
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/reg.c | 103 ++++++++++++++------------
|
||||
1 file changed, 56 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
|
||||
index a66b5bdd2167..8606170ba80d 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/reg.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/reg.c
|
||||
@@ -456,6 +456,9 @@ ath11k_reg_adjust_bw(u16 start_freq, u16 end_freq, u16 max_bw)
|
||||
{
|
||||
u16 bw;
|
||||
|
||||
+ if (end_freq <= start_freq)
|
||||
+ return 0;
|
||||
+
|
||||
bw = end_freq - start_freq;
|
||||
bw = min_t(u16, bw, max_bw);
|
||||
|
||||
@@ -463,8 +466,10 @@ ath11k_reg_adjust_bw(u16 start_freq, u16 end_freq, u16 max_bw)
|
||||
bw = 80;
|
||||
else if (bw >= 40 && bw < 80)
|
||||
bw = 40;
|
||||
- else if (bw < 40)
|
||||
+ else if (bw >= 20 && bw < 40)
|
||||
bw = 20;
|
||||
+ else
|
||||
+ bw = 0;
|
||||
|
||||
return bw;
|
||||
}
|
||||
@@ -488,73 +493,77 @@ ath11k_reg_update_weather_radar_band(struct ath11k_base *ab,
|
||||
struct cur_reg_rule *reg_rule,
|
||||
u8 *rule_idx, u32 flags, u16 max_bw)
|
||||
{
|
||||
+ u32 start_freq;
|
||||
u32 end_freq;
|
||||
u16 bw;
|
||||
u8 i;
|
||||
|
||||
i = *rule_idx;
|
||||
|
||||
+ /* there might be situations when even the input rule must be dropped */
|
||||
+ i--;
|
||||
+
|
||||
+ /* frequencies below weather radar */
|
||||
bw = ath11k_reg_adjust_bw(reg_rule->start_freq,
|
||||
ETSI_WEATHER_RADAR_BAND_LOW, max_bw);
|
||||
+ if (bw > 0) {
|
||||
+ i++;
|
||||
|
||||
- ath11k_reg_update_rule(regd->reg_rules + i, reg_rule->start_freq,
|
||||
- ETSI_WEATHER_RADAR_BAND_LOW, bw,
|
||||
- reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- flags);
|
||||
+ ath11k_reg_update_rule(regd->reg_rules + i,
|
||||
+ reg_rule->start_freq,
|
||||
+ ETSI_WEATHER_RADAR_BAND_LOW, bw,
|
||||
+ reg_rule->ant_gain, reg_rule->reg_power,
|
||||
+ flags);
|
||||
|
||||
- ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
- "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
- i + 1, reg_rule->start_freq, ETSI_WEATHER_RADAR_BAND_LOW,
|
||||
- bw, reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- regd->reg_rules[i].dfs_cac_ms,
|
||||
- flags);
|
||||
-
|
||||
- if (reg_rule->end_freq > ETSI_WEATHER_RADAR_BAND_HIGH)
|
||||
- end_freq = ETSI_WEATHER_RADAR_BAND_HIGH;
|
||||
- else
|
||||
- end_freq = reg_rule->end_freq;
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
+ "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
+ i + 1, reg_rule->start_freq,
|
||||
+ ETSI_WEATHER_RADAR_BAND_LOW, bw, reg_rule->ant_gain,
|
||||
+ reg_rule->reg_power, regd->reg_rules[i].dfs_cac_ms,
|
||||
+ flags);
|
||||
+ }
|
||||
|
||||
- bw = ath11k_reg_adjust_bw(ETSI_WEATHER_RADAR_BAND_LOW, end_freq,
|
||||
- max_bw);
|
||||
+ /* weather radar frequencies */
|
||||
+ start_freq = max_t(u32, reg_rule->start_freq,
|
||||
+ ETSI_WEATHER_RADAR_BAND_LOW);
|
||||
+ end_freq = min_t(u32, reg_rule->end_freq, ETSI_WEATHER_RADAR_BAND_HIGH);
|
||||
|
||||
- i++;
|
||||
+ bw = ath11k_reg_adjust_bw(start_freq, end_freq, max_bw);
|
||||
+ if (bw > 0) {
|
||||
+ i++;
|
||||
|
||||
- ath11k_reg_update_rule(regd->reg_rules + i,
|
||||
- ETSI_WEATHER_RADAR_BAND_LOW, end_freq, bw,
|
||||
- reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- flags);
|
||||
+ ath11k_reg_update_rule(regd->reg_rules + i, start_freq,
|
||||
+ end_freq, bw, reg_rule->ant_gain,
|
||||
+ reg_rule->reg_power, flags);
|
||||
|
||||
- regd->reg_rules[i].dfs_cac_ms = ETSI_WEATHER_RADAR_BAND_CAC_TIMEOUT;
|
||||
+ regd->reg_rules[i].dfs_cac_ms = ETSI_WEATHER_RADAR_BAND_CAC_TIMEOUT;
|
||||
|
||||
- ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
- "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
- i + 1, ETSI_WEATHER_RADAR_BAND_LOW, end_freq,
|
||||
- bw, reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- regd->reg_rules[i].dfs_cac_ms,
|
||||
- flags);
|
||||
-
|
||||
- if (end_freq == reg_rule->end_freq) {
|
||||
- regd->n_reg_rules--;
|
||||
- *rule_idx = i;
|
||||
- return;
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
+ "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
+ i + 1, start_freq, end_freq, bw,
|
||||
+ reg_rule->ant_gain, reg_rule->reg_power,
|
||||
+ regd->reg_rules[i].dfs_cac_ms, flags);
|
||||
}
|
||||
|
||||
+ /* frequencies above weather radar */
|
||||
bw = ath11k_reg_adjust_bw(ETSI_WEATHER_RADAR_BAND_HIGH,
|
||||
reg_rule->end_freq, max_bw);
|
||||
+ if (bw > 0) {
|
||||
+ i++;
|
||||
|
||||
- i++;
|
||||
-
|
||||
- ath11k_reg_update_rule(regd->reg_rules + i, ETSI_WEATHER_RADAR_BAND_HIGH,
|
||||
- reg_rule->end_freq, bw,
|
||||
- reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- flags);
|
||||
+ ath11k_reg_update_rule(regd->reg_rules + i,
|
||||
+ ETSI_WEATHER_RADAR_BAND_HIGH,
|
||||
+ reg_rule->end_freq, bw,
|
||||
+ reg_rule->ant_gain, reg_rule->reg_power,
|
||||
+ flags);
|
||||
|
||||
- ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
- "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
- i + 1, ETSI_WEATHER_RADAR_BAND_HIGH, reg_rule->end_freq,
|
||||
- bw, reg_rule->ant_gain, reg_rule->reg_power,
|
||||
- regd->reg_rules[i].dfs_cac_ms,
|
||||
- flags);
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_REG,
|
||||
+ "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
|
||||
+ i + 1, ETSI_WEATHER_RADAR_BAND_HIGH,
|
||||
+ reg_rule->end_freq, bw, reg_rule->ant_gain,
|
||||
+ reg_rule->reg_power, regd->reg_rules[i].dfs_cac_ms,
|
||||
+ flags);
|
||||
+ }
|
||||
|
||||
*rule_idx = i;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/reg.c
|
||||
===================================================================
|
||||
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/reg.c
|
||||
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/reg.c
|
||||
@@ -170,6 +170,9 @@ int ath11k_regd_update(struct ath11k *ar
|
||||
}
|
||||
} else {
|
||||
regd = ab->new_regd[pdev_id];
|
||||
+ /* force update custom regdm to cfg80211 */
|
||||
+ ar->hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
|
||||
+ wiphy_apply_custom_regulatory(ar->hw->wiphy, regd);
|
||||
}
|
||||
|
||||
if (!regd) {
|
||||
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
===================================================================
|
||||
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -7212,12 +7212,12 @@ static int ath11k_reg_chan_list_event(st
|
||||
* requested, i.e a default regd was already set during initialization
|
||||
* and the regd coming from this event has a valid country info.
|
||||
*/
|
||||
- if (ab->default_regd[pdev_idx] &&
|
||||
+/* if (ab->default_regd[pdev_idx] &&
|
||||
!ath11k_reg_is_world_alpha((char *)
|
||||
ab->default_regd[pdev_idx]->alpha2) &&
|
||||
!ath11k_reg_is_world_alpha((char *)reg_info->alpha2))
|
||||
intersect = true;
|
||||
-
|
||||
+*/
|
||||
regd = ath11k_reg_build_regd(ab, reg_info, intersect);
|
||||
if (!regd) {
|
||||
ath11k_warn(ab, "failed to build regd from reg_info\n");
|
||||
@@ -1,7 +1,7 @@
|
||||
From 85462b8b429bbd0bd5b56ac58ea861b9eef32a2e Mon Sep 17 00:00:00 2001
|
||||
From 19c481164dc772e49e173e08d1bfd266a5f458dd Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 18 Jul 2020 08:53:44 +0200
|
||||
Subject: [PATCH 01/34] ipq807x: add the Qualcomm AX target support
|
||||
Subject: [PATCH 01/36] ipq807x: add the Qualcomm AX target support
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
@@ -13,14 +13,14 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
target/linux/ipq807x/109-logspam.patch | 24 +
|
||||
target/linux/ipq807x/Makefile | 22 +
|
||||
.../ipq807x/base-files/etc/board.d/01_leds | 38 +
|
||||
.../ipq807x/base-files/etc/board.d/02_network | 80 +
|
||||
.../etc/hotplug.d/firmware/10-ath11k-caldata | 95 +
|
||||
.../ipq807x/base-files/etc/board.d/02_network | 81 +
|
||||
.../etc/hotplug.d/firmware/10-ath11k-caldata | 111 +
|
||||
.../ipq807x/base-files/etc/hotplug.d/net/macs | 3 +
|
||||
.../ipq807x/base-files/etc/init.d/aq_phy | 16 +
|
||||
.../ipq807x/base-files/etc/init.d/bootcount | 12 +
|
||||
.../linux/ipq807x/base-files/etc/init.d/wdt | 14 +
|
||||
...G4_v5.4.B-AQR_CIG_WIFI_ID44715_VER1673.cld | Bin 0 -> 391170 bytes
|
||||
.../base-files/lib/upgrade/platform.sh | 72 +
|
||||
.../base-files/lib/upgrade/platform.sh | 73 +
|
||||
target/linux/ipq807x/config-4.4 | 828 +
|
||||
.../arm/boot/dts/qcom-ipq6018-cig-wf188.dts | 18 +
|
||||
.../arm/boot/dts/qcom-ipq6018-cig-wf188n.dts | 18 +
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
target/linux/ipq807x/patches/112-pstore.patch | 147 +
|
||||
.../ipq807x/patches/200-bpf_backport.patch | 44780 ++++++++++++++++
|
||||
toolchain/kernel-headers/Makefile | 8 +
|
||||
61 files changed, 56685 insertions(+), 2 deletions(-)
|
||||
61 files changed, 56703 insertions(+), 2 deletions(-)
|
||||
create mode 100644 package/boot/uboot-envtools/files/ipq807x
|
||||
create mode 100644 target/linux/ipq807x/109-logspam.patch
|
||||
create mode 100644 target/linux/ipq807x/Makefile
|
||||
@@ -344,10 +344,10 @@ index 0000000000..1f1797b0c6
|
||||
+exit 0
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
new file mode 100755
|
||||
index 0000000000..9d7dd4e61e
|
||||
index 0000000000..7772e309a3
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
@@ -0,0 +1,80 @@
|
||||
@@ -0,0 +1,81 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+. /lib/functions.sh
|
||||
@@ -410,6 +410,7 @@ index 0000000000..9d7dd4e61e
|
||||
+ lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
+ ucidef_set_network_device_mac eth0 $lan_mac
|
||||
+ ucidef_set_network_device_mac eth1 $wan_mac
|
||||
+ ucidef_set_label_macaddr $wan_mac
|
||||
+ ;;
|
||||
+ *)
|
||||
+ wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
@@ -430,10 +431,10 @@ index 0000000000..9d7dd4e61e
|
||||
+exit 0
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
new file mode 100755
|
||||
index 0000000000..1788908ab0
|
||||
index 0000000000..016416c089
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
@@ -0,0 +1,95 @@
|
||||
@@ -0,0 +1,111 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
@@ -452,6 +453,18 @@ index 0000000000..1788908ab0
|
||||
+ echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
+}
|
||||
+
|
||||
+ath11k_generate_macs_wf194() {
|
||||
+ touch /lib/firmware/ath11k-macs
|
||||
+ mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2)
|
||||
+ eth=$(macaddr_canonicalize $mac)
|
||||
+ mac1=$(macaddr_add $eth 2)
|
||||
+ mac2=$(macaddr_add $eth 10)
|
||||
+ mac3=$(macaddr_add $eth 18)
|
||||
+ echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
+ echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
+ echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
+}
|
||||
+
|
||||
+caldata_die() {
|
||||
+ echo "caldata: " "$*"
|
||||
+ exit 1
|
||||
@@ -523,6 +536,10 @@ index 0000000000..1788908ab0
|
||||
+ cig,wf188n)
|
||||
+ ath11k_generate_macs
|
||||
+ ;;
|
||||
+ cig,wf194c|\
|
||||
+ cig,wf194c)
|
||||
+ ath11k_generate_macs_wf194
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ;;
|
||||
+*)
|
||||
@@ -531,7 +548,7 @@ index 0000000000..1788908ab0
|
||||
+esac
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/net/macs b/target/linux/ipq807x/base-files/etc/hotplug.d/net/macs
|
||||
new file mode 100644
|
||||
index 0000000000..13e95ec947
|
||||
index 0000000000..10f38108c8
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/net/macs
|
||||
@@ -0,0 +1,3 @@
|
||||
@@ -4779,10 +4796,10 @@ HcmV?d00001
|
||||
|
||||
diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
new file mode 100755
|
||||
index 0000000000..407db099f6
|
||||
index 0000000000..2c6b682178
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
@@ -0,0 +1,72 @@
|
||||
@@ -0,0 +1,73 @@
|
||||
+. /lib/functions/system.sh
|
||||
+
|
||||
+qca_do_upgrade() {
|
||||
@@ -4851,6 +4868,7 @@ index 0000000000..407db099f6
|
||||
+ edgecore,eap102|\
|
||||
+ edgecore,eap101)
|
||||
+ CI_UBIPART="rootfs1"
|
||||
+ [ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
|
||||
+ nand_upgrade_tar "$1"
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
992
patches/0051-ipq807x-add-hfcl-ion4xe-i.patch
Normal file
992
patches/0051-ipq807x-add-hfcl-ion4xe-i.patch
Normal file
@@ -0,0 +1,992 @@
|
||||
From a0e1c6853dabbc3bae674e1644f2de67d565fadb Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 18 Nov 2021 10:44:40 +0100
|
||||
Subject: [PATCH] ipq807x: add hfcl ion4xe/i
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../ipq807x/base-files/etc/board.d/01_leds | 5 +
|
||||
.../ipq807x/base-files/etc/board.d/02_network | 5 +
|
||||
.../etc/hotplug.d/firmware/10-ath11k-caldata | 2 +
|
||||
.../base-files/lib/upgrade/platform.sh | 4 +
|
||||
target/linux/ipq807x/config-4.4 | 2 +-
|
||||
.../arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts | 18 +
|
||||
.../arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts | 18 +
|
||||
.../boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi | 478 ++++++++++++++++++
|
||||
.../dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts | 155 ++++++
|
||||
.../dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts | 156 ++++++
|
||||
target/linux/ipq807x/image/ipq60xx.mk | 18 +
|
||||
11 files changed, 860 insertions(+), 1 deletion(-)
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/board.d/01_leds b/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
index 1f1797b0c6..ab19fd0532 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
+++ b/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
@@ -31,6 +31,11 @@ edgecore,eap102)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
;;
|
||||
+hfcl,ion4xi|\
|
||||
+hfcl,ion4xe)
|
||||
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
|
||||
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
index 9d7dd4e61e..89db0cc5a4 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
+++ b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
@@ -12,6 +12,11 @@ qcom_setup_interfaces()
|
||||
ucidef_add_switch_attr "switch0" "reset" "false"
|
||||
|
||||
case $board in
|
||||
+ hfcl,ion4xi|\
|
||||
+ hfcl,ion4xe)
|
||||
+ ucidef_set_interface_wan "eth0 eth1"
|
||||
+ ucidef_set_interface_lan ""
|
||||
+ ;;
|
||||
cig,wf188|\
|
||||
tplink,ex227|\
|
||||
tplink,ex447)
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
index 1788908ab0..ba7991759e 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
@@ -57,6 +57,8 @@ case "$FIRMWARE" in
|
||||
cig,wf188|\
|
||||
cig,wf188n|\
|
||||
edgecore,eap101|\
|
||||
+ hfcl,ion4xi|\
|
||||
+ hfcl,ion4xe|\
|
||||
wallys,dr6018|\
|
||||
qcom,ipq6018-cp01|\
|
||||
xiaomi,ax1800)
|
||||
diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
index 407db099f6..ef8cce8614 100755
|
||||
--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
@@ -28,6 +28,8 @@ platform_check_image() {
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,eap106|\
|
||||
+ hfcl,ion4xi|\
|
||||
+ hfcl,ion4xe|\
|
||||
tplink,ex227|\
|
||||
tplink,ex447|\
|
||||
qcom,ipq6018-cp01|\
|
||||
@@ -53,6 +55,8 @@ platform_do_upgrade() {
|
||||
cig,wf188n|\
|
||||
cig,wf194c|\
|
||||
cig,wf194c4|\
|
||||
+ hfcl,ion4xi|\
|
||||
+ hfcl,ion4xe|\
|
||||
qcom,ipq6018-cp01|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
diff --git a/target/linux/ipq807x/config-4.4 b/target/linux/ipq807x/config-4.4
|
||||
index 1b4b95b968..cef3f951b6 100644
|
||||
--- a/target/linux/ipq807x/config-4.4
|
||||
+++ b/target/linux/ipq807x/config-4.4
|
||||
@@ -638,7 +638,7 @@ CONFIG_SND_PCM=y
|
||||
CONFIG_SND_SOC=y
|
||||
# CONFIG_SND_SOC_APQ8016_SBC is not set
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
-CONFIG_SND_SOC_IPQ=y
|
||||
+# CONFIG_SND_SOC_IPQ is not set
|
||||
# CONFIG_SND_SOC_IPQ806X_LPAIF is not set
|
||||
# CONFIG_SND_SOC_IPQ806X_PCM_RAW is not set
|
||||
CONFIG_SND_SOC_IPQ_ADSS=y
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
new file mode 100644
|
||||
index 0000000000..5a44b9a3e7
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
@@ -0,0 +1,18 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts"
|
||||
+#include "qcom-ipq6018.dtsi"
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
new file mode 100644
|
||||
index 0000000000..8edd1d817a
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
@@ -0,0 +1,18 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts"
|
||||
+#include "qcom-ipq6018.dtsi"
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi
|
||||
new file mode 100644
|
||||
index 0000000000..7c67cf7ade
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-cp01-hfcl.dtsi
|
||||
@@ -0,0 +1,478 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "qcom-ipq6018.dtsi"
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <0x2>;
|
||||
+ #size-cells = <0x2>;
|
||||
+ compatible = "qcom,ipq6018-cp01", "qcom,ipq6018";
|
||||
+ interrupt-parent = <&intc>;
|
||||
+ qcom,msm-id = <0x192 0x0>, <0x193 0x0>;
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &blsp1_uart3;
|
||||
+ serial1 = &blsp1_uart2;
|
||||
+ sdhc2 = &sdhc_2;
|
||||
+ /*
|
||||
+ * Aliases as required by u-boot
|
||||
+ * to patch MAC addresses
|
||||
+ */
|
||||
+ ethernet0 = "/soc/dp1";
|
||||
+ ethernet1 = "/soc/dp2";
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
+#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
+ bootargs-append = " swiotlb=1";
|
||||
+#else
|
||||
+ bootargs-append = " swiotlb=1 coherent_pool=2M";
|
||||
+#endif
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ pinctrl-0 = <&sd_ldo_pins &hfcl_gpio>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ uart_pins: uart_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio44", "gpio45";
|
||||
+ function = "blsp2_uart";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd_ldo_pins: sd_ldo_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio66";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <2>;
|
||||
+ bias-disable;
|
||||
+ output-low;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi_0_pins: spi_0_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio38", "gpio39", "gpio40", "gpio41";
|
||||
+ function = "blsp0_spi";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ qpic_pins: qpic_pins {
|
||||
+ data_0 {
|
||||
+ pins = "gpio15";
|
||||
+ function = "qpic_pad0";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_1 {
|
||||
+ pins = "gpio12";
|
||||
+ function = "qpic_pad1";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_2 {
|
||||
+ pins = "gpio13";
|
||||
+ function = "qpic_pad2";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_3 {
|
||||
+ pins = "gpio14";
|
||||
+ function = "qpic_pad3";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_4 {
|
||||
+ pins = "gpio5";
|
||||
+ function = "qpic_pad4";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_5 {
|
||||
+ pins = "gpio6";
|
||||
+ function = "qpic_pad5";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_6 {
|
||||
+ pins = "gpio7";
|
||||
+ function = "qpic_pad6";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_7 {
|
||||
+ pins = "gpio8";
|
||||
+ function = "qpic_pad7";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ qpic_pad {
|
||||
+ pins = "gpio1", "gpio3", "gpio4",
|
||||
+ "gpio10", "gpio11", "gpio17";
|
||||
+ function = "qpic_pad";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd_pins: sd_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio62";
|
||||
+ function = "sd_card";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ extcon_usb_pins: extcon_usb_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio26";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <2>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ button_pins: button_pins {
|
||||
+ reset_button {
|
||||
+ pins = "gpio53";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio_pins: mdio_pinmux {
|
||||
+ mux_0 {
|
||||
+ pins = "gpio64";
|
||||
+ function = "mdc";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ mux_1 {
|
||||
+ pins = "gpio65";
|
||||
+ function = "mdio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ mux_2 {
|
||||
+ pins = "gpio75";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ mux_3 {
|
||||
+ pins = "gpio77";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds_pins: leds_pins {
|
||||
+ led_5g {
|
||||
+ pins = "gpio60";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ led_2g {
|
||||
+ pins = "gpio61";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hfcl_gpio: hfcl_gpio {
|
||||
+ mux_0 {
|
||||
+ pins = "gpio25";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ output-low;
|
||||
+ };
|
||||
+ mux_1 {
|
||||
+ pins = "gpio29";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_2 {
|
||||
+ pins = "gpio33";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_3 {
|
||||
+ pins = "gpio34";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_4 {
|
||||
+ pins = "gpio35";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_5 {
|
||||
+ pins = "gpio59";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_6 {
|
||||
+ pins = "gpio67";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_7 {
|
||||
+ pins = "gpio70";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ mux_8 {
|
||||
+ pins = "gpio79";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uniphy_pins: uniphy_pinmux {
|
||||
+ mux {
|
||||
+ pins = "gpio63";
|
||||
+ function = "rx0";
|
||||
+ bias-disable;
|
||||
+ };
|
||||
+ sfp_tx {
|
||||
+ pins = "gpio48";
|
||||
+ function = "gpio";
|
||||
+ driver-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ output-low;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hsuart_pins: hsuart_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio71", "gpio72";
|
||||
+ function = "blsp1_uart";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-disable;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+ extcon_usb: extcon_usb {
|
||||
+ pinctrl-0 = <&extcon_usb_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ id-gpio = <&tlmm 26 GPIO_ACTIVE_LOW>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ mdio: mdio@90000 {
|
||||
+ pinctrl-0 = <&mdio_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ phy-reset-gpio = <&tlmm 77 0>;
|
||||
+ status = "ok";
|
||||
+ phy0: ethernet-phy@0 {
|
||||
+ reg = <4>;
|
||||
+ };
|
||||
+ phy1: ethernet-phy@1 {
|
||||
+ reg = <30>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dp1 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <4>;
|
||||
+ reg = <0x3a001600 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <4>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ dp2 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <5>;
|
||||
+ reg = <0x3a003000 0x3fff>;
|
||||
+ qcom,mactype = <1>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <30>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ nss-macsec1 {
|
||||
+ compatible = "qcom,nss-macsec";
|
||||
+ phy_addr = <30>;
|
||||
+ phy_access_mode = <0>;
|
||||
+ mdiobus = <&mdio>;
|
||||
+ };
|
||||
+
|
||||
+ ess-switch@3a000000 {
|
||||
+ pinctrl-0 = <&uniphy_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
+ switch_lan_bmp = <0x10>; /* lan port bitmap */
|
||||
+ switch_wan_bmp = <0x20>; /* wan port bitmap */
|
||||
+ switch_inner_bmp = <0xc0>; /*inner port bitmap*/
|
||||
+ switch_mac_mode = <0xf>; /* mac mode for uniphy instance0*/
|
||||
+ switch_mac_mode1 = <0x14>; /* mac mode for uniphy instance1*/
|
||||
+ switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
|
||||
+ qcom,port_phyinfo {
|
||||
+ port@0 {
|
||||
+ port_id = <4>;
|
||||
+ phy_address = <4>;
|
||||
+ };
|
||||
+ port@2 {
|
||||
+ port_id = <5>;
|
||||
+ phy_address = <30>;
|
||||
+ phy_i2c_address = <30>;
|
||||
+ phy-i2c-mode;
|
||||
+ port_mac_sel = "GMAC_PORT";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio_keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&button_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
|
||||
+ linux,input-type = <1>;
|
||||
+ debounce-interval = <60>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c_2: i2c@78b9000 {
|
||||
+ compatible = "qcom,i2c-qup-v2.2.1";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x78b9000 0x600>;
|
||||
+ interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&gcc GCC_BLSP1_AHB_CLK>,
|
||||
+ <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>;
|
||||
+ clock-names = "iface", "core";
|
||||
+ clock-frequency = <400000>;
|
||||
+ dmas = <&blsp_dma 21>, <&blsp_dma 20>;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&blsp1_uart3 {
|
||||
+ pinctrl-0 = <&uart_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&spi_0 {
|
||||
+ pinctrl-0 = <&spi_0_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ cs-select = <0>;
|
||||
+ status = "ok";
|
||||
+
|
||||
+ m25p80@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ reg = <0>;
|
||||
+ compatible = "n25q128a11";
|
||||
+ linux,modalias = "m25p80", "n25q128a11";
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ use-default-sizes;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&blsp1_uart2 {
|
||||
+ pinctrl-0 = <&hsuart_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ dmas = <&blsp_dma 2>,
|
||||
+ <&blsp_dma 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&qpic_bam {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ pinctrl-0 = <&qpic_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&ssphy_0 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&qusb_phy_0 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&qusb_phy_1 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&nss_crypto {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&pcie_phy {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&qpic_lcd {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&qpic_lcd_panel {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
new file mode 100644
|
||||
index 0000000000..a64ec25a8a
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xe.dts
|
||||
@@ -0,0 +1,155 @@
|
||||
+/dts-v1/;
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "qcom-ipq6018-cp01-hfcl.dtsi"
|
||||
+#include "qcom-ipq6018-rpm-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cpr-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cp-cpu.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "HFCL ION4Xe";
|
||||
+ compatible = "hfcl,ion4xe", "qcom,ipq6018-cp01", "qcom,ipq6018";
|
||||
+
|
||||
+ /*
|
||||
+ * +=========+==============+========================+
|
||||
+ * | | | |
|
||||
+ * | Region | Start Offset | Size |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | Linux | 0x41000000 | 139MB |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | TZ App | 0x49B00000 | 6MB |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ *
|
||||
+ * From the available 145 MB for Linux in the first 256 MB,
|
||||
+ * we are reserving 6 MB for TZAPP.
|
||||
+ *
|
||||
+ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
|
||||
+ * for memory layout.
|
||||
+ */
|
||||
+
|
||||
+/* TZAPP is enabled in default memory profile only */
|
||||
+#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
|
||||
+ reserved-memory {
|
||||
+ tzapp:tzapp@49B00000 { /* TZAPPS */
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x49B00000 0x0 0x00600000>;
|
||||
+ };
|
||||
+ };
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ i2c_1_pins: i2c_1_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio42", "gpio43";
|
||||
+ function = "blsp2_i2c";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c_2_pins: i2c_2_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio55", "gpio56";
|
||||
+ function = "blsp4_i2c";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_1 {
|
||||
+ pinctrl-0 = <&i2c_1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+
|
||||
+ lm75@48 {
|
||||
+ compatible = "lm75";
|
||||
+ reg = <0x48>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_2 {
|
||||
+ pinctrl-0 = <&i2c_2_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&sdhc_2 {
|
||||
+ pinctrl-0 = <&sd_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ cd-gpios = <&tlmm 62 1>;
|
||||
+ sd-ldo-gpios = <&tlmm 66 0>;
|
||||
+ vqmmc-supply = <&ipq6018_l2_corner>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&leds_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ led@60 {
|
||||
+ label = "blue:wifi5";
|
||||
+ gpios = <&tlmm 60 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "led_5g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ led@61 {
|
||||
+ label = "blue:wifi2";
|
||||
+ gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "led_2g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ leds_pins: leds_pins {
|
||||
+ led_5g {
|
||||
+ pins = "gpio60";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ led_2g {
|
||||
+ pins = "gpio61";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* TZAPP is enabled in default memory profile only */
|
||||
+#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
|
||||
+&qseecom {
|
||||
+ mem-start = <0x49B00000>;
|
||||
+ mem-size = <0x600000>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+#endif
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
new file mode 100644
|
||||
index 0000000000..88b609f37e
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-hfcl-ion4xi.dts
|
||||
@@ -0,0 +1,156 @@
|
||||
+/dts-v1/;
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "qcom-ipq6018-cp01-hfcl.dtsi"
|
||||
+#include "qcom-ipq6018-rpm-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cpr-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cp-cpu.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "HFCL ION4Xi";
|
||||
+ compatible = "hfcl,ion4xi", "qcom,ipq6018-cp01", "qcom,ipq6018";
|
||||
+
|
||||
+ /*
|
||||
+ * +=========+==============+========================+
|
||||
+ * | | | |
|
||||
+ * | Region | Start Offset | Size |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | Linux | 0x41000000 | 139MB |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | TZ App | 0x49B00000 | 6MB |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ *
|
||||
+ * From the available 145 MB for Linux in the first 256 MB,
|
||||
+ * we are reserving 6 MB for TZAPP.
|
||||
+ *
|
||||
+ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
|
||||
+ * for memory layout.
|
||||
+ */
|
||||
+
|
||||
+/* TZAPP is enabled in default memory profile only */
|
||||
+#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
|
||||
+ reserved-memory {
|
||||
+ tzapp:tzapp@49B00000 { /* TZAPPS */
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x49B00000 0x0 0x00600000>;
|
||||
+ };
|
||||
+ };
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ i2c_1_pins: i2c_1_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio42", "gpio43";
|
||||
+ function = "blsp2_i2c";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ i2c_2_pins: i2c_2_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio55", "gpio56";
|
||||
+ function = "blsp4_i2c";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_1 {
|
||||
+ pinctrl-0 = <&i2c_1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+
|
||||
+ lm75@48 {
|
||||
+ compatible = "lm75";
|
||||
+ reg = <0x48>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_2 {
|
||||
+ pinctrl-0 = <&i2c_2_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&sdhc_2 {
|
||||
+ pinctrl-0 = <&sd_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ cd-gpios = <&tlmm 62 1>;
|
||||
+ sd-ldo-gpios = <&tlmm 66 0>;
|
||||
+ vqmmc-supply = <&ipq6018_l2_corner>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&leds_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ led@60 {
|
||||
+ label = "blue:wifi5";
|
||||
+ gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "led_5g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ led@61 {
|
||||
+ label = "blue:wifi2";
|
||||
+ gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "led_2g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ leds_pins: leds_pins {
|
||||
+ led_5g {
|
||||
+ pins = "gpio32";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ led_2g {
|
||||
+ pins = "gpio31";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/* TZAPP is enabled in default memory profile only */
|
||||
+#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
|
||||
+&qseecom {
|
||||
+ mem-start = <0x49B00000>;
|
||||
+ mem-size = <0x600000>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
+#endif
|
||||
diff --git a/target/linux/ipq807x/image/ipq60xx.mk b/target/linux/ipq807x/image/ipq60xx.mk
|
||||
index e94ab22785..30ec2160bc 100644
|
||||
--- a/target/linux/ipq807x/image/ipq60xx.mk
|
||||
+++ b/target/linux/ipq807x/image/ipq60xx.mk
|
||||
@@ -20,6 +20,24 @@ define Device/cig_wf188n
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf188n
|
||||
|
||||
+define Device/hfcl_ion4xe
|
||||
+ DEVICE_TITLE := HFCL ION4Xe
|
||||
+ DEVICE_DTS := qcom-ipq6018-hfcl-ion4xe
|
||||
+ DEVICE_DTS_CONFIG := config@cp01-c1
|
||||
+ SUPPORTED_DEVICES := hfcl,ion4xe
|
||||
+ DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-envtools
|
||||
+endef
|
||||
+TARGET_DEVICES += hfcl_ion4xe
|
||||
+
|
||||
+define Device/hfcl_ion4xi
|
||||
+ DEVICE_TITLE := HFCL ION4Xi
|
||||
+ DEVICE_DTS := qcom-ipq6018-hfcl-ion4xi
|
||||
+ DEVICE_DTS_CONFIG := config@cp01-c1
|
||||
+ SUPPORTED_DEVICES := hfcl,ion4xi
|
||||
+ DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-envtools
|
||||
+endef
|
||||
+TARGET_DEVICES += hfcl_ion4xi
|
||||
+
|
||||
define Device/edgecore_eap101
|
||||
DEVICE_TITLE := EdgeCore EAP101
|
||||
DEVICE_DTS := qcom-ipq6018-edgecore-eap101
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
From bbd31470429134c23f593a49c02d5413dcba352f Mon Sep 17 00:00:00 2001
|
||||
From: Mark Mentovai <mark@moxienet.com>
|
||||
Date: Tue, 23 Nov 2021 12:28:55 -0500
|
||||
Subject: [PATCH] hostapd: allow hostapd under ujail to communicate with
|
||||
hostapd_cli
|
||||
|
||||
When procd-ujail is available, 1f785383875a runs hostapd as user
|
||||
"network", with only limited additional capabilities (CAP_NET_ADMIN and
|
||||
CAP_NET_RAW).
|
||||
|
||||
hostapd_cli (CONFIG_PACKAGE_hostapd-utils) communicates with hostapd
|
||||
over a named UNIX-domain socket. hostapd_cli is responsible for creating
|
||||
this socket at /tmp/wpa_ctrl_$pid_$counter. Since it typically runs as
|
||||
root, this endpoint is normally created with uid root, gid root, mode
|
||||
0755. As a result, hostapd running as uid network is able to receive
|
||||
control messages sent through this interface, but is not able to respond
|
||||
to them. If debug-level logging is enabled (CONFIG_WPA_MSG_MIN_PRIORITY
|
||||
<= 2 at build, and log_level <= 2 in /etc/config/wireless wifi-device),
|
||||
this message will appear from hostapd:
|
||||
|
||||
CTRL: sendto failed: Permission denied
|
||||
|
||||
As a fix, hostapd_cli should create the socket node in the filesystem
|
||||
with uid network, gid network, mode 0770. This borrows the presently
|
||||
Android-only strategy already in hostapd intended to solve the same
|
||||
problem on Android.
|
||||
|
||||
If procd-ujail is not available and hostapd falls back to running as
|
||||
root, it will still be able to read from and write to the socket even if
|
||||
the node in the filesystem has been restricted to the network user and
|
||||
group. This matches the logic in
|
||||
package/network/services/hostapd/files/wpad.init, which sets the uid and
|
||||
gid of /var/run/hostapd to network regardless of whether procd-ujail is
|
||||
available.
|
||||
|
||||
As it appears that the "network" user and group are statically allocated
|
||||
uid 101 and gid 101, respectively, per
|
||||
package/base-files/files/etc/passwd and USERID in
|
||||
package/network/services/hostapd/Makefile, this patch also uses a
|
||||
constant 101 for the uid and gid.
|
||||
|
||||
Signed-off-by: Mark Mentovai <mark@moxienet.com>
|
||||
[refreshed patch]
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
.../610-hostapd_cli_ujail_permission.patch | 33 +++++++++++++++++++
|
||||
1 file changed, 33 insertions(+)
|
||||
create mode 100644 package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
|
||||
|
||||
diff --git a/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch b/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
|
||||
new file mode 100644
|
||||
index 0000000000..a03fcc9f92
|
||||
--- /dev/null
|
||||
+++ b/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
|
||||
@@ -0,0 +1,33 @@
|
||||
+--- a/src/common/wpa_ctrl.c
|
||||
++++ b/src/common/wpa_ctrl.c
|
||||
+@@ -135,7 +135,7 @@ try_again:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ tries++;
|
||||
+-#ifdef ANDROID
|
||||
++
|
||||
+ /* Set client socket file permissions so that bind() creates the client
|
||||
+ * socket with these permissions and there is no need to try to change
|
||||
+ * them with chmod() after bind() which would have potential issues with
|
||||
+@@ -147,7 +147,7 @@ try_again:
|
||||
+ * operations to allow the response to go through. Those are using the
|
||||
+ * no-deference-symlinks version to avoid races. */
|
||||
+ fchmod(ctrl->s, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
|
||||
+-#endif /* ANDROID */
|
||||
++
|
||||
+ if (bind(ctrl->s, (struct sockaddr *) &ctrl->local,
|
||||
+ sizeof(ctrl->local)) < 0) {
|
||||
+ if (errno == EADDRINUSE && tries < 2) {
|
||||
+@@ -165,7 +165,11 @@ try_again:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+-#ifdef ANDROID
|
||||
++#ifndef ANDROID
|
||||
++ /* Set group even if we do not have privileges to change owner */
|
||||
++ lchown(ctrl->local.sun_path, -1, 101);
|
||||
++ lchown(ctrl->local.sun_path, 101, 101);
|
||||
++#else
|
||||
+ /* Set group even if we do not have privileges to change owner */
|
||||
+ lchown(ctrl->local.sun_path, -1, AID_WIFI);
|
||||
+ lchown(ctrl->local.sun_path, AID_SYSTEM, AID_WIFI);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
622
patches/0053-ipq807x-add-support-fro-wallytech-DR6018-v4.patch
Normal file
622
patches/0053-ipq807x-add-support-fro-wallytech-DR6018-v4.patch
Normal file
@@ -0,0 +1,622 @@
|
||||
From 1eb2dea202bbb22ba34130ce9802e72c1c03cf7a Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 29 Nov 2021 10:43:53 +0100
|
||||
Subject: [PATCH] ipq807x: add support fro wallytech DR6018-v4
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../ipq807x/base-files/etc/board.d/01_leds | 1 +
|
||||
.../ipq807x/base-files/etc/board.d/02_network | 4 +
|
||||
.../etc/hotplug.d/firmware/10-ath11k-caldata | 1 +
|
||||
.../base-files/lib/upgrade/platform.sh | 2 +
|
||||
.../dts/qcom-ipq6018-wallys-dr6018-v4.dts | 18 +
|
||||
.../qcom/qcom-ipq6018-wallys-dr6018-v4.dts | 492 ++++++++++++++++++
|
||||
target/linux/ipq807x/image/ipq60xx.mk | 9 +
|
||||
7 files changed, 527 insertions(+)
|
||||
create mode 100644 target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
create mode 100755 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/board.d/01_leds b/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
index ab19fd0532..d47a7e55ed 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
+++ b/target/linux/ipq807x/base-files/etc/board.d/01_leds
|
||||
@@ -9,6 +9,7 @@ board=$(board_name)
|
||||
case "$board" in
|
||||
sercomm,wallaby|\
|
||||
wallys,dr6018|\
|
||||
+wallys,dr6018-v4|\
|
||||
cig,wf188n|\
|
||||
cig,wf194c|\
|
||||
cig,wf194c4)
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
index 89db0cc5a4..7c81bb50e7 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
+++ b/target/linux/ipq807x/base-files/etc/board.d/02_network
|
||||
@@ -50,6 +50,10 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
|
||||
ucidef_set_interface_wan "eth4"
|
||||
;;
|
||||
+ wallys,dr6018-v4)
|
||||
+ ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
|
||||
+ ucidef_set_interface_wan "eth0"
|
||||
+ ;;
|
||||
esac
|
||||
}
|
||||
|
||||
diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
index ba7991759e..7f081a6b5f 100755
|
||||
--- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
+++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/10-ath11k-caldata
|
||||
@@ -60,6 +60,7 @@ case "$FIRMWARE" in
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4xe|\
|
||||
wallys,dr6018|\
|
||||
+ wallys,dr6018-v4|\
|
||||
qcom,ipq6018-cp01|\
|
||||
xiaomi,ax1800)
|
||||
caldata_extract "0:ART" 0x1000 0x20000
|
||||
diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
index ef8cce8614..50ba925a48 100755
|
||||
--- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh
|
||||
@@ -25,6 +25,7 @@ platform_check_image() {
|
||||
cig,wf194c|\
|
||||
cig,wf194c4|\
|
||||
wallys,dr6018|\
|
||||
+ wallys,dr6018-v4|\
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,eap106|\
|
||||
@@ -62,6 +63,7 @@ platform_do_upgrade() {
|
||||
qcom,ipq807x-hk14|\
|
||||
qcom,ipq5018-mp03.3|\
|
||||
wallys,dr6018|\
|
||||
+ wallys,dr6018-v4|\
|
||||
tplink,ex447|\
|
||||
tplink,ex227)
|
||||
nand_upgrade_tar "$1"
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-wallys-dr6018-v4.dts b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
new file mode 100644
|
||||
index 0000000000..470e437e41
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm/boot/dts/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
@@ -0,0 +1,18 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "../../../arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts"
|
||||
+#include "qcom-ipq6018.dtsi"
|
||||
diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
new file mode 100755
|
||||
index 0000000000..a00c106adc
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-wallys-dr6018-v4.dts
|
||||
@@ -0,0 +1,492 @@
|
||||
+/dts-v1/;
|
||||
+/*
|
||||
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "qcom-ipq6018.dtsi"
|
||||
+#include "qcom-ipq6018-rpm-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cpr-regulator.dtsi"
|
||||
+#include "qcom-ipq6018-cp-cpu.dtsi"
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <0x2>;
|
||||
+ #size-cells = <0x2>;
|
||||
+ model = "Wallys DR6018 V4";
|
||||
+ compatible = "wallys,dr6018-v4", "qcom,ipq6018-cp01", "qcom,ipq6018";
|
||||
+ interrupt-parent = <&intc>;
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &blsp1_uart3;
|
||||
+ serial1 = &blsp1_uart2;
|
||||
+
|
||||
+ /*
|
||||
+ * Aliases as required by u-boot
|
||||
+ * to patch MAC addresses
|
||||
+ */
|
||||
+ ethernet0 = "/soc/dp1";
|
||||
+ ethernet1 = "/soc/dp2";
|
||||
+ ethernet2 = "/soc/dp3";
|
||||
+ ethernet3 = "/soc/dp4";
|
||||
+ ethernet4 = "/soc/dp5";
|
||||
+
|
||||
+ sdhc2 = "/soc/sdhci_sd@7804000";
|
||||
+
|
||||
+ led-boot = &led_power;
|
||||
+ led-failsafe = &led_power;
|
||||
+ led-running = &led_power;
|
||||
+ led-upgrade = &led_power;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
+ bootargs-append = " console=ttyMSM0,115200,n8 swiotlb=1 coherent_pool=2M";
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * +=========+==============+========================+
|
||||
+ * | | | |
|
||||
+ * | Region | Start Offset | Size |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | Linux | 0x41000000 | 139MB |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * | | | |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ * | TZ App | 0x49B00000 | 6MB |
|
||||
+ * +--------+--------------+-------------------------+
|
||||
+ *
|
||||
+ * From the available 145 MB for Linux in the first 256 MB,
|
||||
+ * we are reserving 6 MB for TZAPP.
|
||||
+ *
|
||||
+ * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
|
||||
+ * for memory layout.
|
||||
+ */
|
||||
+
|
||||
+/* TZAPP is enabled only in default memory profile */
|
||||
+#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
|
||||
+ reserved-memory {
|
||||
+ tzapp:tzapp@49B00000 { /* TZAPPS */
|
||||
+ no-map;
|
||||
+ reg = <0x0 0x49B00000 0x0 0x00600000>;
|
||||
+ };
|
||||
+ };
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ uart_pins: uart_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio44", "gpio45";
|
||||
+ function = "blsp2_uart";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd_pins: sd_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio62";
|
||||
+ function = "sd_card";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi_0_pins: spi_0_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio38", "gpio39", "gpio40", "gpio41";
|
||||
+ function = "blsp0_spi";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ qpic_pins: qpic_pins {
|
||||
+ data_0 {
|
||||
+ pins = "gpio15";
|
||||
+ function = "qpic_pad0";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_1 {
|
||||
+ pins = "gpio12";
|
||||
+ function = "qpic_pad1";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_2 {
|
||||
+ pins = "gpio13";
|
||||
+ function = "qpic_pad2";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_3 {
|
||||
+ pins = "gpio14";
|
||||
+ function = "qpic_pad3";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_4 {
|
||||
+ pins = "gpio5";
|
||||
+ function = "qpic_pad4";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_5 {
|
||||
+ pins = "gpio6";
|
||||
+ function = "qpic_pad5";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_6 {
|
||||
+ pins = "gpio7";
|
||||
+ function = "qpic_pad6";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ data_7 {
|
||||
+ pins = "gpio8";
|
||||
+ function = "qpic_pad7";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ qpic_pad {
|
||||
+ pins = "gpio1", "gpio3", "gpio4",
|
||||
+ "gpio10", "gpio11", "gpio17";
|
||||
+ function = "qpic_pad";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ extcon_usb_pins: extcon_usb_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio26";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <2>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ button_pins: button_pins {
|
||||
+ wps_button {
|
||||
+ pins = "gpio19";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio_pins: mdio_pinmux {
|
||||
+ mux_0 {
|
||||
+ pins = "gpio64";
|
||||
+ function = "mdc";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ mux_1 {
|
||||
+ pins = "gpio65";
|
||||
+ function = "mdio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ mux_2 {
|
||||
+ pins = "gpio75";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-up;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds_pins: leds_pins {
|
||||
+ led_pwr {
|
||||
+ pins = "gpio74";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ led_5g {
|
||||
+ pins = "gpio35";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ led_2g {
|
||||
+ pins = "gpio37";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+ uart2_pins: uart2_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio57", "gpio58";
|
||||
+ function = "blsp4_uart";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+ extcon_usb: extcon_usb {
|
||||
+ pinctrl-0 = <&extcon_usb_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ id-gpio = <&tlmm 26 GPIO_ACTIVE_LOW>;
|
||||
+ status = "ok";
|
||||
+ };
|
||||
+
|
||||
+ mdio: mdio@90000 {
|
||||
+ pinctrl-0 = <&mdio_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ phy-reset-gpio = <&tlmm 75 0 &tlmm 77 1>;
|
||||
+ status = "ok";
|
||||
+ ethernet-phy@3 {
|
||||
+ reg = <0x03>;
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy@4 {
|
||||
+ reg = <0x18>;
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy@1 {
|
||||
+ reg = <0x01>;
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy@2 {
|
||||
+ reg = <0x02>;
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy@0 {
|
||||
+ reg = <0x00>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dp1 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <1>;
|
||||
+ reg = <0x3a001000 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ dp2 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <2>;
|
||||
+ reg = <0x3a001200 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <1>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ dp3 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <3>;
|
||||
+ reg = <0x3a001400 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <2>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ dp4 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <4>;
|
||||
+ reg = <0x3a001600 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <3>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ dp5 {
|
||||
+ device_type = "network";
|
||||
+ compatible = "qcom,nss-dp";
|
||||
+ qcom,id = <5>;
|
||||
+ reg = <0x3a001800 0x200>;
|
||||
+ qcom,mactype = <0>;
|
||||
+ local-mac-address = [000000000000];
|
||||
+ qcom,link-poll = <1>;
|
||||
+ qcom,phy-mdio-addr = <0x18>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ };
|
||||
+
|
||||
+ ess-switch@3a000000 {
|
||||
+ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
+ switch_lan_bmp = <0x3c>; /* lan port bitmap */
|
||||
+ switch_wan_bmp = <0x2>; /* wan port bitmap */
|
||||
+ switch_inner_bmp = <0xc0>; /*inner port bitmap*/
|
||||
+ switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
|
||||
+ switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
|
||||
+ switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
|
||||
+ qcom,port_phyinfo {
|
||||
+ port@1 {
|
||||
+ phy_address = <0x01>;
|
||||
+ port_id = <0x02>;
|
||||
+ };
|
||||
+
|
||||
+ port@0 {
|
||||
+ phy_address = <0x00>;
|
||||
+ port_id = <0x01>;
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ phy_address = <0x02>;
|
||||
+ port_id = <0x03>;
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ phy_address = <0x03>;
|
||||
+ port_id = <0x04>;
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ phy_address = <0x18>;
|
||||
+ port_id = <0x05>;
|
||||
+ port_mac_sel = "QGMAC_PORT";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio_keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&button_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
|
||||
+ linux,input-type = <1>;
|
||||
+ debounce-interval = <60>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&leds_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ led@25 {
|
||||
+ label = "green:wifi5";
|
||||
+ gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "green:5g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ led@24 {
|
||||
+ label = "green:wifi2";
|
||||
+ gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "green:2g";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ led_power: led@16 {
|
||||
+ label = "green:led_pwr";
|
||||
+ gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "green:power";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&blsp1_uart3 {
|
||||
+ pinctrl-0 = <&uart_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&spi_0 {
|
||||
+ pinctrl-0 = <&spi_0_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ cs-select = <0>;
|
||||
+ status = "ok";
|
||||
+
|
||||
+ m25p80@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ reg = <0>;
|
||||
+ compatible = "n25q128a11";
|
||||
+ linux,modalias = "m25p80", "n25q128a11";
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ use-default-sizes;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&blsp1_uart2 {
|
||||
+ pinctrl-0 = <&uart2_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ dmas = <&blsp_dma 2>,
|
||||
+ <&blsp_dma 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+&qpic_bam {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ pinctrl-0 = <&qpic_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&ssphy_0 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&qusb_phy_0 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&qusb_phy_1 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&usb2 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&usb3 {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&nss_crypto {
|
||||
+ status = "ok";
|
||||
+};
|
||||
+
|
||||
+&sdhc_2 {
|
||||
+ pinctrl-0 = <&sd_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ cd-gpios = <&tlmm 62 1>;
|
||||
+ sd-ldo-gpios = <&tlmm 66 0>;
|
||||
+ //vqmmc-supply = <&ipq6018_l2_corner>;
|
||||
+ status = "ok";
|
||||
+};
|
||||
diff --git a/target/linux/ipq807x/image/ipq60xx.mk b/target/linux/ipq807x/image/ipq60xx.mk
|
||||
index 30ec2160bc..4c779435f5 100644
|
||||
--- a/target/linux/ipq807x/image/ipq60xx.mk
|
||||
+++ b/target/linux/ipq807x/image/ipq60xx.mk
|
||||
@@ -56,6 +56,15 @@ define Device/wallys_dr6018
|
||||
endef
|
||||
TARGET_DEVICES += wallys_dr6018
|
||||
|
||||
+define Device/wallys_dr6018_v4
|
||||
+ DEVICE_TITLE := Wallys DR6018 V4
|
||||
+ DEVICE_DTS := qcom-ipq6018-wallys-dr6018-v4
|
||||
+ DEVICE_DTS_CONFIG := config@cp01-c4
|
||||
+ SUPPORTED_DEVICES := wallys,dr6018-v4
|
||||
+ DEVICE_PACKAGES := ath11k-wifi-wallys-dr6018-v4 uboot-envtools
|
||||
+endef
|
||||
+TARGET_DEVICES += wallys_dr6018_v4
|
||||
+
|
||||
define Device/qcom_cp01_c1
|
||||
DEVICE_TITLE := Qualcomm Cypress C1
|
||||
DEVICE_DTS := qcom-ipq6018-cp01-c1
|
||||
--
|
||||
2.25.1
|
||||
|
||||
12
profiles/hfcl_ion4xe.yml
Normal file
12
profiles/hfcl_ion4xe.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
profile: hfcl_ion4xe
|
||||
target: ipq807x
|
||||
subtarget: ipq60xx
|
||||
description: Build image for the HFCL ION 4XE
|
||||
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-hfcl_ion4xe-squashfs-sysupgrade.tar
|
||||
feeds:
|
||||
- name: ipq807x
|
||||
path: ../../feeds/ipq807x
|
||||
include:
|
||||
- wifi-ax
|
||||
- ucentral-ap
|
||||
12
profiles/hfcl_ion4xi.yml
Normal file
12
profiles/hfcl_ion4xi.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
profile: hfcl_ion4xi
|
||||
target: ipq807x
|
||||
subtarget: ipq60xx
|
||||
description: Build image for the HFCL ION 4XI
|
||||
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-hfcl_ion4xi-squashfs-sysupgrade.tar
|
||||
feeds:
|
||||
- name: ipq807x
|
||||
path: ../../feeds/ipq807x
|
||||
include:
|
||||
- wifi-ax
|
||||
- ucentral-ap
|
||||
@@ -10,3 +10,5 @@ feeds:
|
||||
include:
|
||||
- wifi-ax
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
|
||||
@@ -10,3 +10,5 @@ feeds:
|
||||
include:
|
||||
- wifi-ax
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
|
||||
14
profiles/wallys_dr6018_v4.yml
Normal file
14
profiles/wallys_dr6018_v4.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
profile: wallys_dr6018_v4
|
||||
target: ipq807x
|
||||
subtarget: ipq60xx
|
||||
description: Build image for the Wallys DR6018 V4
|
||||
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-wallys_dr6018_v4-squashfs-sysupgrade.tar
|
||||
feeds:
|
||||
- name: ipq807x
|
||||
path: ../../feeds/ipq807x
|
||||
include:
|
||||
- wifi-ax
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
12
profiles/x64_vmware.yml
Normal file
12
profiles/x64_vmware.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
profile: x64_vmware
|
||||
target: x86
|
||||
subtarget: 64
|
||||
description: Vmware build image for x64
|
||||
image: bin/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz
|
||||
include:
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_VMDK_IMAGES=y
|
||||
CONFIG_ISO_IMAGES=y
|
||||
CONFIG_VDI_IMAGES=y
|
||||
Reference in New Issue
Block a user