mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-28 17:12:22 +00:00
Compare commits
244 Commits
v3.2.1-rc2
...
WIFI-14751
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6060d2389f | ||
|
|
f67a2c404b | ||
|
|
974351335f | ||
|
|
311b1a620c | ||
|
|
066b442247 | ||
|
|
f2b69ce972 | ||
|
|
88830b2537 | ||
|
|
842b21fb5e | ||
|
|
8f8eb63ac4 | ||
|
|
367a919d67 | ||
|
|
919fe12372 | ||
|
|
d6d22433c5 | ||
|
|
eff579f3ec | ||
|
|
0768008764 | ||
|
|
53c45dfaeb | ||
|
|
7e3f851788 | ||
|
|
205484080e | ||
|
|
f1fc99ccbe | ||
|
|
db36e09553 | ||
|
|
b3174a0434 | ||
|
|
5f8c4d31cc | ||
|
|
aa78f40843 | ||
|
|
721fb4cc4d | ||
|
|
f75a36f89f | ||
|
|
a375b9f774 | ||
|
|
16d029f10f | ||
|
|
bb45e09e8b | ||
|
|
2798088cec | ||
|
|
470703a490 | ||
|
|
c56d60b2d3 | ||
|
|
1178c3b6f1 | ||
|
|
0db44ca55b | ||
|
|
ae5015424b | ||
|
|
32c7a7ff1d | ||
|
|
39e601cbd4 | ||
|
|
ce9c896371 | ||
|
|
0008cb20dd | ||
|
|
701242ed25 | ||
|
|
67dd4bfca7 | ||
|
|
88fb4cafbc | ||
|
|
feb410ddc3 | ||
|
|
43a8dd1303 | ||
|
|
188f6b33e0 | ||
|
|
27e4eb3685 | ||
|
|
cd8294eca0 | ||
|
|
e12ecf831e | ||
|
|
1213182012 | ||
|
|
d5df71619a | ||
|
|
a177884893 | ||
|
|
1f7d8a7bb7 | ||
|
|
dc02d2722a | ||
|
|
13ac9166ef | ||
|
|
3d6f360cb6 | ||
|
|
6659e77bd0 | ||
|
|
b061cc55ce | ||
|
|
b17db16c15 | ||
|
|
d36866301f | ||
|
|
ffccb65d1b | ||
|
|
af165342ed | ||
|
|
ed62236d31 | ||
|
|
346bdd9c16 | ||
|
|
dc41a0fd0c | ||
|
|
2b26a4e68a | ||
|
|
fa96b2b24d | ||
|
|
36f00adc7a | ||
|
|
5314a752bd | ||
|
|
0f6683f31e | ||
|
|
8ee96c36c9 | ||
|
|
89789900f5 | ||
|
|
6add44ae27 | ||
|
|
14a0c2d272 | ||
|
|
9e769c85cb | ||
|
|
d6e1008c7a | ||
|
|
0a4c10d6cc | ||
|
|
edfd2883f5 | ||
|
|
f6ac6f791e | ||
|
|
88fe15a985 | ||
|
|
a9f47c9e1e | ||
|
|
f17314a2d3 | ||
|
|
29739ebd13 | ||
|
|
3caba52dba | ||
|
|
44bcc50815 | ||
|
|
942d7c15b4 | ||
|
|
25be7aef1a | ||
|
|
a2e1ffe089 | ||
|
|
911f8eaa4c | ||
|
|
590ee6d514 | ||
|
|
5054a71062 | ||
|
|
d69c1c3176 | ||
|
|
8d0da5a086 | ||
|
|
eb66feb5c5 | ||
|
|
89b6ebd518 | ||
|
|
e3dfe5ea74 | ||
|
|
f39339564a | ||
|
|
adac3818a4 | ||
|
|
a516b035ab | ||
|
|
29b088ef21 | ||
|
|
10b875d42c | ||
|
|
1f0a24a941 | ||
|
|
ea3afcda56 | ||
|
|
b5987cc2a7 | ||
|
|
fc700364d1 | ||
|
|
f2fec9dd87 | ||
|
|
2de57bf167 | ||
|
|
7d31bebdb0 | ||
|
|
fcb5a972cf | ||
|
|
082d04025c | ||
|
|
9ef7d2c227 | ||
|
|
e0d61cb0fb | ||
|
|
ed2795b30b | ||
|
|
4b31e481ec | ||
|
|
ba10a88ab3 | ||
|
|
b85bc5db9c | ||
|
|
e998711444 | ||
|
|
2d6bea18df | ||
|
|
1bf9e40987 | ||
|
|
a20b96eb31 | ||
|
|
c83ac67492 | ||
|
|
2b0c600fb3 | ||
|
|
c5793bae3a | ||
|
|
6afbb92dec | ||
|
|
89cb9d63bd | ||
|
|
16963c997f | ||
|
|
f7a9ad770d | ||
|
|
dcdccc7ba0 | ||
|
|
b67f97f213 | ||
|
|
e9dcf3d953 | ||
|
|
cc5edd4446 | ||
|
|
79adece623 | ||
|
|
49b64ec93f | ||
|
|
b1e3686124 | ||
|
|
e5bcda17e7 | ||
|
|
7c04ed76bd | ||
|
|
04a5cc67e0 | ||
|
|
80b2c6d080 | ||
|
|
c683f19b7c | ||
|
|
1b10507cf1 | ||
|
|
50abd015b3 | ||
|
|
5dd212829f | ||
|
|
3abc947f8f | ||
|
|
5f42e9db58 | ||
|
|
b181add059 | ||
|
|
7eae0397f1 | ||
|
|
1033a63140 | ||
|
|
954108d742 | ||
|
|
caee55a61f | ||
|
|
502727ad6d | ||
|
|
1868e369d3 | ||
|
|
5a597c912d | ||
|
|
82ae3766fa | ||
|
|
d250f91bb3 | ||
|
|
76d112144f | ||
|
|
d218c15419 | ||
|
|
2bf2093305 | ||
|
|
c548edfe89 | ||
|
|
82a6e24e91 | ||
|
|
c0e6b523c4 | ||
|
|
195fc01d06 | ||
|
|
19959d016b | ||
|
|
03b34b062e | ||
|
|
076bc0712e | ||
|
|
486cc7983a | ||
|
|
80343e9dad | ||
|
|
dd14c1c6d1 | ||
|
|
71748f4cd4 | ||
|
|
49c51594a3 | ||
|
|
739b6b29b2 | ||
|
|
7e393c4831 | ||
|
|
1149cd41aa | ||
|
|
18bb47be4d | ||
|
|
7847e1778e | ||
|
|
57735bcd18 | ||
|
|
376072ad97 | ||
|
|
afa7e2bbb3 | ||
|
|
52f2e31892 | ||
|
|
b791a723ca | ||
|
|
a9e0e16a80 | ||
|
|
4d55d427d7 | ||
|
|
53ff49eb6f | ||
|
|
1a3c87cf35 | ||
|
|
75df7bb794 | ||
|
|
b61850ff18 | ||
|
|
3738f5b884 | ||
|
|
708895e7ae | ||
|
|
dbdc16804d | ||
|
|
98375061da | ||
|
|
e3edb1fdd5 | ||
|
|
68cf54d9f7 | ||
|
|
28161aff6e | ||
|
|
c2ea273bea | ||
|
|
9d611028fd | ||
|
|
24dbba4c5a | ||
|
|
4c84a3dbdd | ||
|
|
664fa78572 | ||
|
|
26e782627b | ||
|
|
9105d688b9 | ||
|
|
a9694847cd | ||
|
|
426943c1c0 | ||
|
|
6014103032 | ||
|
|
56eee37052 | ||
|
|
7374c39dea | ||
|
|
b77e80cf14 | ||
|
|
7544c1921b | ||
|
|
2d45944ba3 | ||
|
|
58d0932dee | ||
|
|
4f0f25ad05 | ||
|
|
b74f824b3a | ||
|
|
3e7fd62fc2 | ||
|
|
4050db8ed6 | ||
|
|
8b5a449f6d | ||
|
|
55e3e90513 | ||
|
|
0d1ea98328 | ||
|
|
aaaef76d7d | ||
|
|
4b09108f72 | ||
|
|
c02b5922d9 | ||
|
|
9d54cda767 | ||
|
|
1f10af2355 | ||
|
|
0df07d514e | ||
|
|
9587fb3fee | ||
|
|
4d4d356c1f | ||
|
|
64b1f96721 | ||
|
|
f3f070acb1 | ||
|
|
aa909d9ab8 | ||
|
|
1de1426a80 | ||
|
|
8279bae9db | ||
|
|
3554480103 | ||
|
|
e4b535f6cb | ||
|
|
ed7e047514 | ||
|
|
7ced0ea2cc | ||
|
|
a3a957f688 | ||
|
|
afcaa6dea2 | ||
|
|
605406e191 | ||
|
|
d639c02ec1 | ||
|
|
cf45b65214 | ||
|
|
258c26e7e6 | ||
|
|
ed4f03a1a9 | ||
|
|
7477963b1f | ||
|
|
1cf48ae6d9 | ||
|
|
77144209e9 | ||
|
|
71315b140a | ||
|
|
8332ba86e1 | ||
|
|
6a94323a59 | ||
|
|
3d43f4fc95 | ||
|
|
ee80309fc3 |
11
.github/workflows/build-dev.yml
vendored
11
.github/workflows/build-dev.yml
vendored
@@ -15,21 +15,20 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'cybertan_rap63xc-211g','sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'sercomm_ap72tip', 'udaya_a6-id2', 'udaya_a6-od2', 'wallys_dr5018', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
|
||||
|
||||
target: [ 'cig_wf189h', 'cig_wf189w', 'cig_wf660a', 'cig_wf672', 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf189', 'cig_wf196', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'sonicfi_rap630w-312g', 'sonicfi_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap650c', 'sonicfi_rap7110c-341x', 'sonicfi_rap750e-h', 'sonicfi_rap750e-s', 'sonicfi_rap750w-311a', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap103', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'senao_iap4300m', 'senao_iap2300m', 'senao_jeap6500', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655', 'emplus_wap588m', 'zyxel_nwa130be', 'sercomm_ap72tip-v4' ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Clean unnecessary files to save disk space
|
||||
- name: clean unncessary files to save space
|
||||
run: |
|
||||
docker rmi `docker images -q`
|
||||
docker rmi `docker images -q` || true
|
||||
|
||||
- name: Build image for ${{ matrix.target }}
|
||||
id: build
|
||||
@@ -81,7 +80,7 @@ jobs:
|
||||
fi
|
||||
|
||||
trigger-testing:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
@@ -94,7 +93,7 @@ jobs:
|
||||
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}'
|
||||
|
||||
create-x64_vm-ami:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
|
||||
@@ -6,7 +6,8 @@ boot() {
|
||||
. /lib/functions/system.sh
|
||||
case $(board_name) in
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103)
|
||||
echo 54 > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio54/direction
|
||||
echo 0 > /sys/class/gpio/gpio54/value
|
||||
|
||||
@@ -117,8 +117,6 @@ hostapd_common_add_device_config() {
|
||||
config_add_boolean legacy_rates
|
||||
config_add_int cell_density
|
||||
config_add_int rts_threshold
|
||||
config_add_int rssi_reject_assoc_rssi
|
||||
config_add_int rssi_ignore_probe_request
|
||||
config_add_int maxassoc
|
||||
config_add_boolean maxassoc_ignore_probe
|
||||
|
||||
@@ -162,7 +160,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 \
|
||||
rts_threshold beacon_rate maxassoc \
|
||||
multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \
|
||||
maxassoc_ignore_probe band
|
||||
|
||||
@@ -261,8 +259,6 @@ hostapd_prepare_device_config() {
|
||||
hostapd_add_rate brlist "$br"
|
||||
done
|
||||
|
||||
[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
|
||||
[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
|
||||
[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N"
|
||||
[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N"
|
||||
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
|
||||
@@ -471,6 +467,9 @@ hostapd_common_add_bss_config() {
|
||||
config_add_string uci_section
|
||||
|
||||
config_add_boolean dynamic_probe_resp
|
||||
|
||||
config_add_int rssi_reject_assoc_rssi
|
||||
config_add_int rssi_ignore_probe_request
|
||||
}
|
||||
|
||||
hostapd_set_vlan_file() {
|
||||
@@ -724,7 +723,8 @@ hostapd_set_bss_options() {
|
||||
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
|
||||
multicast_to_unicast_all proxy_arp per_sta_vif \
|
||||
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
|
||||
vendor_elements fils uci_section dynamic_probe_resp
|
||||
vendor_elements fils uci_section dynamic_probe_resp \
|
||||
rssi_reject_assoc_rssi rssi_ignore_probe_request
|
||||
|
||||
set_default fils 0
|
||||
set_default isolate 0
|
||||
@@ -778,6 +778,8 @@ hostapd_set_bss_options() {
|
||||
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
|
||||
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
|
||||
append bss_conf "multi_ap=$multi_ap" "$N"
|
||||
[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
|
||||
[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
|
||||
[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N"
|
||||
|
||||
[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N"
|
||||
|
||||
14
feeds/hostapd/hostapd/patches/zzz-ignore-probe-event.patch
Normal file
14
feeds/hostapd/hostapd/patches/zzz-ignore-probe-event.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat
|
||||
int ubus_response;
|
||||
|
||||
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
|
||||
- ssi_signal < hapd->iconf->rssi_ignore_probe_request)
|
||||
+ ssi_signal < hapd->iconf->rssi_ignore_probe_request) {
|
||||
+ hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal);
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (len < IEEE80211_HDRLEN)
|
||||
return;
|
||||
@@ -0,0 +1,46 @@
|
||||
Index: hostapd-2023-09-08-e5ccbfc6/src/ap/wpa_auth_ft.c
|
||||
===================================================================
|
||||
--- hostapd-2023-09-08-e5ccbfc6.orig/src/ap/wpa_auth_ft.c
|
||||
+++ hostapd-2023-09-08-e5ccbfc6/src/ap/wpa_auth_ft.c
|
||||
@@ -3293,6 +3297,8 @@ static int wpa_ft_process_auth_req(struc
|
||||
size_t identity_len = 0, radius_cui_len = 0;
|
||||
size_t pmk_r1_len, kdk_len, len;
|
||||
int retval = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
+ struct os_reltime now;
|
||||
+ struct rsn_ftie *ftie;
|
||||
|
||||
*resp_ies = NULL;
|
||||
*resp_ies_len = 0;
|
||||
@@ -3324,6 +3330,9 @@ static int wpa_ft_process_auth_req(struc
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ ftie = (struct rsn_ftie *) parse.ftie;
|
||||
+ os_memcpy(sm->SNonce, ftie->snonce, WPA_NONCE_LEN);
|
||||
+
|
||||
if (parse.r0kh_id == NULL) {
|
||||
wpa_printf(MSG_DEBUG, "FT: Invalid FTIE - no R0KH-ID");
|
||||
retval = WLAN_STATUS_INVALID_FTIE;
|
||||
@@ -3424,10 +3433,18 @@ pmk_r1_derived:
|
||||
os_memcpy(sm->pmk_r1, pmk_r1, pmk_r1_len);
|
||||
sm->pmk_r1_len = pmk_r1_len;
|
||||
|
||||
- if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
|
||||
- wpa_printf(MSG_DEBUG, "FT: Failed to get random data for "
|
||||
- "ANonce");
|
||||
- goto out;
|
||||
+ if (os_get_reltime(&now) < 0 ||
|
||||
+ os_reltime_expired(&now, &sm->ANonce_time, 1)) {
|
||||
+ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
|
||||
+ wpa_printf(MSG_DEBUG, "FT: Failed to get random data for "
|
||||
+ "ANonce");
|
||||
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
+ }
|
||||
+ sm->ANonce_time.sec = now.sec;
|
||||
+ sm->ANonce_time.usec = now.usec;
|
||||
+ wpa_printf(MSG_INFO, "FT: ANonce was randomized");
|
||||
+ } else {
|
||||
+ wpa_printf(MSG_INFO, "FT: ANonce has not expired");
|
||||
}
|
||||
|
||||
/* Now that we know the correct PMK-R1 length and as such, the length
|
||||
@@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *
|
||||
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi)
|
||||
{
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
return;
|
||||
|
||||
if (!addr)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_macaddr(&b, "address", addr);
|
||||
blobmsg_add_u32(&b, "rssi", rssi);
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq)
|
||||
{
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
|
||||
@@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
size_t len);
|
||||
void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency,
|
||||
int chan_width, int cf1, int cf2);
|
||||
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi);
|
||||
|
||||
void hostapd_ubus_notify_bss_transition_response(
|
||||
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,
|
||||
|
||||
@@ -32,7 +32,6 @@ ALLWIFIBOARDS:= \
|
||||
cybertan-eww622-a1 \
|
||||
cybertan-eww631-a1 \
|
||||
cybertan-eww631-b1 \
|
||||
cybertan-rap630w-312g \
|
||||
edgecore-eap101 \
|
||||
gl-ax1800 \
|
||||
gl-axt1800 \
|
||||
@@ -40,7 +39,12 @@ ALLWIFIBOARDS:= \
|
||||
sercomm-wallaby \
|
||||
edgecore-eap102 \
|
||||
edgecore-oap102 \
|
||||
edgecore-oap103 \
|
||||
edgecore-eap104 \
|
||||
emplus-wap380c \
|
||||
emplus-wap385c \
|
||||
emplus-wap386v2 \
|
||||
emplus-wap581 \
|
||||
liteon-wpx8324 \
|
||||
indio-um-310ax-v1 \
|
||||
indio-um-510axp-v1 \
|
||||
@@ -52,6 +56,9 @@ ALLWIFIBOARDS:= \
|
||||
wallys-dr6018-v4 \
|
||||
sonicfi-rap630c-311g \
|
||||
sonicfi-rap630w-311g \
|
||||
sonicfi-rap630w-312g \
|
||||
sonicfi-rap650c \
|
||||
sonicfi-rap630e \
|
||||
tplink-ex227 \
|
||||
tplink-ex447 \
|
||||
yuncore-ax840 \
|
||||
@@ -394,20 +401,27 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
|
||||
$(eval $(call generate-ath11k-wifi-package,cybertan-eww622-a1,CyberTan EWW622 A1))
|
||||
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-a1,CyberTan EWW631 A1))
|
||||
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-b1,CyberTan EWW631 B1))
|
||||
$(eval $(call generate-ath11k-wifi-package,cybertan-rap630w-312g,CyberTan RAP630W 312G))
|
||||
$(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,edgecore-oap102,Edgecore OAP102))
|
||||
$(eval $(call generate-ath11k-wifi-package,edgecore-oap103,Edgecore OAP103))
|
||||
$(eval $(call generate-ath11k-wifi-package,edgecore-eap104,Edgecore EAP104))
|
||||
$(eval $(call generate-ath11k-wifi-package,emplus-wap380c,Emplus WAP380C))
|
||||
$(eval $(call generate-ath11k-wifi-package,emplus-wap385c,Emplus WAP385C))
|
||||
$(eval $(call generate-ath11k-wifi-package,emplus-wap386v2,Emplus WAP386 V2))
|
||||
$(eval $(call generate-ath11k-wifi-package,emplus-wap581,Emplus WAP581))
|
||||
$(eval $(call generate-ath11k-wifi-package,liteon-wpx8324,Liteon WPX8324))
|
||||
$(eval $(call generate-ath11k-wifi-package,indio-um-310ax-v1,Indio UM-310AX V1))
|
||||
$(eval $(call generate-ath11k-wifi-package,indio-um-510axp-v1,Indio UM-510AXP V1))
|
||||
$(eval $(call generate-ath11k-wifi-package,indio-um-510axm-v1,Indio UM-510AXM V1))
|
||||
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630c-311g,Sonicfi RAP630C 311G))
|
||||
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-311g,Sonicfi RAP630W 311G))
|
||||
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-312g,Sonicfi RAP630W 312G))
|
||||
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap650c,SonicFi RAP650C))
|
||||
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630e,SonicFi RAP630E))
|
||||
$(eval $(call generate-ath11k-wifi-package,tplink-ex227,TP-Link EX227))
|
||||
$(eval $(call generate-ath11k-wifi-package,tplink-ex447,TP-Link EX447))
|
||||
$(eval $(call generate-ath11k-wifi-package,yuncore-ax840,YunCore AX840))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap103.bin.IPQ8074
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap103.bin.IPQ8074
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap380c.bin.IPQ8074
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap380c.bin.IPQ8074
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.IPQ5018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.IPQ5018
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.QCN6122
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.QCN6122
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap581.bin.IPQ5018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap581.bin.IPQ5018
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap581.bin.QCN6122
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap581.bin.QCN6122
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap630e.bin.IPQ5018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap630e.bin.IPQ5018
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap630e.bin.QCN6122
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap630e.bin.QCN6122
Normal file
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap650c.bin.IPQ8074
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-sonicfi-rap650c.bin.IPQ8074
Normal file
Binary file not shown.
@@ -18,9 +18,11 @@ start() {
|
||||
[ "$enabled" -gt 0 ] || return 1
|
||||
|
||||
case "$board" in
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g)
|
||||
service_start /usr/sbin/cooling
|
||||
sonicfi,rap630c-311g)
|
||||
service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630c-311g-cooling.conf
|
||||
;;
|
||||
sonicfi,rap630w-311g)
|
||||
service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630w-311g-cooling.conf
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -28,143 +28,270 @@
|
||||
|
||||
#define CUR_STATE_PATH "/sys/devices/virtual/thermal/cooling_device%i/cur_state"
|
||||
#define TEMPER_PATH "/sys/devices/virtual/thermal/thermal_zone%i/temp"
|
||||
#define CPU_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/%s"
|
||||
|
||||
#define PATH_MAX 256
|
||||
#define BUF_MAX 8
|
||||
#define THERSHOLD_MAX 20
|
||||
#define BUF_MAX 32
|
||||
#define PHY0 0
|
||||
#define PHY1 1
|
||||
#define NUM_VALUES 4
|
||||
|
||||
int load_config_file=0;
|
||||
|
||||
//#define ULOG_INFO(fmt, ...) ulog(LOG_INFO, fmt, ## __VA_ARGS__)
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned long u32;
|
||||
|
||||
u8 w2g_threshold_level=0;
|
||||
u8 w5g_threshold_level=0;
|
||||
u8 w2g_cur_temper=0;
|
||||
u8 w5g_cur_temper=0;
|
||||
u32 level_cpu_freq=1008000;
|
||||
|
||||
|
||||
/* default value of wifi thresholds*/
|
||||
#ifdef PLATFORM_RAP630C_311G
|
||||
u8 level_2g_lo[4]={0, 105, 110, 115};
|
||||
u8 level_2g_hi[4]={105, 110, 115, 120};
|
||||
u8 level_2g_limit[4]={0, 35, 50, 70};
|
||||
u8 level_5g_lo[4]={0, 105, 110, 115};
|
||||
u8 level_5g_hi[4]={105, 110, 115, 120};
|
||||
u8 level_5g_limit[4]={0, 20, 30, 50};
|
||||
u8 level_2g_high[4]={105, 110, 115, 120};
|
||||
u8 level_2g_low[4]={0, 105, 110, 115};
|
||||
u8 level_2g_mitigation[4]={0, 35, 50, 70};
|
||||
u8 level_5g_high[4]={105, 110, 115, 120};
|
||||
u8 level_5g_low[4]={0, 105, 110, 115};
|
||||
u8 level_5g_mitigation[4]={0, 20, 30, 50};
|
||||
u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000};
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_RAP630W_311G
|
||||
u8 level_2g_lo[4]={0, 105, 110, 115};
|
||||
u8 level_2g_hi[4]={105, 110, 115, 120};
|
||||
u8 level_2g_limit[4]={0, 20, 50, 70};
|
||||
u8 level_5g_lo[4]={0, 105, 110, 115};
|
||||
u8 level_5g_hi[4]={105, 110, 115, 120};
|
||||
u8 level_5g_limit[4]={0, 20, 50, 70};
|
||||
u8 level_2g_high[4]={105, 110, 115, 120};
|
||||
u8 level_2g_low[4]={0, 105, 110, 115};
|
||||
u8 level_2g_mitigation[4]={0, 20, 50, 70};
|
||||
u8 level_5g_high[4]={105, 110, 115, 120};
|
||||
u8 level_5g_low[4]={0, 105, 110, 115};
|
||||
u8 level_5g_mitigation[4]={0, 20, 50, 70};
|
||||
u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000};
|
||||
#endif
|
||||
|
||||
static char *config_file = NULL;
|
||||
char temp[4][BUF_MAX];
|
||||
|
||||
#define ULOG_DBG(fmt, ...) ulog(LOG_DEBUG, fmt, ## __VA_ARGS__)
|
||||
typedef struct {
|
||||
int thresholds_high[NUM_VALUES];
|
||||
int thresholds_low[NUM_VALUES];
|
||||
int mitigation[NUM_VALUES];
|
||||
int cpu_freq[NUM_VALUES];
|
||||
} WifiConfig;
|
||||
|
||||
static void write_cur_state (char *filename, int state) {
|
||||
WifiConfig wifi2g = {0}, wifi5g = {0};
|
||||
|
||||
static void set_cpu_freq (int freq) {
|
||||
FILE * fp;
|
||||
char filename[PATH_MAX];
|
||||
|
||||
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_governor");
|
||||
|
||||
fp = fopen(filename, "w");
|
||||
if (!fp) {
|
||||
ULOG_ERR("open scaling_governor error\n");
|
||||
}
|
||||
fprintf(fp, "%s", "userspace");
|
||||
fclose(fp);
|
||||
|
||||
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_setspeed");
|
||||
|
||||
fp = fopen(filename, "w");
|
||||
if (!fp) {
|
||||
ULOG_ERR("open scaling_setspeed error\n");
|
||||
}
|
||||
fprintf(fp, "%d", freq);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void parse_line(const char* line, const char* key, int* array) {
|
||||
char label[64];
|
||||
int values[NUM_VALUES];
|
||||
int i;
|
||||
|
||||
if (sscanf(line, "%s %d %d %d %d %d", label, &values[0], &values[1], &values[2], &values[3], &values[4]) == 5) {
|
||||
for (i = 0; i < NUM_VALUES; ++i) {
|
||||
array[i] = values[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int load_config() {
|
||||
FILE * fp = fopen(config_file, "r");
|
||||
if (!fp) {
|
||||
ULOG_ERR("open config file error\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
WifiConfig* current_config = NULL;
|
||||
char line[256];
|
||||
|
||||
while (fgets(line, sizeof(line), fp)) {
|
||||
if (strstr(line, "[wifi2g]")) {
|
||||
current_config = &wifi2g;
|
||||
} else if (strstr(line, "[wifi5g]")) {
|
||||
current_config = &wifi5g;
|
||||
} else if (current_config) {
|
||||
if (strstr(line, "thresholds_high")) {
|
||||
parse_line(line, "thresholds_high", current_config->thresholds_high);
|
||||
} else if (strstr(line, "thresholds_low")) {
|
||||
parse_line(line, "thresholds_low", current_config->thresholds_low);
|
||||
} else if (strstr(line, "mitigation")) {
|
||||
parse_line(line, "mitigation", current_config->mitigation);
|
||||
} else if (strstr(line, "CPU_freq")) {
|
||||
parse_line(line, "CPU_freq", current_config->cpu_freq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
set_cpu_freq(wifi5g.cpu_freq[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int load_default_config(){
|
||||
int i=0;
|
||||
|
||||
set_cpu_freq(1008000);
|
||||
for (i = 0; i < NUM_VALUES; i++) {
|
||||
wifi2g.thresholds_high[i]=level_2g_high[i];
|
||||
wifi2g.thresholds_low[i]=level_2g_low[i];
|
||||
wifi2g.mitigation[i]=level_2g_mitigation[i];
|
||||
wifi2g.cpu_freq[i]=level_cpu_frequency[i];
|
||||
wifi5g.thresholds_high[i]=level_5g_high[i];
|
||||
wifi5g.thresholds_low[i]=level_5g_low[i];
|
||||
wifi5g.mitigation[i]=level_5g_mitigation[i];
|
||||
wifi5g.cpu_freq[i]=level_cpu_frequency[i];
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static void write_cur_state (const char *filename, int state) {
|
||||
FILE * fp;
|
||||
|
||||
ULOG_DBG("write_cur_state filename=[%s] [%d]\n", filename, state);
|
||||
fp = fopen(filename, "w");
|
||||
if (!fp){
|
||||
ULOG_ERR("some kind of error write cur_state\n");
|
||||
ULOG_ERR("open %s file error\n",filename);
|
||||
}
|
||||
fprintf(fp, "%d", state);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void read_cur_state (char *filename, char *buffer) {
|
||||
FILE * fp;
|
||||
|
||||
int read_cur_state(const char *filename, char *buf, size_t buffer) {
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (!fp){
|
||||
ULOG_ERR("some kind of error write cur_state\n");
|
||||
if (!fp) {
|
||||
ULOG_ERR("open %s file error\n",filename);
|
||||
return -1;
|
||||
}
|
||||
if (0 == fread(buffer, sizeof(char), 3, fp)) {
|
||||
ULOG_ERR("some kind of error read value\n");
|
||||
if (!fgets(buf, buffer, fp)) {
|
||||
ULOG_ERR("Failed to read %s file\n", filename);
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void wifi_get_temperature() {
|
||||
char filename[PATH_MAX];
|
||||
FILE * fp;
|
||||
int i = 0;
|
||||
char buffer[BUF_MAX];
|
||||
int i = 0;
|
||||
|
||||
// ULOG_INFO("=================================\n");
|
||||
|
||||
/* read cpuinfo_cur_freq*/
|
||||
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "cpuinfo_cur_freq");
|
||||
|
||||
memset(buffer, 0, BUF_MAX);
|
||||
read_cur_state(filename, buffer, sizeof(buffer));
|
||||
// ULOG_INFO("CPU current frequency: %s\n", buffer);
|
||||
|
||||
/* get current phy cooling state*/
|
||||
for (i=0 ; i <= 1; i++ ) {
|
||||
for (i=0; i <= 1; i++) {
|
||||
memset(buffer, 0, BUF_MAX);
|
||||
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
|
||||
read_cur_state(filename, buffer);
|
||||
ULOG_DBG("read from Phy%i cur_state is %s\n", i, buffer);
|
||||
read_cur_state(filename, buffer, sizeof(buffer));
|
||||
// ULOG_INFO("Phy%i cur_state is: %s\n", i, buffer);
|
||||
}
|
||||
|
||||
for (i=0 ; i <= 3; i++ ) {
|
||||
for (i=0; i <= 3; i++) {
|
||||
memset(buffer, 0, BUF_MAX);
|
||||
snprintf(filename, PATH_MAX, TEMPER_PATH, i);
|
||||
fp = fopen(filename, "r");
|
||||
if (!fp) {
|
||||
ULOG_ERR("some kind of error open value\n");
|
||||
}
|
||||
memset(temp[i], 0, BUF_MAX);
|
||||
if (0 == fread(temp[i], sizeof(char), 3, fp)) {
|
||||
ULOG_ERR("some kind of error read value\n");
|
||||
}
|
||||
fclose(fp);
|
||||
ULOG_DBG("thermal_zone%i cur_temp is %s\n", i, temp[i]);
|
||||
read_cur_state(filename, buffer, sizeof(buffer));
|
||||
// ULOG_INFO("thermal_zone%i cur_temp is: %s\n", i, buffer);
|
||||
|
||||
if (i == 0)
|
||||
w2g_cur_temper=atoi(buffer);
|
||||
else if (i == 3)
|
||||
w5g_cur_temper=atoi(buffer);
|
||||
}
|
||||
|
||||
w2g_cur_temper=atoi(temp[0]);
|
||||
w5g_cur_temper=atoi(temp[3]);
|
||||
if (w5g_cur_temper >= 120)
|
||||
{
|
||||
ULOG_ERR("!! Temperature is over %d degree, system will reboot\n", w5g_cur_temper);
|
||||
sync();
|
||||
if ( -1 != system("reboot &") ){
|
||||
printf("sysyem reboot...\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void wifi_set_cooling() {
|
||||
char filename[PATH_MAX];
|
||||
int level;
|
||||
|
||||
for (level=0 ; level<=3 ; level++) {
|
||||
if (w2g_cur_temper >= level_2g_lo[level] && w2g_cur_temper < level_2g_hi[level]) {
|
||||
ULOG_DBG("2G at level %d , %d degree\n" ,level, w2g_cur_temper);
|
||||
for (level = 0; level <= 3; level++) {
|
||||
if (w2g_cur_temper >= wifi2g.thresholds_low[level] && w2g_cur_temper < wifi2g.thresholds_high[level]) {
|
||||
// ULOG_INFO("2G at level %d , %d degree\n" ,level, w2g_cur_temper);
|
||||
if (w2g_threshold_level != level) {
|
||||
ULOG_DBG("setting 2G reduce %d percent\n" ,level_2g_limit[level]);
|
||||
// ULOG_INFO("setting 2G reduce %d percent\n" ,wifi2g.mitigation[level]);
|
||||
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY0);
|
||||
write_cur_state(filename, level_2g_limit[level]);
|
||||
write_cur_state(filename, wifi2g.mitigation[level]);
|
||||
w2g_threshold_level = level;
|
||||
}
|
||||
}
|
||||
if (w5g_cur_temper >= level_5g_lo[level] && w5g_cur_temper < level_5g_hi[level]) {
|
||||
ULOG_DBG("5G at level %d , %d degree\n" ,level, w5g_cur_temper);
|
||||
if (w5g_cur_temper >= wifi5g.thresholds_low[level] && w5g_cur_temper < wifi5g.thresholds_high[level]) {
|
||||
// ULOG_INFO("5G at level %d , %d degree\n" ,level, w5g_cur_temper);
|
||||
if (w5g_threshold_level != level) {
|
||||
ULOG_DBG("setting 5G reduce %d percent\n" ,level_5g_limit[level]);
|
||||
// ULOG_INFO("setting 5G reduce %d percent\n" ,wifi5g.mitigation[level]);
|
||||
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY1);
|
||||
write_cur_state(filename, level_5g_limit[level]);
|
||||
write_cur_state(filename, wifi5g.mitigation[level]);
|
||||
w5g_threshold_level = level;
|
||||
set_cpu_freq(wifi5g.cpu_freq[level]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void cooling_init() {
|
||||
char filename[256];
|
||||
int i;
|
||||
char filename[PATH_MAX];
|
||||
int i,result=0;
|
||||
|
||||
for (i=0 ; i <= 1; i++) {
|
||||
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
|
||||
write_cur_state(filename, 0);
|
||||
}
|
||||
|
||||
if(load_config_file)
|
||||
result = load_config();
|
||||
|
||||
if (result == 1 || load_config_file == 0)
|
||||
load_default_config();
|
||||
}
|
||||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf("\nWifi-cooling daemon usage\n");
|
||||
printf("Optional arguments:\n");
|
||||
printf(" -c <file> config file\n");
|
||||
printf(" -d debug output\n");
|
||||
printf(" -c <file> setting with config file\n");
|
||||
printf(" -d default setting\n");
|
||||
printf(" -h this usage screen\n");
|
||||
}
|
||||
|
||||
@@ -185,17 +312,18 @@ int main(int argc, char *argv[])
|
||||
setpriority(PRIO_PROCESS, getpid(), -20);
|
||||
|
||||
ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "cooling");
|
||||
ulog_threshold(LOG_INFO);
|
||||
ulog_threshold(LOG_ERR);
|
||||
// ulog_threshold(LOG_INFO);
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:dh")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "c:dh")) != -1) {
|
||||
switch (ch) {
|
||||
case 'c':
|
||||
printf("wifi-cooling load configuration file %s\n", optarg);
|
||||
config_file = optarg;
|
||||
load_config_file=1;
|
||||
break;
|
||||
case 'd':
|
||||
printf("wifi-cooling ulog_threshold set to debug level\n");
|
||||
ulog_threshold(LOG_DEBUG);
|
||||
printf("wifi-cooling set to default value\n");
|
||||
break;
|
||||
case 'h':
|
||||
default:
|
||||
@@ -212,4 +340,4 @@ int main(int argc, char *argv[])
|
||||
uloop_done();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
sampling 5000
|
||||
[wifi2g]
|
||||
thresholds_high 105 110 115 120
|
||||
thresholds_low 0 105 110 115
|
||||
mitigation 0 35 50 70
|
||||
CPU_freq 1008000 800000 800000 800000
|
||||
|
||||
[tsens_tz_sensor1]
|
||||
sampling 5000
|
||||
thresholds 105 110 115 119 120
|
||||
thresholds_clr 0 100 105 110 115
|
||||
actions cooling cooling cooling cooling shutdown
|
||||
action_info 0 35 50 70 800000
|
||||
|
||||
[tsens_tz_sensor4]
|
||||
sampling 5000
|
||||
thresholds 105 110 115 119 120
|
||||
thresholds_clr 0 100 105 110 115
|
||||
actions cooling cooling cooling cooling shutdown
|
||||
action_info 0 20 30 50 800000
|
||||
[wifi5g]
|
||||
thresholds_high 105 110 115 120
|
||||
thresholds_low 0 105 110 115
|
||||
mitigation 0 20 30 50
|
||||
CPU_freq 1008000 800000 800000 800000
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
sampling 5000
|
||||
[wifi2g]
|
||||
thresholds_high 105 110 115 120
|
||||
thresholds_low 0 105 110 115
|
||||
mitigation 0 20 50 70
|
||||
CPU_freq 1008000 800000 800000 800000
|
||||
|
||||
[tsens_tz_sensor1]
|
||||
sampling 5000
|
||||
thresholds 105 115 119 125
|
||||
thresholds_clr 0 105 110 120
|
||||
actions cooling cooling cooling cooling
|
||||
action_info 0 20 50 70
|
||||
|
||||
[tsens_tz_sensor4]
|
||||
sampling 5000
|
||||
thresholds 105 115 119 125
|
||||
thresholds_clr 0 105 110 120
|
||||
actions cooling cooling cooling cooling
|
||||
action_info 0 20 50 70
|
||||
[wifi5g]
|
||||
thresholds_high 105 110 115 120
|
||||
thresholds_low 0 105 110 115
|
||||
mitigation 0 20 50 70
|
||||
CPU_freq 1008000 800000 800000 800000
|
||||
|
||||
@@ -117,8 +117,6 @@ hostapd_common_add_device_config() {
|
||||
config_add_boolean legacy_rates
|
||||
config_add_int cell_density
|
||||
config_add_int rts_threshold
|
||||
config_add_int rssi_reject_assoc_rssi
|
||||
config_add_int rssi_ignore_probe_request
|
||||
config_add_int maxassoc
|
||||
config_add_boolean maxassoc_ignore_probe
|
||||
|
||||
@@ -162,7 +160,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 \
|
||||
rts_threshold beacon_rate maxassoc \
|
||||
multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \
|
||||
maxassoc_ignore_probe band
|
||||
|
||||
@@ -261,8 +259,6 @@ hostapd_prepare_device_config() {
|
||||
hostapd_add_rate brlist "$br"
|
||||
done
|
||||
|
||||
[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
|
||||
[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
|
||||
[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N"
|
||||
[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N"
|
||||
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
|
||||
@@ -340,6 +336,7 @@ hostapd_common_add_bss_config() {
|
||||
wpa_group_rekey wpa_pair_rekey wpa_master_rekey
|
||||
config_add_boolean wpa_strict_rekey
|
||||
config_add_boolean wpa_disable_eapol_key_retries
|
||||
config_add_boolean multi_psk
|
||||
|
||||
config_add_boolean tdls_prohibit
|
||||
|
||||
@@ -471,6 +468,9 @@ hostapd_common_add_bss_config() {
|
||||
config_add_string uci_section
|
||||
|
||||
config_add_boolean dynamic_probe_resp
|
||||
|
||||
config_add_int rssi_reject_assoc_rssi
|
||||
config_add_int rssi_ignore_probe_request
|
||||
}
|
||||
|
||||
hostapd_set_vlan_file() {
|
||||
@@ -724,7 +724,8 @@ hostapd_set_bss_options() {
|
||||
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
|
||||
multicast_to_unicast_all proxy_arp per_sta_vif \
|
||||
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
|
||||
vendor_elements fils uci_section dynamic_probe_resp
|
||||
vendor_elements fils uci_section dynamic_probe_resp multi_psk \
|
||||
rssi_reject_assoc_rssi rssi_ignore_probe_request
|
||||
|
||||
set_default fils 0
|
||||
set_default isolate 0
|
||||
@@ -737,6 +738,7 @@ hostapd_set_bss_options() {
|
||||
set_default wmm 1
|
||||
set_default uapsd 1
|
||||
set_default wpa_disable_eapol_key_retries 0
|
||||
set_default multi_psk $multi_psk
|
||||
set_default tdls_prohibit 0
|
||||
set_default eapol_version $((wpa & 1))
|
||||
set_default acct_port 1813
|
||||
@@ -778,6 +780,8 @@ hostapd_set_bss_options() {
|
||||
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
|
||||
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
|
||||
append bss_conf "multi_ap=$multi_ap" "$N"
|
||||
[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
|
||||
[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
|
||||
[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N"
|
||||
|
||||
[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N"
|
||||
|
||||
@@ -26,11 +26,12 @@ function event_cb_6g(req) {
|
||||
return 0;
|
||||
|
||||
let ssid = iface.ssid;
|
||||
if (!ssid || !length(ssids[ssid].keys))
|
||||
|
||||
if (!ssid || !ssids[ssid].mpsk)
|
||||
return 0;
|
||||
|
||||
let ssid_cache = cache[ssid];
|
||||
if (ssid_cache && ssid_cache[addr])
|
||||
if (ssid_cache && addr in ssid_cache)
|
||||
return 0;
|
||||
|
||||
if (req.type == 'probe') {
|
||||
@@ -53,15 +54,15 @@ function event_cb(req) {
|
||||
return 0;
|
||||
|
||||
let ssid = iface.ssid;
|
||||
if (!ssid || !length(ssids[ssid].keys))
|
||||
if (!ssid || !ssids[ssid].mpsk)
|
||||
return 0;
|
||||
|
||||
let ssid_cache = cache[ssid];
|
||||
if (ssid_cache && ssid_cache[addr])
|
||||
if (ssid_cache && addr in ssid_cache)
|
||||
return 0;
|
||||
|
||||
printf(`reply to ${req.type} on ${req.data.ifname} from ${addr} without 6G RNR\n`);
|
||||
return 2;
|
||||
return 2;
|
||||
}
|
||||
|
||||
function create_6g_subscriber() {
|
||||
@@ -143,6 +144,7 @@ function netifd_reload() {
|
||||
|
||||
push(ssid.interfaces, iface.ifname);
|
||||
ssid.bands[band] = iface.ifname;
|
||||
ssid.mpsk = ssid?.mpsk ? true : config.multi_psk;
|
||||
for (let sta in iface.stations) {
|
||||
let stacfg = sta.config;
|
||||
|
||||
@@ -174,6 +176,20 @@ function iface_ssid(ifname) {
|
||||
return iface.ssid;
|
||||
}
|
||||
|
||||
function is_ssid_mpsk(ifname) {
|
||||
let ssid = iface_ssid(ifname);
|
||||
if (!ssid)
|
||||
return false;
|
||||
|
||||
if (!ssids[ssid])
|
||||
return false;
|
||||
|
||||
if (!ssids[ssid]?.mpsk)
|
||||
return false;
|
||||
|
||||
return ssids[ssid].mpsk;
|
||||
}
|
||||
|
||||
function sta_cache_entry_get(ssid, addr) {
|
||||
let ssid_cache = cache[ssid] ?? {};
|
||||
|
||||
@@ -295,12 +311,15 @@ function auth_cb(msg) {
|
||||
printf(`Event ${msg.type}: ${msg.data}\n`);
|
||||
switch (msg.type) {
|
||||
case 'sta_auth':
|
||||
if (!is_ssid_mpsk(data.iface))
|
||||
return;
|
||||
|
||||
return {
|
||||
psk: sta_auth_psk(data.iface, data.sta),
|
||||
force_psk: true,
|
||||
};
|
||||
case 'sta_connected':
|
||||
if (data.psk_idx == null)
|
||||
if (data.psk_idx == null || !is_ssid_mpsk(data.iface))
|
||||
return;
|
||||
return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk);
|
||||
case 'reload':
|
||||
|
||||
@@ -606,12 +606,13 @@
|
||||
for (pw = hapd->conf->sae_passwords; pw; pw = pw->next) {
|
||||
if (!is_broadcast_ether_addr(pw->peer_addr) &&
|
||||
os_memcmp(pw->peer_addr, sta->addr, ETH_ALEN) != 0)
|
||||
@@ -519,6 +525,31 @@ static const char * sae_get_password(str
|
||||
@@ -519,6 +525,33 @@ static const char * sae_get_password(str
|
||||
pt = hapd->conf->ssid.pt;
|
||||
}
|
||||
|
||||
+use_sta_psk:
|
||||
+ if (!password && sta) {
|
||||
+ sta->psk_idx = 0;
|
||||
+ for (psk = sta->psk; psk; psk = psk->next) {
|
||||
+ if (!psk->is_passphrase)
|
||||
+ continue;
|
||||
@@ -620,6 +621,7 @@
|
||||
+ if (!sta->use_sta_psk)
|
||||
+ break;
|
||||
+
|
||||
+ sta->psk_idx = 1;
|
||||
+ if (sta->sae_pt) {
|
||||
+ pt = sta->sae_pt;
|
||||
+ break;
|
||||
@@ -638,7 +640,7 @@
|
||||
if (pw_entry)
|
||||
*pw_entry = pw;
|
||||
if (s_pt)
|
||||
@@ -3698,6 +3729,12 @@ static void handle_auth(struct hostapd_d
|
||||
@@ -3698,6 +3731,12 @@ static void handle_auth(struct hostapd_d
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -686,15 +688,15 @@
|
||||
char *radius_cui; /* Chargeable-User-Identity from RADIUS */
|
||||
--- a/src/ap/wpa_auth_glue.c
|
||||
+++ b/src/ap/wpa_auth_glue.c
|
||||
@@ -337,6 +337,7 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
struct sta_info *sta = ap_get_sta(hapd, addr);
|
||||
const u8 *psk;
|
||||
@@ -355,6 +355,7 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
}
|
||||
#endif /* CONFIG_SAE */
|
||||
|
||||
+ sta->psk_idx = 0;
|
||||
if (vlan_id)
|
||||
*vlan_id = 0;
|
||||
if (psk_len)
|
||||
@@ -381,13 +382,18 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
#ifdef CONFIG_OWE
|
||||
if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) &&
|
||||
sta && sta->owe_pmk) {
|
||||
@@ -381,12 +382,17 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
* returned psk which should not be returned again.
|
||||
* logic list (all hostapd_get_psk; all sta->psk)
|
||||
*/
|
||||
@@ -702,28 +704,26 @@
|
||||
+ psk = NULL;
|
||||
if (sta && sta->psk && !psk) {
|
||||
struct hostapd_sta_wpa_psk_short *pos;
|
||||
+ int psk_idx;
|
||||
+ int psk_idx = 1;
|
||||
|
||||
if (vlan_id)
|
||||
*vlan_id = 0;
|
||||
psk = sta->psk->psk;
|
||||
+ sta->psk_idx = psk_idx = 1;
|
||||
+ if (vlan_id)
|
||||
+ sta->psk_idx = psk_idx;
|
||||
for (pos = sta->psk; pos; pos = pos->next) {
|
||||
+ psk_idx++;
|
||||
if (pos->is_passphrase) {
|
||||
pbkdf2_sha1(pos->passphrase,
|
||||
hapd->conf->ssid.ssid,
|
||||
@@ -396,10 +402,14 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
pos->is_passphrase = 0;
|
||||
@@ -397,9 +403,13 @@ static const u8 * hostapd_wpa_auth_get_p
|
||||
}
|
||||
if (pos->psk == prev_psk) {
|
||||
+ sta->psk_idx = psk_idx;
|
||||
psk = pos->next ? pos->next->psk : NULL;
|
||||
+ if (vlan_id)
|
||||
+ sta->psk_idx = psk_idx + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (!psk)
|
||||
+ if (vlan_id && !psk)
|
||||
+ sta->psk_idx = 0;
|
||||
}
|
||||
return psk;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -1527,19 +1527,15 @@ int hostapd_setup_bss(struct hostapd_dat
|
||||
if (x_snoop_init(hapd)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Generic snooping infrastructure initialization failed");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (dhcp_snoop_init(hapd)) {
|
||||
+ conf->proxy_arp = 0;
|
||||
+ } else if (dhcp_snoop_init(hapd)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"DHCP snooping initialization failed");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (ndisc_snoop_init(hapd)) {
|
||||
+ conf->proxy_arp = 0;
|
||||
+ } else if (ndisc_snoop_init(hapd)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Neighbor Discovery snooping initialization failed");
|
||||
- return -1;
|
||||
+ conf->proxy_arp = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,411 @@
|
||||
From: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
Date: Tue, 14 Feb 2023 11:29:30 +0200
|
||||
Subject: [PATCH] FT: Store PMK-R0/PMK-R1 after EAPOL-Key msg 2/4 MIC
|
||||
validation
|
||||
|
||||
hostapd was previously storing the derived PMK-R0 and PMK-R1 as soon as
|
||||
these keys were derived. While that is fine for most purposes, it is
|
||||
unnecessary to do that so quickly and if anything were to fail before
|
||||
the supplicant is able to return a valid EAPOL-Key msg 2/4, there would
|
||||
not really be any real use for the derived keys.
|
||||
|
||||
For the special case of FT-PSK and VLAN determination based on the
|
||||
wpa_psk file, the VLAN information is set in the per-STA data structures
|
||||
only after the EAPOL-Key msg 2/4 MIC has been verified. This ended up
|
||||
storing the PMK-R0/PMK-R1 entries without correct VLAN assignment and as
|
||||
such, any use of the FT protocol would not be able to transfer the VLAN
|
||||
information through RRB.
|
||||
|
||||
Split local storing of the FT key hierarchy for the cases using the FT
|
||||
4-way handshake so that PMK-R0 and PMK-R1 are first derived and then
|
||||
stored as a separate step after having verified the MIC in the EAPOL-Key
|
||||
msg 2/4 (i.e., after having confirmed the per-STA passphrase/PSK was
|
||||
selected) and VLAN update. This fixes VLAN information for the
|
||||
wpa_psk_file cases with FT-PSK.
|
||||
|
||||
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
---
|
||||
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -58,7 +58,9 @@ static int wpa_group_config_group_keys(s
|
||||
struct wpa_group *group);
|
||||
static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *snonce,
|
||||
const u8 *pmk, unsigned int pmk_len,
|
||||
- struct wpa_ptk *ptk, int force_sha256);
|
||||
+ struct wpa_ptk *ptk, int force_sha256,
|
||||
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
|
||||
+ size_t *key_len);
|
||||
static void wpa_group_free(struct wpa_authenticator *wpa_auth,
|
||||
struct wpa_group *group);
|
||||
static void wpa_group_get(struct wpa_authenticator *wpa_auth,
|
||||
@@ -940,6 +942,10 @@ static int wpa_try_alt_snonce(struct wpa
|
||||
const u8 *pmk = NULL;
|
||||
size_t pmk_len;
|
||||
int vlan_id = 0;
|
||||
+ u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
|
||||
+ u8 pmk_r1[PMK_LEN_MAX];
|
||||
+ size_t key_len;
|
||||
+ int ret = -1;
|
||||
|
||||
os_memset(&PTK, 0, sizeof(PTK));
|
||||
for (;;) {
|
||||
@@ -961,8 +967,8 @@ static int wpa_try_alt_snonce(struct wpa
|
||||
pmk_len = sm->pmk_len;
|
||||
}
|
||||
|
||||
- if (wpa_derive_ptk(sm, sm->alt_SNonce, pmk, pmk_len, &PTK, 0) <
|
||||
- 0)
|
||||
+ if (wpa_derive_ptk(sm, sm->alt_SNonce, pmk, pmk_len, &PTK, 0,
|
||||
+ pmk_r0, pmk_r1, pmk_r0_name, &key_len) < 0)
|
||||
break;
|
||||
|
||||
if (wpa_verify_key_mic(sm->wpa_key_mgmt, pmk_len, &PTK,
|
||||
@@ -983,7 +989,7 @@ static int wpa_try_alt_snonce(struct wpa
|
||||
if (!ok) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"WPA: Earlier SNonce did not result in matching MIC");
|
||||
- return -1;
|
||||
+ goto fail;
|
||||
}
|
||||
|
||||
wpa_printf(MSG_DEBUG,
|
||||
@@ -992,14 +998,26 @@ static int wpa_try_alt_snonce(struct wpa
|
||||
|
||||
if (vlan_id && wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
||||
wpa_auth_update_vlan(sm->wpa_auth, sm->addr, vlan_id) < 0)
|
||||
- return -1;
|
||||
+ goto fail;
|
||||
+
|
||||
+#ifdef CONFIG_IEEE80211R_AP
|
||||
+ if (wpa_key_mgmt_ft(sm->wpa_key_mgmt) && !sm->ft_completed) {
|
||||
+ wpa_printf(MSG_DEBUG, "FT: Store PMK-R0/PMK-R1");
|
||||
+ wpa_auth_ft_store_keys(sm, pmk_r0, pmk_r1, pmk_r0_name,
|
||||
+ key_len);
|
||||
+ }
|
||||
+#endif /* CONFIG_IEEE80211R_AP */
|
||||
|
||||
os_memcpy(sm->SNonce, sm->alt_SNonce, WPA_NONCE_LEN);
|
||||
os_memcpy(&sm->PTK, &PTK, sizeof(PTK));
|
||||
forced_memzero(&PTK, sizeof(PTK));
|
||||
sm->PTK_valid = true;
|
||||
|
||||
- return 0;
|
||||
+ ret = 0;
|
||||
+fail:
|
||||
+ forced_memzero(pmk_r0, sizeof(pmk_r0));
|
||||
+ forced_memzero(pmk_r1, sizeof(pmk_r1));
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2283,7 +2301,9 @@ SM_STATE(WPA_PTK, PTKSTART)
|
||||
|
||||
static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *snonce,
|
||||
const u8 *pmk, unsigned int pmk_len,
|
||||
- struct wpa_ptk *ptk, int force_sha256)
|
||||
+ struct wpa_ptk *ptk, int force_sha256,
|
||||
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
|
||||
+ size_t *key_len)
|
||||
{
|
||||
const u8 *z = NULL;
|
||||
size_t z_len = 0, kdk_len;
|
||||
@@ -2311,7 +2331,8 @@ static int wpa_derive_ptk(struct wpa_sta
|
||||
sm->pairwise,
|
||||
kdk_len);
|
||||
}
|
||||
- return wpa_auth_derive_ptk_ft(sm, ptk);
|
||||
+ return wpa_auth_derive_ptk_ft(sm, ptk, pmk_r0, pmk_r1,
|
||||
+ pmk_r0_name, key_len);
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
|
||||
@@ -2934,6 +2955,9 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
struct wpa_eapol_ie_parse kde;
|
||||
int vlan_id = 0;
|
||||
int owe_ptk_workaround = !!wpa_auth->conf.owe_ptk_workaround;
|
||||
+ u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
|
||||
+ u8 pmk_r1[PMK_LEN_MAX];
|
||||
+ size_t key_len;
|
||||
|
||||
SM_ENTRY_MA(WPA_PTK, PTKCALCNEGOTIATING, wpa_ptk);
|
||||
sm->EAPOLKeyReceived = false;
|
||||
@@ -2972,7 +2996,8 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
}
|
||||
|
||||
if (wpa_derive_ptk(sm, sm->SNonce, pmk, pmk_len, &PTK,
|
||||
- owe_ptk_workaround == 2) < 0)
|
||||
+ owe_ptk_workaround == 2, pmk_r0, pmk_r1,
|
||||
+ pmk_r0_name, &key_len) < 0)
|
||||
break;
|
||||
|
||||
if (mic_len &&
|
||||
@@ -3021,7 +3046,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
sm->last_rx_eapol_key,
|
||||
sm->last_rx_eapol_key_len);
|
||||
sm->waiting_radius_psk = 1;
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
@@ -3029,7 +3054,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
"invalid MIC in msg 2/4 of 4-Way Handshake");
|
||||
if (psk_found)
|
||||
wpa_auth_psk_failure_report(sm->wpa_auth, sm->addr);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3043,12 +3068,12 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
key_data_length = WPA_GET_BE16(mic + mic_len);
|
||||
if (key_data_length > sm->last_rx_eapol_key_len - sizeof(*hdr) -
|
||||
sizeof(*key) - mic_len - 2)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
if (wpa_parse_kde_ies(key_data, key_data_length, &kde) < 0) {
|
||||
wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
|
||||
"received EAPOL-Key msg 2/4 with invalid Key Data contents");
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
if (kde.rsn_ie) {
|
||||
eapol_key_ie = kde.rsn_ie;
|
||||
@@ -3075,7 +3100,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
/* MLME-DEAUTHENTICATE.request */
|
||||
wpa_sta_disconnect(wpa_auth, sm->addr,
|
||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
if ((!sm->rsnxe && kde.rsnxe) ||
|
||||
(sm->rsnxe && !kde.rsnxe) ||
|
||||
@@ -3091,7 +3116,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
/* MLME-DEAUTHENTICATE.request */
|
||||
wpa_sta_disconnect(wpa_auth, sm->addr,
|
||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
#ifdef CONFIG_OCV
|
||||
if (wpa_auth_uses_ocv(sm)) {
|
||||
@@ -3103,14 +3128,14 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
if (wpa_channel_info(wpa_auth, &ci) != 0) {
|
||||
wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
|
||||
"Failed to get channel info to validate received OCI in EAPOL-Key 2/4");
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
if (get_sta_tx_parameters(sm,
|
||||
channel_width_to_int(ci.chanwidth),
|
||||
ci.seg1_idx, &tx_chanwidth,
|
||||
&tx_seg1_idx) < 0)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
res = ocv_verify_tx_params(kde.oci, kde.oci_len, &ci,
|
||||
tx_chanwidth, tx_seg1_idx);
|
||||
@@ -3127,7 +3152,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
OCV_FAILURE "addr=" MACSTR
|
||||
" frame=eapol-key-m2 error=%s",
|
||||
MAC2STR(sm->addr), ocv_errorstr);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_OCV */
|
||||
@@ -3135,7 +3160,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
if (ft && ft_check_msg_2_of_4(wpa_auth, sm, &kde) < 0) {
|
||||
wpa_sta_disconnect(wpa_auth, sm->addr,
|
||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
#ifdef CONFIG_P2P
|
||||
@@ -3171,7 +3196,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
"DPP: Peer indicated it supports PFS and local configuration allows this, but PFS was not negotiated for the association");
|
||||
wpa_sta_disconnect(wpa_auth, sm->addr,
|
||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_DPP2 */
|
||||
@@ -3191,7 +3216,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
sm->sup_pmk_r1_name, WPA_PMK_NAME_LEN);
|
||||
wpa_hexdump(MSG_DEBUG, "FT: Derived PMKR1Name",
|
||||
sm->pmk_r1_name, WPA_PMK_NAME_LEN);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
@@ -3200,7 +3225,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
wpa_auth_update_vlan(wpa_auth, sm->addr, vlan_id) < 0) {
|
||||
wpa_sta_disconnect(wpa_auth, sm->addr,
|
||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
sm->pending_1_of_4_timeout = 0;
|
||||
@@ -3216,9 +3241,20 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
|
||||
sm->MICVerified = true;
|
||||
|
||||
+#ifdef CONFIG_IEEE80211R_AP
|
||||
+ if (wpa_key_mgmt_ft(sm->wpa_key_mgmt) && !sm->ft_completed) {
|
||||
+ wpa_printf(MSG_DEBUG, "FT: Store PMK-R0/PMK-R1");
|
||||
+ wpa_auth_ft_store_keys(sm, pmk_r0, pmk_r1, pmk_r0_name,
|
||||
+ key_len);
|
||||
+ }
|
||||
+#endif /* CONFIG_IEEE80211R_AP */
|
||||
+
|
||||
os_memcpy(&sm->PTK, &PTK, sizeof(PTK));
|
||||
forced_memzero(&PTK, sizeof(PTK));
|
||||
sm->PTK_valid = true;
|
||||
+out:
|
||||
+ forced_memzero(pmk_r0, sizeof(pmk_r0));
|
||||
+ forced_memzero(pmk_r1, sizeof(pmk_r1));
|
||||
}
|
||||
|
||||
|
||||
--- a/src/ap/wpa_auth_ft.c
|
||||
+++ b/src/ap/wpa_auth_ft.c
|
||||
@@ -2175,13 +2175,13 @@ int wpa_ft_store_pmk_fils(struct wpa_sta
|
||||
}
|
||||
|
||||
|
||||
-int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk)
|
||||
+int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk,
|
||||
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
|
||||
+ size_t *key_len)
|
||||
{
|
||||
- u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
|
||||
size_t pmk_r0_len = wpa_key_mgmt_sha384(sm->wpa_key_mgmt) ?
|
||||
SHA384_MAC_LEN : PMK_LEN;
|
||||
size_t pmk_r1_len = pmk_r0_len;
|
||||
- u8 pmk_r1[PMK_LEN_MAX];
|
||||
u8 ptk_name[WPA_PMK_NAME_LEN];
|
||||
const u8 *mdid = sm->wpa_auth->conf.mobility_domain;
|
||||
const u8 *r0kh = sm->wpa_auth->conf.r0_key_holder;
|
||||
@@ -2189,13 +2189,6 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
|
||||
const u8 *r1kh = sm->wpa_auth->conf.r1_key_holder;
|
||||
const u8 *ssid = sm->wpa_auth->conf.ssid;
|
||||
size_t ssid_len = sm->wpa_auth->conf.ssid_len;
|
||||
- int psk_local = sm->wpa_auth->conf.ft_psk_generate_local;
|
||||
- int expires_in = sm->wpa_auth->conf.r0_key_lifetime;
|
||||
- struct vlan_description vlan;
|
||||
- struct rate_description rate;
|
||||
- const u8 *identity, *radius_cui;
|
||||
- size_t identity_len, radius_cui_len;
|
||||
- int session_timeout;
|
||||
const u8 *mpmk;
|
||||
size_t mpmk_len;
|
||||
|
||||
@@ -2211,10 +2204,41 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ *key_len = pmk_r0_len;
|
||||
+ if (wpa_derive_pmk_r0(mpmk, mpmk_len, ssid, ssid_len, mdid,
|
||||
+ r0kh, r0kh_len, sm->addr,
|
||||
+ pmk_r0, pmk_r0_name,
|
||||
+ pmk_r0_len == SHA384_MAC_LEN) < 0 ||
|
||||
+ wpa_derive_pmk_r1(pmk_r0, pmk_r0_len, pmk_r0_name, r1kh, sm->addr,
|
||||
+ pmk_r1, sm->pmk_r1_name) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ return wpa_pmk_r1_to_ptk(pmk_r1, pmk_r1_len, sm->SNonce, sm->ANonce,
|
||||
+ sm->addr, sm->wpa_auth->addr, sm->pmk_r1_name,
|
||||
+ ptk, ptk_name, sm->wpa_key_mgmt, sm->pairwise,
|
||||
+ 0);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void wpa_auth_ft_store_keys(struct wpa_state_machine *sm, const u8 *pmk_r0,
|
||||
+ const u8 *pmk_r1, const u8 *pmk_r0_name,
|
||||
+ size_t key_len)
|
||||
+{
|
||||
+ int psk_local = sm->wpa_auth->conf.ft_psk_generate_local;
|
||||
+ int expires_in = sm->wpa_auth->conf.r0_key_lifetime;
|
||||
+ struct vlan_description vlan;
|
||||
+ struct rate_description rate;
|
||||
+ const u8 *identity, *radius_cui;
|
||||
+ size_t identity_len, radius_cui_len;
|
||||
+ int session_timeout;
|
||||
+
|
||||
+ if (psk_local && wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
|
||||
+ return;
|
||||
+
|
||||
if (wpa_ft_get_vlan(sm->wpa_auth, sm->addr, &vlan) < 0) {
|
||||
wpa_printf(MSG_DEBUG, "FT: vlan not available for STA " MACSTR,
|
||||
MAC2STR(sm->addr));
|
||||
- return -1;
|
||||
+ return;
|
||||
}
|
||||
|
||||
wpa_ft_get_rate_limit(sm->wpa_auth, sm->addr, &rate);
|
||||
@@ -2224,32 +2248,16 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
|
||||
&radius_cui);
|
||||
session_timeout = wpa_ft_get_session_timeout(sm->wpa_auth, sm->addr);
|
||||
|
||||
- if (wpa_derive_pmk_r0(mpmk, mpmk_len, ssid, ssid_len, mdid,
|
||||
- r0kh, r0kh_len, sm->addr,
|
||||
- pmk_r0, pmk_r0_name,
|
||||
- wpa_key_mgmt_sha384(sm->wpa_key_mgmt)) < 0)
|
||||
- return -1;
|
||||
- if (!psk_local || !wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
|
||||
- wpa_ft_store_pmk_r0(sm->wpa_auth, sm->addr, pmk_r0, pmk_r0_len,
|
||||
- pmk_r0_name,
|
||||
- sm->pairwise, &vlan, expires_in,
|
||||
- session_timeout, identity, identity_len,
|
||||
- radius_cui, radius_cui_len, &rate);
|
||||
-
|
||||
- if (wpa_derive_pmk_r1(pmk_r0, pmk_r0_len, pmk_r0_name, r1kh, sm->addr,
|
||||
- pmk_r1, sm->pmk_r1_name) < 0)
|
||||
- return -1;
|
||||
- if (!psk_local || !wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
|
||||
- wpa_ft_store_pmk_r1(sm->wpa_auth, sm->addr, pmk_r1, pmk_r1_len,
|
||||
- sm->pmk_r1_name, sm->pairwise, &vlan,
|
||||
- expires_in, session_timeout, identity,
|
||||
- identity_len, radius_cui, radius_cui_len,
|
||||
- &rate);
|
||||
-
|
||||
- return wpa_pmk_r1_to_ptk(pmk_r1, pmk_r1_len, sm->SNonce, sm->ANonce,
|
||||
- sm->addr, sm->wpa_auth->addr, sm->pmk_r1_name,
|
||||
- ptk, ptk_name, sm->wpa_key_mgmt, sm->pairwise,
|
||||
- 0);
|
||||
+ wpa_ft_store_pmk_r0(sm->wpa_auth, sm->addr, pmk_r0, key_len,
|
||||
+ pmk_r0_name,
|
||||
+ sm->pairwise, &vlan, expires_in,
|
||||
+ session_timeout, identity, identity_len,
|
||||
+ radius_cui, radius_cui_len, &rate);
|
||||
+
|
||||
+ wpa_ft_store_pmk_r1(sm->wpa_auth, sm->addr, pmk_r1, key_len,
|
||||
+ sm->pmk_r1_name, sm->pairwise, &vlan,
|
||||
+ expires_in, session_timeout, identity,
|
||||
+ identity_len, radius_cui, radius_cui_len, &rate);
|
||||
}
|
||||
|
||||
|
||||
--- a/src/ap/wpa_auth_i.h
|
||||
+++ b/src/ap/wpa_auth_i.h
|
||||
@@ -302,7 +302,12 @@ int wpa_write_ftie(struct wpa_auth_confi
|
||||
const u8 *anonce, const u8 *snonce,
|
||||
u8 *buf, size_t len, const u8 *subelem,
|
||||
size_t subelem_len, int rsnxe_used);
|
||||
-int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk);
|
||||
+int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk,
|
||||
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
|
||||
+ size_t *key_len);
|
||||
+void wpa_auth_ft_store_keys(struct wpa_state_machine *sm, const u8 *pmk_r0,
|
||||
+ const u8 *pmk_r1, const u8 *pmk_r0_name,
|
||||
+ size_t key_len);
|
||||
struct wpa_ft_pmk_cache * wpa_ft_pmk_cache_init(void);
|
||||
void wpa_ft_pmk_cache_deinit(struct wpa_ft_pmk_cache *cache);
|
||||
void wpa_ft_install_ptk(struct wpa_state_machine *sm, int retry);
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat
|
||||
int ubus_response;
|
||||
|
||||
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
|
||||
- ssi_signal < hapd->iconf->rssi_ignore_probe_request)
|
||||
+ ssi_signal < hapd->iconf->rssi_ignore_probe_request) {
|
||||
+ hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal);
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (len < IEEE80211_HDRLEN)
|
||||
return;
|
||||
@@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *
|
||||
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi)
|
||||
{
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
return;
|
||||
|
||||
if (!addr)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_macaddr(&b, "address", addr);
|
||||
blobmsg_add_u32(&b, "rssi", rssi);
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq)
|
||||
{
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
|
||||
@@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
size_t len);
|
||||
void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency,
|
||||
int chan_width, int cf1, int cf2);
|
||||
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi);
|
||||
|
||||
void hostapd_ubus_notify_bss_transition_response(
|
||||
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,
|
||||
|
||||
@@ -24,7 +24,7 @@ cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1)
|
||||
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
|
||||
;;
|
||||
cybertan,rap630w-312g)
|
||||
sonicfi,rap630w-312g)
|
||||
ucidef_set_led_default "power" "POWER" "red:power" "on"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
|
||||
@@ -33,6 +33,11 @@ sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g)
|
||||
ucidef_set_led_default "power" "POWER" "pwm:blue" "on"
|
||||
;;
|
||||
sonicfi,rap630e)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
|
||||
ucidef_set_led_default "power" "POWER" "green:power" "on"
|
||||
;;
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
@@ -40,6 +45,11 @@ edgecore,oap101e-6e)
|
||||
ucidef_set_led_netdev "wan" "wan" "red:ethernet" "eth1"
|
||||
ucidef_set_led_default "power" "POWER" "blue:management" "on"
|
||||
;;
|
||||
emplus,wap385c)
|
||||
ucidef_set_led_default "ledr" "LEDR" "sys:red" "on"
|
||||
ucidef_set_led_default "ledg" "LEDG" "sys:green" "on"
|
||||
ucidef_set_led_default "ledb" "LEDB" "sys:blue" "on"
|
||||
;;
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
|
||||
|
||||
@@ -13,10 +13,10 @@ qcom_setup_interfaces()
|
||||
|
||||
case $board in
|
||||
cig,wf186w)
|
||||
ucidef_add_switch "switch0" "4:wan" "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0"
|
||||
ucidef_add_switch "switch0" "4:wan" "0:lan" "1:lan" "2:lan" "3:lan" "6u@eth0"
|
||||
;;
|
||||
cig,wf186h)
|
||||
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6@eth0"
|
||||
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6u@eth0"
|
||||
;;
|
||||
sonicfi,rap630c-311g|\
|
||||
cybertan,eww631-a1)
|
||||
@@ -25,11 +25,7 @@ qcom_setup_interfaces()
|
||||
;;
|
||||
sonicfi,rap630w-311g|\
|
||||
cybertan,eww631-b1)
|
||||
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6@eth0"
|
||||
;;
|
||||
cybertan,rap630w-312g)
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6u@eth0"
|
||||
;;
|
||||
udaya,a6-id2)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
@@ -50,8 +46,9 @@ qcom_setup_interfaces()
|
||||
edgecore,eap104)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
emplus,wap385c|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -63,12 +60,19 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_set_interface_lan "eth1"
|
||||
;;
|
||||
sonicfi,rap630w-312g|\
|
||||
yuncore,fap655)
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
"6u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
;;
|
||||
glinet,b3000)
|
||||
ucidef_add_switch "switch1" "6@eth1" "1:wan" "2:lan" "3:lan"
|
||||
ucidef_add_switch "switch1" "6u@eth1" "1:wan" "2:lan" "3:lan"
|
||||
;;
|
||||
sonicfi,rap630e)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_set_interface_lan "eth0"
|
||||
emplus,wap581)
|
||||
ucidef_set_interface_wan "eth0 eth1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -106,6 +110,16 @@ qcom_setup_macs()
|
||||
wan_mac=$(cat /sys/class/net/eth1/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 2)
|
||||
;;
|
||||
sonicfi,rap630e)
|
||||
mac=$(fw_printenv -n BaseMacAddress)
|
||||
[ -z "$mac" ] && return;
|
||||
lan_mac=$(macaddr_canonicalize $mac)
|
||||
wan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
ucidef_set_network_device_mac eth1 $wan_mac
|
||||
ucidef_set_network_device_mac eth0 $lan_mac
|
||||
ip link set eth1 address $wan_mac
|
||||
ip link set eth0 address $lan_mac
|
||||
;;
|
||||
*)
|
||||
wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
|
||||
@@ -94,6 +94,15 @@ ath11k_generate_macs_gl_b3000() {
|
||||
}
|
||||
}
|
||||
|
||||
ath11k_generate_macs_rap630e() {
|
||||
touch /lib/firmware/ath11k-macs
|
||||
eth=$(cat /sys/class/net/eth0/address)
|
||||
mac1=$(macaddr_add $eth 2)
|
||||
mac2=$(macaddr_add $eth 3)
|
||||
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
caldata_die() {
|
||||
echo "caldata: " "$*"
|
||||
exit 1
|
||||
@@ -121,14 +130,16 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
cig,wf186h|\
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap630w-312g|\
|
||||
sonicfi,rap630e|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
cybertan,rap630w-312g|\
|
||||
edgecore,eap104|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
emplus,wap385c|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w|\
|
||||
optimcloud,d60|\
|
||||
@@ -139,6 +150,7 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
udaya,a6-od2|\
|
||||
wallys,dr5018|\
|
||||
yuncore,fap655|\
|
||||
emplus,wap581|\
|
||||
glinet,b3000)
|
||||
caldata_extract "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
@@ -150,17 +162,20 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
|
||||
cig,wf186h|\
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap630w-312g|\
|
||||
sonicfi,rap630e|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
cybertan,rap630w-312g|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
emplus,wap385c|\
|
||||
udaya,a6-id2|\
|
||||
udaya,a6-od2|\
|
||||
hfcl,ion4xi_w|\
|
||||
wallys,dr5018|\
|
||||
emplus,wap581|\
|
||||
yuncore,fap655)
|
||||
caldata_extract "0:ART" 0x26800 0x20000
|
||||
;;
|
||||
@@ -176,6 +191,7 @@ ath11k/qcn6122/hw1.0/caldata_2.bin)
|
||||
;;
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap630e|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
glinet,b3000)
|
||||
@@ -211,6 +227,9 @@ ath11k-macs)
|
||||
cybertan,eww631-b1)
|
||||
ath11k_generate_macs_eww631_b1
|
||||
;;
|
||||
sonicfi,rap630e)
|
||||
ath11k_generate_macs_rap630e
|
||||
;;
|
||||
edgecore,eap104|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
@@ -219,7 +238,7 @@ ath11k-macs)
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
cybertan,rap630w-312g|\
|
||||
sonicfi,rap630w-312g|\
|
||||
yuncore,fap655)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
|
||||
@@ -6,26 +6,27 @@ board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"edgecore,eap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,eap102")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
"edgecore,eap102"|\
|
||||
"edgecore,oap103")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,oap101e-6e"|\
|
||||
"edgecore,oap101-6e")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
|
||||
;;
|
||||
"edgecore,oap101e"|\
|
||||
"edgecore,oap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
"edgecore,eap104")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -72,10 +72,12 @@ platform_check_image() {
|
||||
cig,wf186h|\
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap630w-312g|\
|
||||
sonicfi,rap630e|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
cybertan,rap630w-312g|\
|
||||
edgecore,eap104|\
|
||||
emplus,wap385c|\
|
||||
wallys,dr5018|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w|\
|
||||
@@ -90,6 +92,7 @@ platform_check_image() {
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
emplus,wap581|\
|
||||
edgecore,oap101e-6e)
|
||||
[ "$magic_long" = "73797375" ] && return 0
|
||||
;;
|
||||
@@ -129,6 +132,7 @@ platform_do_upgrade() {
|
||||
;;
|
||||
cig,wf186w|\
|
||||
cig,wf186h|\
|
||||
emplus,wap385c|\
|
||||
udaya,a6-id2|\
|
||||
udaya,a6-od2|\
|
||||
wallys,dr5018|\
|
||||
@@ -136,6 +140,7 @@ platform_do_upgrade() {
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
emplus,wap581|\
|
||||
yuncore,fap655)
|
||||
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
|
||||
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
|
||||
@@ -143,11 +148,12 @@ platform_do_upgrade() {
|
||||
}
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
cybertan,rap630w-312g)
|
||||
sonicfi,rap630c-311g|\
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap630w-312g|\
|
||||
sonicfi,rap630e)
|
||||
boot_part=$(fw_printenv bootfrom | cut -d = -f2)
|
||||
echo "Current bootfrom is $boot_part"
|
||||
if [[ $boot_part == 1 ]]; then
|
||||
|
||||
@@ -450,6 +450,8 @@ CONFIG_GPIO_DEVRES=y
|
||||
# CONFIG_GPIO_SAMA5D2_PIOBU is not set
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_GPIO_USB_DETECT is not set
|
||||
CONFIG_GPIO_WATCHDOG=y
|
||||
CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
|
||||
# CONFIG_GSI is not set
|
||||
# CONFIG_HABANA_AI is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
|
||||
@@ -0,0 +1,760 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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 "ipq5018.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Emplus WAP385C";
|
||||
compatible = "emplus,wap385c", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet1 = "/soc/dp1";
|
||||
|
||||
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 = " swiotlb=1 coherent_pool=2M";
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D300000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E200000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4EF00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4100000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x1400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E000000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4EF00000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F000000 0x0 0x100000>;
|
||||
};
|
||||
#else
|
||||
/* 512MB/1GB Profiles
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D300000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D500000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E400000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E900000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4F600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4F800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4D00000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 01400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D500000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E400000 0x0 0x500000>;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_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;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 23 0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <24>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x1>;
|
||||
ess-switch@0x39c00000 {
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
mdiobus = <&mdio0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <0x18>;
|
||||
mdiobus = <&mdio1>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x18>;
|
||||
mdiobus = <&mdio1>;
|
||||
};
|
||||
|
||||
lpass: lpass@0xA000000{
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm_lb: pcm_lb@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
qcom,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_data {
|
||||
pins = "gpio4", "gpio5", "gpio6", "gpio7";
|
||||
function = "qspi_data";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
poe_dc_pins: poe_dc_pins {
|
||||
T2P_DET {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
12V_DET {
|
||||
pins = "gpio32";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pinmux {
|
||||
linux,phandle = <0x4d>;
|
||||
phandle = <0x4d>;
|
||||
|
||||
led_G {
|
||||
pins = "gpio24";
|
||||
function = "gpio";
|
||||
bias-pull-down;
|
||||
drive-strength = <0x08>;
|
||||
};
|
||||
|
||||
led_B {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
bias-pull-down;
|
||||
drive-strength = <0x08>;
|
||||
};
|
||||
|
||||
led_R {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
bias-pull-down;
|
||||
drive-strength = <0x08>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@24 {
|
||||
label = "sys:green";
|
||||
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led@28 {
|
||||
label = "sys:blue";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_power: led@38 {
|
||||
label = "sys:red";
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "wap385c:sys:red";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
compatible = "qcom,ipq5018-q6-mpd";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
reg = <0x0cd00000 0x4040>,
|
||||
<0x1938000 0x8>,
|
||||
<0x193d204 0x4>;
|
||||
reg-names = "qdsp6",
|
||||
"tcsr-msip",
|
||||
"tcsr-q6";
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_Q6_BCR>;
|
||||
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_q6_reset";
|
||||
|
||||
clocks = <&gcc GCC_Q6_AXIS_CLK>,
|
||||
<&gcc GCC_WCSS_ECAHB_CLK>,
|
||||
<&gcc GCC_Q6_AXIM_CLK>,
|
||||
<&gcc GCC_Q6_AXIM2_CLK>,
|
||||
<&gcc GCC_Q6_AHB_CLK>,
|
||||
<&gcc GCC_Q6_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_S_CLK>;
|
||||
clock-names = "gcc_q6_axis_clk",
|
||||
"gcc_wcss_ecahb_clk",
|
||||
"gcc_q6_axim_clk",
|
||||
"gcc_q6_axim2_clk",
|
||||
"gcc_q6_ahb_clk",
|
||||
"gcc_q6_ahb_s_clk",
|
||||
"gcc_wcss_axi_s_clk";
|
||||
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
|
||||
qcom,rproc = <&q6v5_wcss>;
|
||||
qcom,bootargs_smem = <507>;
|
||||
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
|
||||
<0x2 0x4 0x2 0x12 0x0 0x0>;
|
||||
status = "ok";
|
||||
|
||||
q6_wcss_pd1: remoteproc_pd1@4ab000 {
|
||||
compatible = "qcom,ipq5018-wcss-ahb-mpd";
|
||||
reg = <0x4ab000 0x20>;
|
||||
reg-names = "rmb";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_BCR>,
|
||||
<&gcc GCC_CE_BCR>;
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_reset",
|
||||
"ce_reset";
|
||||
|
||||
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_ACMT_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_M_CLK>;
|
||||
clock-names = "gcc_wcss_ahb_s_clk",
|
||||
"gcc_wcss_acmt_clk",
|
||||
"gcc_wcss_axi_m_clk";
|
||||
|
||||
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
|
||||
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>, <&q6_caldb_region>;
|
||||
#endif
|
||||
};
|
||||
|
||||
q6_wcss_pd2: remoteproc_pd2 {
|
||||
compatible = "qcom,ipq5018-wcss-pcie-mpd";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "qcn6122/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 16 0>,
|
||||
<&wcss_smp2p_in 17 0>,
|
||||
<&wcss_smp2p_in 20 0>,
|
||||
<&wcss_smp2p_in 19 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 16>,
|
||||
<&wcss_smp2p_out 17>,
|
||||
<&wcss_smp2p_out 18>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
|
||||
#endif
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,multipd_arch;
|
||||
qcom,rproc = <&q6_wcss_pd1>;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
/* QCN6122 5G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
|
||||
qcom,rproc = <&q6_wcss_pd2>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x60>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
|
||||
qcom,caldb-size = <0x500000>;
|
||||
mem-region = <&q6_qcn6122_data1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>;
|
||||
#endif
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&dwc_0 {
|
||||
/delete-property/ #phy-cells;
|
||||
/delete-property/ phys;
|
||||
/delete-property/ phy-names;
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
@@ -0,0 +1,831 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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 "ipq5018.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Emplus WAP581";
|
||||
compatible = "emplus,wap581", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart1;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
bootargs-append = " swiotlb=1 coherent_pool=2M";
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D300000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E200000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4EF00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4100000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x1400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E000000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4EF00000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F000000 0x0 0x100000>;
|
||||
};
|
||||
#else
|
||||
/* 512MB/1GB Profiles
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D300000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D500000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E400000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E900000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4F600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4F800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4D00000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 01400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D500000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E400000 0x0 0x500000>;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_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;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x2>;
|
||||
ess-switch@0x39c00000 {
|
||||
compatible = "qcom,ess-switch-ipq50xx";
|
||||
device_id = <0>;
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
forced-speed = <1000>;
|
||||
forced-duplex = <1>;
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch1@1 {
|
||||
compatible = "qcom,ess-switch-qca83xx";
|
||||
device_id = <1>;
|
||||
switch_access_mode = "mdio";
|
||||
mdio-bus = <&mdio1>;
|
||||
reset_gpio = <&tlmm 0x27 0>;
|
||||
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x3e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x0>; /* wan port bitmap */
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
|
||||
0x000e4 0xaa545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <5>;
|
||||
phy_address = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
qcom,rx-page-mode = <0>;
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <2>;
|
||||
reg = <0x39D00000 0x10000>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
qcom,rx-page-mode = <0>;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@28 {
|
||||
label = "led_blue";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@38 {
|
||||
label = "led_red";
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@46 {
|
||||
label = "led_green";
|
||||
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x1c>;
|
||||
mdiobus = <&mdio1>;
|
||||
};
|
||||
|
||||
lpass: lpass@0xA000000{
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm_lb: pcm_lb@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qcom,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_data {
|
||||
pins = "gpio4", "gpio5", "gpio6", "gpio7";
|
||||
function = "qspi_data";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
i2c_sda {
|
||||
pins = "gpio26";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_blue {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
led_red { /* POWER_LED */
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
led_green { /* 2G_LED */
|
||||
pins = "gpio46";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
|
||||
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
compatible = "qcom,ipq5018-q6-mpd";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
reg = <0x0cd00000 0x4040>,
|
||||
<0x1938000 0x8>,
|
||||
<0x193d204 0x4>;
|
||||
reg-names = "qdsp6",
|
||||
"tcsr-msip",
|
||||
"tcsr-q6";
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_Q6_BCR>;
|
||||
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_q6_reset";
|
||||
|
||||
clocks = <&gcc GCC_Q6_AXIS_CLK>,
|
||||
<&gcc GCC_WCSS_ECAHB_CLK>,
|
||||
<&gcc GCC_Q6_AXIM_CLK>,
|
||||
<&gcc GCC_Q6_AXIM2_CLK>,
|
||||
<&gcc GCC_Q6_AHB_CLK>,
|
||||
<&gcc GCC_Q6_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_S_CLK>;
|
||||
clock-names = "gcc_q6_axis_clk",
|
||||
"gcc_wcss_ecahb_clk",
|
||||
"gcc_q6_axim_clk",
|
||||
"gcc_q6_axim2_clk",
|
||||
"gcc_q6_ahb_clk",
|
||||
"gcc_q6_ahb_s_clk",
|
||||
"gcc_wcss_axi_s_clk";
|
||||
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
|
||||
qcom,rproc = <&q6v5_wcss>;
|
||||
qcom,bootargs_smem = <507>;
|
||||
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
|
||||
<0x2 0x4 0x2 0x12 0x0 0x0>;
|
||||
status = "ok";
|
||||
|
||||
q6_wcss_pd1: remoteproc_pd1@4ab000 {
|
||||
compatible = "qcom,ipq5018-wcss-ahb-mpd";
|
||||
reg = <0x4ab000 0x20>;
|
||||
reg-names = "rmb";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_BCR>,
|
||||
<&gcc GCC_CE_BCR>;
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_reset",
|
||||
"ce_reset";
|
||||
|
||||
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_ACMT_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_M_CLK>;
|
||||
clock-names = "gcc_wcss_ahb_s_clk",
|
||||
"gcc_wcss_acmt_clk",
|
||||
"gcc_wcss_axi_m_clk";
|
||||
|
||||
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
|
||||
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>, <&q6_caldb_region>;
|
||||
#endif
|
||||
};
|
||||
|
||||
q6_wcss_pd2: remoteproc_pd2 {
|
||||
compatible = "qcom,ipq5018-wcss-pcie-mpd";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "qcn6122/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 16 0>,
|
||||
<&wcss_smp2p_in 17 0>,
|
||||
<&wcss_smp2p_in 20 0>,
|
||||
<&wcss_smp2p_in 19 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 16>,
|
||||
<&wcss_smp2p_out 17>,
|
||||
<&wcss_smp2p_out 18>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
|
||||
#endif
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
|
||||
qcom,rproc = <&q6_wcss_pd1>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x23>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
/* QCN6122 5G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
|
||||
qcom,rproc = <&q6_wcss_pd2>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x50>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
|
||||
qcom,caldb-size = <0x500000>;
|
||||
mem-region = <&q6_qcn6122_data1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>;
|
||||
#endif
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&dwc_0 {
|
||||
/delete-property/ #phy-cells;
|
||||
/delete-property/ phys;
|
||||
/delete-property/ phy-names;
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
&pcie_x2 {
|
||||
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
3
feeds/ipq807x_v5.4/ipq50xx/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-eww631-a1.dts
Normal file → Executable file
3
feeds/ipq807x_v5.4/ipq50xx/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-eww631-a1.dts
Normal file → Executable file
@@ -817,10 +817,9 @@
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
1235
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
|
||||
78
feeds/ipq807x_v5.4/ipq50xx/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-eww631-b1.dts
Normal file → Executable file
78
feeds/ipq807x_v5.4/ipq50xx/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-eww631-b1.dts
Normal file → Executable file
@@ -173,40 +173,40 @@
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 14MB |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D200000 | 1MB |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D300000 | 1MB |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D400000 | 2MB |
|
||||
* | Caldb | 0x4D300000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D600000 | 16MB |
|
||||
* | data | 0x4D500000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E600000 | 1MB |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E700000 | 1MB |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E800000 | 5MB |
|
||||
* | Caldb | 0x4E400000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4ED00000 | 16MB |
|
||||
* | data | 0x4E900000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4FD00000 | 1MB |
|
||||
* | M3 Dump | 0x4F600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4FE00000 | 1MB |
|
||||
* | QDSS | 0x4F700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4FF00000 | 5MB |
|
||||
* | Caldb | 0x4F800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
@@ -215,7 +215,7 @@
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x5400000>;
|
||||
reg = <0x0 0x4B000000 0x0 0x4D00000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
@@ -225,62 +225,62 @@
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xE00000>;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D200000 {
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D300000 {
|
||||
q6_caldb_region: q6_caldb_region@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x100000>;
|
||||
reg = <0x0 0x4D300000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D400000 {
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D400000 0x0 0x200000>;
|
||||
reg = <0x0 0x4D500000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D600000 0x0 0x1000000>;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E600000 0x0 0x100000>;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E800000 0x0 0x500000>;
|
||||
reg = <0x0 0x4E400000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ED00000 0x0 0x1000000>;
|
||||
reg = <0x0 0x4E900000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FD00000 0x0 0x100000>;
|
||||
reg = <0x0 0x4F600000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FE00000 0x0 0x100000>;
|
||||
reg = <0x0 0x4F700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FF00000 0x0 0x500000>;
|
||||
reg = <0x0 0x4F800000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -883,8 +883,8 @@
|
||||
#endif
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
#else
|
||||
|
||||
@@ -816,10 +816,9 @@
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
1235
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,893 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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 "ipq5018.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Sonicfi RAP630E";
|
||||
compatible = "sonicfi,rap630e", "qcom,ipq5018-mp03.5", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
|
||||
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 = " swiotlb=1 coherent_pool=2M";
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D300000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E200000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4EF00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F000000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4100000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x1400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E000000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4EF00000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F000000 0x0 0x100000>;
|
||||
};
|
||||
#else
|
||||
/* 512MB/1GB Profiles
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D300000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D500000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E400000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E900000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4F600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4F800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4D00000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 01400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D500000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E400000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E900000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F600000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F800000 0x0 0x500000>;
|
||||
};
|
||||
ramoops: ramoops@50400000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0x50400000 0x0 0x80000>; // 512KB
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
pmsg-size = <0x20000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
blsp1_uart2: serial@78b0000 {
|
||||
pinctrl-0 = <&blsp1_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_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;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <28>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x1>;
|
||||
ess-switch@0x39c00000 {
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
mdiobus = <&mdio0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <0x1c>;
|
||||
mdiobus = <&mdio1>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
qcom,rx-page-mode = <0>;
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <2>;
|
||||
reg = <0x39D00000 0x10000>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <28>;
|
||||
mdio-bus = <&mdio1>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
qcom,rx-page-mode = <0>;
|
||||
};
|
||||
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x1c>;
|
||||
mdiobus = <&mdio1>;
|
||||
};
|
||||
|
||||
pcm: pcm@0xA3C0000{
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
qcom,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp1_uart_pins: blsp1_uart_pins {
|
||||
blsp1_uart_rx_tx {
|
||||
pins = "gpio22", "gpio24", "gpio23", "gpio25";
|
||||
function = "blsp1_uart2";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
qspi_data {
|
||||
pins = "gpio4", "gpio5", "gpio6", "gpio7";
|
||||
function = "qspi_data";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
phy_led_pins: phy_led_pins {
|
||||
gephy_led_pin {
|
||||
pins = "gpio46";
|
||||
function = "led0";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
i2c_sda {
|
||||
pins = "gpio26";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_5g {
|
||||
pins = "gpio34";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g {
|
||||
pins = "gpio33";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_sys {
|
||||
pins = "gpio26";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_onekey {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led34 {
|
||||
label = "green:wifi5";
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
led33 {
|
||||
label = "green:wifi2";
|
||||
gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
led_power: led26 {
|
||||
label = "green:power";
|
||||
gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
led@28 {
|
||||
label = "led_onekey";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "led_onekey";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
gpio-watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
|
||||
hw_algo = "toggle";
|
||||
hw_margin_ms = <5000>;
|
||||
start-at-boot;
|
||||
always-running;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
compatible = "qcom,ipq5018-q6-mpd";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
reg = <0x0cd00000 0x4040>,
|
||||
<0x1938000 0x8>,
|
||||
<0x193d204 0x4>;
|
||||
reg-names = "qdsp6",
|
||||
"tcsr-msip",
|
||||
"tcsr-q6";
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_Q6_BCR>;
|
||||
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_q6_reset";
|
||||
|
||||
clocks = <&gcc GCC_Q6_AXIS_CLK>,
|
||||
<&gcc GCC_WCSS_ECAHB_CLK>,
|
||||
<&gcc GCC_Q6_AXIM_CLK>,
|
||||
<&gcc GCC_Q6_AXIM2_CLK>,
|
||||
<&gcc GCC_Q6_AHB_CLK>,
|
||||
<&gcc GCC_Q6_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_S_CLK>;
|
||||
clock-names = "gcc_q6_axis_clk",
|
||||
"gcc_wcss_ecahb_clk",
|
||||
"gcc_q6_axim_clk",
|
||||
"gcc_q6_axim2_clk",
|
||||
"gcc_q6_ahb_clk",
|
||||
"gcc_q6_ahb_s_clk",
|
||||
"gcc_wcss_axi_s_clk";
|
||||
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
|
||||
qcom,rproc = <&q6v5_wcss>;
|
||||
qcom,bootargs_smem = <507>;
|
||||
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
|
||||
<0x2 0x4 0x2 0x12 0x0 0x0>;
|
||||
status = "ok";
|
||||
q6_wcss_pd1: remoteproc_pd1@4ab000 {
|
||||
compatible = "qcom,ipq5018-wcss-ahb-mpd";
|
||||
reg = <0x4ab000 0x20>;
|
||||
reg-names = "rmb";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
|
||||
resets = <&gcc GCC_WCSSAON_RESET>,
|
||||
<&gcc GCC_WCSS_BCR>,
|
||||
<&gcc GCC_CE_BCR>;
|
||||
reset-names = "wcss_aon_reset",
|
||||
"wcss_reset",
|
||||
"ce_reset";
|
||||
|
||||
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
|
||||
<&gcc GCC_WCSS_ACMT_CLK>,
|
||||
<&gcc GCC_WCSS_AXI_M_CLK>;
|
||||
clock-names = "gcc_wcss_ahb_s_clk",
|
||||
"gcc_wcss_acmt_clk",
|
||||
"gcc_wcss_axi_m_clk";
|
||||
|
||||
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
|
||||
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>, <&q6_caldb_region>;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
q6_wcss_pd2: remoteproc_pd2 {
|
||||
compatible = "qcom,ipq5018-wcss-pcie-mpd";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
m3_firmware = "qcn6122/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 16 0>,
|
||||
<&wcss_smp2p_in 17 0>,
|
||||
<&wcss_smp2p_in 20 0>,
|
||||
<&wcss_smp2p_in 19 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
|
||||
qcom,smem-states = <&wcss_smp2p_out 16>,
|
||||
<&wcss_smp2p_out 17>,
|
||||
<&wcss_smp2p_out 18>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
q6_wcss_pd3: remoteproc_pd3 {
|
||||
compatible = "qcom,ipq5018-wcss-pcie-mpd";
|
||||
firmware = "IPQ5018/q6_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 24 0>,
|
||||
<&wcss_smp2p_in 25 0>,
|
||||
<&wcss_smp2p_in 28 0>,
|
||||
<&wcss_smp2p_in 27 0>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn-ack",
|
||||
"stop-ack";
|
||||
|
||||
qcom,smem-states = <&wcss_smp2p_out 24>,
|
||||
<&wcss_smp2p_out 25>,
|
||||
<&wcss_smp2p_out 26>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
|
||||
<&q6_qcn6122_etr_2>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
|
||||
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,multipd_arch;
|
||||
qcom,rproc = <&q6_wcss_pd1>;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
nss-radio-priority = <0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
/* QCN6122 5G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
qcom,rproc = <&q6_wcss_pd3>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x60>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4E900000 0x4E900000 0x4E200000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4F800000 0x4F800000 0 0 0>;
|
||||
qcom,caldb-size = <0x500000>;
|
||||
mem-region = <&q6_qcn6122_data2>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data2>;
|
||||
#endif
|
||||
nss-radio-priority = <1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi2 {
|
||||
/* QCN6122 6G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x60>;
|
||||
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4FF00000>;
|
||||
m3-dump-addr = <0x4FD00000>;
|
||||
nss-radio-priority = <1>;
|
||||
#endif
|
||||
mem-region = <&q6_qcn6122_data2>;
|
||||
qcom,caldb-size = <0x500000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dwc_0 {
|
||||
/delete-property/ #phy-cells;
|
||||
/delete-property/ phys;
|
||||
/delete-property/ phy-names;
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -175,40 +175,40 @@
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 14MB |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D200000 | 1MB |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D300000 | 1MB |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D400000 | 2MB |
|
||||
* | Caldb | 0x4D300000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D600000 | 16MB |
|
||||
* | data | 0x4D500000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E600000 | 1MB |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E700000 | 1MB |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E800000 | 5MB |
|
||||
* | Caldb | 0x4E400000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4ED00000 | 16MB |
|
||||
* | data | 0x4E900000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4FD00000 | 1MB |
|
||||
* | M3 Dump | 0x4F600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4FE00000 | 1MB |
|
||||
* | QDSS | 0x4F700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4FF00000 | 5MB |
|
||||
* | Caldb | 0x4F800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
@@ -217,7 +217,7 @@
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x5400000>;
|
||||
reg = <0x0 0x4B000000 0x0 0x4D00000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
@@ -227,62 +227,62 @@
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xE00000>;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D200000 {
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D300000 {
|
||||
q6_caldb_region: q6_caldb_region@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x100000>;
|
||||
reg = <0x0 0x4D300000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D400000 {
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D400000 0x0 0x200000>;
|
||||
reg = <0x0 0x4D500000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D600000 0x0 0x1000000>;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E600000 0x0 0x100000>;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E800000 0x0 0x500000>;
|
||||
reg = <0x0 0x4E400000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ED00000 0x0 0x1000000>;
|
||||
reg = <0x0 0x4E900000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FD00000 0x0 0x100000>;
|
||||
reg = <0x0 0x4F600000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FE00000 0x0 0x100000>;
|
||||
reg = <0x0 0x4F700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FF00000 0x0 0x500000>;
|
||||
reg = <0x0 0x4F800000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -894,8 +894,8 @@
|
||||
#endif
|
||||
qcom,board_id = <0x24>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
#else
|
||||
|
||||
@@ -22,16 +22,15 @@
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Cybertan RAP630W-312G";
|
||||
compatible = "cybertan,rap630w-312g", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
|
||||
model = "Sonicfi RAP630W-312G";
|
||||
compatible = "sonicfi,rap630w-312g", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
ethernet1 = "/soc/dp1";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
@@ -375,7 +374,7 @@
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
phy_dac = <0x10 0x10>;
|
||||
mdiobus = <&mdio0>;
|
||||
mdio-bus = <&mdio0>;
|
||||
};
|
||||
port@1 {
|
||||
mdio-bus = <&mdio0>;
|
||||
@@ -441,22 +440,6 @@
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
|
||||
@@ -40,16 +40,16 @@ define Device/cybertan_eww631_b1
|
||||
endef
|
||||
TARGET_DEVICES += cybertan_eww631_b1
|
||||
|
||||
define Device/cybertan_rap630w_312g
|
||||
DEVICE_TITLE := CyberTan RAP630W-312G
|
||||
define Device/sonicfi_rap630w_312g
|
||||
DEVICE_TITLE := Sonicfi RAP630W-312G
|
||||
DEVICE_DTS := qcom-ipq5018-rap630w-312g
|
||||
SUPPORTED_DEVICES := cybertan,rap630w-312g
|
||||
DEVICE_PACKAGES := ath11k-wifi-cybertan-rap630w-312g ath11k-firmware-ipq50xx-map-spruce \
|
||||
SUPPORTED_DEVICES := sonicfi,rap630w-312g
|
||||
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap630w-312g ath11k-firmware-ipq50xx-map-spruce \
|
||||
-kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3 \
|
||||
kmod-usb-uas kmod-fs-msdos kmod-fs-ntfs
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += cybertan_rap630w_312g
|
||||
TARGET_DEVICES += sonicfi_rap630w_312g
|
||||
|
||||
define Device/sonicfi_rap630c_311g
|
||||
DEVICE_TITLE := Sonicfi RAP630C-311G
|
||||
@@ -73,6 +73,17 @@ define Device/sonicfi_rap630w_311g
|
||||
endef
|
||||
TARGET_DEVICES += sonicfi_rap630w_311g
|
||||
|
||||
define Device/sonicfi_rap630e
|
||||
DEVICE_TITLE := Sonicfi RAP630E
|
||||
DEVICE_DTS := qcom-ipq5018-rap630e
|
||||
SUPPORTED_DEVICES := sonicfi,rap630e
|
||||
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap630e ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.5-c1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += sonicfi_rap630e
|
||||
|
||||
define Device/edgecore_eap104
|
||||
DEVICE_TITLE := EdgeCore EAP104
|
||||
DEVICE_DTS := qcom-ipq5018-eap104
|
||||
@@ -154,6 +165,15 @@ define Device/edgecore_oap101e_6e
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap101e_6e
|
||||
|
||||
define Device/emplus_wap385c
|
||||
DEVICE_TITLE := Emplus WAP385C
|
||||
DEVICE_DTS := qcom-ipq5018-emplus-wap385c
|
||||
SUPPORTED_DEVICES := emplus,wap385c
|
||||
DEVICE_PACKAGES := ath11k-wifi-emplus-wap385c ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += emplus_wap385c
|
||||
|
||||
define Device/hfcl_ion4x_w
|
||||
DEVICE_TITLE := HFCL ION4x_w
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w
|
||||
@@ -219,3 +239,16 @@ define Device/glinet_b3000
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
endef
|
||||
TARGET_DEVICES += glinet_b3000
|
||||
|
||||
define Device/emplus_wap581
|
||||
DEVICE_TITLE := Emplus WAP581
|
||||
DEVICE_DTS := qcom-ipq5018-emplus-wap581
|
||||
SUPPORTED_DEVICES := emplus,wap581
|
||||
DEVICE_PACKAGES := ath11k-wifi-emplus-wap581 ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
IMAGES := sysupgrade.tar nand-factory.bin
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
endef
|
||||
TARGET_DEVICES += emplus_wap581
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ cig,wf188n)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
ucidef_set_led_default "power" "POWER" "green:power" "on"
|
||||
;;
|
||||
cig,wf660a)
|
||||
ucidef_set_led_default "power" "POWER" "status:blue" "on"
|
||||
;;
|
||||
edgecore,eap101)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
@@ -23,6 +26,12 @@ edgecore,eap101)
|
||||
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
||||
ucidef_set_led_default "power" "POWER" "green:led_pwr" "on"
|
||||
;;
|
||||
emplus,wap386v2)
|
||||
ucidef_set_led_default "power" "POWER" "red:power" "on"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" "tx rx link"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
|
||||
;;
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
|
||||
@@ -34,10 +34,10 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
;;
|
||||
cig,wf660a)
|
||||
cig,wf660a|\
|
||||
emplus,wap386v2)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
;;
|
||||
|
||||
yuncore,fap650)
|
||||
ucidef_set_interface_lan "eth3 eth2 eth1 eth0"
|
||||
ucidef_set_interface_wan "eth4"
|
||||
@@ -76,6 +76,9 @@ qcom_setup_macs()
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ip link set eth0 address $wan_mac
|
||||
;;
|
||||
emplus,wap386v2)
|
||||
wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
;;
|
||||
yuncore,ax840)
|
||||
wan_mac=$(cat /sys/class/net/eth1/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
|
||||
@@ -76,6 +76,7 @@ case "$FIRMWARE" in
|
||||
cig,wf188n|\
|
||||
cig,wf660a|\
|
||||
edgecore,eap101|\
|
||||
emplus,wap386v2|\
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
@@ -109,7 +110,8 @@ ath11k-macs)
|
||||
edgecore,eap101)
|
||||
ath11k_generate_macs_eap101
|
||||
;;
|
||||
cig,wf188n)
|
||||
cig,wf188n|\
|
||||
emplus,wap386v2)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
cig,wf660a)
|
||||
|
||||
@@ -6,26 +6,27 @@ board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"edgecore,eap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,eap102")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
"edgecore,eap102"|\
|
||||
"edgecore,oap103")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,oap101e-6e"|\
|
||||
"edgecore,oap101-6e")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
|
||||
;;
|
||||
"edgecore,oap101e"|\
|
||||
"edgecore,oap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
"edgecore,eap104")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -7,11 +7,12 @@ boot() {
|
||||
hfcl,ion4xe|\
|
||||
hfcl,ion4xi)
|
||||
fw_setenv boot_count 0
|
||||
;;
|
||||
;;
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
edgecore.eap104)
|
||||
edgecore,oap103|\
|
||||
edgecore,eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
|
||||
fw_setenv bootcount 0
|
||||
|
||||
@@ -122,6 +122,7 @@ platform_check_image() {
|
||||
wallys,dr6018|\
|
||||
wallys,dr6018-v4|\
|
||||
edgecore,eap101|\
|
||||
emplus,wap386v2|\
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
@@ -146,6 +147,13 @@ platform_do_upgrade() {
|
||||
spi_nor_emmc_do_upgrade_bootconfig $1
|
||||
;;
|
||||
cig,wf188n|\
|
||||
emplus,wap386v2)
|
||||
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
|
||||
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
|
||||
CI_BOOTCFG=1
|
||||
}
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
glinet,ax1800|\
|
||||
glinet,axt1800|\
|
||||
wallys,dr6018|\
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "ipq6018-cpr-regulator.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
compatible = "cig,wf660a", "qcom,ipq6018-ap-cp01", "qcom,ipq6018";
|
||||
@@ -29,6 +28,11 @@
|
||||
ethernet2 = "/soc/dp3";
|
||||
ethernet3 = "/soc/dp4";
|
||||
ethernet4 = "/soc/dp5";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -155,6 +159,21 @@
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
wps_button {
|
||||
pins = "gpio9";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
reset_button {
|
||||
pins = "gpio19";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
@@ -181,20 +200,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
pwm_pins: pwm_pinmux {
|
||||
led_pins: led_pins {
|
||||
mux_1 {
|
||||
pins = "gpio22";
|
||||
function = "pwm02";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
};
|
||||
mux_2 {
|
||||
pins = "gpio23";
|
||||
function = "pwm12";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
};
|
||||
mux_3 {
|
||||
pins = "gpio24";
|
||||
function = "pwm22";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
};
|
||||
};
|
||||
@@ -208,27 +227,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_5g {
|
||||
pins = "gpio35";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g {
|
||||
pins = "gpio37";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_usb0 {
|
||||
pins = "gpio50";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
btcoex_pins: btcoex_pins {
|
||||
mux_0 {
|
||||
pins = "gpio51";
|
||||
@@ -390,36 +388,38 @@
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
used-pwm-indices = <1>, <1>, <1>, <0>;
|
||||
dft-pwm-status = <0>, <1>, <0>, <0>;
|
||||
status = "ok";
|
||||
|
||||
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-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@35 {
|
||||
label = "led_5g";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_5g";
|
||||
default-state = "off";
|
||||
led_power: led@22 {
|
||||
label = "status:blue";
|
||||
gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
led@37 {
|
||||
label = "led_2g";
|
||||
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_2g";
|
||||
default-state = "off";
|
||||
|
||||
led@23 {
|
||||
label = "status:green";
|
||||
gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
led@50 {
|
||||
label = "led_usb0";
|
||||
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "usb-host";
|
||||
default-state = "off";
|
||||
|
||||
led@24 {
|
||||
label = "status:red";
|
||||
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2021, 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.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "ipq6018.dtsi"
|
||||
#include "ipq6018-cpr-regulator.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Emplus WAP386 v2";
|
||||
compatible = "emplus,wap386v2", "qcom,ipq6018-cp03", "qcom,ipq6018";
|
||||
|
||||
aliases {
|
||||
/*
|
||||
* Aliases as required by u-boot
|
||||
* to patch MAC addresses
|
||||
*/
|
||||
ethernet0 = "/soc/dp1";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs-append = " 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 {
|
||||
gpio-reserved-ranges = <20 1>;
|
||||
|
||||
uart_pins: uart_pins {
|
||||
mux {
|
||||
pins = "gpio44", "gpio45";
|
||||
function = "blsp2_uart";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
spi_0_pins: spi_0_pins {
|
||||
mux {
|
||||
pins = "gpio38", "gpio39", "gpio40", "gpio41";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio9";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
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_5g {
|
||||
pins = "gpio31";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
mdio@90000 {
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 75 0>;
|
||||
status = "ok";
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <3>;
|
||||
};
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch@3a000000 {
|
||||
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x08>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x10>; /* wan port bitmap */
|
||||
switch_inner_bmp = <0xc0>; /*inner port bitmap*/
|
||||
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
|
||||
switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
|
||||
switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <2>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <3>;
|
||||
phy_address = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dp1 {
|
||||
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 = <4>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@9 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power: led@28 {
|
||||
label = "red:power";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "wap386v2:red:power";
|
||||
default-state = "on";
|
||||
};
|
||||
led@29 {
|
||||
label = "blue:wan";
|
||||
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "wap386v2:blue:eth";
|
||||
default-state = "on";
|
||||
};
|
||||
led@30 {
|
||||
label = "blue:wifi2";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "wap386v2:blue:2g";
|
||||
default-state = "on";
|
||||
};
|
||||
led@31 {
|
||||
label = "blue:wifi5";
|
||||
gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "wap386v2:blue:5g";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&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;
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
qcom,board_id = <0x30>;
|
||||
};
|
||||
|
||||
&pcie_phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
#if defined(__CNSS2__)
|
||||
status = "ok";
|
||||
#endif
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qpic_nand {
|
||||
status = "ok";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-ecc-step-size = <512>;
|
||||
nand-bus-width = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
&ssphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&nss_crypto {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&CPU0 {
|
||||
operating-points = <
|
||||
/* kHz uV (fixed) */
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1320000 1100000
|
||||
1440000 1100000
|
||||
1608000 1100000
|
||||
1800000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
|
||||
&CPU1 {
|
||||
operating-points = <
|
||||
/* kHz uV (fixed) */
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1320000 1100000
|
||||
1440000 1100000
|
||||
1608000 1100000
|
||||
1800000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
|
||||
&CPU2 {
|
||||
operating-points = <
|
||||
/* kHz uV (fixed) */
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1320000 1100000
|
||||
1440000 1100000
|
||||
1608000 1100000
|
||||
1800000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
|
||||
&CPU3 {
|
||||
operating-points = <
|
||||
/* kHz uV (fixed) */
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1320000 1100000
|
||||
1440000 1100000
|
||||
1608000 1100000
|
||||
1800000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
|
||||
&rpm_glink {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -76,6 +76,15 @@ define Device/edgecore_eap101
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_eap101
|
||||
|
||||
define Device/emplus_wap386v2
|
||||
DEVICE_TITLE := Emplus WAP386v2
|
||||
DEVICE_DTS := qcom-ipq6018-emplus-wap386v2
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
SUPPORTED_DEVICES := emplus,wap386v2
|
||||
DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-env
|
||||
endef
|
||||
TARGET_DEVICES += emplus_wap386v2
|
||||
|
||||
define Device/indio_um-310ax-v1
|
||||
DEVICE_TITLE := Indio UM-310AX V1
|
||||
DEVICE_DTS := qcom-ipq6018-indio-um-310ax-v1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/drivers/mmc/host/sdhci.c
|
||||
+++ b/drivers/mmc/host/sdhci.c
|
||||
@@ -367,7 +367,7 @@ static void __sdhci_led_deactivate(struc
|
||||
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
|
||||
}
|
||||
|
||||
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
|
||||
+#if 0
|
||||
static void sdhci_led_control(struct led_classdev *led,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
@@ -13,13 +13,21 @@ cig,wf194c4)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
;;
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103)
|
||||
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
ucidef_set_led_wlan "power" "POWER" "green:power" "default-on"
|
||||
;;
|
||||
emplus,wap380c)
|
||||
ucidef_set_led_default "power" "POWER" "ipq::led0" "on"
|
||||
ucidef_set_led_netdev "wan" "WAN" "ipq::led1" "eth0"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "ipq::led2" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "ipq::led3" "phy0tpt"
|
||||
;;
|
||||
sonicfi,rap630w-311g|\
|
||||
sonicfi,rap650c|\
|
||||
cybertan,eww631-b1)
|
||||
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
|
||||
;;
|
||||
|
||||
@@ -12,6 +12,7 @@ qcom_setup_interfaces()
|
||||
ucidef_add_switch_attr "switch0" "reset" "false"
|
||||
|
||||
case $board in
|
||||
emplus,wap380c|\
|
||||
tplink,ex227|\
|
||||
tplink,ex447)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -23,6 +24,8 @@ qcom_setup_interfaces()
|
||||
;;
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103|\
|
||||
sonicfi,rap650c|\
|
||||
cig,wf196)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -49,6 +52,16 @@ qcom_setup_macs()
|
||||
ip link set eth1 address $lan_mac
|
||||
ucidef_set_label_macaddr $wan_mac
|
||||
;;
|
||||
sonicfi,rap650c)
|
||||
mac=$(fw_printenv -n BaseMacAddress)
|
||||
[ -z "$mac" ] && return;
|
||||
wan_mac=$(macaddr_canonicalize $mac)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ucidef_set_network_device_mac eth1 $lan_mac
|
||||
ip link set eth0 address $wan_mac
|
||||
ip link set eth1 address $lan_mac
|
||||
;;
|
||||
*)
|
||||
wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
|
||||
@@ -16,6 +16,20 @@ ath11k_generate_macs() {
|
||||
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
ath11k_generate_macs_rap650c() {
|
||||
mac=$(fw_printenv -n BaseMacAddress)
|
||||
[ -z "$mac" ] && return;
|
||||
|
||||
touch /lib/firmware/ath11k-macs
|
||||
eth=$(macaddr_canonicalize $mac)
|
||||
mac1=$(macaddr_add $eth 3)
|
||||
mac2=$(macaddr_add $eth 2)
|
||||
mac3=$(macaddr_add $eth 4)
|
||||
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
|
||||
}
|
||||
|
||||
ath11k_generate_macs_wf196() {
|
||||
touch /lib/firmware/ath11k-macs
|
||||
mac=$(grep BaseMacAddress= /dev/mtd18 | cut -dx -f2)
|
||||
@@ -56,12 +70,15 @@ case "$FIRMWARE" in
|
||||
cig,wf196|\
|
||||
edgecore,eap102 |\
|
||||
edgecore,oap102 |\
|
||||
edgecore,oap103 |\
|
||||
edgecore,eap106 |\
|
||||
emplus,wap380c|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
tplink,ex227|\
|
||||
tplink,ex447|\
|
||||
yuncore,ax840|\
|
||||
sonicfi,rap650c|\
|
||||
sercomm,wallaby)
|
||||
caldata_extract "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
@@ -89,12 +106,16 @@ ath11k-macs)
|
||||
case "$board" in
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103|\
|
||||
edgecore,eap106)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
cig,wf196)
|
||||
ath11k_generate_macs_wf196
|
||||
;;
|
||||
sonicfi,rap650c)
|
||||
ath11k_generate_macs_rap650c
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ath11k/IPQ8074/hw2.0/board.bin)
|
||||
|
||||
@@ -6,26 +6,28 @@ board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"edgecore,eap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,eap102")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
"edgecore,eap102"|\
|
||||
"edgecore,oap103"|\
|
||||
"sonicfi,rap650c")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
;;
|
||||
"edgecore,oap101e-6e"|\
|
||||
"edgecore,oap101-6e")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
|
||||
;;
|
||||
"edgecore,oap101e"|\
|
||||
"edgecore,oap101")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
"edgecore,eap104")
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
|
||||
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
|
||||
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -11,7 +11,8 @@ boot() {
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
edgecore.eap104)
|
||||
edgecore,oap103|\
|
||||
edgecore,eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
|
||||
fw_setenv bootcount 0
|
||||
|
||||
@@ -27,7 +27,10 @@ platform_check_image() {
|
||||
cig,wf196|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103|\
|
||||
edgecore,eap106|\
|
||||
emplus,wap380c|\
|
||||
sonicfi,rap650c|\
|
||||
tplink,ex227|\
|
||||
tplink,ex447)
|
||||
[ "$magic_long" = "73797375" ] && return 0
|
||||
@@ -46,8 +49,15 @@ platform_do_upgrade() {
|
||||
tplink,ex227)
|
||||
qca_do_upgrade "$1"
|
||||
;;
|
||||
cig,wf194c4|\
|
||||
cig,wf196|\
|
||||
emplus,wap380c)
|
||||
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
|
||||
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
|
||||
CI_BOOTCFG=1
|
||||
}
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
cig,wf194c4|\
|
||||
tplink,ex447)
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
@@ -57,7 +67,8 @@ platform_do_upgrade() {
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore,oap103)
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
@@ -75,5 +86,17 @@ platform_do_upgrade() {
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
sonicfi,rap650c)
|
||||
boot_part=$(fw_printenv -n bootfrom)
|
||||
[ ${#boot_part} -eq 0 ] && boot_part=0
|
||||
echo "Current bootfrom is $boot_part"
|
||||
if [[ $boot_part == 1 ]]; then
|
||||
CI_UBIPART="rootfs"
|
||||
CI_FWSETENV="bootfrom 0"
|
||||
elif [[ $boot_part == 0 ]]; then
|
||||
CI_UBIPART="rootfs_1"
|
||||
CI_FWSETENV="bootfrom 1"
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -0,0 +1,736 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include "ipq8074.dtsi"
|
||||
#include "ipq8074-ac-cpu.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Edgecore OAP103";
|
||||
compatible = "edgecore,oap103", "qcom,ipq807x-ac02", "qcom,ipq807x";
|
||||
qcom,msm-id = <0x178 0x0>;
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart5;
|
||||
/* Aliases as required by u-boot to patch MAC addresses */
|
||||
ethernet1 = "/soc/dp5";
|
||||
ethernet0 = "/soc/dp6";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
mcu-enable {
|
||||
gpio-export,name = "mcu-enable";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-hub-enable {
|
||||
gpio-export,name = "usb-hub-enable";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-rear-power {
|
||||
gpio-export,name = "usb-rear-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-side-power {
|
||||
gpio-export,name = "usb-side-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
pinctrl@1000000 {
|
||||
pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mcu_rst: mcu_rst_pins {
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
mcu_rsv: mcu_rsv_pins {
|
||||
pins = "gpio56";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
usb_rear_pwr: usb_rear_pwr_pins {
|
||||
pins = "gpio29";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_side_pwr: usb_side_pwr_pins {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_hub_rst: usb_hub_rst_pins {
|
||||
pins = "gpio55";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio66";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio68";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_1 {
|
||||
pins = "gpio69";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_2 {
|
||||
pins = "gpio33";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_3 {
|
||||
pins = "gpio44";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
led_pins: led_pins {
|
||||
led_2g {
|
||||
pins = "gpio42";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
led_5g {
|
||||
pins = "gpio43";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
serial@78b3000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi@78b5000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "n25q128a11";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
};
|
||||
};
|
||||
|
||||
dma@7984000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand@79b0000 {
|
||||
status = "ok";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-ecc-step-size = <512>;
|
||||
nand-bus-width = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
qusb@79000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ssphy@78000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
usb3@8A00000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
usb3@8C00000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qusb@59000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ssphy@58000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
usb3@8C00000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio@90000 {
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 37 0 &tlmm 25 1 &tlmm 44 1>;
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
phy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <24>;
|
||||
};
|
||||
phy5: ethernet-phy@5 {
|
||||
reg = <28>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch@3a000000 {
|
||||
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x3e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x40>; /* wan port bitmap */
|
||||
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
|
||||
switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
|
||||
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
|
||||
bm_tick_mode = <0>; /* bm tick mode */
|
||||
tm_tick_mode = <0>; /* tm tick mode */
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <5>;
|
||||
phy_address = <24>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
port@5 {
|
||||
port_id = <6>;
|
||||
phy_address = <28>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
};
|
||||
port_scheduler_resource {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
ucast_queue = <0 143>;
|
||||
mcast_queue = <256 271>;
|
||||
l0sp = <0 35>;
|
||||
l0cdrr = <0 47>;
|
||||
l0edrr = <0 47>;
|
||||
l1cdrr = <0 7>;
|
||||
l1edrr = <0 7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
ucast_queue = <144 159>;
|
||||
mcast_queue = <272 275>;
|
||||
l0sp = <36 39>;
|
||||
l0cdrr = <48 63>;
|
||||
l0edrr = <48 63>;
|
||||
l1cdrr = <8 11>;
|
||||
l1edrr = <8 11>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
ucast_queue = <160 175>;
|
||||
mcast_queue = <276 279>;
|
||||
l0sp = <40 43>;
|
||||
l0cdrr = <64 79>;
|
||||
l0edrr = <64 79>;
|
||||
l1cdrr = <12 15>;
|
||||
l1edrr = <12 15>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
ucast_queue = <176 191>;
|
||||
mcast_queue = <280 283>;
|
||||
l0sp = <44 47>;
|
||||
l0cdrr = <80 95>;
|
||||
l0edrr = <80 95>;
|
||||
l1cdrr = <16 19>;
|
||||
l1edrr = <16 19>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
ucast_queue = <192 207>;
|
||||
mcast_queue = <284 287>;
|
||||
l0sp = <48 51>;
|
||||
l0cdrr = <96 111>;
|
||||
l0edrr = <96 111>;
|
||||
l1cdrr = <20 23>;
|
||||
l1edrr = <20 23>;
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
ucast_queue = <208 223>;
|
||||
mcast_queue = <288 291>;
|
||||
l0sp = <52 55>;
|
||||
l0cdrr = <112 127>;
|
||||
l0edrr = <112 127>;
|
||||
l1cdrr = <24 27>;
|
||||
l1edrr = <24 27>;
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
ucast_queue = <224 239>;
|
||||
mcast_queue = <292 295>;
|
||||
l0sp = <56 59>;
|
||||
l0cdrr = <128 143>;
|
||||
l0edrr = <128 143>;
|
||||
l1cdrr = <28 31>;
|
||||
l1edrr = <28 31>;
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
ucast_queue = <240 255>;
|
||||
mcast_queue = <296 299>;
|
||||
l0sp = <60 63>;
|
||||
l0cdrr = <144 159>;
|
||||
l0edrr = <144 159>;
|
||||
l1cdrr = <32 35>;
|
||||
l1edrr = <32 35>;
|
||||
};
|
||||
};
|
||||
port_scheduler_config {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <0 1>; /*L0 SPs*/
|
||||
/*cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
/*unicast queues*/
|
||||
ucast_queue = <0 4 8>;
|
||||
/*multicast queues*/
|
||||
mcast_queue = <256 260>;
|
||||
/*sp cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0 0>;
|
||||
};
|
||||
group@1 {
|
||||
ucast_queue = <1 5 9>;
|
||||
mcast_queue = <257 261>;
|
||||
cfg = <0 1 1 1 1>;
|
||||
};
|
||||
group@2 {
|
||||
ucast_queue = <2 6 10>;
|
||||
mcast_queue = <258 262>;
|
||||
cfg = <0 2 2 2 2>;
|
||||
};
|
||||
group@3 {
|
||||
ucast_queue = <3 7 11>;
|
||||
mcast_queue = <259 263>;
|
||||
cfg = <0 3 3 3 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <36>;
|
||||
cfg = <0 8 0 8>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <37>;
|
||||
cfg = <1 9 1 9>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <144>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <272>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <36 0 48 0 48>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <40>;
|
||||
cfg = <0 12 0 12>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <41>;
|
||||
cfg = <1 13 1 13>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <160>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <276>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <40 0 64 0 64>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <44>;
|
||||
cfg = <0 16 0 16>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <45>;
|
||||
cfg = <1 17 1 17>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <176>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <280>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <44 0 80 0 80>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <48>;
|
||||
cfg = <0 20 0 20>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <49>;
|
||||
cfg = <1 21 1 21>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <192>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <284>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <48 0 96 0 96>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <52>;
|
||||
cfg = <0 24 0 24>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <53>;
|
||||
cfg = <1 25 1 25>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <208>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <288>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <52 0 112 0 112>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <56>;
|
||||
cfg = <0 28 0 28>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <57>;
|
||||
cfg = <1 29 1 29>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <224>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <292>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <56 0 128 0 128>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <60>;
|
||||
cfg = <0 32 0 32>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <61>;
|
||||
cfg = <1 33 1 33>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <240>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <296>;
|
||||
cfg = <60 0 144 0 144>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dp6 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
qcom,id = <6>;
|
||||
reg = <0x3a001800 0x200>;
|
||||
qcom,mactype = <0>;
|
||||
local-mac-address = [000000000000];
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <28>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp5 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
qcom,id = <5>;
|
||||
reg = <0x3a001a00 0x200>;
|
||||
qcom,mactype = <0>;
|
||||
local-mac-address = [000000000000];
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <24>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_pwr {
|
||||
label = "green:wan";
|
||||
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "led_pwr";
|
||||
};
|
||||
|
||||
led_2g {
|
||||
label = "green:wifi2";
|
||||
gpio = <&tlmm 47 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_5g {
|
||||
label = "green:wifi5";
|
||||
gpio = <&tlmm 48 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_power: led_bt {
|
||||
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
|
||||
label = "green:power";
|
||||
default-state = "on";
|
||||
linux,default-trigger = "led_bt";
|
||||
};
|
||||
};
|
||||
nss-macsec0 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x18>;
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x1c>;
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&apc_cpr {
|
||||
/* Same CPR configuration as OAK */
|
||||
compatible = "qcom,cpr4-ipq817x-apss-regulator";
|
||||
|
||||
thread@0 {
|
||||
apc_vreg: regulator {
|
||||
regulator-min-microvolt = <1>;
|
||||
regulator-max-microvolt = <2>;
|
||||
qcom,cpr-fuse-corners = <2>;
|
||||
qcom,cpr-corners = <3>;
|
||||
qcom,cpr-speed-bin-corners = <3>;
|
||||
qcom,cpr-corner-fmax-map = <1 3>;
|
||||
|
||||
qcom,cpr-voltage-ceiling =
|
||||
<840000 904000 944000>;
|
||||
qcom,cpr-voltage-floor =
|
||||
<592000 648000 712000>;
|
||||
qcom,corner-frequencies =
|
||||
<1017600000 1382400000 1382400000>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-0 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-1 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 20000 26000>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-0 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-1 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 7000>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-floor-to-ceiling-max-range =
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&npu_cpr {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&nss0 {
|
||||
qcom,low-frequency = <187200000>;
|
||||
qcom,mid-frequency = <748800000>;
|
||||
qcom,max-frequency = <1497600000>;
|
||||
};
|
||||
|
||||
&nss0 {
|
||||
npu-supply = <&dummy_reg>;
|
||||
mx-supply = <&dummy_reg>;
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
qcom,board_id = <0x92>;
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
qcom,board_id = <0x292>;
|
||||
};
|
||||
@@ -0,0 +1,650 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include "ipq8074.dtsi"
|
||||
#include "ipq8074-hk-cpu.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "SonicFi RAP650C";
|
||||
compatible = "sonicfi,rap650c", "qcom,ipq8074-ap-hk09", "qcom,ipq8074";
|
||||
qcom,msm-id = <0x157 0x0>, <0x187 0x0>;
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart5;
|
||||
/* Aliases as required by u-boot to patch MAC addresses */
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
soc {
|
||||
pinctrl@1000000 {
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio57";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
usb_mux_sel_pins: usb_mux_pins {
|
||||
mux {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
pcie0_pins: pcie_pins {
|
||||
pcie0_rst {
|
||||
pins = "gpio58";
|
||||
function = "pcie0_rst";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
pcie0_wake {
|
||||
pins = "gpio59";
|
||||
function = "pcie0_wake";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio68";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_1 {
|
||||
pins = "gpio69";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_2 {
|
||||
pins = "gpio25";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_3 {
|
||||
pins = "gpio44";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
red {
|
||||
pins = "gpio0";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
green {
|
||||
pins = "gpio2";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
blue {
|
||||
pins = "gpio9";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
spi_3_pins: spi_3_pins {
|
||||
mux {
|
||||
pins = "gpio50", "gpio52", "gpio53";
|
||||
function = "blsp3_spi";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
spi_cs {
|
||||
pins = "gpio22";
|
||||
function = "blsp3_spi2";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
quartz_interrupt {
|
||||
pins = "gpio47";
|
||||
function = "gpio";
|
||||
input;
|
||||
bias-disable;
|
||||
};
|
||||
quartz_reset {
|
||||
pins = "gpio21";
|
||||
function = "gpio";
|
||||
output-low;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
serial@78b3000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
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 = <24>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
qcom,id = <6>;
|
||||
reg = <0x3a001a00 0x200>;
|
||||
qcom,mactype = <0>;
|
||||
local-mac-address = [000000000000];
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <28>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
spi@78b5000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "n25q128a11";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
};
|
||||
};
|
||||
|
||||
spi@78b8000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&spi_3_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <2>;
|
||||
quartz-reset-gpio = <&tlmm 21 1>;
|
||||
|
||||
spidev3: spi@3 {
|
||||
compatible = "qti,spidev";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
dma@7984000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand@79b0000 {
|
||||
status = "ok";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-ecc-step-size = <512>;
|
||||
nand-bus-width = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
qusb@79000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ssphy@78000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
usb3@8A00000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qusb@59000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ssphy@58000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
usb3@8C00000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@84000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@86000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
pci@20000000 {
|
||||
perst-gpio = <&tlmm 58 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
red {
|
||||
label = "sys:red";
|
||||
gpio = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
green {
|
||||
label = "sys:green";
|
||||
gpio = <&tlmm 2 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_power: blue {
|
||||
label = "sys:blue";
|
||||
gpio = <&tlmm 9 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio@90000 {
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 37 0 &tlmm 25 0 &tlmm 44 0>;
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
phy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <24>;
|
||||
};
|
||||
phy5: ethernet-phy@5 {
|
||||
reg = <28>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch@3a000000 {
|
||||
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x3e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x40>; /* wan port bitmap */
|
||||
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
|
||||
switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
|
||||
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
|
||||
bm_tick_mode = <0>; /* bm tick mode */
|
||||
tm_tick_mode = <0>; /* tm tick mode */
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <5>;
|
||||
phy_address = <24>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
port@5 {
|
||||
port_id = <6>;
|
||||
phy_address = <28>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
};
|
||||
port_scheduler_resource {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
ucast_queue = <0 143>;
|
||||
mcast_queue = <256 271>;
|
||||
l0sp = <0 35>;
|
||||
l0cdrr = <0 47>;
|
||||
l0edrr = <0 47>;
|
||||
l1cdrr = <0 7>;
|
||||
l1edrr = <0 7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
ucast_queue = <144 159>;
|
||||
mcast_queue = <272 275>;
|
||||
l0sp = <36 39>;
|
||||
l0cdrr = <48 63>;
|
||||
l0edrr = <48 63>;
|
||||
l1cdrr = <8 11>;
|
||||
l1edrr = <8 11>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
ucast_queue = <160 175>;
|
||||
mcast_queue = <276 279>;
|
||||
l0sp = <40 43>;
|
||||
l0cdrr = <64 79>;
|
||||
l0edrr = <64 79>;
|
||||
l1cdrr = <12 15>;
|
||||
l1edrr = <12 15>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
ucast_queue = <176 191>;
|
||||
mcast_queue = <280 283>;
|
||||
l0sp = <44 47>;
|
||||
l0cdrr = <80 95>;
|
||||
l0edrr = <80 95>;
|
||||
l1cdrr = <16 19>;
|
||||
l1edrr = <16 19>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
ucast_queue = <192 207>;
|
||||
mcast_queue = <284 287>;
|
||||
l0sp = <48 51>;
|
||||
l0cdrr = <96 111>;
|
||||
l0edrr = <96 111>;
|
||||
l1cdrr = <20 23>;
|
||||
l1edrr = <20 23>;
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
ucast_queue = <208 223>;
|
||||
mcast_queue = <288 291>;
|
||||
l0sp = <52 55>;
|
||||
l0cdrr = <112 127>;
|
||||
l0edrr = <112 127>;
|
||||
l1cdrr = <24 27>;
|
||||
l1edrr = <24 27>;
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
ucast_queue = <224 239>;
|
||||
mcast_queue = <292 295>;
|
||||
l0sp = <56 59>;
|
||||
l0cdrr = <128 143>;
|
||||
l0edrr = <128 143>;
|
||||
l1cdrr = <28 31>;
|
||||
l1edrr = <28 31>;
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
ucast_queue = <240 255>;
|
||||
mcast_queue = <296 299>;
|
||||
l0sp = <60 63>;
|
||||
l0cdrr = <144 159>;
|
||||
l0edrr = <144 159>;
|
||||
l1cdrr = <32 35>;
|
||||
l1edrr = <32 35>;
|
||||
};
|
||||
};
|
||||
port_scheduler_config {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <0 1>; /*L0 SPs*/
|
||||
/*cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
/*unicast queues*/
|
||||
ucast_queue = <0 4 8>;
|
||||
/*multicast queues*/
|
||||
mcast_queue = <256 260>;
|
||||
/*sp cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0 0>;
|
||||
};
|
||||
group@1 {
|
||||
ucast_queue = <1 5 9>;
|
||||
mcast_queue = <257 261>;
|
||||
cfg = <0 1 1 1 1>;
|
||||
};
|
||||
group@2 {
|
||||
ucast_queue = <2 6 10>;
|
||||
mcast_queue = <258 262>;
|
||||
cfg = <0 2 2 2 2>;
|
||||
};
|
||||
group@3 {
|
||||
ucast_queue = <3 7 11>;
|
||||
mcast_queue = <259 263>;
|
||||
cfg = <0 3 3 3 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <36>;
|
||||
cfg = <0 8 0 8>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <37>;
|
||||
cfg = <1 9 1 9>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <144>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <272>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <36 0 48 0 48>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <40>;
|
||||
cfg = <0 12 0 12>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <41>;
|
||||
cfg = <1 13 1 13>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <160>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <276>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <40 0 64 0 64>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <44>;
|
||||
cfg = <0 16 0 16>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <45>;
|
||||
cfg = <1 17 1 17>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <176>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <280>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <44 0 80 0 80>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <48>;
|
||||
cfg = <0 20 0 20>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <49>;
|
||||
cfg = <1 21 1 21>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <192>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <284>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <48 0 96 0 96>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <52>;
|
||||
cfg = <0 24 0 24>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <53>;
|
||||
cfg = <1 25 1 25>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <208>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <288>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <52 0 112 0 112>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <56>;
|
||||
cfg = <0 28 0 28>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <57>;
|
||||
cfg = <1 29 1 29>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <224>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <292>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <56 0 128 0 128>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <60>;
|
||||
cfg = <0 32 0 32>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <61>;
|
||||
cfg = <1 33 1 33>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <240>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <296>;
|
||||
cfg = <60 0 144 0 144>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nss-macsec0 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x18>;
|
||||
phy_access_mode = <0>;
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x1c>;
|
||||
phy_access_mode = <0>;
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
qcom,board_id = <0x90>;
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
qcom,board_id = <0x290>;
|
||||
};
|
||||
@@ -0,0 +1,648 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include "ipq8074.dtsi"
|
||||
#include "ipq8074-ac-cpu.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Emplus WAP380C";
|
||||
compatible = "emplus,wap380c", "qcom,ipq8074-ap-hk07", "qcom,ipq8074";
|
||||
qcom,msm-id = <0x143 0x0>;
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart5;
|
||||
/* Aliases as required by u-boot to patch MAC addresses */
|
||||
ethernet0 = "/soc/dp6";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
soc {
|
||||
qti: ledc@191E000 {
|
||||
compatible = "qti,ledc";
|
||||
reg = <0x191E000 0x20070>;
|
||||
reg-names = "ledc_base_addr";
|
||||
qti,tcsr_ledc_values = <0x0320193 0x00000000 \
|
||||
0x00000000 0x00000000 \
|
||||
0x00000000 0xFFFFFFFF \
|
||||
0xFFFF7FFF 0xFFFFFFFF \
|
||||
0x007D0820 0x00000000 \
|
||||
0x10482094 0x03FFFFE1>;
|
||||
qti,ledc_blink_indices_cnt = <6>;
|
||||
qti,ledc_blink_indices = <15 14 13 12 11 10>;
|
||||
qti,ledc_blink_idx_src_pair = <5 20>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
pinctrl@1000000 {
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio52";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio68";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_1 {
|
||||
pins = "gpio69";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
mux_2 {
|
||||
pins = "gpio44";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
ledc_pins: ledc_pinmux {
|
||||
led_clk {
|
||||
pins = "gpio18";
|
||||
function = "led0";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_data {
|
||||
pins = "gpio19";
|
||||
function = "led1";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_clr {
|
||||
pins = "gpio20";
|
||||
function = "led2";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
serial@78b3000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi@78b5000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "n25q128a11";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
};
|
||||
};
|
||||
|
||||
dma@7984000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand@79b0000 {
|
||||
status = "ok";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nand-ecc-strength = <4>;
|
||||
nand-ecc-step-size = <512>;
|
||||
nand-bus-width = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
ssphy@78000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ssphy@58000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio@90000 {
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 43 1 &tlmm 44 1>;
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
phy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
phy5: ethernet-phy@5 {
|
||||
reg = <28>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch@3a000000 {
|
||||
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x3e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x40>; /* wan port bitmap */
|
||||
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
|
||||
switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
|
||||
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
|
||||
bm_tick_mode = <0>; /* bm tick mode */
|
||||
tm_tick_mode = <0>; /* tm tick mode */
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <5>;
|
||||
phy_address = <4>;
|
||||
};
|
||||
port@5 {
|
||||
port_id = <6>;
|
||||
phy_address = <28>;
|
||||
port_mac_sel = "QGMAC_PORT";
|
||||
};
|
||||
};
|
||||
port_scheduler_resource {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
ucast_queue = <0 143>;
|
||||
mcast_queue = <256 271>;
|
||||
l0sp = <0 35>;
|
||||
l0cdrr = <0 47>;
|
||||
l0edrr = <0 47>;
|
||||
l1cdrr = <0 7>;
|
||||
l1edrr = <0 7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
ucast_queue = <144 159>;
|
||||
mcast_queue = <272 275>;
|
||||
l0sp = <36 39>;
|
||||
l0cdrr = <48 63>;
|
||||
l0edrr = <48 63>;
|
||||
l1cdrr = <8 11>;
|
||||
l1edrr = <8 11>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
ucast_queue = <160 175>;
|
||||
mcast_queue = <276 279>;
|
||||
l0sp = <40 43>;
|
||||
l0cdrr = <64 79>;
|
||||
l0edrr = <64 79>;
|
||||
l1cdrr = <12 15>;
|
||||
l1edrr = <12 15>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
ucast_queue = <176 191>;
|
||||
mcast_queue = <280 283>;
|
||||
l0sp = <44 47>;
|
||||
l0cdrr = <80 95>;
|
||||
l0edrr = <80 95>;
|
||||
l1cdrr = <16 19>;
|
||||
l1edrr = <16 19>;
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
ucast_queue = <192 207>;
|
||||
mcast_queue = <284 287>;
|
||||
l0sp = <48 51>;
|
||||
l0cdrr = <96 111>;
|
||||
l0edrr = <96 111>;
|
||||
l1cdrr = <20 23>;
|
||||
l1edrr = <20 23>;
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
ucast_queue = <208 223>;
|
||||
mcast_queue = <288 291>;
|
||||
l0sp = <52 55>;
|
||||
l0cdrr = <112 127>;
|
||||
l0edrr = <112 127>;
|
||||
l1cdrr = <24 27>;
|
||||
l1edrr = <24 27>;
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
ucast_queue = <224 239>;
|
||||
mcast_queue = <292 295>;
|
||||
l0sp = <56 59>;
|
||||
l0cdrr = <128 143>;
|
||||
l0edrr = <128 143>;
|
||||
l1cdrr = <28 31>;
|
||||
l1edrr = <28 31>;
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
ucast_queue = <240 255>;
|
||||
mcast_queue = <296 299>;
|
||||
l0sp = <60 63>;
|
||||
l0cdrr = <144 159>;
|
||||
l0edrr = <144 159>;
|
||||
l1cdrr = <32 35>;
|
||||
l1edrr = <32 35>;
|
||||
};
|
||||
};
|
||||
port_scheduler_config {
|
||||
port@0 {
|
||||
port_id = <0>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <0 1>; /*L0 SPs*/
|
||||
/*cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
/*unicast queues*/
|
||||
ucast_queue = <0 4 8>;
|
||||
/*multicast queues*/
|
||||
mcast_queue = <256 260>;
|
||||
/*sp cpri cdrr epri edrr*/
|
||||
cfg = <0 0 0 0 0>;
|
||||
};
|
||||
group@1 {
|
||||
ucast_queue = <1 5 9>;
|
||||
mcast_queue = <257 261>;
|
||||
cfg = <0 1 1 1 1>;
|
||||
};
|
||||
group@2 {
|
||||
ucast_queue = <2 6 10>;
|
||||
mcast_queue = <258 262>;
|
||||
cfg = <0 2 2 2 2>;
|
||||
};
|
||||
group@3 {
|
||||
ucast_queue = <3 7 11>;
|
||||
mcast_queue = <259 263>;
|
||||
cfg = <0 3 3 3 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
port_id = <1>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <36>;
|
||||
cfg = <0 8 0 8>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <37>;
|
||||
cfg = <1 9 1 9>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <144>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <272>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <36 0 48 0 48>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@2 {
|
||||
port_id = <2>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <40>;
|
||||
cfg = <0 12 0 12>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <41>;
|
||||
cfg = <1 13 1 13>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <160>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <276>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <40 0 64 0 64>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@3 {
|
||||
port_id = <3>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <44>;
|
||||
cfg = <0 16 0 16>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <45>;
|
||||
cfg = <1 17 1 17>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <176>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <280>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <44 0 80 0 80>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@4 {
|
||||
port_id = <4>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <48>;
|
||||
cfg = <0 20 0 20>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <49>;
|
||||
cfg = <1 21 1 21>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <192>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <284>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <48 0 96 0 96>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@5 {
|
||||
port_id = <5>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <52>;
|
||||
cfg = <0 24 0 24>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <53>;
|
||||
cfg = <1 25 1 25>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <208>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <288>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <52 0 112 0 112>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@6 {
|
||||
port_id = <6>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <56>;
|
||||
cfg = <0 28 0 28>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <57>;
|
||||
cfg = <1 29 1 29>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <224>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <292>;
|
||||
mcast_loop_pri = <4>;
|
||||
cfg = <56 0 128 0 128>;
|
||||
};
|
||||
};
|
||||
};
|
||||
port@7 {
|
||||
port_id = <7>;
|
||||
l1scheduler {
|
||||
group@0 {
|
||||
sp = <60>;
|
||||
cfg = <0 32 0 32>;
|
||||
};
|
||||
group@1 {
|
||||
sp = <61>;
|
||||
cfg = <1 33 1 33>;
|
||||
};
|
||||
};
|
||||
l0scheduler {
|
||||
group@0 {
|
||||
ucast_queue = <240>;
|
||||
ucast_loop_pri = <16>;
|
||||
mcast_queue = <296>;
|
||||
cfg = <60 0 144 0 144>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dp6 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
qcom,id = <6>;
|
||||
reg = <0x3a001800 0x200>;
|
||||
qcom,mactype = <0>;
|
||||
local-mac-address = [000000000000];
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <28>;
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
nss-macsec1 {
|
||||
compatible = "qcom,nss-macsec";
|
||||
phy_addr = <0x1c>;
|
||||
mdiobus = <&mdio>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&apc_cpr {
|
||||
/* Same CPR configuration as OAK */
|
||||
compatible = "qcom,cpr4-ipq817x-apss-regulator";
|
||||
|
||||
thread@0 {
|
||||
apc_vreg: regulator {
|
||||
regulator-min-microvolt = <1>;
|
||||
regulator-max-microvolt = <2>;
|
||||
qcom,cpr-fuse-corners = <2>;
|
||||
qcom,cpr-corners = <3>;
|
||||
qcom,cpr-speed-bin-corners = <3>;
|
||||
qcom,cpr-corner-fmax-map = <1 3>;
|
||||
|
||||
qcom,cpr-voltage-ceiling =
|
||||
<840000 904000 944000>;
|
||||
qcom,cpr-voltage-floor =
|
||||
<592000 648000 712000>;
|
||||
qcom,corner-frequencies =
|
||||
<1017600000 1382400000 1382400000>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-0 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-1 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 20000 26000>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-0 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-1 =
|
||||
/* Speed bin 0; CPR rev 0..7 */
|
||||
< 0 0>,
|
||||
< 0 7000>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>,
|
||||
< 0 0>;
|
||||
|
||||
qcom,cpr-floor-to-ceiling-max-range =
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>,
|
||||
< 40000 40000 40000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&npu_cpr {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&nss0 {
|
||||
qcom,low-frequency = <187200000>;
|
||||
qcom,mid-frequency = <748800000>;
|
||||
qcom,max-frequency = <1497600000>;
|
||||
};
|
||||
|
||||
&nss0 {
|
||||
npu-supply = <&dummy_reg>;
|
||||
mx-supply = <&dummy_reg>;
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
qcom,board_id = <0x92>;
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
qcom,board_id = <0x290>;
|
||||
};
|
||||
|
||||
&ledc {
|
||||
pinctrl-0 = <&ledc_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
|
||||
led_power: led0 {
|
||||
label = "ipq::led0";
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
|
||||
wan: led1 {
|
||||
label = "ipq::led1";
|
||||
linux,default-trigger = "netdev";
|
||||
};
|
||||
|
||||
wifi2g: led2 {
|
||||
label = "ipq::led2";
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
wifi5g: led3 {
|
||||
label = "ipq::led3";
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led4 {
|
||||
label = "ipq::led4";
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
|
||||
led5 {
|
||||
label = "ipq::led5";
|
||||
linux,default-trigger = "none";
|
||||
};
|
||||
};
|
||||
@@ -39,6 +39,15 @@ define Device/edgecore_oap102
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap102
|
||||
|
||||
define Device/edgecore_oap103
|
||||
DEVICE_TITLE := Edgecore OAP103
|
||||
DEVICE_DTS := qcom-ipq807x-oap103
|
||||
DEVICE_DTS_CONFIG=config@ac02
|
||||
SUPPORTED_DEVICES := edgecore,oap103
|
||||
DEVICE_PACKAGES := ath11k-wifi-edgecore-oap103 kmod-usb2 kmod-usb3 uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap103
|
||||
|
||||
define Device/edgecore_eap106
|
||||
DEVICE_TITLE := Edgecore EAP106
|
||||
DEVICE_DTS := qcom-ipq807x-eap106
|
||||
@@ -48,6 +57,26 @@ define Device/edgecore_eap106
|
||||
endef
|
||||
#TARGET_DEVICES += edgecore_eap106
|
||||
|
||||
define Device/emplus_wap380c
|
||||
DEVICE_TITLE := Emplus WAP380C
|
||||
DEVICE_DTS := qcom-ipq807x-wap380c
|
||||
DEVICE_DTS_CONFIG=config@hk07
|
||||
SUPPORTED_DEVICES := emplus,wap380c
|
||||
DEVICE_PACKAGES := ath11k-wifi-emplus-wap380c uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += emplus_wap380c
|
||||
|
||||
define Device/sonicfi_rap650c
|
||||
DEVICE_TITLE := SonicFi RAP650C
|
||||
DEVICE_DTS := qcom-ipq807x-rap650c
|
||||
DEVICE_DTS_CONFIG=config@hk09
|
||||
SUPPORTED_DEVICES := sonicfi,rap650c
|
||||
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap650c uboot-envtools
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += sonicfi_rap650c
|
||||
|
||||
define Device/tplink_ex227
|
||||
DEVICE_TITLE := TP-Link EX227
|
||||
DEVICE_DTS := qcom-ipq807x-ex227
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return 0;
|
||||
- if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
|
||||
+ if (rate->nss < 1 || rate->nss > 8) {
|
||||
+ printk_once(1, "invalid rate->nss: %d\n", rate->nss);
|
||||
+ printk_once(KERN_WARNING "cfg80211_calculate_bitrate_he: invalid rate->nss: %d\n", rate->nss);
|
||||
return 0;
|
||||
-
|
||||
+ }
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
Index: backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/peer.c
|
||||
===================================================================
|
||||
--- backports-20210222_001-5.4.164-b157d2276.orig/drivers/net/wireless/ath/ath11k/peer.c
|
||||
+++ backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/peer.c
|
||||
@@ -789,8 +789,6 @@ int ath11k_peer_delete(struct ath11k *ar
|
||||
#endif
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
- reinit_completion(&ar->peer_delete_done);
|
||||
-
|
||||
ath11k_nss_peer_delete(ar->ab, vdev_id, addr);
|
||||
#ifdef CCPTCFG_ATH11K_NSS_SUPPORTPTCFG_ATH11K_NSS_SUPPORT
|
||||
mutex_lock(&ar->ab->base_ast_lock);
|
||||
@@ -799,33 +797,60 @@ int ath11k_peer_delete(struct ath11k *ar
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
|
||||
peer = ath11k_peer_find_by_addr(ar->ab, addr);
|
||||
- if (peer) {
|
||||
+ /* Check if the found peer is what we want to remove.
|
||||
+ * While the sta is transitioning to another band we may
|
||||
+ * have 2 peer with the same addr assigned to different
|
||||
+ * vdev_id. Make sure we are deleting the correct peer.
|
||||
+ */
|
||||
+ if (peer && peer->vdev_id == vdev_id)
|
||||
+ ath11k_peer_rhash_delete(ar->ab, peer);
|
||||
+
|
||||
+ /* Fallback to peer list search if the correct peer can't be found.
|
||||
+ * Skip the deletion of the peer from the rhash since it has already
|
||||
+ * been deleted in peer add.
|
||||
+ */
|
||||
+ if (!peer)
|
||||
+ peer = ath11k_peer_find(ar->ab, vdev_id, addr);
|
||||
+
|
||||
+
|
||||
+ if (!peer) {
|
||||
+ spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
||||
- peer->delete_in_progress = true;
|
||||
- if (peer->self_ast_entry) {
|
||||
- ath11k_peer_del_ast(ar, peer->self_ast_entry);
|
||||
- peer->self_ast_entry = NULL;
|
||||
- }
|
||||
+ mutex_unlock(&ar->ab->base_ast_lock);
|
||||
+#endif
|
||||
+ ath11k_warn(ar->ab,
|
||||
+ "failed to find peer vdev_id %d addr %pM in delete\n",
|
||||
+ vdev_id, addr);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
||||
+ peer->delete_in_progress = true;
|
||||
+ if (peer->self_ast_entry) {
|
||||
+ ath11k_peer_del_ast(ar, peer->self_ast_entry);
|
||||
+ peer->self_ast_entry = NULL;
|
||||
+ }
|
||||
|
||||
- list_for_each_entry_safe(ast_entry, tmp_ast,
|
||||
- &peer->ast_entry_list, ase_list)
|
||||
- if ((ast_entry->type == ATH11K_AST_TYPE_WDS) ||
|
||||
- (ast_entry->type == ATH11K_AST_TYPE_MEC)) {
|
||||
- if (!list_empty(&ast_entry->wmi_list)) {
|
||||
- ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
- "%s deleting unprocessed ast entry %pM of peer %pM from wmi list\n",
|
||||
- __func__, ast_entry->addr, addr);
|
||||
- list_del_init(&ast_entry->wmi_list);
|
||||
- }
|
||||
+ list_for_each_entry_safe(ast_entry, tmp_ast,
|
||||
+ &peer->ast_entry_list, ase_list)
|
||||
+ if ((ast_entry->type == ATH11K_AST_TYPE_WDS) ||
|
||||
+ (ast_entry->type == ATH11K_AST_TYPE_MEC)) {
|
||||
+ if (!list_empty(&ast_entry->wmi_list)) {
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
+ "%s deleting unprocessed ast entry %pM of peer %pM from wmi list\n",
|
||||
+ __func__, ast_entry->addr, addr);
|
||||
+ list_del_init(&ast_entry->wmi_list);
|
||||
}
|
||||
+ }
|
||||
#endif
|
||||
- ath11k_peer_rhash_delete(ar->ab, peer);
|
||||
- }
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
||||
mutex_unlock(&ar->ab->base_ast_lock);
|
||||
#endif
|
||||
+ reinit_completion(&ar->peer_delete_done);
|
||||
+
|
||||
ret = ath11k_wmi_send_peer_delete_cmd(ar, addr, vdev_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab,
|
||||
@@ -866,14 +891,20 @@ int ath11k_peer_create(struct ath11k *ar
|
||||
"failed to create peer due to insufficient peer entry resource in firmware\n");
|
||||
return -ENOBUFS;
|
||||
}
|
||||
-
|
||||
+ mutex_lock(&ar->ab->tbl_mtx_lock);
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
|
||||
if (peer) {
|
||||
- spin_unlock_bh(&ar->ab->base_lock);
|
||||
- return -EINVAL;
|
||||
+ if (peer->vdev_id == param->vdev_id) {
|
||||
+ spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ ath11k_peer_rhash_delete(ar->ab, peer);
|
||||
}
|
||||
+
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
|
||||
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
|
||||
if (ret) {
|
||||
@@ -0,0 +1,36 @@
|
||||
From 93d02017c444d9bcb5e319ba6d9dac5794529cdd Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkata@shasta.cloud>
|
||||
Date: Fri, 19 Jul 2024 18:43:19 +0530
|
||||
Subject: [PATCH] mac80211: workaround: Send multicast frames as multiple
|
||||
unicast frames in DVLAN mode
|
||||
|
||||
Broadcast / Multciast transmission is not working in DVLAN mode in the driver.
|
||||
If we send the frames as unicast frames, it works. This is a workaround for now.
|
||||
Need to rollback once we add a clean fix.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
|
||||
---
|
||||
net/mac80211/tx.c | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
|
||||
index 9e978f9..6ebf9c2 100644
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -4197,11 +4197,8 @@ static bool ieee80211_multicast_to_unicast(struct sk_buff *skb,
|
||||
|
||||
switch (sdata->vif.type) {
|
||||
case NL80211_IFTYPE_AP_VLAN:
|
||||
- if (sdata->u.vlan.sta)
|
||||
- return false;
|
||||
- if (sdata->wdev.use_4addr)
|
||||
- return false;
|
||||
- fallthrough;
|
||||
+ // For now always enable multicast_to_unicast in DVLAN
|
||||
+ return true;
|
||||
case NL80211_IFTYPE_AP:
|
||||
/* check runtime toggle for this bss */
|
||||
if (!sdata->bss->multicast_to_unicast)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
@@ -819,10 +819,7 @@ int ath11k_peer_delete(struct ath11k *ar
|
||||
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
||||
mutex_unlock(&ar->ab->base_ast_lock);
|
||||
#endif
|
||||
- ath11k_warn(ar->ab,
|
||||
- "failed to find peer vdev_id %d addr %pM in delete\n",
|
||||
- vdev_id, addr);
|
||||
- return -EINVAL;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
||||
@@ -883,6 +880,7 @@ int ath11k_peer_create(struct ath11k *ar
|
||||
struct ieee80211_vif *vif = arvif->vif;
|
||||
struct ath11k_sta *arsta;
|
||||
int ret, fbret;
|
||||
+ u8 vdev_id = 0;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -891,20 +889,21 @@ int ath11k_peer_create(struct ath11k *ar
|
||||
"failed to create peer due to insufficient peer entry resource in firmware\n");
|
||||
return -ENOBUFS;
|
||||
}
|
||||
+
|
||||
mutex_lock(&ar->ab->tbl_mtx_lock);
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
|
||||
+ if (peer)
|
||||
+ vdev_id = peer->vdev_id;
|
||||
+ spin_unlock_bh(&ar->ab->base_lock);
|
||||
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
+
|
||||
if (peer) {
|
||||
- if (peer->vdev_id == param->vdev_id) {
|
||||
- spin_unlock_bh(&ar->ab->base_lock);
|
||||
- mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
+ if (vdev_id == param->vdev_id)
|
||||
return -EINVAL;
|
||||
- }
|
||||
- ath11k_peer_rhash_delete(ar->ab, peer);
|
||||
- }
|
||||
|
||||
- spin_unlock_bh(&ar->ab->base_lock);
|
||||
- mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
+ ath11k_peer_delete(ar, vdev_id, param->peer_addr);
|
||||
+ }
|
||||
|
||||
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
|
||||
if (ret) {
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
||||
@@ -28,7 +28,7 @@ void ath11k_dp_peer_cleanup(struct ath11
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
peer = ath11k_peer_find(ab, vdev_id, addr);
|
||||
if (!peer) {
|
||||
- ath11k_warn(ab, "failed to lookup peer %pM on vdev %d\n",
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to lookup peer %pM on vdev %d\n",
|
||||
addr, vdev_id);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
return;
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -1204,9 +1204,9 @@ int ath11k_dp_rx_ampdu_stop(struct ath11
|
||||
|
||||
peer = ath11k_peer_find(ab, vdev_id, params->sta->addr);
|
||||
if (!peer) {
|
||||
- ath11k_warn(ab, "failed to find the peer to stop rx aggregation\n");
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to find the peer to stop rx aggregation\n");
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
- return -ENOENT;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
paddr = peer->rx_tid[params->tid].paddr;
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4075,7 +4075,7 @@ static int ath11k_clear_peer_keys(struct
|
||||
peer = ath11k_peer_find(ab, arvif->vdev_id, addr);
|
||||
if (!peer) {
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
- return -ENOENT;
|
||||
+ return 0;
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(keys); i++) {
|
||||
keys[i]= peer->keys[i];
|
||||
@@ -4325,6 +4325,10 @@ static int ath11k_mac_op_set_key(struct
|
||||
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
peer = ath11k_peer_find(ab, arvif->vdev_id, peer_addr);
|
||||
+ if (!peer && cmd == DISABLE_KEY) {
|
||||
+ ret = 0;
|
||||
+ goto unlock;
|
||||
+ }
|
||||
|
||||
/* TODO: Check if vdev specific security cfg is mandatory */
|
||||
ret = ath11k_nss_vdev_set_cmd(arvif, ATH11K_NSS_WIFI_VDEV_SECURITY_TYPE_CMD, key->cipher);
|
||||
@@ -5961,7 +5965,7 @@ static void ath11k_mac_op_sta_rc_update(
|
||||
peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr);
|
||||
if (!peer) {
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
- ath11k_warn(ar->ab, "mac sta rc update failed to find peer %pM on vdev %i\n",
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac sta rc update failed to find peer %pM on vdev %i\n",
|
||||
sta->addr, arvif->vdev_id);
|
||||
return;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -8425,7 +8425,7 @@ static void ath11k_peer_sta_kickout_even
|
||||
peer = ath11k_peer_find_by_addr(ab, arg.mac_addr);
|
||||
if (!peer) {
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
- ath11k_warn(ab, "peer not found %pM\n",
|
||||
+ ath11k_dbg(ab, ATH11K_DBG_WMI, "peer not found %pM\n",
|
||||
arg.mac_addr);
|
||||
goto exit;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -543,6 +543,9 @@ ieee80211_get_sband_iftype_data(const st
|
||||
if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
|
||||
return NULL;
|
||||
|
||||
+ if (iftype == NL80211_IFTYPE_AP_VLAN)
|
||||
+ iftype = NL80211_IFTYPE_AP;
|
||||
+
|
||||
for (i = 0; i < sband->n_iftype_data; i++) {
|
||||
const struct ieee80211_sband_iftype_data *data =
|
||||
&sband->iftype_data[i];
|
||||
@@ -1,37 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ath11k-firmware
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_BRANCH:=main
|
||||
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
|
||||
PKG_MIRROR_HASH:=557505744764b0442c887be3f5bb0ce924323d785b6d207899f19fad992a6020
|
||||
PKG_SOURCE_VERSION:=3417bb86645c5ff4c58258db7cc33e43260b4222
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ath11k-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=$(PKG_SOURCE_URL)
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/ath11k-firmware-ipq95xx
|
||||
$(Package/ath11k-firmware-default)
|
||||
TITLE:=ath11k firmware for IPQ95xx devices
|
||||
DEPENDS:=@TARGET_ipq95xx
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/ath11k-firmware-ipq95xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/IPQ9574/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ath11k-firmware/IPQ9574/hw1.0/2.9.0.1/WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/IPQ9574/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath11k-firmware-ipq95xx))
|
||||
@@ -1,36 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
PKG_NAME:=ath11k-wifi
|
||||
PKG_RELEASE:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-default
|
||||
SUBMENU:=ath11k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@TARGET_ipq95xx
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-qcom-ipq95xx
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=board-2.bin for QCOM IPQ9574 eval kits
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-qcom-ipq95xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ9574/hw1.0/
|
||||
$(INSTALL_DATA) ./board-2.bin.IPQ9574 $(1)/lib/firmware/ath11k/IPQ9574/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq95xx))
|
||||
Binary file not shown.
@@ -1,76 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ath12k-firmware
|
||||
PKG_MIRROR_HASH:=a325f86b1d613f713d2e015abca4a9ff86c8448d4cd540fa022866da2c5aa042
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_BRANCH:=main
|
||||
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
|
||||
PKG_SOURCE_VERSION:=e90d32aaa149800ea79760639cb5ac9ddcfc8281
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ath12k-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=$(PKG_SOURCE_URL)
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx-split-phy
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for qcn92xx split phy devices
|
||||
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for qcn92xx devices
|
||||
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for ipq53xx devices
|
||||
DEPENDS:=@TARGET_ipq53xx
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx-wk-wk
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for ipq53xx + wk + wk devices
|
||||
DEPENDS:=@TARGET_ipq53xx
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx-split-phy/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0_split_phy/1.2.1/WLAN.WBE.1.2.1-00148-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware//IPQ5322/hw1.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/IPQ5332/
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx-wk-wk/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/IPQ5322_QCN6432_QCN6432/hw1.0/testing/1.3/WLAN.WBE.1.3-02907-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/IPQ5332/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx-split-phy))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx-wk-wk))
|
||||
@@ -1,78 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
PKG_NAME:=ath12k-wifi
|
||||
PKG_RELEASE:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-default
|
||||
SUBMENU:=ath12k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@(TARGET_qcn9274||TARGET_ipq53xx)
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-qcom-qcn9274
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board-2.bin for QCOM QCN9274 eval kits
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-qcom-qcn9274/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN9274/hw1.0/
|
||||
$(INSTALL_DATA) ./board-2.bin.QCN9274 $(1)/lib/firmware/ath12k/QCN9274/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-cig-wf189
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board.bin for CIG WF189
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-edgecore-eap105
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board.bin for Edgecore EAP105
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-sercomm-ap72tip
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board.bin for Sercomm WIFI-7
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-cig-wf189/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf189.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf189.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-edgecore-eap105/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
|
||||
$(INSTALL_DATA) ./board-edgecore-eap105.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
|
||||
$(INSTALL_DATA) ./board-edgecore-eap105.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-sercomm-ap72tip/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
|
||||
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
|
||||
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath12k-wifi-qcom-qcn9274))
|
||||
$(eval $(call BuildPackage,ath12k-wifi-cig-wf189))
|
||||
$(eval $(call BuildPackage,ath12k-wifi-edgecore-eap105))
|
||||
$(eval $(call BuildPackage,ath12k-wifi-sercomm-ap72tip))
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,88 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
|
||||
#
|
||||
# Marek Lindner, Simon Wunderlich
|
||||
|
||||
#
|
||||
# B.A.T.M.A.N meshing protocol
|
||||
#
|
||||
|
||||
config BATMAN_ADV_BATMAN_V
|
||||
bool "B.A.T.M.A.N. V protocol"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
default y
|
||||
help
|
||||
This option enables the B.A.T.M.A.N. V protocol, the successor
|
||||
of the currently used B.A.T.M.A.N. IV protocol. The main
|
||||
changes include splitting of the OGM protocol into a neighbor
|
||||
discovery protocol (Echo Location Protocol, ELP) and a new OGM
|
||||
Protocol OGMv2 for flooding protocol information through the
|
||||
network, as well as a throughput based metric.
|
||||
B.A.T.M.A.N. V is currently considered experimental and not
|
||||
compatible to B.A.T.M.A.N. IV networks.
|
||||
|
||||
config BATMAN_ADV_BLA
|
||||
bool "Bridge Loop Avoidance"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
select PACKAGE_kmod-lib-crc16
|
||||
default y
|
||||
help
|
||||
This option enables BLA (Bridge Loop Avoidance), a mechanism
|
||||
to avoid Ethernet frames looping when mesh nodes are connected
|
||||
to both the same LAN and the same mesh. If you will never use
|
||||
more than one mesh node in the same LAN, you can safely remove
|
||||
this feature and save some space.
|
||||
|
||||
config BATMAN_ADV_DAT
|
||||
bool "Distributed ARP Table"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
default y
|
||||
help
|
||||
This option enables DAT (Distributed ARP Table), a DHT based
|
||||
mechanism that increases ARP reliability on sparse wireless
|
||||
mesh networks. If you think that your network does not need
|
||||
this option you can safely remove it and save some space.
|
||||
|
||||
config BATMAN_ADV_NC
|
||||
bool "Network Coding"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
help
|
||||
This option enables network coding, a mechanism that aims to
|
||||
increase the overall network throughput by fusing multiple
|
||||
packets in one transmission.
|
||||
Note that interfaces controlled by batman-adv must be manually
|
||||
configured to have promiscuous mode enabled in order to make
|
||||
network coding work.
|
||||
If you think that your network does not need this feature you
|
||||
can safely disable it and save some space.
|
||||
|
||||
config BATMAN_ADV_MCAST
|
||||
bool "Multicast optimisation"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
default y
|
||||
help
|
||||
This option enables the multicast optimisation which aims to
|
||||
reduce the air overhead while improving the reliability of
|
||||
multicast messages.
|
||||
|
||||
config BATMAN_ADV_DEBUG
|
||||
bool "B.A.T.M.A.N. debugging"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
help
|
||||
This is an option for use by developers; most people should
|
||||
say N here. This enables compilation of support for
|
||||
outputting debugging information to the debugfs log or tracing
|
||||
buffer. The output is controlled via the batadv netdev specific
|
||||
log_level setting.
|
||||
|
||||
config BATMAN_ADV_TRACING
|
||||
bool "B.A.T.M.A.N. tracing support"
|
||||
depends on PACKAGE_kmod-batman-adv
|
||||
select KERNEL_FTRACE
|
||||
select KERNEL_ENABLE_DEFAULT_TRACERS
|
||||
help
|
||||
This is an option for use by developers; most people should
|
||||
say N here. Select this option to gather traces like the debug
|
||||
messages using the generic tracing infrastructure of the kernel.
|
||||
BATMAN_ADV_DEBUG must also be selected to get trace events for
|
||||
batadv_dbg.
|
||||
@@ -1,101 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=batman-adv
|
||||
PKG_VERSION:=2022.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
|
||||
PKG_HASH:=49338705bc207709ac84d766688e702571009c827c0a320788ea51fb887714aa
|
||||
PKG_EXTMOD_SUBDIRS:=net/batman-adv
|
||||
|
||||
PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
|
||||
PKG_LICENSE:=GPL-2.0-only MIT
|
||||
PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_BATMAN_ADV_BATMAN_V \
|
||||
CONFIG_BATMAN_ADV_BLA \
|
||||
CONFIG_BATMAN_ADV_DAT \
|
||||
CONFIG_BATMAN_ADV_NC \
|
||||
CONFIG_BATMAN_ADV_MCAST \
|
||||
CONFIG_BATMAN_ADV_DEBUG \
|
||||
CONFIG_BATMAN_ADV_TRACING
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/batman-adv
|
||||
SUBMENU:=Network Support
|
||||
TITLE:=B.A.T.M.A.N. Adv
|
||||
URL:=https://www.open-mesh.org/
|
||||
DEPENDS:=+BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-lib-crc32c +kmod-cfg80211 +batctl
|
||||
FILES:=$(PKG_BUILD_DIR)/net/batman-adv/batman-adv.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoProbe,batman-adv)
|
||||
endef
|
||||
|
||||
define KernelPackage/batman-adv/description
|
||||
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is
|
||||
a routing protocol for multi-hop ad-hoc mesh networks. The
|
||||
networks may be wired or wireless. See
|
||||
https://www.open-mesh.org/ for more information and user space
|
||||
tools. This package builds version $(PKG_VERSION) of the kernel
|
||||
module.
|
||||
endef
|
||||
|
||||
define KernelPackage/batman-adv/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/kmod-batman-adv/conffiles
|
||||
/etc/config/batman-adv
|
||||
endef
|
||||
|
||||
PKG_EXTRA_KCONFIG:= \
|
||||
CONFIG_BATMAN_ADV=m \
|
||||
CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_BATMAN_ADV_DEBUG),y,n) \
|
||||
CONFIG_BATMAN_ADV_BLA=$(if $(CONFIG_BATMAN_ADV_BLA),y,n) \
|
||||
CONFIG_BATMAN_ADV_DAT=$(if $(CONFIG_BATMAN_ADV_DAT),y,n) \
|
||||
CONFIG_BATMAN_ADV_MCAST=$(if $(CONFIG_BATMAN_ADV_MCAST),y,n) \
|
||||
CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_BATMAN_ADV_NC),y,n) \
|
||||
CONFIG_BATMAN_ADV_BATMAN_V=$(if $(CONFIG_BATMAN_ADV_BATMAN_V),y,n) \
|
||||
CONFIG_BATMAN_ADV_TRACING=$(if $(CONFIG_BATMAN_ADV_TRACING),y,n) \
|
||||
|
||||
PKG_EXTRA_CFLAGS:= \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
|
||||
|
||||
NOSTDINC_FLAGS = \
|
||||
$(KERNEL_NOSTDINC_FLAGS) \
|
||||
-I$(PKG_BUILD_DIR)/net/batman-adv \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||
-I$(PKG_BUILD_DIR)/include/ \
|
||||
-include backport/autoconf.h \
|
||||
-include backport/backport.h \
|
||||
-include $(PKG_BUILD_DIR)/compat-hacks.h \
|
||||
-DBATADV_SOURCE_VERSION=\\\"$(PKG_VERSION)-openwrt-$(PKG_RELEASE)\\\"
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)/net/batman-adv" \
|
||||
$(PKG_EXTRA_KCONFIG) \
|
||||
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
modules
|
||||
endef
|
||||
|
||||
define KernelPackage/batman-adv/install
|
||||
$(CP) ./files/. $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,batman-adv))
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This UCI-Defaults script will split the batadv proto network interfaces
|
||||
# in batadv_hardif and batadv proto. The configuration options from
|
||||
# /etc/config/batman-adv will be moved to the latter.
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
proto_batadv_to_batadv_hardif() {
|
||||
local section="$1"
|
||||
local proto
|
||||
local mesh
|
||||
local routing_algo
|
||||
|
||||
config_get proto "${section}" proto
|
||||
config_get mesh "${section}" mesh
|
||||
config_get routing_algo "${section}" routing_algo
|
||||
|
||||
if [ -z "$mesh" -o "${proto}" != "batadv" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
uci set network."${section}".proto="batadv_hardif"
|
||||
uci rename network."${section}".mesh="master"
|
||||
uci delete network."${section}".routing_algo
|
||||
|
||||
# create new section or adjust existing one
|
||||
uci set network."${mesh}"=interface
|
||||
uci set network."${mesh}".proto=batadv
|
||||
[ -n "${routing_algo}" ] && uci set network."${mesh}".routing_algo="${routing_algo}"
|
||||
}
|
||||
|
||||
mv_batadv_config_section() {
|
||||
local section="$1"
|
||||
local aggregated_ogms
|
||||
local ap_isolation
|
||||
local bonding
|
||||
local bridge_loop_avoidance
|
||||
local distributed_arp_table
|
||||
local fragmentation
|
||||
local gw_bandwidth
|
||||
local gw_mode
|
||||
local gw_sel_class
|
||||
local hop_penalty
|
||||
local isolation_mark
|
||||
local log_level
|
||||
local multicast_mode
|
||||
local network_coding
|
||||
local orig_interval
|
||||
|
||||
config_get aggregated_ogms "${section}" aggregated_ogms
|
||||
config_get ap_isolation "${section}" ap_isolation
|
||||
config_get bonding "${section}" bonding
|
||||
config_get bridge_loop_avoidance "${section}" bridge_loop_avoidance
|
||||
config_get distributed_arp_table "${section}" distributed_arp_table
|
||||
config_get fragmentation "${section}" fragmentation
|
||||
config_get gw_bandwidth "${section}" gw_bandwidth
|
||||
config_get gw_mode "${section}" gw_mode
|
||||
config_get gw_sel_class "${section}" gw_sel_class
|
||||
config_get hop_penalty "${section}" hop_penalty
|
||||
config_get isolation_mark "${section}" isolation_mark
|
||||
config_get log_level "${section}" log_level
|
||||
config_get multicast_mode "${section}" multicast_mode
|
||||
config_get network_coding "${section}" network_coding
|
||||
config_get orig_interval "${section}" orig_interval
|
||||
|
||||
# update section in case it exists
|
||||
[ -n "${aggregated_ogms}" ] && uci set network."${section}".aggregated_ogms="${aggregated_ogms}"
|
||||
[ -n "${ap_isolation}" ] && uci set network."${section}".ap_isolation="${ap_isolation}"
|
||||
[ -n "${bonding}" ] && uci set network."${section}".bonding="${bonding}"
|
||||
[ -n "${bridge_loop_avoidance}" ] && uci set network."${section}".bridge_loop_avoidance="${bridge_loop_avoidance}"
|
||||
[ -n "${distributed_arp_table}" ] && uci set network."${section}".distributed_arp_table="${distributed_arp_table}"
|
||||
[ -n "${fragmentation}" ] && uci set network."${section}".fragmentation="${fragmentation}"
|
||||
[ -n "${gw_bandwidth}" ] && uci set network."${section}".gw_bandwidth="${gw_bandwidth}"
|
||||
[ -n "${gw_mode}" ] && uci set network."${section}".gw_mode="${gw_mode}"
|
||||
[ -n "${gw_sel_class}" ] && uci set network."${section}".gw_sel_class="${gw_sel_class}"
|
||||
[ -n "${hop_penalty}" ] && uci set network."${section}".hop_penalty="${hop_penalty}"
|
||||
[ -n "${isolation_mark}" ] && uci set network."${section}".isolation_mark="${isolation_mark}"
|
||||
[ -n "${log_level}" ] && uci set network."${section}".log_level="${log_level}"
|
||||
[ -n "${multicast_mode}" ] && uci set network."${section}".multicast_mode="${multicast_mode}"
|
||||
[ -n "${network_coding}" ] && uci set network."${section}".network_coding="${network_coding}"
|
||||
[ -n "${orig_interval}" ] && uci set network."${section}".orig_interval="${orig_interval}"
|
||||
}
|
||||
|
||||
if [ -f /etc/config/batman-adv ]; then
|
||||
config_load network
|
||||
config_foreach proto_batadv_to_batadv_hardif 'interface'
|
||||
uci commit network
|
||||
|
||||
config_load batman-adv
|
||||
config_foreach mv_batadv_config_section 'mesh'
|
||||
uci commit network
|
||||
|
||||
rm -f /etc/config/batman-adv
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
. /lib/functions.sh
|
||||
. ../netifd-proto.sh
|
||||
init_proto "$@"
|
||||
}
|
||||
|
||||
proto_batadv_init_config() {
|
||||
no_device=1
|
||||
available=1
|
||||
|
||||
proto_config_add_boolean 'aggregated_ogms:bool'
|
||||
proto_config_add_boolean 'ap_isolation:bool'
|
||||
proto_config_add_boolean 'bonding:bool'
|
||||
proto_config_add_boolean 'bridge_loop_avoidance:bool'
|
||||
proto_config_add_boolean 'distributed_arp_table:bool'
|
||||
proto_config_add_boolean 'fragmentation:bool'
|
||||
proto_config_add_string 'gw_bandwidth'
|
||||
proto_config_add_string 'gw_mode'
|
||||
proto_config_add_int 'gw_sel_class'
|
||||
proto_config_add_int 'hop_penalty'
|
||||
proto_config_add_string 'isolation_mark'
|
||||
proto_config_add_string 'log_level'
|
||||
proto_config_add_int 'multicast_fanout'
|
||||
proto_config_add_boolean 'multicast_mode:bool'
|
||||
proto_config_add_boolean 'network_coding:bool'
|
||||
proto_config_add_int 'orig_interval'
|
||||
proto_config_add_string 'routing_algo'
|
||||
}
|
||||
|
||||
proto_batadv_setup() {
|
||||
local config="$1"
|
||||
local iface="$config"
|
||||
|
||||
local aggregated_ogms
|
||||
local ap_isolation
|
||||
local bonding
|
||||
local bridge_loop_avoidance
|
||||
local distributed_arp_table
|
||||
local fragmentation
|
||||
local gw_bandwidth
|
||||
local gw_mode
|
||||
local gw_sel_class
|
||||
local hop_penalty
|
||||
local isolation_mark
|
||||
local log_level
|
||||
local multicast_fanout
|
||||
local multicast_mode
|
||||
local network_coding
|
||||
local orig_interval
|
||||
local routing_algo
|
||||
|
||||
json_get_vars aggregated_ogms
|
||||
json_get_vars ap_isolation
|
||||
json_get_vars bonding
|
||||
json_get_vars bridge_loop_avoidance
|
||||
json_get_vars distributed_arp_table
|
||||
json_get_vars fragmentation
|
||||
json_get_vars gw_bandwidth
|
||||
json_get_vars gw_mode
|
||||
json_get_vars gw_sel_class
|
||||
json_get_vars hop_penalty
|
||||
json_get_vars isolation_mark
|
||||
json_get_vars log_level
|
||||
json_get_vars multicast_fanout
|
||||
json_get_vars multicast_mode
|
||||
json_get_vars network_coding
|
||||
json_get_vars orig_interval
|
||||
json_get_vars routing_algo
|
||||
|
||||
set_default routing_algo 'BATMAN_IV'
|
||||
|
||||
batctl routing_algo "$routing_algo"
|
||||
batctl meshif "$iface" interface create
|
||||
|
||||
[ -n "$aggregated_ogms" ] && batctl meshif "$iface" aggregation "$aggregated_ogms"
|
||||
[ -n "$ap_isolation" ] && batctl meshif "$iface" ap_isolation "$ap_isolation"
|
||||
[ -n "$bonding" ] && batctl meshif "$iface" bonding "$bonding"
|
||||
[ -n "$bridge_loop_avoidance" ] && batctl meshif "$iface" bridge_loop_avoidance "$bridge_loop_avoidance" 2>&-
|
||||
[ -n "$distributed_arp_table" ] && batctl meshif "$iface" distributed_arp_table "$distributed_arp_table" 2>&-
|
||||
[ -n "$fragmentation" ] && batctl meshif "$iface" fragmentation "$fragmentation"
|
||||
|
||||
case "$gw_mode" in
|
||||
server)
|
||||
if [ -n "$gw_bandwidth" ]; then
|
||||
batctl meshif "$iface" gw_mode "server" "$gw_bandwidth"
|
||||
else
|
||||
batctl meshif "$iface" gw_mode "server"
|
||||
fi
|
||||
;;
|
||||
client)
|
||||
if [ -n "$gw_sel_class" ]; then
|
||||
batctl meshif "$iface" gw_mode "client" "$gw_sel_class"
|
||||
else
|
||||
batctl meshif "$iface" gw_mode "client"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
batctl meshif "$iface" gw_mode "off"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$hop_penalty" ] && batctl meshif "$iface" hop_penalty "$hop_penalty"
|
||||
[ -n "$isolation_mark" ] && batctl meshif "$iface" isolation_mark "$isolation_mark"
|
||||
[ -n "$multicast_fanout" ] && batctl meshif "$iface" multicast_fanout "$multicast_fanout"
|
||||
[ -n "$multicast_mode" ] && batctl meshif "$iface" multicast_mode "$multicast_mode" 2>&-
|
||||
[ -n "$network_coding" ] && batctl meshif "$iface" network_coding "$network_coding" 2>&-
|
||||
[ -n "$log_level" ] && batctl meshif "$iface" loglevel "$log_level" 2>&-
|
||||
[ -n "$orig_interval" ] && batctl meshif "$iface" orig_interval "$orig_interval"
|
||||
|
||||
proto_init_update "$iface" 1
|
||||
proto_send_update "$config"
|
||||
}
|
||||
|
||||
proto_batadv_teardown() {
|
||||
local config="$1"
|
||||
local iface="$config"
|
||||
|
||||
batctl meshif "$iface" interface destroy
|
||||
}
|
||||
|
||||
add_protocol batadv
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
. /lib/functions.sh
|
||||
. ../netifd-proto.sh
|
||||
init_proto "$@"
|
||||
}
|
||||
|
||||
proto_batadv_hardif_init_config() {
|
||||
proto_config_add_int 'elp_interval'
|
||||
proto_config_add_int 'hop_penalty'
|
||||
proto_config_add_string "master"
|
||||
proto_config_add_string 'throughput_override'
|
||||
}
|
||||
|
||||
proto_batadv_hardif_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local elp_interval
|
||||
local hop_penalty
|
||||
local master
|
||||
local throughput_override
|
||||
|
||||
json_get_vars elp_interval
|
||||
json_get_vars hop_penalty
|
||||
json_get_vars master
|
||||
json_get_vars throughput_override
|
||||
|
||||
( proto_add_host_dependency "$config" '' "$master" )
|
||||
|
||||
batctl meshif "$master" interface -M add "$iface"
|
||||
|
||||
[ -n "$elp_interval" ] && batctl hardif "$iface" elp_interval "$elp_interval"
|
||||
[ -n "$hop_penalty" ] && batctl hardif "$iface" hop_penalty "$hop_penalty"
|
||||
[ -n "$throughput_override" ] && batctl hardif "$iface" throughput_override "$throughput_override"
|
||||
|
||||
proto_init_update "$iface" 1
|
||||
proto_send_update "$config"
|
||||
}
|
||||
|
||||
proto_batadv_hardif_teardown() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local master
|
||||
|
||||
json_get_vars master
|
||||
|
||||
batctl meshif "$master" interface -M del "$iface" || true
|
||||
}
|
||||
|
||||
add_protocol batadv_hardif
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. ../netifd-proto.sh
|
||||
init_proto "$@"
|
||||
|
||||
proto_batadv_vlan_init_config() {
|
||||
proto_config_add_boolean 'ap_isolation:bool'
|
||||
}
|
||||
|
||||
proto_batadv_vlan_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
# batadv_vlan options
|
||||
local ap_isolation
|
||||
|
||||
json_get_vars ap_isolation
|
||||
|
||||
[ -n "$ap_isolation" ] && batctl vlan "$iface" ap_isolation "$ap_isolation"
|
||||
proto_init_update "$iface" 1
|
||||
proto_send_update "$config"
|
||||
}
|
||||
|
||||
add_protocol batadv_vlan
|
||||
@@ -1,128 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Sat, 24 Oct 2020 22:51:23 +0200
|
||||
Subject: Revert "batman-adv: genetlink: move to smaller ops wherever possible"
|
||||
|
||||
The netlink genl_ops interface was splitted into two parts for Linux 5.10.
|
||||
The batman-adv code changed to the new one because it doesn't use the more
|
||||
complex policy handling of genl_ops. But the backports-5.8-1 version in
|
||||
OpenWrt doesn't yet support the new genl_small_ops.
|
||||
|
||||
This patch must be dropped directly when OpenWrt switches to backports-5.10
|
||||
or newer - otherwise it will not work as expected.
|
||||
|
||||
This reverts commit 725b4ef5be840cfcd0ca33b9393c14dee40c10f7.
|
||||
|
||||
--- a/compat-include/net/genetlink.h
|
||||
+++ b/compat-include/net/genetlink.h
|
||||
@@ -31,17 +31,15 @@ void batadv_genl_dump_check_consistent(s
|
||||
#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
|
||||
|
||||
|
||||
-#if LINUX_VERSION_IS_LESS(5, 10, 0)
|
||||
-
|
||||
#if LINUX_VERSION_IS_LESS(5, 2, 0)
|
||||
+
|
||||
enum genl_validate_flags {
|
||||
GENL_DONT_VALIDATE_STRICT = BIT(0),
|
||||
GENL_DONT_VALIDATE_DUMP = BIT(1),
|
||||
GENL_DONT_VALIDATE_DUMP_STRICT = BIT(2),
|
||||
};
|
||||
-#endif /* LINUX_VERSION_IS_LESS(5, 2, 0) */
|
||||
|
||||
-struct batadv_genl_small_ops {
|
||||
+struct batadv_genl_ops {
|
||||
int (*doit)(struct sk_buff *skb,
|
||||
struct genl_info *info);
|
||||
int (*dumpit)(struct sk_buff *skb,
|
||||
@@ -70,9 +68,9 @@ struct batadv_genl_family {
|
||||
struct genl_info *info);
|
||||
void (*post_doit)(const struct genl_ops *ops, struct sk_buff *skb,
|
||||
struct genl_info *info);
|
||||
- const struct batadv_genl_small_ops *small_ops;
|
||||
+ const struct batadv_genl_ops *ops;
|
||||
const struct genl_multicast_group *mcgrps;
|
||||
- unsigned int n_small_ops;
|
||||
+ unsigned int n_ops;
|
||||
unsigned int n_mcgrps;
|
||||
struct module *module;
|
||||
|
||||
@@ -96,32 +94,24 @@ static inline int batadv_genl_register_f
|
||||
family->family.pre_doit = family->pre_doit;
|
||||
family->family.post_doit = family->post_doit;
|
||||
family->family.mcgrps = family->mcgrps;
|
||||
- family->family.n_ops = family->n_small_ops;
|
||||
+ family->family.n_ops = family->n_ops;
|
||||
family->family.n_mcgrps = family->n_mcgrps;
|
||||
family->family.module = family->module;
|
||||
|
||||
- ops = kzalloc(sizeof(*ops) * family->n_small_ops, GFP_KERNEL);
|
||||
+ ops = kzalloc(sizeof(*ops) * family->n_ops, GFP_KERNEL);
|
||||
if (!ops)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < family->family.n_ops; i++) {
|
||||
- ops[i].doit = family->small_ops[i].doit;
|
||||
- ops[i].dumpit = family->small_ops[i].dumpit;
|
||||
- ops[i].done = family->small_ops[i].done;
|
||||
- ops[i].cmd = family->small_ops[i].cmd;
|
||||
- ops[i].internal_flags = family->small_ops[i].internal_flags;
|
||||
- ops[i].flags = family->small_ops[i].flags;
|
||||
-#if LINUX_VERSION_IS_GEQ(5, 2, 0)
|
||||
- ops[i].validate = family->small_ops[i].validate;
|
||||
-#else
|
||||
+ ops[i].doit = family->ops[i].doit;
|
||||
+ ops[i].dumpit = family->ops[i].dumpit;
|
||||
+ ops[i].done = family->ops[i].done;
|
||||
+ ops[i].cmd = family->ops[i].cmd;
|
||||
+ ops[i].internal_flags = family->ops[i].internal_flags;
|
||||
+ ops[i].flags = family->ops[i].flags;
|
||||
ops[i].policy = family->policy;
|
||||
-#endif
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_IS_GEQ(5, 2, 0)
|
||||
- family->family.policy = family->policy;
|
||||
-#endif
|
||||
-
|
||||
family->family.ops = ops;
|
||||
family->copy_ops = ops;
|
||||
|
||||
@@ -136,7 +126,7 @@ typedef struct genl_ops batadv_genl_ops_
|
||||
#define batadv_post_doit(__x, __y, __z) \
|
||||
batadv_post_doit(const batadv_genl_ops_old *ops, __y, __z)
|
||||
|
||||
-#define genl_small_ops batadv_genl_small_ops
|
||||
+#define genl_ops batadv_genl_ops
|
||||
#define genl_family batadv_genl_family
|
||||
|
||||
#define genl_register_family(family) \
|
||||
@@ -160,6 +150,6 @@ batadv_genl_unregister_family(struct bat
|
||||
genlmsg_multicast_netns(&(_family)->family, _net, _skb, _portid, \
|
||||
_group, _flags)
|
||||
|
||||
-#endif /* LINUX_VERSION_IS_LESS(5, 10, 0) */
|
||||
+#endif /* LINUX_VERSION_IS_LESS(5, 2, 0) */
|
||||
|
||||
#endif /* _NET_BATMAN_ADV_COMPAT_NET_GENETLINK_H_ */
|
||||
--- a/net/batman-adv/netlink.c
|
||||
+++ b/net/batman-adv/netlink.c
|
||||
@@ -1357,7 +1357,7 @@ static void batadv_post_doit(const struc
|
||||
}
|
||||
}
|
||||
|
||||
-static const struct genl_small_ops batadv_netlink_ops[] = {
|
||||
+static const struct genl_ops batadv_netlink_ops[] = {
|
||||
{
|
||||
.cmd = BATADV_CMD_GET_MESH,
|
||||
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||
@@ -1491,8 +1491,8 @@ struct genl_family batadv_netlink_family
|
||||
.pre_doit = batadv_pre_doit,
|
||||
.post_doit = batadv_post_doit,
|
||||
.module = THIS_MODULE,
|
||||
- .small_ops = batadv_netlink_ops,
|
||||
- .n_small_ops = ARRAY_SIZE(batadv_netlink_ops),
|
||||
+ .ops = batadv_netlink_ops,
|
||||
+ .n_ops = ARRAY_SIZE(batadv_netlink_ops),
|
||||
.mcgrps = batadv_netlink_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(batadv_netlink_mcgrps),
|
||||
};
|
||||
@@ -1,116 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Thu, 28 Jan 2021 21:06:51 +0100
|
||||
Subject: Revert "batman-adv: Add new include for min/max helpers"
|
||||
|
||||
The OpenWrt kernel sources and backports sources are currently missing this
|
||||
header.
|
||||
|
||||
This reverts commit 1810de05310d5c5e9140f870ac21052f38bc06b8.
|
||||
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
|
||||
--- a/compat-include/linux/minmax.h
|
||||
+++ /dev/null
|
||||
@@ -1,20 +0,0 @@
|
||||
-/* SPDX-License-Identifier: GPL-2.0 */
|
||||
-/* Copyright (C) B.A.T.M.A.N. contributors:
|
||||
- *
|
||||
- * Marek Lindner, Simon Wunderlich
|
||||
- *
|
||||
- * This file contains macros for maintaining compatibility with older versions
|
||||
- * of the Linux kernel.
|
||||
- */
|
||||
-
|
||||
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_
|
||||
-#define _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_
|
||||
-
|
||||
-#include <linux/version.h>
|
||||
-#if LINUX_VERSION_IS_GEQ(5, 10, 0)
|
||||
-#include_next <linux/minmax.h>
|
||||
-#else
|
||||
-#include <linux/kernel.h>
|
||||
-#endif
|
||||
-
|
||||
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_ */
|
||||
--- a/net/batman-adv/bat_v.c
|
||||
+++ b/net/batman-adv/bat_v.c
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/list.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rculist.h>
|
||||
--- a/net/batman-adv/bat_v_elp.c
|
||||
+++ b/net/batman-adv/bat_v_elp.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/kref.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/nl80211.h>
|
||||
#include <linux/prandom.h>
|
||||
--- a/net/batman-adv/bat_v_ogm.c
|
||||
+++ b/net/batman-adv/bat_v_ogm.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <linux/kref.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/lockdep.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/prandom.h>
|
||||
--- a/net/batman-adv/fragmentation.c
|
||||
+++ b/net/batman-adv/fragmentation.c
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/jiffies.h>
|
||||
+#include <linux/kernel.h>
|
||||
#include <linux/lockdep.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/slab.h>
|
||||
--- a/net/batman-adv/hard-interface.c
|
||||
+++ b/net/batman-adv/hard-interface.c
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/kref.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/list.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/printk.h>
|
||||
--- a/net/batman-adv/main.c
|
||||
+++ b/net/batman-adv/main.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/list.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/printk.h>
|
||||
--- a/net/batman-adv/netlink.c
|
||||
+++ b/net/batman-adv/netlink.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/list.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/printk.h>
|
||||
--- a/net/batman-adv/tp_meter.c
|
||||
+++ b/net/batman-adv/tp_meter.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/list.h>
|
||||
-#include <linux/minmax.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/printk.h>
|
||||
@@ -1,34 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Fri, 14 May 2021 19:34:35 +0200
|
||||
Subject: batman-adv: Fix build of multicast code against Linux < 5.13
|
||||
|
||||
Fixes: 007b4c4b031f ("batman-adv: convert ifmcaddr6 to RCU")
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
|
||||
--- a/net/batman-adv/multicast.c
|
||||
+++ b/net/batman-adv/multicast.c
|
||||
@@ -422,9 +422,14 @@ batadv_mcast_mla_softif_get_ipv6(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(5, 13, 0)
|
||||
+ read_lock_bh(&in6_dev->lock);
|
||||
+ for (pmc6 = in6_dev->mc_list; pmc6; pmc6 = pmc6->next) {
|
||||
+#else
|
||||
for (pmc6 = rcu_dereference(in6_dev->mc_list);
|
||||
pmc6;
|
||||
pmc6 = rcu_dereference(pmc6->next)) {
|
||||
+#endif
|
||||
if (IPV6_ADDR_MC_SCOPE(&pmc6->mca_addr) <
|
||||
IPV6_ADDR_SCOPE_LINKLOCAL)
|
||||
continue;
|
||||
@@ -453,6 +458,9 @@ batadv_mcast_mla_softif_get_ipv6(struct
|
||||
hlist_add_head(&new->list, mcast_list);
|
||||
ret++;
|
||||
}
|
||||
+#if LINUX_VERSION_IS_LESS(5, 13, 0)
|
||||
+ read_unlock_bh(&in6_dev->lock);
|
||||
+#endif
|
||||
rcu_read_unlock();
|
||||
|
||||
return ret;
|
||||
@@ -1,19 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Tue, 14 Sep 2021 21:02:10 +0200
|
||||
Subject: Revert "batman-adv: Switch to kstrtox.h for kstrtou64"
|
||||
|
||||
This header is only available after Linux 5.14
|
||||
|
||||
This reverts commit c9a69cb4048ebef3a4d91835669011a26d9b7dab.
|
||||
|
||||
--- a/net/batman-adv/gateway_common.c
|
||||
+++ b/net/batman-adv/gateway_common.c
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/byteorder/generic.h>
|
||||
#include <linux/errno.h>
|
||||
-#include <linux/kstrtox.h>
|
||||
+#include <linux/kernel.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/math64.h>
|
||||
#include <linux/netdevice.h>
|
||||
@@ -1,19 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Tue, 14 Sep 2021 21:07:34 +0200
|
||||
Subject: Revert "batman-adv: use Linux's stdarg.h"
|
||||
|
||||
This header is only available since Linux 5.15
|
||||
|
||||
This reverts commit 36d059797a14f0e373fdc3c79df7b467435925ad.
|
||||
|
||||
--- a/net/batman-adv/log.c
|
||||
+++ b/net/batman-adv/log.c
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "log.h"
|
||||
#include "main.h"
|
||||
|
||||
-#include <linux/stdarg.h>
|
||||
+#include <stdarg.h>
|
||||
|
||||
#include "trace.h"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Wed, 2 Mar 2022 20:05:13 +0100
|
||||
Subject: batman-adv: make mc_forwarding atomic
|
||||
|
||||
This fixes minor data-races in ip6_mc_input() and
|
||||
batadv_mcast_mla_rtr_flags_softif_get_ipv6()
|
||||
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
[sven@narfation.org: Add ugly hack to get it building with old kernels]
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/56db7c0540e733a1f063ccd6bab1b537a80857eb
|
||||
|
||||
--- a/net/batman-adv/multicast.c
|
||||
+++ b/net/batman-adv/multicast.c
|
||||
@@ -134,7 +134,11 @@ static u8 batadv_mcast_mla_rtr_flags_sof
|
||||
{
|
||||
struct inet6_dev *in6_dev = __in6_dev_get(dev);
|
||||
|
||||
+#if LINUX_VERSION_IS_GEQ(5, 18, 0) // UGLY_HACK_NEW
|
||||
+ if (in6_dev && atomic_read(&in6_dev->cnf.mc_forwarding))
|
||||
+#else // UGLY_HACK_OLD
|
||||
if (in6_dev && in6_dev->cnf.mc_forwarding)
|
||||
+#endif // UGLY_HACK_STOP
|
||||
return BATADV_NO_FLAGS;
|
||||
else
|
||||
return BATADV_MCAST_WANT_NO_RTR6;
|
||||
@@ -1,23 +0,0 @@
|
||||
From: Sven Eckelmann <sven@narfation.org>
|
||||
Date: Fri, 15 Apr 2022 15:12:45 +0200
|
||||
Subject: batman-adv: compat: Add atomic mc_fowarding support for stable kernels
|
||||
|
||||
Fixes: 56db7c0540e7 ("batman-adv: make mc_forwarding atomic")
|
||||
Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
||||
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/350adcaec82fbaa358a2406343b6130ac8dad126
|
||||
|
||||
--- a/net/batman-adv/multicast.c
|
||||
+++ b/net/batman-adv/multicast.c
|
||||
@@ -134,7 +134,11 @@ static u8 batadv_mcast_mla_rtr_flags_sof
|
||||
{
|
||||
struct inet6_dev *in6_dev = __in6_dev_get(dev);
|
||||
|
||||
-#if LINUX_VERSION_IS_GEQ(5, 18, 0) // UGLY_HACK_NEW
|
||||
+#if (LINUX_VERSION_IS_GEQ(5, 4, 189) && LINUX_VERSION_IS_LESS(5, 5, 0)) || /* UGLY_HACK */ \
|
||||
+ (LINUX_VERSION_IS_GEQ(5, 10, 111) && LINUX_VERSION_IS_LESS(5, 11, 0)) || /* UGLY_HACK */ \
|
||||
+ (LINUX_VERSION_IS_GEQ(5, 15, 34) && LINUX_VERSION_IS_LESS(5, 16, 0)) || /* UGLY_HACK */ \
|
||||
+ (LINUX_VERSION_IS_GEQ(5, 16, 20) && LINUX_VERSION_IS_LESS(5, 17, 0)) || /* UGLY_HACK */ \
|
||||
+ LINUX_VERSION_IS_GEQ(5, 17, 3) // UGLY_HACK_NEW
|
||||
if (in6_dev && atomic_read(&in6_dev->cnf.mc_forwarding))
|
||||
#else // UGLY_HACK_OLD
|
||||
if (in6_dev && in6_dev->cnf.mc_forwarding)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user