From patchwork Mon Apr 3 10:25:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Potthuri, Sai Krishna" X-Patchwork-Id: 13197971 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 F299BC761A6 for ; Mon, 3 Apr 2023 10:26:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231852AbjDCK0U (ORCPT ); Mon, 3 Apr 2023 06:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232193AbjDCK0S (ORCPT ); Mon, 3 Apr 2023 06:26:18 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB684212C; Mon, 3 Apr 2023 03:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAwCxFWWOuifJ/SrafMz/6vUBxmK2+VZoZLWy4RkxiTctifILg0nO+8IPAlEO9N3KjZqrZm2fn3Q3LZjduYJnQFOshlJ+i+U1AipFu6M8Xd/wOQJZUGSLwLVy/YciWcO5Mc8wmZQNqTyoRmM8daOVmPKHaaDlouHnDcnTi28zHLKb9Kp0aoWrDKxfI/EdMliWbWqGn/QqSxaf6h8LpPQUjEwx/fZYMa0zInjjKwCruCmTIDjjKuy/dDi1PRtF1oiKg8dAsYivvZBpCC0IoMjGegtki8t0p+wu4UiPC+43y27xeuePsMKiulB0PB9TwqCA+SAsIPPaeHM9+5r5xajdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WQmCSXqwpCf7GE9DbmhLgOjMqbzs8lpNHdiAwleC5nA=; b=CwVsbydhOXKVeXMpLddJr9UyRPAaY4IJASLrehDbbs0Sbns5IyQ0gl5ZqAVT2JFMalhPJpoJpoIwjfu3/4//OVIlqtPZSr2YhWvXIbIP33rG8Oerw2GrymoG5+Cv5KvXxyZj8Ftn45xu+mj3K8zh+TKntBM6+yQD+x7oBkvb5C9UjgmowtaF694g3A7Q6IGEI9qvYmlgB9vf50zCkCPwKRqdgAiY2yt+vbeE6vBD0cphG3RnMI1V08FnOfBiE+VproaKQUBNHgarG+Hrn4LTbr4nN+6bzALCZvClxkwcvLgHj25GSXMlUTk8RvWzguSMZUrtvpQpQywUDQpDfFbwXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WQmCSXqwpCf7GE9DbmhLgOjMqbzs8lpNHdiAwleC5nA=; b=w1kfAjs8omseqfJBPa+XO+bxOq7APOfnVN495+gAEoTmGpDz4CuC7YruUVH7mT8yja7FdHjHpJbAwoDdKtaIN5tNe03TuYNmrpN07yAspBHBGsa3BdNpoPQouE+HCyZE2ZogMbxrNKThwG6oKn7U6CQKpFau8Oc4q/3qwGP6lUc= Received: from BN9PR03CA0911.namprd03.prod.outlook.com (2603:10b6:408:107::16) by CH3PR12MB8186.namprd12.prod.outlook.com (2603:10b6:610:129::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.29; Mon, 3 Apr 2023 10:26:13 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:107:cafe::d2) by BN9PR03CA0911.outlook.office365.com (2603:10b6:408:107::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Mon, 3 Apr 2023 10:26:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6277.26 via Frontend Transport; Mon, 3 Apr 2023 10:26:13 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 3 Apr 2023 05:26:12 -0500 Received: from xhdlakshmis40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 3 Apr 2023 05:26:09 -0500 From: Sai Krishna Potthuri To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Michal Simek , Adrian Hunter CC: , , , , , , Sai Krishna Potthuri , Krzysztof Kozlowski Subject: [PATCH v3 1/3] dt-bindings: mmc: arasan,sdci: Add Xilinx Versal Net compatible Date: Mon, 3 Apr 2023 15:55:49 +0530 Message-ID: <20230403102551.3763054-2-sai.krishna.potthuri@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> References: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT045:EE_|CH3PR12MB8186:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f3c7f3b-f826-4a43-ac05-08db342dd9c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Iy6xRUam/F4cPkUDkR17OoktWflZAW1kqlO0AY8aV7BHhp2IF941s0aJ4FGRVlx+PZm9clXqnwklHR8Njif/q85tmKoi24ZweQ1PnhM8v7V00mKxQoe6FwXqfEzo3wRugUNdiC5dhPx6bgtde4i5L/XuunjsOSsNF4VepaG/k8PFogW9uTfn0hApfR54km/k6EMOLI31W/YftEFchqVj+rWG/sev7OX+SrV2LKoqtdrvEHbrH8DH0U3tKl6VMeVEBQXdXp1Wa49TGZSh2DL00Kv9WnAfJBXQ7BhWwa9QFxdrwn2sc4c2JxWpg6ZF6uu+sxTtygoYNWXt2WQ7Y59RdMkBOhndW8/VVdfZR/l+iQKn5cLjSPAVu34uduorAQIZQcFgQDZ8M1gRV5faPusYYbIKfjHFTY+F41f//70KcM0vCySE2nLzcHh0QFHUEbcuj9/NDEYs68m73DKWyICW7z0MPS2IszfGaonDgk/VgOcjVJI5+bc5SUheFo92fGGVpnSwk7GRzUaI1iA6Jc5MtLfUseCEMqSBig3ag6XcCsgXDVOA+Kt5gBTu5HdP20fOO/bbAMlj5f/sQQ/V/PYQp7yeczvWW5EdSsHXV3L1qvEP+rLDVI/0EHoTYPj6CSFbEcEBkZnThunen5qUjO7bNWJbouvbW4kzvzkzzfKXdfOYY9uKZl2LkqytPOAW99FL1aE2wMUb8nc7DI2N0LcDREizcekmRf858kk2ec20StA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(396003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(86362001)(2906002)(36756003)(103116003)(82310400005)(40460700003)(40480700001)(2616005)(186003)(83380400001)(336012)(47076005)(1076003)(6666004)(26005)(8676002)(70586007)(36860700001)(4326008)(478600001)(70206006)(81166007)(41300700001)(82740400003)(356005)(7416002)(5660300002)(110136005)(316002)(426003)(54906003)(8936002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 10:26:13.4633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f3c7f3b-f826-4a43-ac05-08db342dd9c9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8186 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add Xilinx Versal Net compatible to support eMMC 5.1 PHY. Signed-off-by: Sai Krishna Potthuri Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml b/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml index 8296c34cfa00..9166ac061b44 100644 --- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml @@ -27,6 +27,7 @@ allOf: enum: - xlnx,zynqmp-8.9a - xlnx,versal-8.9a + - xlnx,versal-net-emmc then: properties: clock-output-names: @@ -62,6 +63,10 @@ properties: description: For this device it is strongly suggested to include clock-output-names and '#clock-cells'. + - const: xlnx,versal-net-emmc # Versal Net eMMC PHY + description: + For this device it is strongly suggested to include + clock-output-names and '#clock-cells'. - items: - const: intel,lgm-sdhci-5.1-emmc # Intel LGM eMMC PHY - const: arasan,sdhci-5.1 From patchwork Mon Apr 3 10:25:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Potthuri, Sai Krishna" X-Patchwork-Id: 13197972 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 7773DC77B60 for ; Mon, 3 Apr 2023 10:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbjDCK02 (ORCPT ); Mon, 3 Apr 2023 06:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232224AbjDCK0X (ORCPT ); Mon, 3 Apr 2023 06:26:23 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2059.outbound.protection.outlook.com [40.107.100.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006AB113FC; Mon, 3 Apr 2023 03:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F26sjwXFAZ5ZZevsYZIiY8rHPt6dADabe9mciD4KqxJLhjtw/LWHUYix8FC4AWE7rfu7EF48yr7l6s/FYgb8dwJcplBJr2LLKMjhClQbw4csqy1MeRwm3pFY11UO64ydgF/VR6XkCtvxYz1EGqkcJSlDAsWPUZVPkng13IfjuriGwwJiPYg1YP/atlt0ADWEk/ZwsKpyrOyXI0naIB3/TbAW5DjgJXqPKz3HHorhYfoSQ8MV1PpTHRk5AH0yyq0zuO7M8MLHg+erhZaXSQMoD8RyG8FoojKzTkZmFjl8jFAmj/91ucirAlzmZFzOpLzd6XKUxiwFWLeyEfA1ewjevA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ePH8Ow77QkgUhH3KfzH7rq4c3CqPs+SUn7rbTczDJGc=; b=c3HLkT9FSIW3Kt2rt5pyPTLY3nQEtPgRfWrjVyJXsry8+XrL9BPKj2kEhgiBIC+geRlV1obx05HUhPuHxkTBrVXSnMI1gyrLEEJjgurMh8xh7F/8bVNB/f0Foty25NfHx8tRsIQ4Wq0D2M46AzF5QCpPvF1DuaA0s2FZhrxrFWL4FR08JPtwte8WcMW3QcnEEO1M+qO9i2eCUwCBaQ3/PQCb5ynj2WSzbV1FxIZ42fQpBSduAoMSnGgWVzLHhHibc6ugcA9M8hm0TJ24706YzWNr9cswNT8QfU+iYC4xy9RGgFWeuF3qL7kubsTntA7DBgnfRVKQWVFd6WVlKRNvkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ePH8Ow77QkgUhH3KfzH7rq4c3CqPs+SUn7rbTczDJGc=; b=HrBvaoUHmJkN0fK3O5UgDwgTbG4LGBYgBWi19tDOP5nXiTJc2AFIMiW2j8ejpxbt6xwm0JA4wXOPbgeMxOLrsk6apb8WB6v3vq4MoDWx0rBZZxHCcDv3PhBNP1LZDD/kPyZvL+cMLRC6ouijRQDlsEIvP8/o30UeKH0svFa05Ds= Received: from BN9PR03CA0565.namprd03.prod.outlook.com (2603:10b6:408:138::30) by IA1PR12MB6436.namprd12.prod.outlook.com (2603:10b6:208:3ac::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 3 Apr 2023 10:26:18 +0000 Received: from BN8NAM11FT007.eop-nam11.prod.protection.outlook.com (2603:10b6:408:138:cafe::d5) by BN9PR03CA0565.outlook.office365.com (2603:10b6:408:138::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.43 via Frontend Transport; Mon, 3 Apr 2023 10:26:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT007.mail.protection.outlook.com (10.13.177.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6254.21 via Frontend Transport; Mon, 3 Apr 2023 10:26:17 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 3 Apr 2023 05:26:17 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 3 Apr 2023 03:26:17 -0700 Received: from xhdlakshmis40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 3 Apr 2023 05:26:13 -0500 From: Sai Krishna Potthuri To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Michal Simek , Adrian Hunter CC: , , , , , , Swati Agarwal , Sai Krishna Potthuri Subject: [PATCH v3 2/3] mmc: sdhci-of-arasan: Add support for eMMC5.1 on Xilinx Versal Net platform Date: Mon, 3 Apr 2023 15:55:50 +0530 Message-ID: <20230403102551.3763054-3-sai.krishna.potthuri@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> References: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT007:EE_|IA1PR12MB6436:EE_ X-MS-Office365-Filtering-Correlation-Id: fd9dcf10-a0f3-4b22-c934-08db342ddc64 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IaGOqMNeqI5IVgpFJD5J/JWXuEYQtaGROrQKhv8HGoNaRQ1Df/s4IVxnKsQXb9vyoXzqfJKl6J1siTr5scvzwdvo1KYrRnGet5eod+QtAzrT5/rmXPjDgax1a8bf0tKE+0vLi2PzVQRXTikcl2ZX9DrYZO5shLUrXjHCrQy2bpHFfxLnGRZnYy26IVeUWzeYhXLKblnOt/92CjamJ+pAhAYHxyCjBcAB6GJZ410vmnIZFhuLTJkFE8rmypjmtKYRiAug3LphFBn8qR1S87tAq0YLZ8gVDlT0CGyp8af7iv1KjBdkwfcJd/Zd8Q48ZPQ0OYAYg4oZS/cTgGqBmnCTCyFK3J5r1tBYB0wRJN61NE4DrE6iykWuLqvctTtlXTej1O+0wpKKq9mxJzT1RBdNg3P52+B/JvDaSjEqo/BouwPhLklCpzjRpxJtFtF0ygDHf8vV8vYRkQOFcPj8M2HyZZOSzDwZneCooCeN1qZuh3mPem3iaBG4BIlcVhC6/w7QUMc0OaQ78WKEcZjHE/piYR1m3zUeg9wTL2DAqTF1A6eMUuLQNxxa/wbY1ybfIz0uEDj+E6O1s2GXMvsnTO7tRDj79ZKm+CCHoMZTIZmAQlHj6Z4WiaB7/WEcMOnzrSC/A++VuH4ma4uWzZD5lJWyH7RryWLs7eWb1FEUzmVSXfD2bhZZXV/1T9N8GmomiZyiyOZ2LkDEQgSgzvY0x799oAA8o82AjcrWUPOyP4o9x4M= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(376002)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(26005)(41300700001)(1076003)(186003)(426003)(6666004)(478600001)(83380400001)(2616005)(336012)(47076005)(8676002)(5660300002)(54906003)(316002)(36860700001)(40460700003)(40480700001)(70206006)(30864003)(4326008)(7416002)(103116003)(70586007)(82740400003)(2906002)(110136005)(81166007)(86362001)(36756003)(82310400005)(356005)(8936002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 10:26:17.8353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd9dcf10-a0f3-4b22-c934-08db342ddc64 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT007.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6436 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Swati Agarwal Add support for eMMC5.1 on Xilinx Versal Net platform - Add new compatible string(xlnx,versal-net-emmc). - Add support for PHY which is part of Host Controller register space. - Add DLL and Delay Chain mode support and corresponding tap delays for all eMMC modes. - Add Strobe select tap for HS400 mode. Signed-off-by: Swati Agarwal Co-developed-by: Sai Krishna Potthuri Signed-off-by: Sai Krishna Potthuri Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 235 +++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index deb67daf179f..c3fecb8ba66e 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -41,11 +41,41 @@ #define VENDOR_ENHANCED_STROBE BIT(0) #define PHY_CLK_TOO_SLOW_HZ 400000 +#define MIN_PHY_CLK_HZ 50000000 #define SDHCI_ITAPDLY_CHGWIN 0x200 #define SDHCI_ITAPDLY_ENABLE 0x100 #define SDHCI_OTAPDLY_ENABLE 0x40 +#define PHY_CTRL_REG1 0x270 +#define PHY_CTRL_ITAPDLY_ENA_MASK BIT(0) +#define PHY_CTRL_ITAPDLY_SEL_MASK GENMASK(5, 1) +#define PHY_CTRL_ITAPDLY_SEL_SHIFT 1 +#define PHY_CTRL_ITAP_CHG_WIN_MASK BIT(6) +#define PHY_CTRL_OTAPDLY_ENA_MASK BIT(8) +#define PHY_CTRL_OTAPDLY_SEL_MASK GENMASK(15, 12) +#define PHY_CTRL_OTAPDLY_SEL_SHIFT 12 +#define PHY_CTRL_STRB_SEL_MASK GENMASK(23, 16) +#define PHY_CTRL_STRB_SEL_SHIFT 16 +#define PHY_CTRL_TEST_CTRL_MASK GENMASK(31, 24) + +#define PHY_CTRL_REG2 0x274 +#define PHY_CTRL_EN_DLL_MASK BIT(0) +#define PHY_CTRL_DLL_RDY_MASK BIT(1) +#define PHY_CTRL_FREQ_SEL_MASK GENMASK(6, 4) +#define PHY_CTRL_FREQ_SEL_SHIFT 4 +#define PHY_CTRL_SEL_DLY_TX_MASK BIT(16) +#define PHY_CTRL_SEL_DLY_RX_MASK BIT(17) +#define FREQSEL_200M_170M 0x0 +#define FREQSEL_170M_140M 0x1 +#define FREQSEL_140M_110M 0x2 +#define FREQSEL_110M_80M 0x3 +#define FREQSEL_80M_50M 0x4 +#define FREQSEL_275M_250M 0x5 +#define FREQSEL_250M_225M 0x6 +#define FREQSEL_225M_200M 0x7 +#define PHY_DLL_TIMEOUT_MS 100 + /* Default settings for ZynqMP Clock Phases */ #define ZYNQMP_ICLK_PHASE {0, 63, 63, 0, 63, 0, 0, 183, 54, 0, 0} #define ZYNQMP_OCLK_PHASE {0, 72, 60, 0, 60, 72, 135, 48, 72, 135, 0} @@ -53,6 +83,11 @@ #define VERSAL_ICLK_PHASE {0, 132, 132, 0, 132, 0, 0, 162, 90, 0, 0} #define VERSAL_OCLK_PHASE {0, 60, 48, 0, 48, 72, 90, 36, 60, 90, 0} +#define VERSAL_NET_EMMC_ICLK_PHASE {0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0} +#define VERSAL_NET_EMMC_OCLK_PHASE {0, 113, 0, 0, 0, 0, 0, 0, 113, 79, 45} + +#define VERSAL_NET_PHY_CTRL_STRB90_STRB180_VAL 0X77 + /* * On some SoCs the syscon area has a feature where the upper 16-bits of * each 32-bit register act as a write mask for the lower 16-bits. This allows @@ -135,6 +170,7 @@ struct sdhci_arasan_clk_data { * @clk_ahb: Pointer to the AHB clock * @phy: Pointer to the generic phy * @is_phy_on: True if the PHY is on; false if not. + * @internal_phy_reg: True if the PHY is within the Host controller. * @has_cqe: True if controller has command queuing engine. * @clk_data: Struct for the Arasan Controller Clock Data. * @clk_ops: Struct for the Arasan Controller Clock Operations. @@ -147,6 +183,7 @@ struct sdhci_arasan_data { struct clk *clk_ahb; struct phy *phy; bool is_phy_on; + bool internal_phy_reg; bool has_cqe; struct sdhci_arasan_clk_data clk_data; @@ -207,6 +244,61 @@ static const struct sdhci_arasan_soc_ctl_map intel_keembay_soc_ctl_map = { .hiword_update = false, }; +static void sdhci_arasan_phy_set_delaychain(struct sdhci_host *host, bool enable) +{ + u32 reg; + + reg = readl(host->ioaddr + PHY_CTRL_REG2); + if (enable) + reg |= (PHY_CTRL_SEL_DLY_TX_MASK | PHY_CTRL_SEL_DLY_RX_MASK); + else + reg &= ~(PHY_CTRL_SEL_DLY_TX_MASK | PHY_CTRL_SEL_DLY_RX_MASK); + + writel(reg, host->ioaddr + PHY_CTRL_REG2); +} + +static int sdhci_arasan_phy_set_dll(struct sdhci_host *host, bool enable) +{ + u32 reg; + + reg = readl(host->ioaddr + PHY_CTRL_REG2); + if (enable) + reg |= PHY_CTRL_EN_DLL_MASK; + else + reg &= ~PHY_CTRL_EN_DLL_MASK; + + writel(reg, host->ioaddr + PHY_CTRL_REG2); + + if (!enable) + return 0; + + return readl_relaxed_poll_timeout(host->ioaddr + PHY_CTRL_REG2, reg, + (reg & PHY_CTRL_DLL_RDY_MASK), 10, + 1000 * PHY_DLL_TIMEOUT_MS); +} + +static void sdhci_arasan_phy_dll_set_freq(struct sdhci_host *host, int clock) +{ + u32 reg, freq_sel, freq; + + freq = DIV_ROUND_CLOSEST(clock, 1000000); + if (freq <= 200 && freq > 170) + freq_sel = FREQSEL_200M_170M; + else if (freq <= 170 && freq > 140) + freq_sel = FREQSEL_170M_140M; + else if (freq <= 140 && freq > 110) + freq_sel = FREQSEL_140M_110M; + else if (freq <= 110 && freq > 80) + freq_sel = FREQSEL_110M_80M; + else + freq_sel = FREQSEL_80M_50M; + + reg = readl(host->ioaddr + PHY_CTRL_REG2); + reg &= ~PHY_CTRL_FREQ_SEL_MASK; + reg |= (freq_sel << PHY_CTRL_FREQ_SEL_SHIFT); + writel(reg, host->ioaddr + PHY_CTRL_REG2); +} + /** * sdhci_arasan_syscon_write - Write to a field in soc_ctl registers * @@ -324,8 +416,21 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock) if (clk_data->set_clk_delays) clk_data->set_clk_delays(host); + if (sdhci_arasan->internal_phy_reg && clock >= MIN_PHY_CLK_HZ) { + sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); + sdhci_arasan_phy_set_dll(host, 0); + sdhci_arasan_phy_set_delaychain(host, 0); + sdhci_arasan_phy_dll_set_freq(host, clock); + } else if (sdhci_arasan->internal_phy_reg) { + sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); + sdhci_arasan_phy_set_delaychain(host, 1); + } + sdhci_set_clock(host, clock); + if (sdhci_arasan->internal_phy_reg && clock >= MIN_PHY_CLK_HZ) + sdhci_arasan_phy_set_dll(host, 1); + if (sdhci_arasan->quirks & SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE) /* * Some controllers immediately report SDHCI_CLOCK_INT_STABLE @@ -897,6 +1002,101 @@ static const struct clk_ops versal_sampleclk_ops = { .set_phase = sdhci_versal_sampleclk_set_phase, }; +static int sdhci_versal_net_emmc_sdcardclk_set_phase(struct clk_hw *hw, int degrees) +{ + struct sdhci_arasan_clk_data *clk_data = + container_of(hw, struct sdhci_arasan_clk_data, sdcardclk_hw); + struct sdhci_arasan_data *sdhci_arasan = + container_of(clk_data, struct sdhci_arasan_data, clk_data); + struct sdhci_host *host = sdhci_arasan->host; + u8 tap_delay, tap_max = 0; + + switch (host->timing) { + case MMC_TIMING_MMC_HS: + case MMC_TIMING_MMC_DDR52: + tap_max = 16; + break; + case MMC_TIMING_MMC_HS200: + case MMC_TIMING_MMC_HS400: + /* For 200MHz clock, 32 Taps are available */ + tap_max = 32; + break; + default: + break; + } + + tap_delay = (degrees * tap_max) / 360; + + /* Set the Clock Phase */ + if (tap_delay) { + u32 regval; + + regval = sdhci_readl(host, PHY_CTRL_REG1); + regval |= PHY_CTRL_OTAPDLY_ENA_MASK; + sdhci_writel(host, regval, PHY_CTRL_REG1); + regval &= ~PHY_CTRL_OTAPDLY_SEL_MASK; + regval |= tap_delay << PHY_CTRL_OTAPDLY_SEL_SHIFT; + sdhci_writel(host, regval, PHY_CTRL_REG1); + } + + return 0; +} + +static const struct clk_ops versal_net_sdcardclk_ops = { + .recalc_rate = sdhci_arasan_sdcardclk_recalc_rate, + .set_phase = sdhci_versal_net_emmc_sdcardclk_set_phase, +}; + +static int sdhci_versal_net_emmc_sampleclk_set_phase(struct clk_hw *hw, int degrees) +{ + struct sdhci_arasan_clk_data *clk_data = + container_of(hw, struct sdhci_arasan_clk_data, sampleclk_hw); + struct sdhci_arasan_data *sdhci_arasan = + container_of(clk_data, struct sdhci_arasan_data, clk_data); + struct sdhci_host *host = sdhci_arasan->host; + u8 tap_delay, tap_max = 0; + u32 regval; + + switch (host->timing) { + case MMC_TIMING_MMC_HS: + case MMC_TIMING_MMC_DDR52: + tap_max = 32; + break; + case MMC_TIMING_MMC_HS400: + /* Strobe select tap point for strb90 and strb180 */ + regval = sdhci_readl(host, PHY_CTRL_REG1); + regval &= ~PHY_CTRL_STRB_SEL_MASK; + regval |= VERSAL_NET_PHY_CTRL_STRB90_STRB180_VAL << PHY_CTRL_STRB_SEL_SHIFT; + sdhci_writel(host, regval, PHY_CTRL_REG1); + break; + default: + break; + } + + tap_delay = (degrees * tap_max) / 360; + + /* Set the Clock Phase */ + if (tap_delay) { + regval = sdhci_readl(host, PHY_CTRL_REG1); + regval |= PHY_CTRL_ITAP_CHG_WIN_MASK; + sdhci_writel(host, regval, PHY_CTRL_REG1); + regval |= PHY_CTRL_ITAPDLY_ENA_MASK; + sdhci_writel(host, regval, PHY_CTRL_REG1); + regval &= ~PHY_CTRL_ITAPDLY_SEL_MASK; + regval |= tap_delay << PHY_CTRL_ITAPDLY_SEL_SHIFT; + sdhci_writel(host, regval, PHY_CTRL_REG1); + regval &= ~PHY_CTRL_ITAP_CHG_WIN_MASK; + sdhci_writel(host, regval, PHY_CTRL_REG1); + } + + return 0; +} + +static const struct clk_ops versal_net_sampleclk_ops = { + .recalc_rate = sdhci_arasan_sampleclk_recalc_rate, + .set_phase = sdhci_versal_net_emmc_sampleclk_set_phase, +}; + static void arasan_zynqmp_dll_reset(struct sdhci_host *host, u32 deviceid) { u16 clk; @@ -1107,7 +1307,17 @@ static void arasan_dt_parse_clk_phases(struct device *dev, clk_data->clk_phase_out[i] = versal_oclk_phase[i]; } } + if (of_device_is_compatible(dev->of_node, "xlnx,versal-net-emmc")) { + u32 versal_net_iclk_phase[MMC_TIMING_MMC_HS400 + 1] = + VERSAL_NET_EMMC_ICLK_PHASE; + u32 versal_net_oclk_phase[MMC_TIMING_MMC_HS400 + 1] = + VERSAL_NET_EMMC_OCLK_PHASE; + for (i = 0; i <= MMC_TIMING_MMC_HS400; i++) { + clk_data->clk_phase_in[i] = versal_net_iclk_phase[i]; + clk_data->clk_phase_out[i] = versal_net_oclk_phase[i]; + } + } arasan_dt_read_clk_phase(dev, clk_data, MMC_TIMING_LEGACY, "clk-phase-legacy"); arasan_dt_read_clk_phase(dev, clk_data, MMC_TIMING_MMC_HS, @@ -1225,6 +1435,14 @@ static const struct sdhci_pltfm_data sdhci_arasan_zynqmp_pdata = { SDHCI_QUIRK2_STOP_WITH_TC, }; +static const struct sdhci_pltfm_data sdhci_arasan_versal_net_pdata = { + .ops = &sdhci_arasan_ops, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN | + SDHCI_QUIRK2_STOP_WITH_TC | + SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400, +}; + static const struct sdhci_arasan_clk_ops zynqmp_clk_ops = { .sdcardclk_ops = &zynqmp_sdcardclk_ops, .sampleclk_ops = &zynqmp_sampleclk_ops, @@ -1245,6 +1463,16 @@ static struct sdhci_arasan_of_data sdhci_arasan_versal_data = { .clk_ops = &versal_clk_ops, }; +static const struct sdhci_arasan_clk_ops versal_net_clk_ops = { + .sdcardclk_ops = &versal_net_sdcardclk_ops, + .sampleclk_ops = &versal_net_sampleclk_ops, +}; + +static struct sdhci_arasan_of_data sdhci_arasan_versal_net_data = { + .pdata = &sdhci_arasan_versal_net_pdata, + .clk_ops = &versal_net_clk_ops, +}; + static struct sdhci_arasan_of_data intel_keembay_emmc_data = { .soc_ctl_map = &intel_keembay_soc_ctl_map, .pdata = &sdhci_keembay_emmc_pdata, @@ -1314,6 +1542,10 @@ static const struct of_device_id sdhci_arasan_of_match[] = { .compatible = "xlnx,versal-8.9a", .data = &sdhci_arasan_versal_data, }, + { + .compatible = "xlnx,versal-net-emmc", + .data = &sdhci_arasan_versal_net_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sdhci_arasan_of_match); @@ -1788,6 +2020,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev) host->mmc->caps2 |= MMC_CAP2_CQE_DCMD; } + if (of_device_is_compatible(np, "xlnx,versal-net-emmc")) + sdhci_arasan->internal_phy_reg = true; + ret = sdhci_arasan_add_host(sdhci_arasan); if (ret) goto err_add_host; From patchwork Mon Apr 3 10:25:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Potthuri, Sai Krishna" X-Patchwork-Id: 13197973 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 08D88C77B60 for ; Mon, 3 Apr 2023 10:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232284AbjDCK0e (ORCPT ); Mon, 3 Apr 2023 06:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbjDCK03 (ORCPT ); Mon, 3 Apr 2023 06:26:29 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2047.outbound.protection.outlook.com [40.107.237.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC0B113D7; Mon, 3 Apr 2023 03:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Un7wUdRDwUFLfFMJOcnoLUprl8UEtyzUAAjpIb4BzagTgWgqSOAtsIHfSXfORuxsubAmPuRMj099izxZrnfG855i2C+SqgMR+cENT8hJad7zpg4yorVlCUSJDudcwFRCn87gBsnbqCbMZKPdQ54qPA/3oQdBVEi5FJPhhZ8UIMgTnBODFgfVRf2BgiNReRE2k4qikNFOYSvaOUKG2R9Z9Y6NK3hkGk2ONRByEwUpNwKMhGbxHNKgk0tQk0w1E371Td8zOOi6n0IDc2BKLqQj3er1i+yvEYDWtR32FMIPVspuwOBv8NYgX+J788YRd5vI5nRz9SkyeibihDxZVt0v1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ehuPES+rvGtvOFSZQxDC/djuDdzbTC2UZn5AFh6w/yc=; b=TAX8Vgc5AzMhN17dUpi27y9q8PaaW9vNvjp7WCGrS3O3hI1epp0o+dTBeq5WHUe62pU0iEh9LxkHThCOwYkjFeKLemwhdHrdNoqcHWQ/OpeZSRJ+hZwAaG+jJ0X1aa21/Xto9KbweHsxLQKmCETphf4VPL/wL8pb8k7uri09JhN8PY70B5tD74Q/ImRfdMQsWj5w121xEw5bbCCzYYevvxt6kDmm9BsKD7Al6mC+F1ZIlDJz9zNouDRUYDvuFvVqVOxT5aRWaooyxT2XB5pgQX5hzvcPtbb94eFQoMsqwiOAbLj4m40qhoVi/Wb0EfDk2Hkx/H9YIepbFcteEDYGtw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ehuPES+rvGtvOFSZQxDC/djuDdzbTC2UZn5AFh6w/yc=; b=SI9tg6HdRr0FVtwA/JIAW8fewxewp10wwRDJf9TZubQ574HBv4sSc90DTAOvfx5PvGqpxLSECtMZyQ6GM5sHG+FOFLsNMQA5v4YRJk2Cl4UfugUJHujy/dWvd0iGXYHCtqsoZJqiqWzbf+U9UWFpMIYxrwgRhOF2S/2rNapwwV0= Received: from DS7P222CA0012.NAMP222.PROD.OUTLOOK.COM (2603:10b6:8:2e::15) by SA0PR12MB4462.namprd12.prod.outlook.com (2603:10b6:806:95::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Mon, 3 Apr 2023 10:26:22 +0000 Received: from DS1PEPF0000E636.namprd02.prod.outlook.com (2603:10b6:8:2e:cafe::f0) by DS7P222CA0012.outlook.office365.com (2603:10b6:8:2e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22 via Frontend Transport; Mon, 3 Apr 2023 10:26:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E636.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.30 via Frontend Transport; Mon, 3 Apr 2023 10:26:21 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 3 Apr 2023 05:26:21 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 3 Apr 2023 03:26:20 -0700 Received: from xhdlakshmis40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 3 Apr 2023 05:26:17 -0500 From: Sai Krishna Potthuri To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Michal Simek , Adrian Hunter CC: , , , , , , Sai Krishna Potthuri Subject: [PATCH v3 3/3] mmc: sdhci-of-arasan: Skip setting clock delay for 400KHz Date: Mon, 3 Apr 2023 15:55:51 +0530 Message-ID: <20230403102551.3763054-4-sai.krishna.potthuri@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> References: <20230403102551.3763054-1-sai.krishna.potthuri@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E636:EE_|SA0PR12MB4462:EE_ X-MS-Office365-Filtering-Correlation-Id: abf21d48-a11d-4fed-e9db-08db342ddeb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OZ2qVz7Yp2Wyn1j7b8MNbWo2BnX2WM9LOFHoxtX6imC+WFh1DJvcxTWOkd7H4zy1D5G5HMzLihHwW+lCxFU3oExnXX7i7TeSpI9eSVcOYCD3woh1QOzYf59mB3hZnyfa8PuoXRDmy5mK7UsG0JjEAv+Gkt5l5M9Q4LheBK3IbE82wE6ITb5dYX9O86mZYJH5k7U1Cmgw1Jyy7FOZZyaLi14Lc7sWCdYFTbk8MVt9RSdnLyVU4yBuCg+DTZVt5gZFetBLt8FNqtC2X5sD2/36W+U3zWSk5n5yiJKDm2u3Df4+lj8S/kkxoRoJPGfme7KEB8BHXohxh8ZQAOszNwCzT6CXG/8b9RXwlztjB3kC8UyDtp3WitfM6VTLsxom8jFLVR415my4U/PcXfInOls8FTlJ2vFh7PQed6sS425q5Uo05jNCFxJ+GlPSWlRgrl7MMXEmdA66VFsC5H31JHyfwkp1yp07QjYmaq8pliddCH1Sf00PIQIlpWNSjUZYiC7UJU4/GMTvhhF4sh6rQZF+qwZMR3rNowWrwXqP8kmLlqNztU7FQSBqpyUXRsUqpVaU6rml3o14uskR20h0KOEAp3P6T7zQTxoBTplJTHtJB69IqHfgpyTs5wbX8SJWXvaZ5rBt4VsIq4KjVxy1EK2365CD/OoIE1f1ArGFZwq7M/1sk5T0IHgUwx6uc2GsL6Qtw1nDCi5Up7/WlsPOs0969E0p+knpcPI6IIF58RgFi2U= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(396003)(346002)(136003)(451199021)(40470700004)(36840700001)(46966006)(2906002)(4744005)(81166007)(7416002)(356005)(5660300002)(82740400003)(70206006)(70586007)(8936002)(41300700001)(4326008)(8676002)(40460700003)(36860700001)(36756003)(110136005)(54906003)(316002)(83380400001)(2616005)(47076005)(82310400005)(426003)(336012)(86362001)(40480700001)(186003)(478600001)(6666004)(1076003)(26005)(103116003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 10:26:21.6625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abf21d48-a11d-4fed-e9db-08db342ddeb3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E636.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4462 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Clock delay settings are not defined for 400KHz, so add frequency check to skip calling the clock delay settings when frequency is <=400KHz. Signed-off-by: Sai Krishna Potthuri Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index c3fecb8ba66e..d9a29c346745 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -413,7 +413,7 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock) } /* Set the Input and Output Clock Phase Delays */ - if (clk_data->set_clk_delays) + if (clk_data->set_clk_delays && clock > PHY_CLK_TOO_SLOW_HZ) clk_data->set_clk_delays(host); if (sdhci_arasan->internal_phy_reg && clock >= MIN_PHY_CLK_HZ) {