From patchwork Tue Jan 25 16:18:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 536759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78E03C4332F for ; Tue, 25 Jan 2022 16:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242464AbiAYQXD (ORCPT ); Tue, 25 Jan 2022 11:23:03 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:47138 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1583465AbiAYQSj (ORCPT ); Tue, 25 Jan 2022 11:18:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E0E22B81737; Tue, 25 Jan 2022 16:18:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0074C340E0; Tue, 25 Jan 2022 16:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643127510; bh=RclnUdWYXZYBackLuNulVETwidezdXIJdtI4dXHKaRg=; h=From:To:Cc:Subject:Date:From; b=nn+FYi+dxpTXsOslHHO1B1bjJ1B0JTUQI6zvYsgYEcZp6QRK2MutXDqxHTi5AStfW AObbqV/Hno0owGpeD+yEpTGBD1g0llZXdrHasBJVzOShCysQJ/IXxnSPuYSMg7EdGQ pakGDZ1BAOWGn0FABtRJHF4uN+YyldKRCd1BZBlrd5QeRYYIhrgK5xun0NiWdzx7vP DfvxVsMgEdscx8ZR+0XrTbEcWYN6DMuiNZ0qiENBS0fKYvaAH/q8hzeeQcV6QGO4BZ K8fyspxF6ofTYE8a8wwtII1f/sZRocN0NOdlC0ynnhl1ybbc9oIHCC6IPjMeRY3tld sZ/r0Dc/Xfp1A== From: Dinh Nguyen To: hminas@synopsys.com Cc: dinguyen@kernel.org, gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: usb: dwc2: add compatible "intel,socfpga-agilex-hsotg" Date: Tue, 25 Jan 2022 10:18:19 -0600 Message-Id: <20220125161821.1951906-1-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add the compatible "intel,socfpga-agilex-hsotg" to the DWC2 implementation, because the Agilex DWC2 implementation does not support clock gating. Signed-off-by: Dinh Nguyen --- Documentation/devicetree/bindings/usb/dwc2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml index f00867ebc147..481aaa09f3f2 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.yaml +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml @@ -53,6 +53,7 @@ properties: - const: st,stm32mp15-hsotg - const: snps,dwc2 - const: samsung,s3c6400-hsotg + - const: intel,socfpga-agilex-hsotg reg: maxItems: 1 From patchwork Tue Jan 25 16:18:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 536760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF8A3C433FE for ; Tue, 25 Jan 2022 16:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233165AbiAYQXA (ORCPT ); Tue, 25 Jan 2022 11:23:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1583467AbiAYQSi (ORCPT ); Tue, 25 Jan 2022 11:18:38 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196F9C061747; Tue, 25 Jan 2022 08:18:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE891B81745; Tue, 25 Jan 2022 16:18:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7BAEC340E6; Tue, 25 Jan 2022 16:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643127511; bh=KPhS8G2JErUeZZWslcOjR2HLQZQslkcvwy9PWOhcCdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ixx61h0LRzALsiO0OESBkCkry6HzzEBq6auEBXRj8s7n91qzMj2SL23YaaYNnw2ZK rdV2rA1JlUueFtWRVqmtiFxvPrhzNR+3mY/VOrwppJTdkf9joWe10etxXxWzWG01md pBAyvHMOMQ1mKVR5Nt3yNgzFmyd1BXgNNc8Lpy5Mz/IfIpTJH6WHEqKVmgquzOTYM0 UpxgvyDgQH8qpqA3UUs8gtllNBb2ZgPuNO7axVPhuhqt72FEOk3q2/32d3cTu4J9OU PjZmNwauXZmua9AlLdkFOvEMQhBEoSCfoIPv+W6oIcv4W4x6+DOKBLJiDvxLRgz3Bx X7QLUkRQ1i1AA== From: Dinh Nguyen To: hminas@synopsys.com Cc: dinguyen@kernel.org, gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/3] usb: dwc2: Add platform specific data for Intel's Agilex Date: Tue, 25 Jan 2022 10:18:20 -0600 Message-Id: <20220125161821.1951906-2-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220125161821.1951906-1-dinguyen@kernel.org> References: <20220125161821.1951906-1-dinguyen@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The DWC2 IP on the Agilex platform does not support clock-gating. Signed-off-by: Dinh Nguyen Acked-by: Minas Harutyunyan --- 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); From patchwork Tue Jan 25 16:18:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 537555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD946C433F5 for ; Tue, 25 Jan 2022 16:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238468AbiAYQWh (ORCPT ); Tue, 25 Jan 2022 11:22:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1583474AbiAYQSi (ORCPT ); Tue, 25 Jan 2022 11:18:38 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5221C061748; Tue, 25 Jan 2022 08:18:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9E12AB8173F; Tue, 25 Jan 2022 16:18:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4498C340EC; Tue, 25 Jan 2022 16:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643127512; bh=vRDpKZFZETn6MvZEf3bprTs1tghONakQ9rTVi1azmOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=azZLiM0c/MPpOicaF0zIjU5ZmbKWYo6YdfLmXMq+261w2UUr70AWAUlMTVkXoNLae gh6eWxuL+W6ogzagg0TnwQ84JvqLHByDQ7VH7wFQwIWMRw2vBfdAScXLbUZ1GskKDZ Pa2YPR5sJy526gIEa5SWrHoTbEYWHUCFYDEb37krcU+6egRG2+Y7K0q3T8CcozJ6oU vTj/u5Z/l/h8qrrQI+EKJxYbQOlVRikT/PFVwaaWg5e/yuOBiKPZry9En7GdFaWS9W ePmOKOdgqWV3FtZy56o/isczBLL4jsuwNwwYRoI/a5bpqC6fZUNn0ZkucdaJim0X5V nohnlZn1QoQOw== From: Dinh Nguyen To: hminas@synopsys.com Cc: dinguyen@kernel.org, gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: agilex: use the compatible "intel,socfpga-agilex-hsotg" Date: Tue, 25 Jan 2022 10:18:21 -0600 Message-Id: <20220125161821.1951906-3-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220125161821.1951906-1-dinguyen@kernel.org> References: <20220125161821.1951906-1-dinguyen@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The DWC2 USB controller on the Agilex platform does not support clock gating, so use the chip specific "intel,socfpga-agilex-hsotg" compatible. Signed-off-by: Dinh Nguyen --- arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi index 0dd2d2ee765a..f4270cf18996 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi @@ -502,7 +502,7 @@ uart1: serial@ffc02100 { }; usb0: usb@ffb00000 { - compatible = "snps,dwc2"; + compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2"; reg = <0xffb00000 0x40000>; interrupts = ; phys = <&usbphy0>; @@ -515,7 +515,7 @@ usb0: usb@ffb00000 { }; usb1: usb@ffb40000 { - compatible = "snps,dwc2"; + compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2"; reg = <0xffb40000 0x40000>; interrupts = ; phys = <&usbphy0>;