From patchwork Tue Jun 21 08:45:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 12888863 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3786C433EF for ; Tue, 21 Jun 2022 08:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=x0BATS07al8hFvxYl+ynPkkJ3fNav63wMWELYAK4VNE=; b=uCslinVroKOe0x SgE/2JWQebw1Q1wxhZX9j4QUHk6Yb9tCD9qfq5A2OtrX+z81yIDCph4t7376UnfXUesSfqva23nXB S3pNtVxTU3HzuybPOOabidRtevwKqLXv81rXakQpvitNA8DzKeER69ZHlsJffGoRGYD2/x9sJsmSI nX3pfebpgw38obw5ylt96fe10wB8SuoFbO3cSM7rZW3PGj8rHSAXVKjF7B+vBJFFWQ03/7nkZLwNj eaQ6Gtz2CRb7jbJ+eubKya2uqS4nTZCIDlnPTzKjR/0Yjjxw6bh+h44iGp74UWlyy2XVJKdX4eASl Zmat8o8Snu6RyUlsIZug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3ZVt-004OWj-Op; Tue, 21 Jun 2022 08:45:33 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3ZVq-004OVV-DC for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 08:45:32 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25L7u7eV006621; Tue, 21 Jun 2022 10:45:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=selector1; bh=2OyBIvFq+cbqc84GuaJEdZ2RqadPrXQDktccoEX4tyw=; b=YG8k6IgOGCpOqcO56I4GnWgsxNUvRpkvSbNJUa0NzXbZbwSDTquS6TUJakri3vIvhoym CHVkqJt+Lygzt9yIFZCASFqpE/Yg5pyPxJcFh5hqYjIZ0JDqOMtYZ1HrkyDhkFfwzOGo CC2xE33Mb9jjF/+FBp/dxbIhquEoXqBGJcpiUSS6LCygY4UKCI05GzPHB0xGDEY4OWx1 0rrL0AvGHcp7AQ2m0jLr22EiAyEicZdCBVgY4OQ/dPoZuDDyuRv2+POBbeYhakUoKodm fYQagkyuBD3W4puQAtzKFOzHcwefZz/SIZmaXPZYrBZS8V/C3rbMlyLYT1iNma1oe0j/ OA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3gua1n0atj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jun 2022 10:45:18 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 309D9100034; Tue, 21 Jun 2022 10:45:18 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1A12721515D; Tue, 21 Jun 2022 10:45:18 +0200 (CEST) Received: from localhost (10.75.127.50) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Tue, 21 Jun 2022 10:45:17 +0200 From: Fabrice Gasnier To: , CC: , , , , , Subject: [PATCH] ARM: dts: stm32: add missing usbh clock and fix clk order on stm32mp15 Date: Tue, 21 Jun 2022 10:45:09 +0200 Message-ID: <20220621084509.407451-1-fabrice.gasnier@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-21_03,2022-06-17_01,2022-02-23_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_014531_359775_4B0DD880 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The USBH composed of EHCI and OHCI controllers needs the PHY clock to be initialized first, before enabling (gating) them. The reverse is also required when going to suspend. So, add USBPHY clock as 1st entry in both controllers, so the USBPHY PLL gets enabled 1st upon controller init. Upon suspend/resume, this also makes the clock to be disabled/re-enabled in the correct order. This fixes some IRQ storm conditions seen when going to low-power, due to PHY PLL being disabled before all clocks are cleanly gated. Fixes: 949a0c0dec85 ("ARM: dts: stm32: add USB Host (USBH) support to stm32mp157c") Fixes: db7be2cb87ae ("ARM: dts: stm32: use usbphyc ck_usbo_48m as USBH OHCI clock on stm32mp151") Signed-off-by: Fabrice Gasnier --- arch/arm/boot/dts/stm32mp151.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi index edc0a1641c7b..9e2226430802 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1473,7 +1473,7 @@ stmmac_axi_config_0: stmmac-axi-config { usbh_ohci: usb@5800c000 { compatible = "generic-ohci"; reg = <0x5800c000 0x1000>; - clocks = <&rcc USBH>, <&usbphyc>; + clocks = <&usbphyc>, <&rcc USBH>; resets = <&rcc USBH_R>; interrupts = ; status = "disabled"; @@ -1482,7 +1482,7 @@ usbh_ohci: usb@5800c000 { usbh_ehci: usb@5800d000 { compatible = "generic-ehci"; reg = <0x5800d000 0x1000>; - clocks = <&rcc USBH>; + clocks = <&usbphyc>, <&rcc USBH>; resets = <&rcc USBH_R>; interrupts = ; companion = <&usbh_ohci>;