aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd/rtsx_pci.h
AgeCommit message (Collapse)AuthorFilesLines
2013-10-23mfd: rtsx: Modify rts5249_optimize_phyWei WANG1-0/+53
In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. It is a little different between simulation and real chip. We have no idea about which configuration is better before tape-out. We set default settings according to simulation, but need to tune these parameters after getting the real chip. I can't explain every change in detail here. The below information is just a rough description: PHY_REG_REV: Disable internal clkreq_tx, enable rx_pwst PHY_BPCR: No change, just turn the magic number to macro definitions PHY_PCR: Change OOBS sensitivity, from 60mV to 90mV PHY_RCR2: Control charge-pump current automatically PHY_FLD4: Use TX cmu reference clock PHY_RDR: Change RXDSEL from 30nF to 1.9nF PHY_RCR1: Change the duration between adp_st and asserting cp_en from 0.32 us to 0.64us PHY_FLD3: Adjust internal timers PHY_TUNE: Fine tune the regulator12 output voltage Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2013-08-30mfd: mmc: rtsx: Change default tx phaseWei WANG1-0/+15
The default phase can meet most cards' requirement, but it is not the optimal one. In some extreme situation, the rx phase point produced by the following tuning process will drift quite a distance. Before tuning UHS card, this patch will set a more proper initial tx phase point, which is calculated from statistic data, and can achieve a much better tx signal quality. Signed-off-by: Wei WANG <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Chris Ball <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-08-20mfd: rtsx: Copyright modificationsWei WANG1-2/+1
Update copyright date, remove author address and add Roger Tseng. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-08-20mfd: rtsx: Configure to enter a deeper power-saving mode in S3Wei WANG1-1/+1
Set a bit to enable rts5227 and rts5249 to enter a deeper internal power-saving mode in S3, and recover it after resuming. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-08-20mfd: rtsx: Clear hardware PFM mode in rtl8411bWei WANG1-0/+1
Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some situation registers in 0xFDxx domain can't be accessed. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-08-20mfd: rtsx: Add shutdown callback in rtsx_pci_driverWei WANG1-2/+11
Some actions to clear power state should be handled in .shutdown callback in rtsx_pci_driver. This patch adopts the following measures to catch this goal: 1. Add a function rtsx_pci_power_off to abstract the common ops in .shutdown and .suspend 2. Add pcr->ops->force_power_down to fulfill the individual action for each reader model Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-08-20mfd: rtsx: Read vendor setting from config spaceWei WANG1-1/+33
Normally OEMs will set vendor setting to the config space of Realtek card reader in BIOS stage. This patch reads the setting at the first, and configure the internal registers according to it, to improve card reader's compatibility condition. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-06-11mfd: rtsx: Add support for RTL8411BRoger Tseng1-0/+1
Adding support of model RTL8411B. Since the model is similar to RTL8411, differences are implemented in rtl8411.c. Signed-off-by: Roger Tseng <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-04-19mfd: rtsx: Support RTS5249Wei WANG1-0/+36
RTS5249 supports SD UHS-II interface. In order to support SD UHS-II,the definitions of some internal registers of RTS5249 have to be modified and are different from its predecessors. So we need this patch to ensure RTS5249 can work, even SD/MMC stack doesn't support UHS-II interface. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-02-14mfd: rtsx: Fix issue that booting OS with SD card insertedWei WANG1-0/+2
Realtek card reader supports both SD and MS card. According to the settings of rtsx MFD driver, SD host will be probed before MS host. If we boot/reboot Linux with SD card inserted, the resetting flow of SD card will succeed, and the following resetting flow of MS is sure to fail. Then MS upper-level driver will ask rtsx driver to turn power off. This request leads to the result that the following SD commands fail and SD card can't be accessed again. In this commit, Realtek's SD and MS host driver will check whether the card that upper driver requesting is the one existing in the slot. If not, Realtek's host driver will refuse the operation to make sure the exlusive accessing at the same time. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-02-14mfd: rtsx: Support RTS5227Roger Tseng1-0/+5
Support new model RTS5227. Signed-off-by: Roger Tseng <[email protected]> Reviewed-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-02-14mfd: rtsx: Fix typo in commentWei WANG1-1/+1
Fix a misspelling word in comment Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-01-27mfd: rtsx: Add clock divider hookWei WANG1-0/+1
Add callback function conv_clk_and_div_n to convert between SSC clock and its divider N. For rtl8411, the formula to calculate SSC clock divider N is different with the other card reader models. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2013-01-27mfd: rtsx: Add output voltage switch hookWei WANG1-4/+20
Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. This is needed as rtl8411 has a specific switch output voltage procedure. Signed-off-by: Wei WANG <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-11-15drivers/mfd: Add realtek pcie card reader driverWei WANG1-0/+794
Realtek PCI-E card reader driver adapts requests from upper-level sdmmc/memstick layer to the real physical card reader. Signed-off-by: Wei WANG <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Tested-by: Borislav Petkov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>