Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1217411

Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages

From Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
Date 2015-09-02 10:30 +0200
Message-ID <q4bAD-82i-17@gated-at.bofh.it> (permalink)
References <q3Zzr-7B3-9@gated-at.bofh.it> <q3Zzs-7B3-23@gated-at.bofh.it> <q4alc-6kn-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> On Wed, 2 Sep 2015 01:02:17 +0530
> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
>> controller specific voltage switch configuration only for 1.8v usecase;
>> but it is required for others as well.
>>
>> For example, in case of PXA1928 SDH controller, we need to set different
>> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
>> control register).
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>> Note:
>> Currently ->voltage_switch() callback is only supported
>> in f_sdh30 driver. And I am not sure on the dependency of execution
>> sequence for that device. I could have moved ->voltage_switch() call
>> at one common place (above/below), but was not quite sure about it.
>> So, replicated/duplicated the call for other voltages.
>>
>>   drivers/mmc/host/sdhci.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 3dd295f..b59b76d 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>>   		/* Wait for 5ms */
>>   		usleep_range(5000, 5500);
>>
>> +		/* Some controller need to do more when switching */
>> +		if (host->ops->voltage_switch)
>> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
>
> Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> voltage_switch hook is to operate the IO pad registers, this seems not belong
> to the SDHC IP core.
>

Not quite sure whether regulator would be right fit for this.

Initially I was thinking of making use of pinconf framework, using
PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
doing it.

Probably, question for pinctrl maintainer. Looping Linus Walleji.

Also note that, this configuration is not applicable to all pins/pads,
only handpicked pads have this configuration (voltage selection on
pads).
And this configuration is not part of the same register map.

It is part of separate register map (AIB_EXT_REG_BASE), called IO
domain power control register.
And that

Thanks,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages Vaibhav Hiremath <vaibhav.hiremath@linaro.org> - 2015-09-01 21:40 +0200
  Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for  all other voltages Jisheng Zhang <jszhang@marvell.com> - 2015-09-02 09:10 +0200
    Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for  all other voltages Vaibhav Hiremath <vaibhav.hiremath@linaro.org> - 2015-09-02 10:30 +0200
      Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for  all other voltages Jisheng Zhang <jszhang@marvell.com> - 2015-09-02 10:40 +0200
        Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for  all other voltages Vaibhav Hiremath <vaibhav.hiremath@linaro.org> - 2015-09-02 13:50 +0200

csiph-web