All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question
@ 2018-09-09 12:19 Adam Ford
  2018-09-10 11:40 ` Jean-Jacques Hiblot
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2018-09-09 12:19 UTC (permalink / raw)
  To: u-boot

I was having some issues with a DM3730 properly reading the card
detect on GPIO 127 and attributed it to being related to the pbias
register.  I have since submitted a patch to enable GPIO_127, but I am
not the best approach.

On the HSMMC driver, there are explicit commands to Disable extended
drain IO before changing PBIAS, because the MMC driver needs to enable
the PBIAS to make the MMC/SD interface operate correctly.

I also submitted a patch to enable pbias driver found in
power/regulator/pbias_regulator.c to work on omap3 boards by adding
the 'compatible' options.   I have been able to test that the pbias
driver and it appears to have been setup to work on the omap3, but I
have only tried to read the pbias values, I haven't tried to set the
pbias values with it.

Two questions:

What I was wondering is if there is some method to get the PBIAS
driver to set the PBIAS instead of having the HSMMC driver do it.  It
seems like one should be able to do this in the device tree, but it's
not clear on how.

The pbias driver does not seem to have the same checks for disabling
the extended drain IO before changing the PBIAS which seems to be
required per the DM3730 technical reference manual.  Would it make
sense to do this in here, or is it just better to leave it in the MMC
Driver?

adam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question
  2018-09-09 12:19 [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question Adam Ford
@ 2018-09-10 11:40 ` Jean-Jacques Hiblot
  2018-09-11 10:45   ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Jacques Hiblot @ 2018-09-10 11:40 UTC (permalink / raw)
  To: u-boot

Hi Adam,


On 09/09/2018 14:19, Adam Ford wrote:
> I was having some issues with a DM3730 properly reading the card
> detect on GPIO 127 and attributed it to being related to the pbias
> register.  I have since submitted a patch to enable GPIO_127, but I am
> not the best approach.
>
> On the HSMMC driver, there are explicit commands to Disable extended
> drain IO before changing PBIAS, because the MMC driver needs to enable
> the PBIAS to make the MMC/SD interface operate correctly.
>
> I also submitted a patch to enable pbias driver found in
> power/regulator/pbias_regulator.c to work on omap3 boards by adding
> the 'compatible' options.   I have been able to test that the pbias
> driver and it appears to have been setup to work on the omap3, but I
> have only tried to read the pbias values, I haven't tried to set the
> pbias values with it.
>
> Two questions:
>
> What I was wondering is if there is some method to get the PBIAS
> driver to set the PBIAS instead of having the HSMMC driver do it.  It
> seems like one should be able to do this in the device tree, but it's
> not clear on how.
I believe that the PBIAs must be configured by the HSMMC driver for 2 
reasons:
* PBIAS is used by HSMMC only.
* PBIAS must be updated when the MMC IO voltage is changed (see 
omap_hsmmc_set_io_regulator())

>
> The pbias driver does not seem to have the same checks for disabling
> the extended drain IO before changing the PBIAS which seems to be
> required per the DM3730 technical reference manual.  Would it make
> sense to do this in here, or is it just better to leave it in the MMC
> Driver?
IMO It would make sense to do it in the PBIAS driver as it is strongly 
advised
to toggle both at the same time.

JJ
>
> adam
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question
  2018-09-10 11:40 ` Jean-Jacques Hiblot
@ 2018-09-11 10:45   ` Adam Ford
  2018-09-14  7:59     ` Jean-Jacques Hiblot
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2018-09-11 10:45 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 10, 2018 at 6:40 AM Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
>
> Hi Adam,
>
>
> On 09/09/2018 14:19, Adam Ford wrote:
> > I was having some issues with a DM3730 properly reading the card
> > detect on GPIO 127 and attributed it to being related to the pbias
> > register.  I have since submitted a patch to enable GPIO_127, but I am
> > not the best approach.
> >
> > On the HSMMC driver, there are explicit commands to Disable extended
> > drain IO before changing PBIAS, because the MMC driver needs to enable
> > the PBIAS to make the MMC/SD interface operate correctly.
> >
> > I also submitted a patch to enable pbias driver found in
> > power/regulator/pbias_regulator.c to work on omap3 boards by adding
> > the 'compatible' options.   I have been able to test that the pbias
> > driver and it appears to have been setup to work on the omap3, but I
> > have only tried to read the pbias values, I haven't tried to set the
> > pbias values with it.
> >
> > Two questions:
> >
> > What I was wondering is if there is some method to get the PBIAS
> > driver to set the PBIAS instead of having the HSMMC driver do it.  It
> > seems like one should be able to do this in the device tree, but it's
> > not clear on how.
> I believe that the PBIAs must be configured by the HSMMC driver for 2
> reasons:
> * PBIAS is used by HSMMC only.
> * PBIAS must be updated when the MMC IO voltage is changed (see
> omap_hsmmc_set_io_regulator())

That function looks like it's contained in a set of #ifdef's which may
or may not be enabled.  I think it makes sense to enable it, but I
also noticed that
mmc_board_init() is manipulating the pbias settings.  Do you think
this is OK, or do you think we should remove the pbias references from
here and only
use them from omap_hsmmc_set_io_regulator()?

>
> >
> > The pbias driver does not seem to have the same checks for disabling
> > the extended drain IO before changing the PBIAS which seems to be
> > required per the DM3730 technical reference manual.  Would it make
> > sense to do this in here, or is it just better to leave it in the MMC
> > Driver?
> IMO It would make sense to do it in the PBIAS driver as it is strongly
> advised
> to toggle both at the same time.

I don't know the details of the other OMAP/Sitara SoC's, but
currently, there is an ifdef for the OMAP36XX inside mmc_board_init
which disables and enables the IO when toggling.  Are there other
SoC's that should be included and if so, do they use the same
registers?  I am basically trying to determine if the #ifdef for the
OMAP36XX is necessary or if it should always be included.

adam
>
> JJ
> >
> > adam
> >
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question
  2018-09-11 10:45   ` Adam Ford
@ 2018-09-14  7:59     ` Jean-Jacques Hiblot
  0 siblings, 0 replies; 4+ messages in thread
From: Jean-Jacques Hiblot @ 2018-09-14  7:59 UTC (permalink / raw)
  To: u-boot



On 11/09/2018 12:45, Adam Ford wrote:
> On Mon, Sep 10, 2018 at 6:40 AM Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
>> Hi Adam,
>>
>>
>> On 09/09/2018 14:19, Adam Ford wrote:
>>> I was having some issues with a DM3730 properly reading the card
>>> detect on GPIO 127 and attributed it to being related to the pbias
>>> register.  I have since submitted a patch to enable GPIO_127, but I am
>>> not the best approach.
>>>
>>> On the HSMMC driver, there are explicit commands to Disable extended
>>> drain IO before changing PBIAS, because the MMC driver needs to enable
>>> the PBIAS to make the MMC/SD interface operate correctly.
>>>
>>> I also submitted a patch to enable pbias driver found in
>>> power/regulator/pbias_regulator.c to work on omap3 boards by adding
>>> the 'compatible' options.   I have been able to test that the pbias
>>> driver and it appears to have been setup to work on the omap3, but I
>>> have only tried to read the pbias values, I haven't tried to set the
>>> pbias values with it.
>>>
>>> Two questions:
>>>
>>> What I was wondering is if there is some method to get the PBIAS
>>> driver to set the PBIAS instead of having the HSMMC driver do it.  It
>>> seems like one should be able to do this in the device tree, but it's
>>> not clear on how.
>> I believe that the PBIAs must be configured by the HSMMC driver for 2
>> reasons:
>> * PBIAS is used by HSMMC only.
>> * PBIAS must be updated when the MMC IO voltage is changed (see
>> omap_hsmmc_set_io_regulator())
> That function looks like it's contained in a set of #ifdef's which may
> or may not be enabled.  I think it makes sense to enable it, but I
> also noticed that
> mmc_board_init() is manipulating the pbias settings.  Do you think
> this is OK, or do you think we should remove the pbias references from
> here and only
> use them from omap_hsmmc_set_io_regulator()?
omap_hsmmc_set_io_regulator() can be used only with DM so it should stay 
in mmc_board_init() at least for the non-DM case

>
>>> The pbias driver does not seem to have the same checks for disabling
>>> the extended drain IO before changing the PBIAS which seems to be
>>> required per the DM3730 technical reference manual.  Would it make
>>> sense to do this in here, or is it just better to leave it in the MMC
>>> Driver?
>> IMO It would make sense to do it in the PBIAS driver as it is strongly
>> advised
>> to toggle both at the same time.
> I don't know the details of the other OMAP/Sitara SoC's, but
> currently, there is an ifdef for the OMAP36XX inside mmc_board_init
> which disables and enables the IO when toggling.  Are there other
> SoC's that should be included and if so, do they use the same
> registers?  I am basically trying to determine if the #ifdef for the
> OMAP36XX is necessary or if it should always be included.
I don't know enough about all the SOCs to say for sure. I'd say that 
this is required only for omap36xx.

>
> adam
>> JJ
>>> adam
>>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-14  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09 12:19 [U-Boot] PBIAS driver and MMC Interaction in U-Boot Question Adam Ford
2018-09-10 11:40 ` Jean-Jacques Hiblot
2018-09-11 10:45   ` Adam Ford
2018-09-14  7:59     ` Jean-Jacques Hiblot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.