From nobody Mon Feb 9 21:21:51 2026 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 BA481EB64DD for ; Thu, 15 Jun 2023 09:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244423AbjFOJVX (ORCPT ); Thu, 15 Jun 2023 05:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245322AbjFOJVO (ORCPT ); Thu, 15 Jun 2023 05:21:14 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A4762125; Thu, 15 Jun 2023 02:21:12 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35F8aRx3016209; Thu, 15 Jun 2023 11:20:52 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=qPbUB15wIZOIUJ8yrzqh32Nl3JHBM2M82YtjJjGSCD0=; b=ClU5UwTTAUSs3D4iPLB3N6q+nrSIqUTUhR/NVipfXdfMQ3kwcGqLR33N6vklgRGmMjUk 6eBPHy5FdiPhW8rabg9OGe+/8nwX5YaBCgQaUFyu1CSUfd81GJrIuzcrSa9TcTI32kcq 9xrpc3FpPPyOQ+18paZ55b+hWvdZW6DdmCVtG4CA8II08pufz2+SmFDpUkOm/9HihEwt R7lZrfPOGQBlkFOhJJiSoTzNzMnzoTNvzafdqj3kBJVYKUdFOqZmdpwUXLdc5LEjwfO1 KXMLImD36F8x+Ea/C16X4+rvGqKMUUxVcW6Ur+Qq+tvjKy9r+AFGGak8A2r05kxuMGIM mQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3r7wgx1er0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jun 2023 11:20:52 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6C49910002A; Thu, 15 Jun 2023 11:20:51 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 63A16211F02; Thu, 15 Jun 2023 11:20:51 +0200 (CEST) Received: from localhost (10.201.21.210) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 15 Jun 2023 11:20:51 +0200 From: Yann Gautier To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , , CC: Conor Dooley , Russell King , Philipp Zabel , Christophe Kerello , , Marek Vasut , Alexandre Torgue , Maxime Coquelin , Linus Walleij , Yang Yingliang , Xiang wangx , , , Yann Gautier Subject: [PATCH 3/6] mmc: mmci: Add support for sdmmc variant revision v3.0 Date: Thu, 15 Jun 2023 11:19:58 +0200 Message-ID: <20230615092001.1213132-4-yann.gautier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230615092001.1213132-1-yann.gautier@foss.st.com> References: <20230615092001.1213132-1-yann.gautier@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.201.21.210] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-15_06,2023-06-14_02,2023-05-22_02 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This is an update of the SDMMC revision v2.2, with just an increased FIFO size, from 64B to 1kB. Signed-off-by: Yann Gautier --- drivers/mmc/host/mmci.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index eae3d1c8934cb..3c54ab2c59176 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -306,6 +306,34 @@ static struct variant_data variant_stm32_sdmmcv2 =3D { .init =3D sdmmc_variant_init, }; =20 +static struct variant_data variant_stm32_sdmmcv3 =3D { + .fifosize =3D 256 * 4, + .fifohalfsize =3D 128 * 4, + .f_max =3D 267000000, + .stm32_clkdiv =3D true, + .cmdreg_cpsm_enable =3D MCI_CPSM_STM32_ENABLE, + .cmdreg_lrsp_crc =3D MCI_CPSM_STM32_LRSP_CRC, + .cmdreg_srsp_crc =3D MCI_CPSM_STM32_SRSP_CRC, + .cmdreg_srsp =3D MCI_CPSM_STM32_SRSP, + .cmdreg_stop =3D MCI_CPSM_STM32_CMDSTOP, + .data_cmd_enable =3D MCI_CPSM_STM32_CMDTRANS, + .irq_pio_mask =3D MCI_IRQ_PIO_STM32_MASK, + .datactrl_first =3D true, + .datacnt_useless =3D true, + .datalength_bits =3D 25, + .datactrl_blocksz =3D 14, + .datactrl_any_blocksz =3D true, + .datactrl_mask_sdio =3D MCI_DPSM_ST_SDIOEN, + .stm32_idmabsize_mask =3D GENMASK(16, 6), + .stm32_idmabsize_align =3D BIT(6), + .dma_lli =3D true, + .busy_timeout =3D true, + .busy_detect =3D true, + .busy_detect_flag =3D MCI_STM32_BUSYD0, + .busy_detect_mask =3D MCI_STM32_BUSYD0ENDMASK, + .init =3D sdmmc_variant_init, +}; + static struct variant_data variant_qcom =3D { .fifosize =3D 16 * 4, .fifohalfsize =3D 8 * 4, @@ -2500,6 +2528,11 @@ static const struct amba_id mmci_ids[] =3D { .mask =3D 0xf0ffffff, .data =3D &variant_stm32_sdmmcv2, }, + { + .id =3D 0x00353180, + .mask =3D 0xf0ffffff, + .data =3D &variant_stm32_sdmmcv3, + }, /* Qualcomm variants */ { .id =3D 0x00051180, --=20 2.25.1