Skip to content

Commit

Permalink
Add Synopsys DesignWare SD Host Controller driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobalanica committed Apr 29, 2023
1 parent 05c39cb commit 493fbbe
Show file tree
Hide file tree
Showing 9 changed files with 6,127 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This repository contains drivers for RK35xx-based platforms, with a focus on RK3
|USB 2.0 & 1.1|usbehci (Inbox)|🔴 Not working|Windows bugchecks if enabled. USBOHCI driver for USB 1.1 is missing in ARM64 builds.|
|PCIe 3.0 & 2.1|pci (Inbox)|🔴 Not working|MSI & ITS silicon bugs, bad ACPI descriptors|
|SATA|mshdc (Inbox)|🔴 Not working|If enabled, drive enumerates with no IDs and hangs.|
|eMMC||🔴 Not working||
|eMMC|[dwcsdhc](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/sd/dwcsdhc)|🟢 Working||
|SD/SDIO||🔴 Not working||
|CPU frequency scaling||🔴 Not working|Clocks limited at values set by UEFI.|
|HDMI output|MSBDD (Inbox)|🟢 Working|Single display with mode limited at 1080p 60 Hz, provided by UEFI GOP.|
Expand Down
13 changes: 13 additions & 0 deletions build/RockchipDrivers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Release|ARM64 = Release|ARM64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10452736-7C4F-4206-94F9-AD634213C9C4}.Debug|ARM64.ActiveCfg = Debug|ARM64
{10452736-7C4F-4206-94F9-AD634213C9C4}.Debug|ARM64.Build.0 = Debug|ARM64
{10452736-7C4F-4206-94F9-AD634213C9C4}.Debug|ARM64.Deploy.0 = Debug|ARM64
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
Expand Down
20 changes: 20 additions & 0 deletions drivers/sd/dwcsdhc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Synopsys DesignWare SD/eMMC Host Controller Driver
This is a driver for the DesignWare Core SD/eMMC Host Controller found in RK35xx SoCs.

It is a miniport that works in conjunction with sdport.sys, which implements the actual SD/SDIO/eMMC protocols and WDM interfaces.

## Hardware details
The controller itself is SDHCI-compliant, with some peculiarities and a few more on Rockchip's implementation:
- HS400 has a custom setting.
- the clock divider is not functional, requiring clock rate changes via CRU instead.
- the PHY Delay Lines (DLL) need to be configured depending on bus speed mode, especially for HS200/HS400(ES).

## Supported features
- ADMA2 transfers
- up to HS SDR52 speed mode (52 MB/s)

## To-do
* HS400 Enhanced Strobe (the other modes are not planned)

## Credits
The driver is based on Microsoft's [sdhc sample](https://github.com/microsoft/Windows-driver-samples/tree/main/sd/miniport/sdhc) with a few fixes from [bcm2836sdhc](https://github.com/raspberrypi/windows-drivers/tree/master/drivers/sd/bcm2836/bcm2836sdhc) in regard to request completion and interrupts handling.
Loading

0 comments on commit 493fbbe

Please sign in to comment.