Commit Graph

5 Commits

Author SHA1 Message Date
Emmanuel Vadot
ffdb1aa854 aw_mmc: Rename clock register defines consistently 2018-05-31 15:36:26 +00:00
Emmanuel Vadot
b091392eb8 aw_mmc: Correctly reset the mmc controller
Always disable FIFO access as we don't use it.
Rename some register bits so they are in sync with the register name.

While here add my copyright as I've probably wrote 70% of the code here.
2018-05-21 21:15:46 +00:00
Emmanuel Vadot
35a186191f aw_mmc: Do not fully init the controller in attach
Only do a reset of the controller at attach and init it at power_up.
We use to enable some interrupts in reset, only enable the interrupts
we are interested in when doing a request.
While here remove the regulators handling in power_on as it is very wrong
and will be dealt with in another commit.

Tested on: A31, A64
2018-05-12 13:13:34 +00:00
Emmanuel Vadot
ce0618bea2 allwinner: mmc: Multiple improvement
- Add a per compatible configuration struct
  - Not all SoC uses the same size for DMA transfert, add this into the
    configuration data
  - Use new timing mode for some SoC (A64 mmc)
  - Auto calibrate clock for A64 mmc/emmc
  - A64 mmc controller need masking of data0
  - Add support for vmmc/vqmmc regulator
  - Add more capabilities, r/w speed is better for eMMC
  - MMC_CAP_SIGNALING_180 gives weird result so do not enable it for now.
  - Add new register documented in H3/A64 user manual

Tested-On: Pine64-LTS (A64), eMMC still doesn't work
Tested-On: A64-Olinuxino (A64), sd and eMMC are working
Tested-On: NanoPi Neo Plus2 (H5), sd and eMMC are working
Tested-On: OrangePi PC2 (H5), sd only (no eMMC)
Tested-On: OrangePi One (H3), sd only (no eMMC)
Tested-On: BananaPi M2 (A31s), sd only (no eMMC)
2018-01-14 22:05:29 +00:00
Emmanuel Vadot
b5be541f1d Allwinner: mmc: Rename driver to aw_mmc and add a man page for it
Reviewed by:	bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D13616
2017-12-26 12:06:56 +00:00