• Vicente Bergas's avatar
    arm64: dts: rockchip: Fix microSD in rk3399 sapphire board · 9d2ce061
    Vicente Bergas authored
    [ Upstream commit 88a20edf ]
    
    The microSD card slot in the Sapphire board is not working because of
    several issues:
     1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V
     and has a GPIO-based enable control.
     2.- The vqmmc power supply can provide up to 3.3V, but it is capped in
     the DTS to just 3.0V because of the vmmc capability. This results in a
     conflict from the mmc driver requesting an unsupportable voltage range
     from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the
     range up to 3.3V. The hw should be able to stand this 0.3V tolerance.
     See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c.
     3.- The card detect signal is non-working. There is a known conflict
     with jtag, but the workaround in drivers/soc/rockchip/grf.c does not
     work. Adding the broken-cd attribute to the DTS fixes the issue.
    Signed-off-by: default avatarVicente Bergas <vicencb@gmail.com>
    Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    9d2ce061
rk3399-sapphire.dtsi 12.6 KB