From patchwork Wed Oct 25 17:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 158190 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102177vqb; Wed, 25 Oct 2023 10:09:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGActyaI9JPu195zMMLFw4B3P0WXcGoYA3FB/7GL08tMx6+Cm8xJ3s7vnNu+7sliBEeiFM X-Received: by 2002:a0c:aa5c:0:b0:66d:55da:191d with SMTP id e28-20020a0caa5c000000b0066d55da191dmr14259987qvb.37.1698253764480; Wed, 25 Oct 2023 10:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253764; cv=none; d=google.com; s=arc-20160816; b=aj15wbEZ4iKyejknev/9WSgWyEyRN7eOdsSTp+w7xd92FpWKOTr03leyN89IKmsB4X HcrCC//z4cObWl/15T6Y0CVA3DhHcymsu+leMyhW+9f0wTj5S7jXeJ1Wt1yCsTGwEd8q UB9YKB+Ul/cYv8hdu3/7+LM9txLAdFG9dPninIe9y8zN6NtHFBNubSdwAyVLpTqZpMYn uor4lLlNieWF6NH9QXyL0wr6Z9KNdsG1vnH2KdKQFxRasm22InLR2TqCQt0IrVqVHHjV 3vZmfvl2MpuTiKdF6XVkfY6MJmaN7VFoNLoFoS9mVK/mOwXvkJPPK3tUUppMeRA0GIew SEsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bac0cPNtRqeMT6ltBwYDY11vruRiib1jT+EBIKA5buQ=; fh=wfd1Xmj6Lq3BnEWEssc4j0CgKCXWDB9uo47QgHsv+Ag=; b=DcBCcGnk5BTIu0sDdyOOEMWUrVe+IgiWYU+NJycoTeIA+R6hwVJZCnSGVrAL5l5hwJ mBjQYVcKl7ECEh8CTM2aux0KvdOhVIEH2sn3WRd65r9cpyhMbyY03/sjrR6K173PWi5Y htNfHZeGgIkoO31j61nrFE61wGG64c5KkCYE1bTxu44KAZnsuXwIV6vvTE8cfvn1Rt0W Egyz0kurS3hruuJGlNw4MtqGo8nLbF9ZEFXj5Sf1/T2k+L5X3DBcY4OzxbUjv+VB8NUk DJRGcAwPDhOTBel+4mDe3kgAMOZaofJ/xnZE9OZ1MtPOTx8LeRVfE+y3vFRVFlx0zYcW l9zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Gql11qAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id me4-20020a0562145d0400b0066db3467946si5107608qvb.461.2023.10.25.10.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Gql11qAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 380688145947; Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233581AbjJYRI4 (ORCPT + 26 others); Wed, 25 Oct 2023 13:08:56 -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 X-Mail-ID: e843dea4-707f-44c8-985a-73ad6095ed42 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748139358372775 X-GMAIL-MSGID: 1780748139358372775 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#L287 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/dts/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 = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>; interrupts = ; + assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&topckgen CLK_TOP_EMMC_250M_SEL>; + assigned-clock-parents = <&apmixedsys CLK_APMIXED_MPLL>, + <&topckgen CLK_TOP_NET1PLL_D5_D2>; clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, <&infracfg CLK_INFRA_MSDC_HCK_CK>, <&infracfg CLK_INFRA_MSDC_CK>,