From nobody Fri Sep 20 10:40:23 2024 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 CC9A6C25B6D for ; Wed, 25 Oct 2023 17:08:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233953AbjJYRI5 (ORCPT ); Wed, 25 Oct 2023 13:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233876AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D30C13A for ; Wed, 25 Oct 2023 10:08:48 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 968DA3FC25; Wed, 25 Oct 2023 17:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bac0cPNtRqeMT6ltBwYDY11vruRiib1jT+EBIKA5buQ=; b=Gql11qAG1rQf0U7yBatwmKbA0iV7KgSvliP/+cIz3IjPjCEw9PeyUftMorgZD/fAvWB9tR 3P/01PexfIvBZs58mWou57ZQL2KYJ8I9f6szVIN3hj5o7Azquh6RKbmFP7p5ylTJDIjHOd mkfvTt/wEds8iweT4efe3s/NGU/fbGs= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id DEE393608ED; Wed, 25 Oct 2023 17:08:42 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra , stable@vger.kernel.org Subject: [PATCH v2 1/5] arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization Date: Wed, 25 Oct 2023 19:08:28 +0200 Message-Id: <20231025170832.78727-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: e843dea4-707f-44c8-985a-73ad6095ed42 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Eric Woudstra Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3 without uboot [1]. Booting with uboot does not show this because clocks seem to be initialized by uboot. Fix this by adding assigned-clocks and assigned-clock-parents like it's done in uboot [2]. [1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to= -416m-depends-on-u-boot/15170 [2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L= 287 Cc: stable@vger.kernel.org Fixes: 513b49d19b34 ("arm64: dts: mt7986: add mmc related device nodes") Signed-off-by: Eric Woudstra Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 24eda00e320d..77ddd9e44ed2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -374,6 +374,10 @@ mmc0: mmc@11230000 { reg =3D <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>; interrupts =3D ; + assigned-clocks =3D <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&topckgen CLK_TOP_EMMC_250M_SEL>; + assigned-clock-parents =3D <&apmixedsys CLK_APMIXED_MPLL>, + <&topckgen CLK_TOP_NET1PLL_D5_D2>; clocks =3D <&topckgen CLK_TOP_EMMC_416M_SEL>, <&infracfg CLK_INFRA_MSDC_HCK_CK>, <&infracfg CLK_INFRA_MSDC_CK>, --=20 2.34.1