aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-07-28 13:40:12 +0200
committerDaniel Golle <daniel@makrotopia.org>2022-09-19 02:48:26 +0100
commit7c459ac1d5a9a5c507afd7a3205dccfad20883d1 (patch)
tree24dda31482c091b5583c1d414433b2c2b4407ea4 /target
parentd004110ef7b6a656b59ea7a5ca4a3deb4fc7ef99 (diff)
downloadupstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.tar.gz
upstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.tar.bz2
upstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.zip
mac80211: rt2x00: experimental improvements for MT7620 wifi
Serge Vasilugin reports: To improve mt7620 built-in wifi performance some changes: 1. Correct BW20/BW40 switching (see comments with mark (1)) 2. Correct TX_SW_CFG1 MAC reg from v3 of vendor driver see https://gitlab.com/dm38/padavan-ng/-/blob/master/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/chips/rt6352.c#L531 3. Set bbp66 for all chains. 4. US_CYC_CNT init based on Programming guide, default value was 33 (pci), set chipset bus clock with fallback to cpu clock/3. 5. Don't overwrite default values for mt7620. 6. Correct some typos. 7. Add support for external LNA: a) RF and BBP regs never be corrected for this mode b) eLNA is driven the same way as ePA with mt7620's pin PA but vendor driver explicitly pin PA to gpio mode (for forrect calibration?) so I'm not sure that request for pa_pin in dts-file will be enough First 5 changes (really 2) improve performance for boards w/o eLNA/ePA. Changes 7 add support for eLNA Configuration w/o eLAN/ePA and with eLNA show results tx/rx (from router point of view) for each stream: 35-40/30-35 Mbps for HT20 65-70/60-65 Mbps for HT40 Yes. Max results for 2T2R client is 140-145/135-140 with peaks 160/150, It correspond to mediatek driver results. Boards with ePA untested. Reported-by: Serge Vasilugin <vasilugin@yandex.ru> Signed-off-by: Daniel Golle <daniel@makrotopia.org> [directly include v3 of the patchset submitted upstream] (cherry picked from commit 31a6605de04218e1c04bd5c2436c24d7d1c07506) (cherry picked from commit e785ca05e9f0502894772f5df92192b816ba5d7c) (cherry picked from commit 412fcf3d4400f84551f3ead0514834c62d94a251)
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/dts/mt7620a.dtsi7
-rw-r--r--target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_cameo_810.dtsi3
-rw-r--r--target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_fon_fon2601.dts4
-rw-r--r--target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi6
-rw-r--r--target/linux/ramips/dts/mt7620a_phicomm_k2-v22.4.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_phicomm_k2-v22.5.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_phicomm_k2g.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts3
-rw-r--r--target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts4
-rw-r--r--target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi4
-rw-r--r--target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts4
16 files changed, 44 insertions, 15 deletions
diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi
index c33dd135fe..4b6fa60dc8 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -420,6 +420,13 @@
};
};
+ pa_gpio_pins: pa_gpio {
+ pa {
+ groups = "pa";
+ function = "gpio";
+ };
+ };
+
sdhci_pins: sdhci {
sdhci {
groups = "nd_sd";
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
index 7c8caa5066..4b960da312 100644
--- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
@@ -147,8 +147,9 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
&factory {
diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
index 3174b98bbf..d0113f5560 100644
--- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
+++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
@@ -138,8 +138,9 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
ralink,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_factory_28>;
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
index 68b733cade..2884bfdb04 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
@@ -174,8 +174,9 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
&factory {
diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
index 69ddea589b..8f95204ad1 100644
--- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
+++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
@@ -143,8 +143,10 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>, <&wled_pins>;
+ pinctrl-1 = <&pa_gpio_pins>, <&wled_pins>;
};
&pcie {
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
index 10aa0ddf6f..87eacb13d7 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -107,6 +107,7 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
index c7b7ea7b90..5e834d291d 100644
--- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
@@ -90,9 +90,11 @@
};
&wmac {
- ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
+
+ ralink,mtd-eeprom = <&factory 0x0>;
};
&state_default {
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.4.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.4.dts
index 4e9fc1307b..52d131556d 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.4.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.4.dts
@@ -18,6 +18,7 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.5.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.5.dts
index 2a682872c6..cf9d0b290c 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.5.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_k2-v22.5.dts
@@ -24,6 +24,7 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
index d113edc19f..bc934d7058 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
@@ -42,6 +42,7 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
index e3c077cb0d..8fe5b9c3a2 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -69,8 +69,9 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&macaddr_rom_f100>;
nvmem-cell-names = "mac-address";
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
index aefd951f43..4dbd1b2a98 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -69,8 +69,9 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&macaddr_rom_f100>;
nvmem-cell-names = "mac-address";
diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
index b0522de7d0..9f58fb86ee 100644
--- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
@@ -131,8 +131,9 @@
};
&wmac {
- pinctrl-names = "default";
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
ralink,mtd-eeprom = <&factory 0x0>;
};
diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
index 9f5df5dd79..1dd3f2eb47 100644
--- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
+++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
@@ -146,8 +146,10 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
&pcie {
diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
index ac874cef3d..d15d2c0f4b 100644
--- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
+++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
@@ -113,6 +113,10 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
+
+ pinctrl-names = "default", "pa_gpio";
+ pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
&sdhci {
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
index 6fcda971a6..ceb348e1d2 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
@@ -106,8 +106,10 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- pinctrl-names = "default";
+
+ pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
+ pinctrl-1 = <&pa_gpio_pins>;
};
&pcie {