Skip to content

Commit

Permalink
Add Synopsys DWC MSHC driver
Browse files Browse the repository at this point in the history
This is an sdport-based miniport driver for the two MSHC instances on
RK3588: one for SD card slot, the other for SDIO Wi-Fi.

Features:
- Speed modes: Default, HS, SDR50, SDR104
- Internal 32-bit scatter/gather DMA support
- Card detection
- Crashdump support

To-do:
- Test eMMC support
- SDIO (e.g. CMD53)
- Support SD version 1 cards (they don't respond to CMD8 by design,
which makes sdport assume it's not an SD card at all)

Known issues:
- Plugging/unplugging the card quickly can lead to a bugcheck. This
happens due to race conditions in sdport w.r.t. card removal and
request completion. It ends up dereferencing a NULL pointer, which was
supposed to be the outstanding request.

Signed-off-by: Mario BΔƒlΔƒnicΔƒ <[email protected]>
  • Loading branch information
mariobalanica committed Jun 20, 2024
1 parent 0b3a26b commit aef3a17
Show file tree
Hide file tree
Showing 12 changed files with 6,090 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This repository contains drivers for RK35xx-based platforms, with a focus on RK3
|PCIe 3.0 & 2.1|pci (Inbox)|🟑 Partially working|Devices may work if drivers are available for them. Known issues include:<br> - NVMe SSDs do not work with in-box storport.sys (issue #6, workaround available).<br> - Devices that require cache-coherent bus or MSI do not work (e.g. Qualcomm Wi-Fi cards).<br> - Devices that require a root PCIe port do not work (e.g. XHCI).|
|SATA|storahci (Inbox)|πŸ”΄ Not working|SATA SSDs do not work with in-box storport.sys (issue #6, workaround available).|
|eMMC|[dwcsdhc](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/sd/dwcsdhc)|🟒 Working||
|SD/SDIO||πŸ”΄ Not working||
|SD/SDIO|[dwcmshc](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/sd/dwcmshc)|🟒 Working||
|CPU frequency scaling||πŸ”΄ Not working|Clocks limited at values set by UEFI.|
|HDMI output|MSBDD (Inbox)|🟑 Partially working|Single display with mode limited at 1080p 60 Hz, provided by UEFI GOP.|
|HDMI input||πŸ”΄ Not working||
Expand Down
8 changes: 8 additions & 0 deletions build/RockchipDrivers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dwcsdhc", "..\drivers\sd\dwcsdhc\dwcsdhc.vcxproj", "{10452736-7C4F-4206-94F9-AD634213C9C4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dwcmshc", "..\drivers\sd\dwcmshc\dwcmshc.vcxproj", "{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rk3xi2c", "..\drivers\i2c\rk3xi2c\rk3xi2c.vcxproj", "{B3E71397-9BE4-492B-AAED-4D056E59CB1F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rk3xgpio", "..\drivers\gpio\rk3xgpio\rk3xgpio.vcxproj", "{A80FE9DD-C140-40F6-A3F4-55A2A55BFAD4}"
Expand Down Expand Up @@ -47,6 +49,12 @@ Global
{10452736-7C4F-4206-94F9-AD634213C9C4}.Release|ARM64.ActiveCfg = Release|ARM64
{10452736-7C4F-4206-94F9-AD634213C9C4}.Release|ARM64.Build.0 = Release|ARM64
{10452736-7C4F-4206-94F9-AD634213C9C4}.Release|ARM64.Deploy.0 = Release|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Debug|ARM64.Build.0 = Debug|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Debug|ARM64.Deploy.0 = Debug|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Release|ARM64.ActiveCfg = Release|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Release|ARM64.Build.0 = Release|ARM64
{7C5FC1E9-1DB8-4A07-A1F3-6CE62D694AD8}.Release|ARM64.Deploy.0 = Release|ARM64
{B3E71397-9BE4-492B-AAED-4D056E59CB1F}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B3E71397-9BE4-492B-AAED-4D056E59CB1F}.Debug|ARM64.Build.0 = Debug|ARM64
{B3E71397-9BE4-492B-AAED-4D056E59CB1F}.Debug|ARM64.Deploy.0 = Debug|ARM64
Expand Down
Loading

0 comments on commit aef3a17

Please sign in to comment.