Page MenuHomeFreeBSD

sdhci_xenon: improve the VCCQ voltage switch sequence
ClosedPublic

Authored by mw on May 31 2021, 7:56 AM.

Details

Summary

Improve the VCCQ voltage switch, so that to properly
handle the SDHCI_HOST_CONTROL2 register signaling
flags, along with manipulating the regulator.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mw requested review of this revision.May 31 2021, 7:56 AM
mw created this revision.
sys/dev/sdhci/sdhci_xenon.c
424

Is this delay needed ? The regulator set_voltage function should write to the delay variable and the regulator framework will sleep.

sys/dev/sdhci/sdhci_xenon.c
424

According to SD Host Controller Simplified Specification 4.20: 'Host driver should take more than 5ms for stable time of host voltage regulator from changing 1.8V Signaling Enable. Specific host driver may use a specific time, which is provided by host system, instead of using 5ms.'

I prefer to keep it explicitly here, even if regulator_set_voltage adds its own. Hint - Linux and EDK2 do it in generic code, it works and I'd rather not deviate :)

sys/dev/sdhci/sdhci_xenon.c
424

Could you add a comment quoting the spec then please ?
(Same for below)

mw marked an inline comment as done.
This revision is now accepted and ready to land.Jun 2 2021, 7:01 AM