From patchwork Thu Feb 3 01:51:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12733748 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 E9CD2C433EF for ; Thu, 3 Feb 2022 01:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348857AbiBCBvX (ORCPT ); Wed, 2 Feb 2022 20:51:23 -0500 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:44063 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348861AbiBCBvT (ORCPT ); Wed, 2 Feb 2022 20:51:19 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 861152B000B2; Wed, 2 Feb 2022 20:51:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 02 Feb 2022 20:51:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=oqPS/m8KdcwSEqSZDEqPQcylkLS5Bx Wh5VCZ7RIAJTQ=; b=OPfolPSeFqBN7+2WBft/PzG9Qf+vuXW7fGAtKcdwY7hBt9 p//R5NQFO8Kd8XKpS0AzBpPbmh6/857b0+XMTCV0QTKddL/hph82cg8tYOROKOtD m60SGmJRDF1MAX1WvmZUIDJ/Q7keZNxKZmJD569fVCAVt85JLxWeQkqVnBqhpcko qobYSRLY2lz7muP3qb8/cYeZ+Rysek0IdjjVull/WeSeUQTfVWCTEPzlHi4eKCd9 ujDvEsqndXQsLQ8Y0LQmT3MHtQBrIQeb15Mx+IlXQe28AcDzx5JNEE8TU14hBQ9X jGuFd+ova53J/nSVYSANOwAxDlj4N8EcjpKNWghg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=oqPS/m 8KdcwSEqSZDEqPQcylkLS5BxWh5VCZ7RIAJTQ=; b=gtvImH1Up2Cm+sAJovBnj/ u1UwtFmOzaQSgDyS4VgyIE/odakeT1coAhPNQUoP2EbzWRt7I3ZkE4zL71ev9nhn dUUJvB5W55Ze2HYat5SvQcaBJ36KSwWpkPAyvypxdAutC8LnOMc2VtQB3wPEqb0F +b6VzOKqStlEKY4a7W4KMtTFNtPi2zgKCsyn59EkdQOwJviotbdC+SuE2T7VZtL7 5rTeMmaRLuHN45HPFJNyeyQmkb/OpBec1U6QcchXLHX/ErkNFu9JvPnDl2qaUVGc On1nyiSF4cd6YpMWnk2aKphBYw053OCCz9HwWKB+1A5XB2ij+awvly5kKtSh5dPw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 20:51:16 -0500 (EST) From: Samuel Holland To: Ulf Hansson Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland Subject: [PATCH 2/2] mmc: sunxi-mmc: Add D1 MMC variant Date: Wed, 2 Feb 2022 19:51:11 -0600 Message-Id: <20220203015112.12008-2-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220203015112.12008-1-samuel@sholland.org> References: <20220203015112.12008-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org D1's MMC controllers are unique in that they have the DMA address shift (like A100) with a 13-bit descriptor size field (like sun4i). Add the compatible and parameters for this new variant. Signed-off-by: Samuel Holland --- drivers/mmc/host/sunxi-mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 2702736a1c57..c62afd212692 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1167,6 +1167,14 @@ static const struct sunxi_mmc_cfg sun9i_a80_cfg = { .can_calibrate = false, }; +static const struct sunxi_mmc_cfg sun20i_d1_cfg = { + .idma_des_size_bits = 13, + .idma_des_shift = 2, + .can_calibrate = true, + .mask_data0 = true, + .needs_new_timings = true, +}; + static const struct sunxi_mmc_cfg sun50i_a64_cfg = { .idma_des_size_bits = 16, .clk_delays = NULL, @@ -1205,6 +1213,7 @@ static const struct of_device_id sunxi_mmc_of_match[] = { { .compatible = "allwinner,sun7i-a20-mmc", .data = &sun7i_a20_cfg }, { .compatible = "allwinner,sun8i-a83t-emmc", .data = &sun8i_a83t_emmc_cfg }, { .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg }, + { .compatible = "allwinner,sun20i-d1-mmc", .data = &sun20i_d1_cfg }, { .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg }, { .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg }, { .compatible = "allwinner,sun50i-a100-mmc", .data = &sun50i_a100_cfg },