diff mbox series

[2/3] usb: dwc2: Add platform specific data for Intel's Agilex

Message ID 20220125161821.1951906-2-dinguyen@kernel.org (mailing list archive)
State Accepted
Commit 3d8d3504d23351bcbab7be08f82c5dfabc3c9e0a
Headers show
Series [1/3] dt-bindings: usb: dwc2: add compatible "intel,socfpga-agilex-hsotg" | expand

Commit Message

Dinh Nguyen Jan. 25, 2022, 4:18 p.m. UTC
The DWC2 IP on the Agilex platform does not support clock-gating.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
 drivers/usb/dwc2/params.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Minas Harutyunyan Feb. 1, 2022, 5:15 a.m. UTC | #1
On 1/25/2022 8:18 PM, Dinh Nguyen wrote:
> The DWC2 IP on the Agilex platform does not support clock-gating.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>

> ---
>   drivers/usb/dwc2/params.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index d300ae3d9274..1306f4ec788d 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -82,6 +82,14 @@ static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg)
>   	p->phy_utmi_width = 8;
>   }
>   
> +static void dwc2_set_socfpga_agilex_params(struct dwc2_hsotg *hsotg)
> +{
> +	struct dwc2_core_params *p = &hsotg->params;
> +
> +	p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
> +	p->no_clock_gating = true;
> +}
> +
>   static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>   {
>   	struct dwc2_core_params *p = &hsotg->params;
> @@ -239,6 +247,8 @@ const struct of_device_id dwc2_of_match_table[] = {
>   	  .data = dwc2_set_stm32mp15_fsotg_params },
>   	{ .compatible = "st,stm32mp15-hsotg",
>   	  .data = dwc2_set_stm32mp15_hsotg_params },
> +	{ .compatible = "intel,socfpga-agilex-hsotg",
> +	  .data = dwc2_set_socfpga_agilex_params },
>   	{},
>   };
>   MODULE_DEVICE_TABLE(of, dwc2_of_match_table);
diff mbox series

Patch

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index d300ae3d9274..1306f4ec788d 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -82,6 +82,14 @@  static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg)
 	p->phy_utmi_width = 8;
 }
 
+static void dwc2_set_socfpga_agilex_params(struct dwc2_hsotg *hsotg)
+{
+	struct dwc2_core_params *p = &hsotg->params;
+
+	p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
+	p->no_clock_gating = true;
+}
+
 static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
 {
 	struct dwc2_core_params *p = &hsotg->params;
@@ -239,6 +247,8 @@  const struct of_device_id dwc2_of_match_table[] = {
 	  .data = dwc2_set_stm32mp15_fsotg_params },
 	{ .compatible = "st,stm32mp15-hsotg",
 	  .data = dwc2_set_stm32mp15_hsotg_params },
+	{ .compatible = "intel,socfpga-agilex-hsotg",
+	  .data = dwc2_set_socfpga_agilex_params },
 	{},
 };
 MODULE_DEVICE_TABLE(of, dwc2_of_match_table);