From patchwork Mon Jul 22 15:26:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13738908 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 35E9EC3DA5D for ; Mon, 22 Jul 2024 15:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: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=yE/SqHTV1C34nGAmEjO8Ca/17uHkpN6zyQL0nSw3sRM=; b=nkh184FywJJG5nYHF8PD6oXm8Y AKP+lu/hwXBDIB//YRJc1x3QLEUxi3ntsLEKNSABr4pPoE2zpkioshDSEsJufykHKoZbRAbe8u14u Oc8cXtKF0hK9lMkXIKUxPiMwTfIY5hJN+33CObi38EdrbvJbHWNV91/b191O9Gt4WNY8klNTx67O6 tB1tdDC+cAIrgBIr7ARSY6pLyvC+qQp8ESYHAUAS5CYRKH+2gKnALOpxQpdoWlpok51MW6Mr3Mir8 Qsg6mC0Jt2aOFjx2/lZlVbAbY+DU5w1S1ztNXRQSHEZfZcBkNU/yO2nDqDANWWntloTINPwtlzhLI hAVAdQMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVux7-00000009wiB-1su8; Mon, 22 Jul 2024 15:27:53 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVuwj-00000009wY9-3zMm; Mon, 22 Jul 2024 15:27:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1721662048; bh=8F8AqL8+uz10xZlIRw115rqKTtHgjwv0e3CayfgJVno=; h=From:Date:Subject:To:Cc:From; b=SagOMCU94ZPPnQfyFh6zFI2khT9EEF4MUcPcSRe7pwncodoAfwvPKlKTBi9yQAADO phRE4ogpZoaWIS67EqGkT5cXNku33U0qSNmZfGImbPZbAML4kIHwJNdYiJv/JjGnEU tGsAIWVB3mTWMDkEVKAWimvOy9fu90EcHuysvsK7KbThlDu/1ukBj90l1635Ml1Mm3 vIu/obugyqQ+s5XoBPIKDEfYK1kY1Wdvat6819IOoa+Eh+tPSVcsJQ7FMhrHq+69Uw 5UAvItx7YQNxYN8QhkLjEeThmVHg1IpF9Rrkp45cRHzr9QcHUEDELUHVZzB2XYMjTa 6w/ESdtIwWcxA== Received: from [192.168.1.217] (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0CFC137800DE; Mon, 22 Jul 2024 15:27:25 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Mon, 22 Jul 2024 11:26:55 -0400 Subject: [PATCH] arm64: dts: mediatek: mt8195: Add missing clock for xhci1 controller MIME-Version: 1.0 Message-Id: <20240722-usb-1129-probe-pci-clk-fix-v1-1-99ea804228b6@collabora.com> X-B4-Tracking: v=1; b=H4sIAD56nmYC/x3MTQqAIBBA4avErBvIQeznKtHCbKyhKFGKILp70 vJ7i/dA4iicoCseiHxJkmPPUGUBbrH7zChTNlBFuqqJ8EwjKkUthniMjMEJum1FLzeyb4w2Xht rHeRBiJzzP++H9/0Af+1nAWwAAAA= To: AngeloGioacchino Del Regno , Matthias Brugger Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240722_082730_172474_EFD2DC38 X-CRM114-Status: GOOD ( 12.83 ) 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 Currently if the xhci1 controller happens to probe before the pcie1 controller then it fails with the following errors: xhci-mtk 11290000.usb: clocks are not stable (0x1003d0f) xhci-mtk 11290000.usb: can't setup: -110 xhci-mtk: probe of 11290000.usb failed with error -110 The issue has been tracked down to the CLK_INFRA_AO_PCIE_P1_TL_96M clock, although exactly why this pcie clock is needed for the usb controller is still unknown. Add the clock to the xhci1 controller so it always probes successfully and use a placeholder clock name for it. Reported-by: NĂ­colas F. R. A. Prado #KernelCI Closes: https://lore.kernel.org/all/9fce9838-ef87-4d1b-b3df-63e1ddb0ec51@notapiano/ Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- base-commit: dee7f101b64219f512bb2f842227bd04c14efe30 change-id: 20240722-usb-1129-probe-pci-clk-fix-ef8646f46aac Best regards, diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 2ee45752583c..cc5169871f1c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -1453,9 +1453,15 @@ xhci1: usb@11290000 { <&topckgen CLK_TOP_SSUSB_P1_REF>, <&apmixedsys CLK_APMIXED_USB1PLL>, <&clk26m>, - <&pericfg_ao CLK_PERI_AO_SSUSB_1P_XHCI>; + <&pericfg_ao CLK_PERI_AO_SSUSB_1P_XHCI>, + /* + * This clock is required due to a hardware + * bug. The 'frmcnt_ck' clock name is used as a + * placeholder. + */ + <&infracfg_ao CLK_INFRA_AO_PCIE_P1_TL_96M>; clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", - "xhci_ck"; + "xhci_ck", "frmcnt_ck"; mediatek,syscon-wakeup = <&pericfg 0x400 104>; wakeup-source; status = "disabled";