Search Linux Wireless

Re: [RFC PATCH] brcmfmac: add 43751 SDIO ids and initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marc,

On Mon, Mar 13, 2023 at 6:09 PM Marc Gonzalez <marc.w.gonzalez@xxxxxxx> wrote:
[...]
> > Wrapping mmc_send_io_op_cond() in a loop
> > makes it work on the second try.
>
> Almost there, I think, I hope :)
>
> DT prop "post-power-on-delay-ms" looks like what I needed all along.
> It exists both for host (default 10 ms) and for pwrseq_simple (default 0 apparently).
I think you're on the right track here!

[...]
> QUESTION:
> It's not clear to me why we sleep twice for host->ios.power_delay_ms?
I'm not sure but I think host->ios.power_delay_ms is independent from
the post-power-on-delay-ms property of "mmc-pwrseq-simple".

> Looks like all I need is to add post-power-on-delay-ms = <100>; to
>
>         sdio_pwrseq: sdio-pwrseq {
>                 compatible = "mmc-pwrseq-simple";
>                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
>                 clocks = <&wifi32k>;
>                 clock-names = "ext_clock";
>         };
I found the following code in the vendor RTL8822CS driver [0].
Simplified version:
    for (i = 0; i <= 50; i++) {
       msleep(10);
        if (sdhci_device_attached())
           break;
   }
(so a delay of up to 500ms)

Also I found this code [1] in the same repo:
    mmc_pm_gpio_ctrl("rtl8189es_vdd_en", 1);
    udelay(100);
    mmc_pm_gpio_ctrl("rtl8189es_vcc_en", 1);
    udelay(50);

So like I said above: I think you're going in the right direction!


Best regards,
Martin


[0] https://github.com/chewitt/RTL8822CS/blob/main/platform/platform_sprd_sdio.c#L55-L62
[1] https://github.com/chewitt/RTL8822CS/blob/main/platform/platform_ARM_SUNxI_sdio.c#L35-L43




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux