Page MenuHomeFreeBSD

Add support for RK3399 emmc
Needs ReviewPublic

Authored by ganbold on May 4 2019, 11:21 AM.



Add emmc support for Rockchip RK3399 SoC.

Diff Detail

rS FreeBSD src repository
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 25390

Event Timeline

ganbold created this revision.May 4 2019, 11:21 AM
manu requested changes to this revision.May 4 2019, 11:35 AM

It missed the phy, so currently this works because u-boot already setup it for us.


This needs to be undef ifdef EXT_RESOURCES.
Same comment for most of the thing below.

This revision now requires changes to proceed.May 4 2019, 11:35 AM
andrew added a subscriber: andrew.May 4 2019, 11:48 AM
andrew added inline comments.

This should be moved from probe to attach.

ganbold updated this revision to Diff 57034.May 4 2019, 2:52 PM

Updated. In case pf phy, we first maybe need separate driver for emmc-phy.

emaste added a subscriber: emaste.May 13 2019, 3:03 PM
ganbold updated this revision to Diff 59337.Wed, Jul 3, 6:41 AM

Updated (phy enabled)

ganbold updated this revision to Diff 59340.Wed, Jul 3, 11:06 AM

Fix register definitions

manu added a comment.Mon, Jul 15, 6:25 PM

For rockchip there is a clock exposed (via the clock-output-names property) but you don't register it and you try to get it in the emmc-phy review (D20840).

This means that the sdhci driver should first expose the clock, wait for the phy driver with the help of newpass to be attached and then resume the work on sd/emmc detection.
I also think that you should subclass the driver since this will add a lot of rockchip related code.

ganbold updated this revision to Diff 59802.Tue, Jul 16, 12:16 PM

Updated accordingly.

manu added inline comments.Tue, Jul 16, 12:44 PM

You should validate that this was the emmcclock that was requested based on the cells content and return ENXIO if it wasn't



ganbold updated this revision to Diff 59804.Tue, Jul 16, 2:29 PM

Updated accordingly.

ganbold updated this revision to Diff 59861.Thu, Jul 18, 3:01 AM

Looks like phydev_if.h is not needed, and no other functional changes.