Re: [PATCH 4/4] mmc: pwrseq-simple: add disable-post-power-on option
From: Matt Ranostay <hidden>
Date: 2017-01-13 03:12:51
Also in:
linux-mmc
On Thu, Jan 12, 2017 at 7:57 AM, Ulf Hansson [off-list ref] wrote:
On 12 January 2017 at 05:43, Matt Ranostay [off-list ref] wrote:quoted
On Wed, Jan 11, 2017 at 2:55 PM, Ulf Hansson [off-list ref] wrote:quoted
On 9 January 2017 at 05:53, Matt Ranostay [off-list ref] wrote:quoted
On Fri, Dec 30, 2016 at 12:05 AM, Linus Walleij [off-list ref] wrote:quoted
On Mon, Dec 19, 2016 at 1:01 AM, Matt Ranostay [off-list ref] wrote:quoted
* SD8787 has a "powerdown" line, and CW1200 has a "powerup" line.. I know this is a simple logic inversion.If this is a GPIO line, the GPIO subsystem can flag a line for inverted logic. GPIO_ACTIVE_LOW from device tree for example.Slight ping on Ulf on this thread :).Thanks, sorry for the delay!quoted
I do understand the inverted logic flag but that doesn't help if there are different logic states between various chipsets.For cw1200 (I looked at code from an old ST-Ericsson vendor tree), the sequence is as follows: 1) Enable clock/power to the card/chip. 2) Assert GPIO pin. I assume this also can be done before the clock/power is enabled. 3) Wait some time (~50ms). 4) De-assert GPIO pin. 5) Wait some time (~20ms) 6) Assert GPIO pin. 7) Wait some time (~32ms). At power off, the GPIO pin is de-asserted and of course also the clock/power is disabled. Just to make sure we have all the relevant logic. Looking at mmc pwrseq simple, perhaps we can extend this to deal with GPIOs that needs to be *toggled*, as this is not just reset GPIOs. Then we also need to deal with the delays in-between the toggling.Wouldn't we need to have a per chip function for each device supported? As well document gpios? I suspect we'd need an array ofI was hoping to avoid this, but the more I look at it, it seems inevitable.quoted
gpios defined in device tree since different devices will likely have various numbers of pins to toggleMaybe we can think of a clever way to combine cw1200 with your case? Perhaps a "mmc pwrseq toggle". :-) If not, please go ahead an repost a device specific mmc pwrseq for your case.
I think the best solution for now. We can merge the two solutions latter down the road. Thanks, Matt
I realize this would be a good opportunity for me to work on enabling support for cw1200 on ux500, but as the implementation of the clock/power control also needs to be up-streamed, I am quite far from being done. Kind regards Uffe