WiFi SDIO fixes and improvements for Acer A500 and Nexus 7
Subsystems (2)
cover WiFi SDIO fixes and improvements for Acer A500 and Nexus 7
Hello!
I was debugging WiFi performance problems that I started to notice on Acer A500 and found couple problems. One discovered problem lays in a wrong SDIO PINCTRL configuration of A500 device-tree, others are found in MMC core and brcmfmac driver.
This series fixes the PINCTRL configuration and improves MMC clock setup of Acer A500 and Nexus 7 WiFi.
Big thanks to Wright Feng of Cypress who indirectly helped me to notice the PINCTRL bug by showing MMC IOS info of the BCM4329 setup that Wright uses, it lead me to re-check to the PINCTRL configuration!
Dmitry Osipenko (4):
ARM: tegra: acer-a500: Correct PINCTRL configuration
ARM: tegra: acer-a500: Set WiFi MMC clock rate to 50MHz
ARM: tegra: acer-a500: Use PLLC for WiFi MMC clk parent
ARM: tegra: nexus7: Use PLLC for WiFi MMC clk parent
.../arm/boot/dts/tegra20-acer-a500-picasso.dts | 18 +++++++++++++++--- .../tegra30-asus-nexus7-grouper-common.dtsi | 5 +++++ 2 files changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
2.27.0
PATCH 1/4 ARM: tegra: acer-a500: Correct PINCTRL configuration
The low-power-mode drive was set to DIV_4 for some of PINCTRL groups, while these groups should use DIV_1. This patch fixes the wrong PINCTRL configurations and adds a full drive-setup for the changed configs, just for completeness since the added values match the default configuration.
Now WiFi SDIO communication works properly using legacy signaling mode if SDIO BUS clocked at 50MHz, which is a maximum SDIO clock rate on Tegra20.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +10 -2
@@ -314,16 +314,24 @@ drive_ddc { nvidia,pins = "drive_ddc", "drive_vi1", "drive_sdio1"; + nvidia,pull-up-strength = <31>; + nvidia,pull-down-strength = <31>; nvidia,schmitt = <TEGRA_PIN_ENABLE>; - nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_4>; + nvidia,high-speed-mode = <TEGRA_PIN_DISABLE>; + nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>; + nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOWEST>; + nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOWEST>; }; drive_dbg { nvidia,pins = "drive_dbg", "drive_vi2", "drive_at1", "drive_ao1"; + nvidia,pull-up-strength = <31>; + nvidia,pull-down-strength = <31>; nvidia,schmitt = <TEGRA_PIN_ENABLE>; - nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_4>; + nvidia,high-speed-mode = <TEGRA_PIN_DISABLE>; + nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>; nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>; nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>; };
Signature · 1 line
2.27.0
PATCH 2/4 ARM: tegra: acer-a500: Set WiFi MMC clock rate to 50MHz
In reply to Dmitry OsipenkoPreviously 50MHz clock rate didn't work because of the wrong PINCTRL configuration used for SDIO pins. Now the PINCTRL config is corrected and the MMC clock rate could be bumped safely to 50MHz, increasing WiFi TX throughput by 20 Mbit/s and allowing to hit the maximum 40 Mbit/s.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +1 -1
@@ -744,7 +744,7 @@ mmc@c8000000 { #address-cells = <1>; #size-cells = <0>; - max-frequency = <25000000>; + max-frequency = <50000000>; keep-power-in-suspend; bus-width = <4>; non-removable;
Signature · 1 line
2.27.0
PATCH 3/4 ARM: tegra: acer-a500: Use PLLC for WiFi MMC clk parent
In reply to Dmitry OsipenkoThe default parent for all MMCs is PLLP, which is running at 216MHz on Tegra20 and 50MHz clock can't be derived from PLLP. The maximum SDIO clock rate is 50MHz, but this rate isn't achievable using PLLP.
Let's switch the WiFi MMC clk parent to PLLC in order to get true 50MHz. This patch doesn't fix any problems, it's just a minor improvement.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +4 -0
@@ -744,6 +744,10 @@ mmc@c8000000 { #address-cells = <1>; #size-cells = <0>; + assigned-clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; + assigned-clock-parents = <&tegra_car TEGRA20_CLK_PLL_C>; + assigned-clock-rates = <50000000>; + max-frequency = <50000000>; keep-power-in-suspend; bus-width = <4>;
Signature · 1 line
2.27.0
PATCH 4/4 ARM: tegra: nexus7: Use PLLC for WiFi MMC clk parent
In reply to Dmitry OsipenkoThe default parent for all MMCs is PLLP, which is running at 408MHz on Tegra30 and 50MHz clock can't be derived from PLLP. The maximum SDIO clock rate is 50MHz, but this rate isn't achievable using PLLP.
Let's switch the WiFi MMC clk parent to PLLC in order to get true 50MHz. This patch doesn't fix any problems, it's just a minor improvement.
--- arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +5 -0
@@ -976,6 +976,11 @@ mmc@78000400 { #address-cells = <1>; #size-cells = <0>; + assigned-clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_C>; + assigned-clock-rates = <50000000>; + + max-frequency = <50000000>; keep-power-in-suspend; bus-width = <4>; non-removable;
Signature · 1 line
2.27.0
Quoted 20 lines · Dmitry Osipenko
Hello!
I was debugging WiFi performance problems that I started to notice on Acer A500 and found couple problems. One discovered problem lays in a wrong SDIO PINCTRL configuration of A500 device-tree, others are found in MMC core and brcmfmac driver.
This series fixes the PINCTRL configuration and improves MMC clock setup of Acer A500 and Nexus 7 WiFi.
Big thanks to Wright Feng of Cypress who indirectly helped me to notice the PINCTRL bug by showing MMC IOS info of the BCM4329 setup that Wright uses, it lead me to re-check to the PINCTRL configuration!
Dmitry Osipenko (4):
ARM: tegra: acer-a500: Correct PINCTRL configuration
ARM: tegra: acer-a500: Set WiFi MMC clock rate to 50MHz
ARM: tegra: acer-a500: Use PLLC for WiFi MMC clk parent
ARM: tegra: nexus7: Use PLLC for WiFi MMC clk parent
Quoted 3 lines
.../arm/boot/dts/tegra20-acer-a500-picasso.dts | 18 +++++++++++++++--- .../tegra30-asus-nexus7-grouper-common.dtsi | 5 +++++ 2 files changed, 20 insertions(+), 3 deletions(-)
All patches applied to for-5.10/arm/dt, thanks.
Thierry