drivers: mmc: sdhci-brcmstb: fix usage of SD_PIN_SEL on BCM2712
authorJonathan Bell <jonathan@raspberrypi.com>
Fri, 9 Feb 2024 13:47:23 +0000 (13:47 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:38 +0000 (11:35 +0000)
commitfcd86d46c949c15822b73b277df35ebfb61d08b3
tree82928d0b55b00a3702c7b02d240f2ad025d6f398
parentb1bd6b5bbe9cec30a253923ea0cefa0c68eb3fe5
drivers: mmc: sdhci-brcmstb: fix usage of SD_PIN_SEL on BCM2712

The SDIO_CFG register SD_PIN_SEL conflates two settings - whether eMMC
HS or SD UHS timings are applied to the interface, and whether or not
the card-detect line is functional. SD_PIN_SEL can only be changed when
the SD clock isn't running, so add a bcm2712-specific clock setup.

Toggling SD_PIN_SEL at runtime means the integrated card-detect feature
can't be used, so this controller needs a cd-gpios property.

Also fix conditionals for usage of the delay-line PHY - no-1-8-v will
imply no bits set in hsemmc_mask or uhs_mask, so remove it.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/mmc/host/sdhci-brcmstb.c