HomeFreeBSD

mmc_fdt: handle broken-cd property

Description

mmc_fdt: handle broken-cd property

The documented properties [1] for card-detection are one of:

  • cd-gpios
  • non-removable
  • broken-cd

In cd_setup() we handle the first two, but not the latter, resulting in
a silently undetected card on an affected system.

To work around this, force cd_disabled when broken-cd is specified, so
that the card detect helper function gets to run. A more complete
solution would implement some kind of polling mechanism to detect the
card's presence or removal.

Some variants of the Allwinner D1, such as the Lichee Rv, specify this
property in the mmc0 device node.

[1] sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml

Reported by: Haowu Ge <gehaowu@bitmoe.com>
Tested by: Haowu Ge <gehaowu@bitmoe.com>
Reviewed by: imp, manu, mmel
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53546

Details

Provenance
mhorneAuthored on Wed, Nov 5, 2:37 PM
Reviewer
imp
Differential Revision
D53546: mmc_fdt: handle broken-cd property
Parents
rGf939619a2f98: UPDATING: mention pf's nat64 support
Branches
Unknown
Tags
Unknown