mbox series

[V2,0/3] Internal voltage control for platform drivers

Message ID 1537424558-17989-1-git-send-email-vbadigan@codeaurora.org (mailing list archive)
Headers show
Series Internal voltage control for platform drivers | expand

Message

Veerabhadrarao Badiganti Sept. 20, 2018, 6:22 a.m. UTC
Certain SDHC controllers may require that voltage switching happen after
sepcial conditions.

For SDHCI-MSM controllers, power irq is a signal from controller to SW
that it is ready for voltage switch. So added support to register
voltage regulators from the msm driver and use them.
Voltage switching from core layer is causing CRC/cmd timeout errors in
some chipsets.

Changes since RFC:
	- Added DT option to pass regulator load values the sdhci-msm driver
	should vote during BUS_ON and BUS_OFF power irq.
	- Removed quirk and used local flags in sdhci_add_host to to avoid
	scenario of both sdhci & sdhci-msm layer controlling the regulators.
	- Introduced two sdhci msm layer APIs to replace the respective
	sdhci layer APIs. This is again to stop sdhci layer from
	controlling regulators if sdhci_msm layer is present.

Changes since V1:
	- Introduced vqmmc_enabled flag in sdhci_host to track if vqmmc is
	enabled or not.
	- Updated DT option name with vendor prefix and unit suffix.
	- Introduced sdhci_msm_set_vmmc/vqmmc APIs for configuring vmmc and
	vqmmc. And moved all relevant code to these functions.
	- Removed pltfm_init_done flag from sdhci_msm_host which is not needed.
	As long as the device is in power-off state, SDHCI-MSM controller
	doesn't trigger power irq. So this flag is not needed.

Tested on: sdm845

Vijay Viswanath (3):
  mmc: sdhci: Allow platform controlled voltage switching
  dt-bindings: mmc: sdhci-msm: Add entries for passing load values
  mmc: sdhci-msm: Use internal voltage control

 .../devicetree/bindings/mmc/sdhci-msm.txt          |   6 +
 drivers/mmc/host/sdhci-msm.c                       | 211 ++++++++++++++++++++-
 drivers/mmc/host/sdhci.c                           |  22 ++-
 drivers/mmc/host/sdhci.h                           |   1 +
 4 files changed, 225 insertions(+), 15 deletions(-)