Commit 4c19cc14 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Felipe Balbi

usb: dwc3: exynos: Add support for Exynos5433 variant with all clocks

DWC3 variant found in Exynos5433 SoCs requires keeping all DRD30/UHOST30
clocks enabled all the time the driver does any access to DWC3 registers,
otherwise external abort happens. So far DWC3 hardware module worked with
samsung,exynos5250-dwusb3 compatible only by luck when built into kernel:
all DRD30 clocks were left enabled by bootloader and later kept enabled
by the DRD PHY driver. However, if one tried to use Exnos DWC3 driver as
a module or performed system suspend/resume cycle, external abort
happened. This patch finally fixes this issue.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 9f216836
...@@ -19,6 +19,7 @@ Exception for clocks: ...@@ -19,6 +19,7 @@ Exception for clocks:
"cavium,octeon-7130-usb-uctl" "cavium,octeon-7130-usb-uctl"
"qcom,dwc3" "qcom,dwc3"
"samsung,exynos5250-dwusb3" "samsung,exynos5250-dwusb3"
"samsung,exynos5433-dwusb3"
"samsung,exynos7-dwusb3" "samsung,exynos7-dwusb3"
"sprd,sc9860-dwc3" "sprd,sc9860-dwc3"
"st,stih407-dwc3" "st,stih407-dwc3"
......
...@@ -83,6 +83,8 @@ Required properties: ...@@ -83,6 +83,8 @@ Required properties:
- compatible: should be one of the following - - compatible: should be one of the following -
"samsung,exynos5250-dwusb3": for USB 3.0 DWC3 controller on "samsung,exynos5250-dwusb3": for USB 3.0 DWC3 controller on
Exynos5250/5420. Exynos5250/5420.
"samsung,exynos5433-dwusb3": for USB 3.0 DWC3 controller on
Exynos5433.
"samsung,exynos7-dwusb3": for USB 3.0 DWC3 controller on Exynos7. "samsung,exynos7-dwusb3": for USB 3.0 DWC3 controller on Exynos7.
- #address-cells, #size-cells : should be '1' if the device has sub-nodes - #address-cells, #size-cells : should be '1' if the device has sub-nodes
with 'reg' property. with 'reg' property.
......
...@@ -162,6 +162,12 @@ static const struct dwc3_exynos_driverdata exynos5250_drvdata = { ...@@ -162,6 +162,12 @@ static const struct dwc3_exynos_driverdata exynos5250_drvdata = {
.suspend_clk_idx = -1, .suspend_clk_idx = -1,
}; };
static const struct dwc3_exynos_driverdata exynos5433_drvdata = {
.clk_names = { "aclk", "susp_clk", "pipe_pclk", "phyclk" },
.num_clks = 4,
.suspend_clk_idx = 1,
};
static const struct dwc3_exynos_driverdata exynos7_drvdata = { static const struct dwc3_exynos_driverdata exynos7_drvdata = {
.clk_names = { "usbdrd30", "usbdrd30_susp_clk", "usbdrd30_axius_clk" }, .clk_names = { "usbdrd30", "usbdrd30_susp_clk", "usbdrd30_axius_clk" },
.num_clks = 3, .num_clks = 3,
...@@ -172,6 +178,9 @@ static const struct of_device_id exynos_dwc3_match[] = { ...@@ -172,6 +178,9 @@ static const struct of_device_id exynos_dwc3_match[] = {
{ {
.compatible = "samsung,exynos5250-dwusb3", .compatible = "samsung,exynos5250-dwusb3",
.data = &exynos5250_drvdata, .data = &exynos5250_drvdata,
}, {
.compatible = "samsung,exynos5433-dwusb3",
.data = &exynos5433_drvdata,
}, { }, {
.compatible = "samsung,exynos7-dwusb3", .compatible = "samsung,exynos7-dwusb3",
.data = &exynos7_drvdata, .data = &exynos7_drvdata,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment