arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
authorVicente Bergas <vicencb@gmail.com>
Mon, 17 Sep 2018 13:47:14 +0000 (15:47 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Sat, 22 Sep 2018 20:49:22 +0000 (22:49 +0200)
commit88a20edf76091ee7f1bb459b89d714d53f0f8940
tree9eacea80feced47f080e02cec9974d33bad3362e
parent501500e65fa96f899230d66153fefd780f08dd34
arm64: dts: rockchip: Fix microSD in rk3399 sapphire board

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: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi