From patchwork Fri Apr 22 15:41:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: icenowy@outlook.com X-Patchwork-Id: 12823683 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 92933C433F5 for ; Fri, 22 Apr 2022 15:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XN1upIpV4nMiZF+U2Xnm6SgyVAzjj1HPAsA118/tQ+o=; b=A31hkb+2Poja7d kTtIyLE9OhDL1d74SfenD3zT8b5yaqa1ymwjC3eLw61AVxPNmEvFsgL7e1Wag7Pz1kQAxGYMDqJC+ PDczKXUUemUm57uiNacGqX459Yur3oqbum8G5hnbyExzUA+xY+z2lrm2l6LtEjVdfULdV+YenfiCo PnUpkgvvgsGGpXappW/vcW8gyDZz5zDJaROzb+f/9FAZ9NlKklXD+8zq6dCR0XxZcUb8fA8Qm8LyD bgY0eAhAoZA+2HCC67miET0Eq9ptLCEMMjpQzkP1fwjGXoF7uxI1WwYLD6cxjTgEvQoJG/viV0u5g sL0Qy+8RUrX6504QvOlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvSD-001Bal-6d; Fri, 22 Apr 2022 15:44:17 +0000 Received: from mail-bn8nam11olkn2081c.outbound.protection.outlook.com ([2a01:111:f400:7eae::81c] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvQo-001Axt-Kj for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 15:42:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PPfBEBkSqGoTy+T1Pfbx/OUhFxI8PK3dYuxcKrbdG8dTL5gjUMc2ARPQJ98KRu/lvlbMp9kTEOfaBeLXNFNO0lb/7VZkLz8T655iuGkI06Zt0fGEWMrj3kZzXGrjUYgw/HM6BmOLFcnG6f6FpUx9q422NcGdmnO8EKtbUjKbTa4vNG0xGkl12SHNu/GMWvOHCaeOq27MUukwJxOgeN7zAdDnd9WCPSlv3mBAhHFxjnMYD+pBtq0tW4kERbGFQ94XkoZ1qkJWWlUtNTWGKJVcPVUKhxy422e6L34IWStMgv722MPxP+2Yfa8mFpi9ddeQiK7OnZy9j9X5r5/0G6OwpQ== 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=QzsnBRl1kO4JKVKbaIC5wMKWdaRVYwYb152iNzGXuOw=; b=kW4Ac8sFVKgo0JTjGh3iICACmsammiqA/+5mXv4OHp8GZlU3NYr6vYk13mCtO/ecpShkzBmSk6y0cdjOt2TQOlfiGtIIxVEwxk3G5o+wBTSyYCsLZoophHHnki65F/4XHz7x/qgirx+ef446vcTgJvX3FF6IQrJpGX1BTZOFWm8HZMpmjMc6sY308NPpCae78/L8Dt3lUYZxTchHrH9BrpTPvlyiEfFnzwN3x8w3kR38M7aUIRn35rEHXHjtOFKf0wQPqvJ2cNBOBuf8+Wk9Oab+3K66yvYvgVxbBFk6pAqetSdEvpmI+55B6YAycM9qPOm0/ncasOcJgXpTLdDvYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QzsnBRl1kO4JKVKbaIC5wMKWdaRVYwYb152iNzGXuOw=; b=g3RP7ND696buziAhetPGGcp1KP/8eNyS8FvFnGX4xHd6yrtpOdQVC6gVsTf47+MvVgy0IeNdnnTPlt5KMSN3JtbLl/pvmcMfxNA3ZiCbdoYiNFH+1Vqp9PpO0XmRda6h2MiwGTaIXgw7cYMk54sQyjAmZTEKXCeyFZhsLb8TQdANWx0n2nlWFToKhFtBKOduPzo6YMDGIzfgwXfB2NCiCoaqAhsmBwlVgE1FPdV6NFrWCi2yBkqSdn8mHbjAJLcP2GUnnPD8+yF27v/DT1KmB5IMP976wCo6f8IAKP8sFgEWvOLMzMChCOJg5/UvfWPbLF27zP1GWxR3DB+qApf3jQ== Received: from BYAPR20MB2472.namprd20.prod.outlook.com (2603:10b6:a03:155::16) by SJ0PR20MB3642.namprd20.prod.outlook.com (2603:10b6:a03:2e9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 22 Apr 2022 15:42:44 +0000 Received: from BYAPR20MB2472.namprd20.prod.outlook.com ([fe80::3480:160a:eb92:d6e3]) by BYAPR20MB2472.namprd20.prod.outlook.com ([fe80::3480:160a:eb92:d6e3%6]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 15:42:44 +0000 From: icenowy@outlook.com To: Rob Herring , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Ulf Hansson , Linus Walleij , Andre Przywara Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Icenowy Zheng Subject: [PATCH 08/12] mmc: sunxi: add support for R329 MMC controllers Date: Fri, 22 Apr 2022 23:41:11 +0800 Message-ID: X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422140902.1058101-1-icenowy@aosc.io> References: <20220422140902.1058101-1-icenowy@aosc.io> X-TMN: [oSw8wRHTSxNMDQeBhamboNRKmzQ7x45A] X-ClientProxiedBy: HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) To BYAPR20MB2472.namprd20.prod.outlook.com (2603:10b6:a03:155::16) X-Microsoft-Original-Message-ID: <20220422154115.1068642-6-icenowy@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 489edf50-d672-41f6-de65-08da2476be39 X-MS-TrafficTypeDiagnostic: SJ0PR20MB3642:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sHYB3p1mlqlL7on0bOWXGDR10KBDVDVh3XQQOfzeDTVmpUmHILTOc5J91SmehyKifPP4p2A/dfjNUUIhOu54IhpiFk6n5z6IaK6Ix5o781b4Z7uYik/64+5Mg7vhm3wIYXaJeQlZ/5eAHTmOlDBrEz4CDooarpfaCYKuIYpdn9ukmjorIq6+aRZcXkp4IZFHUM37t/fNKC27Q6rV9kkAk3WAr4IwUq+j92l/oP2ptlLaoeJho1AqsZcH2nAXs7+ibJDST6KkmuWNwwXTdSdxqBz43t2M8AfvcSObKTHUBSKzFdLuLiSU/HLXAqKrqg7AbK3sYCVxlT+G6Ik2XNa+rlAqWOxXUZCnLQBPNQlh35cj5f/i3rDC/TvcIDjcsmIAK+ZzgSozPLGedaoA/5QmoN6BXA0t2D2wv0HVhC1CaBagjCIpu+S0UE3aFMmeyPEAPDExLj/+TSXf/Jz1w+fAEpboNpNAr1KRX7wX0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lWwZb64y9RYEzVB3ZaV8fpbG90Xr8ILEO7dSqvx2y/4rxmnxmshXeaIdgLiwfifLQqmuHgsPyBsWt3Kf0Yt4bx2SNeWGR/QkZWNTJg9A+DUo6sC2E1ExeapJ9/kD8xyB97Y6rpl5j9nEkYpSBHVU4cV2FIHYpiwzhvE/gCouE2U/TZhEJ7DHq0YPOCphADq7D3zunMU4RPQLAKAhAfE97s66YfaflZMWtRrJC8TGw11D6BIKso79uvKFqltJfHq9CbitQ2mBDpLAS71F/fBOItfVuIzN1qAzDzLS5d1XxXwG/QH35ciblV/UCRiOS3ws3CgPDS69KBjmK/Xn2RrU9RTZqnj1ss2qa0BdAzUtAcgLr+fUklTQKWV4h2ROfQhFID3lm0Qr4WQGuBaBtbfROcv4UZT165f7aZmT4aTWGPLXBkFCuCmrypigG+yJ6LrXC3l5cVyBriKO7KJeXB6Ka7KB/pNoSE/YvGsigqo3IGsZAlqzlwWd4b/jb5mcW5R9QTjETdx+3wuxTzrxZlPx+rAF39I= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 489edf50-d672-41f6-de65-08da2476be39 X-MS-Exchange-CrossTenant-AuthSource: BYAPR20MB2472.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 15:42:44.5206 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR20MB3642 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_084250_768549_C51BFE35 X-CRM114-Status: GOOD ( 11.50 ) 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 From: Icenowy Zheng The two MMC controllers in Allwinner R329 have a mixed feature set comparing to the previous SoCs' ordinary MMC and eMMC controllers. Add support for them. Signed-off-by: Icenowy Zheng Acked-by: Samuel Holland --- drivers/mmc/host/sunxi-mmc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 0e8fbf4957d8..06934eef8be5 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1207,6 +1207,15 @@ static const struct sunxi_mmc_cfg sun50i_a100_emmc_cfg = { .needs_new_timings = true, }; +static const struct sunxi_mmc_cfg sun50i_r329_cfg = { + .idma_des_size_bits = 13, + .idma_des_shift = 2, + .clk_delays = NULL, + .can_calibrate = true, + .mask_data0 = true, + .needs_new_timings = true, +}; + static const struct of_device_id sunxi_mmc_of_match[] = { { .compatible = "allwinner,sun4i-a10-mmc", .data = &sun4i_a10_cfg }, { .compatible = "allwinner,sun5i-a13-mmc", .data = &sun5i_a13_cfg }, @@ -1218,6 +1227,7 @@ static const struct of_device_id sunxi_mmc_of_match[] = { { .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg }, { .compatible = "allwinner,sun50i-a100-mmc", .data = &sun50i_a100_cfg }, { .compatible = "allwinner,sun50i-a100-emmc", .data = &sun50i_a100_emmc_cfg }, + { .compatible = "allwinner,sun50i-r329-mmc", .data = &sun50i_r329_cfg }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sunxi_mmc_of_match);