mmc: sdhci-of-aspeed: Expose clock phase controls
authorAndrew Jeffery <andrew@aj.id.au>
Thu, 14 Jan 2021 03:14:29 +0000 (13:44 +1030)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Feb 2021 10:54:47 +0000 (11:54 +0100)
commit2fc88f92359df753fc892f3b3d0e1d69ef6c620c
tree8cbebf1d34cffe32cad13670b09dc8f3dc6373ad
parent3561afa02605b398d1b98e1ce913ea6411cdc5dd
mmc: sdhci-of-aspeed: Expose clock phase controls

The Aspeed SD/eMMC controllers expose configurable clock phase
correction by inserting delays of up to 15 logic elements in length into
the bus clock path. The hardware supports independent configuration for
both bus directions on a per-slot basis.

The timing delay per element encoded in the driver was experimentally
determined by scope measurements.

The phase controls for both slots are grouped together in a single
register of the global register block of the SD/MMC controller(s), which
drives the use of a locking scheme between the SDHCIs and the global
register set.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20210114031433.2388532-3-andrew@aj.id.au
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-aspeed.c