hello,
I am trying to boot OpenBSD on LicheePi Zero (Allwinner V3s) and
I found this board has "broken-cd" DT binding.
So we cannot attach microSD device without sximmc(4) modification.
There is an idea that treat broken-cd as non-removable;
always card is present, like attached diff.
But broken-cd means not non-removable, we can detect card presence
with using SD's DATA[3] line (but it limits 1bit data width and
slow data transfer rate).
Does anyone have good ideas?
Index: sximmc.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/sximmc.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 sximmc.c
--- sximmc.c 29 Dec 2018 14:09:00 -0000 1.8
+++ sximmc.c 5 Feb 2019 23:09:38 -0000
@@ -646,7 +646,9 @@ sximmc_card_detect(sdmmc_chipset_handle_
struct sximmc_softc *sc = sch;
int inverted, val;
- if (OF_getproplen(sc->sc_node, "non-removable") == 0)
+ /* XXX treat broken-cd as non-removable */
+ if (OF_getproplen(sc->sc_node, "non-removable") == 0 ||
+ OF_getproplen(sc->sc_node, "broken-cd") == 0)
return 1;
val = gpio_controller_get_pin(sc->sc_gpio);
--
SASANO Takayoshi (JG1UAA) <[email protected]>