linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Modeling the register bit as a voltage regulator for SDHI/eMMC
@ 2024-04-19 10:55 Lad, Prabhakar
  2024-04-19 12:26 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Lad, Prabhakar @ 2024-04-19 10:55 UTC (permalink / raw)
  To: Wolfram Sang, Geert Uytterhoeven; +Cc: Fabrizio Castro, Biju Das, Linux-Renesas

Hi Wolfram and Geert,

On the RZ/V2H SoC for the SDHI IP block we have SD_STATUS register
(page 1503 in [0]) which has a SD_IOVS bit that controls SDmIOVS pin.
SDmIOVS is a multiplexed pin when '0' is written to SD_IOVS bit the
pin state will be '0' and when '1' is written the pin state is '1'.
So instead of a GPIO pin acting as regulator this SDmIOVS can be used
to toggle 0/1 which will control the pmic to allow us for switching
between 1.8V and 3.3V.

There is a similar instance of regulator driver [1] which is
controlled via register bit write, but in our case the SD_STATUS
register is part of the SDHI IP block itself.

What approach would you suggest in this case?

[0] https://www.renesas.com/us/en/document/mah/rzv2h-group-users-manual-hardware?r=25471761
[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml

Cheers,
Prabhakar

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

* Re: Modeling the register bit as a voltage regulator for SDHI/eMMC
  2024-04-19 10:55 Modeling the register bit as a voltage regulator for SDHI/eMMC Lad, Prabhakar
@ 2024-04-19 12:26 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2024-04-19 12:26 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Geert Uytterhoeven, Fabrizio Castro, Biju Das, Linux-Renesas

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hi Prabhakar,

> So instead of a GPIO pin acting as regulator this SDmIOVS can be used
> to toggle 0/1 which will control the pmic to allow us for switching
> between 1.8V and 3.3V.

Does the PMIC have a Linux driver? If so, then SDmIOVS would be really a
GPIO telling the PMIC what to do? If not...

> There is a similar instance of regulator driver [1] which is
> controlled via register bit write, but in our case the SD_STATUS
> register is part of the SDHI IP block itself.

... I could imagine that the SDHI driver itself exposes a regulator
driver. Just without a <reg>-property. The compatible will induce which
register and bit to use.

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-04-19 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 10:55 Modeling the register bit as a voltage regulator for SDHI/eMMC Lad, Prabhakar
2024-04-19 12:26 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).