HomeFreeBSD

sdhci_fsl_fdt: Add support for HS200/HS400 modes

Description

sdhci_fsl_fdt: Add support for HS200/HS400 modes

The controller requires some custom logic to perform MMC tuning
and to later switch to HS400 mode. Implement it supplying mmcbr_tune
and sdhci_set_uhs_timing devmethods respectivly. Since the latter
is called unconditionally when the ios is updated we need to keep
track of the tuning state in sc and execute the HS400 switch logic
only when required.

Two HS200/HS400 related errata were implemented.

  1. In HS400 modes the clock divisors are limited to 4, 8, 12. Apply it by falling back to the closes, higher divider when needed.
  2. Hardware tuning procedure can sometimes fails. If that is the case fallback to the software tuning.

Reviewed by: manu, mw
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D33320

Details

Provenance
hum_semihalf.comAuthored on Nov 3 2021, 9:38 AM
wmaCommitted on Dec 8 2021, 10:21 AM
Reviewer
manu
Differential Revision
D33320: sdhci_fsl_fdt: Add support for HS200/HS400 modes
Parents
rGec9333c3aac3: sdhci_fsl_fdt: Fix vccq reconfiguration
Branches
Unknown
Tags
Unknown