Isso Posted July 15, 2019 Posted July 15, 2019 I'm bringing up a custom Allwinner H3 board with Armbian. I created the required conf, u-boot and kernel patches and built the image. The SD card connector card detect pin is active high (high when card is inserted) unlike all the references available online. (Orange pis and nano pis) U-boot SPL refused to complete the boot sequence with the following error message: U-Boot SPL 2019.04-armbian (Jul 14 2019 - 17:19:54 +0000) DRAM: 512 MiB Trying to boot from MMC1: no card present spl: mmc init failed with error: -123 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Here is a snippet from the relevant part in the device tree: &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ /* no cd-inverted as the card detect is active high already */ status = "okay"; }; Changes in the device tree's mmc0 section didn't solve it. (tried: non-removable and even GPIO_ACTIVE_LOW with cd-inverted)It only worked when I built u-boot with CONFIG_MMC0_CD_PIN="" in the config. (Default is PF6 in Sun8i) I want to keep the flag with PF6 (as this is the pin I'm using) but active high instead of low. Is there a flag to change the polarity of the CD during early in the boot stage?
Recommended Posts