Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1735281rwb; Thu, 1 Dec 2022 23:50:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf4HA8v+9fIfHF7cFMF+dF9IoC74XaE12TG/F/9257lXMosAmxRQMVNJVmiQm4EvWWZ034/a X-Received: by 2002:a05:6a00:1696:b0:573:52e5:3c8a with SMTP id k22-20020a056a00169600b0057352e53c8amr59850248pfc.31.1669967449494; Thu, 01 Dec 2022 23:50:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669967449; cv=none; d=google.com; s=arc-20160816; b=nWDIJdtLf+8xDWnJyfSyZYSuQMCH5iIjIDYOZ7HMc56KtEEaTVd/ld5xdRtGsGvCMb j9ORr2nlPPS01QBqChMm8XIzMcNF7f/hP0e3oPcsMPk28CFYh43fdVoyZGwXaKH9xefp tyUpqQzpp3dow6M1l3FZrKhfk/LNd/tdt88/UkoxHYs5OAJBIzlLYBVho4KqFvM8XXjO Q4bZcNkAMY5a2ohxad3rcTDkHywL7nuN0CiLSTzGNH6I7oJB6WIy3zbdnrxipEqlueM5 LP1RX8B9Gq28M/XdNtueT57377MDQtb8/7Q58bmdawKGVstdMQQuG3wV1dCNNNwhuTNw BqQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=5ho38b8uXed8RbOoR8p1eklYHsHNBI0PEGRDx5vs7MU=; b=BkpEADG0Ytx9I+1ZDhM1z1SZMjISCyDTWUokiH8c6zqPJ4CbBM3lg/0DJ2F5tkorO7 Mn4i+G1JSBzL7pb9CQyTfPrjcdAeks5sKa1Ot+GiuBxLDDjc4sQNg5YKV7Kc0YsVMKzd v2zFMtTXd37Z6xbduCKDLx9FY8JXRbyMjxXi1MDBfAigHWJD+CwYuldgSIaLsiF+PI9L mODVGQTLMJIiLzUuYAA2KOjvPQ8XubWBseJm77183UUtdqQQqqM6ppOAWHBgrYNgS4yn sUFRvfTiFvRo8vf++j2kTuzIp4fhCmti4dhfS72MhxlgK0IfyeZRP69Q1FbGZXLSNtAv oXHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a63eb4b000000b00460dd0eed0csi6673207pgk.176.2022.12.01.23.50.36; Thu, 01 Dec 2022 23:50:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232190AbiLBHoK (ORCPT + 83 others); Fri, 2 Dec 2022 02:44:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiLBHoJ (ORCPT ); Fri, 2 Dec 2022 02:44:09 -0500 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D144765E6A; Thu, 1 Dec 2022 23:44:08 -0800 (PST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 682CB1A09F4; Fri, 2 Dec 2022 08:44:07 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3153A1A09DA; Fri, 2 Dec 2022 08:44:07 +0100 (CET) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id F1474180031C; Fri, 2 Dec 2022 15:44:05 +0800 (+08) From: andy.tang@nxp.com To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Tang Subject: [PATCH] mmc: sdhci-of-esdhc: limit the SDHC clock frequency Date: Fri, 2 Dec 2022 15:59:05 +0800 Message-Id: <20221202075905.25363-1-andy.tang@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Tang The highest clock frequency for eMMC HS200 mode on ls1043a is 116.7Mhz according to its specification. So add the limit to gate the frequency. Signed-off-by: Andy Tang --- v2: change the author to andy tang drivers/mmc/host/sdhci-of-esdhc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 00542dd74c07..1fd4ae10862d 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -43,6 +43,12 @@ static const struct esdhc_clk_fixup ls1021a_esdhc_clk = { .max_clk[MMC_TIMING_SD_HS] = 46500000, }; +static const struct esdhc_clk_fixup ls1043a_esdhc_clk = { + .sd_dflt_max_clk = 25000000, + .max_clk[MMC_TIMING_UHS_SDR104] = 116700000, + .max_clk[MMC_TIMING_MMC_HS200] = 116700000, +}; + static const struct esdhc_clk_fixup ls1046a_esdhc_clk = { .sd_dflt_max_clk = 25000000, .max_clk[MMC_TIMING_UHS_SDR104] = 167000000, @@ -64,6 +70,7 @@ static const struct esdhc_clk_fixup p1010_esdhc_clk = { static const struct of_device_id sdhci_esdhc_of_match[] = { { .compatible = "fsl,ls1021a-esdhc", .data = &ls1021a_esdhc_clk}, + { .compatible = "fsl,ls1043a-esdhc", .data = &ls1043a_esdhc_clk}, { .compatible = "fsl,ls1046a-esdhc", .data = &ls1046a_esdhc_clk}, { .compatible = "fsl,ls1012a-esdhc", .data = &ls1012a_esdhc_clk}, { .compatible = "fsl,p1010-esdhc", .data = &p1010_esdhc_clk}, -- 2.25.1