From patchwork Thu Sep 5 09:43:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 13792069 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 F1FBBCD5BA2 for ; Thu, 5 Sep 2024 09:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding: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=b5DOIcT+K2RMRm8g2YmmN51MmSBtg76QWoltVLmtXZA=; b=BL9KQXJ+2tV7vVDTQqt84bW46s 6dmu1JRWBcM5B2MGKUVWUqeC+qF3RY+8zTNJV75/VsY03Bfj7YwagtM2XusFDXgKNj8Bu/hJ/kTwc x0KSWxs0K7qqUwToaM23j2ahZq9Kwu8cX1SnazgS2YIo0QrQIMyorB1+p2wCGbFdv68ys0WAd2QxY RtXzTdDWZKPPuaY+CUC5XA8x4Jt+G46uLwX/5yj/ecSE0o3bCZwLZcFPs7MkYvSYlK1DCo7ju95XQ UJcDH9vEY9bOKCwXs9LuuXPIdx/5R7YGfz91OGNY2zkfLNVoT5YH6K6TDk/ypm3uX9sUJeq7/gQKO Y6kY0cSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm96h-00000007q83-0ghw; Thu, 05 Sep 2024 09:48:51 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm938-00000007p5T-2JRI for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 09:45:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t8Wd72B3zvn+pgV1hev2q+jDtt+uX0F59BzsvTOPc67xnwoP8XsJUbW+pZWoy7/Ri4vLeMsgm1txlGAyddUWVNeT2b6Wehp1VNZzd0xGIGrpr2wY6ZLczg9toxuU38sqLeOX7l/T0M5hfMK/ecMAPcp7u0tCglqTFzw4EGTFRkW/Zlq0VsMJRz9C6/0BnDLVBvda/s217pZ89EEDWNSSKSBwVnyrENUKQKJeB2uKRr83HPLhhRrWa5T2uyBJT9vi/Yj5PrIJI623KGr8xzluysjY2Y2MLaJG3DfVyOxyMEGF4+nUkGpRTDnIXsVMh9OY7cOrzUMa+pdnbxjIRnZjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=b5DOIcT+K2RMRm8g2YmmN51MmSBtg76QWoltVLmtXZA=; b=m++a2m3LcBDj8fbhcp2SmZbFDS1Pf2FWC2VZLVQy8CsBSzUai9SkyS9JYe4mqK4AY7Gr3vFelkaPXApy5vgESbXanQsb5EcXQLPBKz3D8iVsAXdwMMl3CJmMD6MrQg/ZzXtVBEURP5fKGsGARWmEz1bhnAOkTq0Cki4/YBvDhCj77KzqiHOnNSiOZ7GGXOpnF9MAkHzXkHlvuU+COeY5aEAAZHJ5eeWAxWfHIx4HMtsXAgT+eYxdGG7fLS0Tmj9ShGFB6WAuF6h4PqCRGzQPmwNGJj6O8JEPTgp5MLrBAoD8UvweHThks5uMZ1YOYFSlVZ6+lhqyZrcXPsDoRyWZPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b5DOIcT+K2RMRm8g2YmmN51MmSBtg76QWoltVLmtXZA=; b=LSxLKJTP7Mn58DVmpt3+iAYTR2qaQuLtAc1q0CLLNrQmkJU9N8GkZrR3D88yAZ5mLRofgHTvf06UFigcDXiMz+s6dv6Vk3+PtVnY+CT7QZ5HYrGV+5x3BAjCZz7j5pDNOKCGYCM9LbZXR5f1oxUTjJPhgKJKCXMJ+ZQDXTuShgi++Xs3+hBRuAnEEyIB89LRM9JgqiRXOt+Jl00MlNqvSkDQu7HPnZIyuL2goruMmSS7RXxlANVsvIU+IYUCMpd3Wd2z6SUeeexQhMmFdviD0g4pCSmnwZ0sqwJTxWI0HgcuUAJGAHTnx12ATs9gkq+dZp74Q1Bd3DTiJWwSdTD/Mg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU0PR04MB9496.eurprd04.prod.outlook.com (2603:10a6:10:32d::19) by GV1PR04MB10306.eurprd04.prod.outlook.com (2603:10a6:150:1c9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Thu, 5 Sep 2024 09:45:08 +0000 Received: from DU0PR04MB9496.eurprd04.prod.outlook.com ([fe80::4fa3:7420:14ed:5334]) by DU0PR04MB9496.eurprd04.prod.outlook.com ([fe80::4fa3:7420:14ed:5334%4]) with mapi id 15.20.7918.024; Thu, 5 Sep 2024 09:45:08 +0000 From: haibo.chen@nxp.com To: han.xu@nxp.com, yogeshgaur.83@gmail.com, broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, singh.kuldeep87k@gmail.com, hs@denx.de, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, haibo.chen@nxp.com, peng.fan@nxp.com, stable@kernel.org Subject: [PATCH v3 3/4] spi: fspi: add support for imx8ulp Date: Thu, 5 Sep 2024 17:43:37 +0800 Message-Id: <20240905094338.1986871-4-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240905094338.1986871-1-haibo.chen@nxp.com> References: <20240905094338.1986871-1-haibo.chen@nxp.com> X-ClientProxiedBy: SG2P153CA0020.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::7) To DU0PR04MB9496.eurprd04.prod.outlook.com (2603:10a6:10:32d::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9496:EE_|GV1PR04MB10306:EE_ X-MS-Office365-Filtering-Correlation-Id: 487af6ba-2a7f-4f49-3f09-08dccd8f6d83 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: tquxmhjysCSZapNrs3nphIB1Q6Jzq048l0gVw3omcX1NFrPEg9Br/bijJqFkyaoIyNJXWg/qa25DwCoLA6O3pEMrkTTeFAyTaMCJ0CAlTAo2i5T49OvRCoJ8K6tL12HL5zYRL6MmzACsSBf7tC8ViYWbR4hPMSDqBDqUrLCeI09toCZ2TMkBMb1bDVa240sf2aJzERstabVTYabT7fN1kYa5+zgbfsQ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2JwmNSBcoXpORzf/fEunrEEZPMno37+ELF3bIvUOPzMnVfi88Vy5jftSXBQ7iSzgEKeczH27Y7/917VaYPfm5uvei1Bt2EDlmdEmd7O7buOTJPN3TShWoVmof2BhDN4UQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9496.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: siHp5LMeJ7sDUlC4BFLLwsVal16gq2WhznfmTdYFenODST4yyp09dWnbP4nxAGhKNAyTbQm0/PZuBLasiBiJoYIr3Lg1Qc6Zqd120cslEyiGlPC+l6a8P4o/BMA5ojmH9mB4SDcEJt27RFfjY4l4wOfSZLsz+1MuPN4Oo4VCTuEMvbpqLYakZW59cFPGg1DB8RKnO5cQHpjGrboqOb4cIkEizGobVxJ98eMKl8JXvaw6gxzi6d3ub0t7fv31iroGbiOCXOrQ8R0udeaEJj/bI78OawUKIRqRZrFDyZAy3FggY+h4yVnFKteTZb8hKHuVwoW1sSATISxbCYNKc36WDaXn/hnDbKdePVx22zVhV7ec1pqol4ZAgzljFFTRDeB9zYTKJ5wleRA/d5ylfK3xiQWsiZ5BasnthI6nfOkCDFTjz9P3rPXdUYeshnBZuQtfkvrCzPKfnWB1fO+3EkLRRBIdcoMZp6krTR6S7X/88/T3ABr+Kf7OIvFv+aMOWl1DhCm0X48CWIrGLvcRNNi2M4aWTfIsyYnCp6VlD1V3feLb+DVA+Jwr4oU23w2u+i0YOdSiR428iSTIx8VL5a21IBL0aR/qINa5ZMH78JzXUnA5xSYh4K6nYskirQgxTdgRcE+YQx6TbSPsduH8XYlb45vPey0P870EPmW1CJi4nKDH69eQOi0Hi0UUBb486cVso1/X+ULE8PTpg/tP5gTDfR2+idpbdO8zaPH3azCxjpn8mA511zVAsI5NrALM3SGvCa9d+EntmFCOcD5ooARqZd39wbvgVG490Brwdq52SD+HDTGmVfyw7kO+Kk0stwIDmqstlA2dQ46/ipYaMgrLU4v4LPdYSIaPkCnm84zBceL7RrLjihjUmHnerD5Tt+MmUBHCv/BV75556obiyr1lFtSEqjzqkcoUGHBPU0l4gy3584kL3Oks5xEFd55Om8ZONAL5ztY36ZRgG6+JYhX6CI/X3vqmX89cXmv5dK5YazmgvQokSXObOdc5Mh7ab8df55l+LWM8ivZaiS8EFm6OsxG1tLRO1IZ1dcCOWPiDK1usWena/kj9PKwzXvdohm3/mnI8RCHw9NWMagnYWFe6ur42mLeKnlGrpQSh9RwQTV6G6GlvA9uCWVaZkObKPZL10W2GCLbcsKI1k6VywQFbWBw+gmL+upUFv8tMG6uG17QlihfUZ8H2qfEX/NOjsMy8QgJJvEefgFtNyBcKuaUAzBdPe3xeaw8RwOxZHx9s0GVqijwRcbSE93WgcQsZ6gz5OIThkRBP/sWVf0mEQIXgYE/MgHqMetb4xsdqO/9+r52d+/4wwA7HU1CGLaTexfh6djlT34IXKmQbLccisXdlZs3DpdvTdoyF+Z5xXCi5Pu2EIcSr7OKidFChuJXiaWQ87OtiVVJOC+rVOatvvyKXQE7dPOW18n8BcD/qOWyOx25U0b28e90TSs06Z/RFV8fMeDq8U/C2qq+33Cpf7b5uAOP+JKkXvOfw1z3a9AJsYhIUlUxk8PNug9NgStt51Vy9rr6QcaosAt8sImgjgRcT8a/T8NuPJxsbGhunV/NaCtkguc3dbWL00MQ86CMDQ12D X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 487af6ba-2a7f-4f49-3f09-08dccd8f6d83 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9496.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 09:45:08.2926 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ACl2X3gAjABfSpHzHi/+P5PnxrF04eAHbDTvz51PODsW6SvnzmZxR/0dB58tgVpR3zm6SXfd9uLaDRSwQTiLKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10306 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_024510_619484_3C4A77AB X-CRM114-Status: GOOD ( 13.19 ) 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: Haibo Chen The flexspi on imx8ulp only has 16 LUTs, different with others which have up to 32 LUTs. Add a separate compatible string and nxp_fspi_devtype_data to support flexspi on imx8ulp. Fixes: ef89fd56bdfc ("arm64: dts: imx8ulp: add flexspi node") Cc: stable@kernel.org Signed-off-by: Haibo Chen Reviewed-by: Frank Li --- drivers/spi/spi-nxp-fspi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index f42c14d80289..69e427b1903b 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -371,6 +371,15 @@ static struct nxp_fspi_devtype_data imx8dxl_data = { .little_endian = true, /* little-endian */ }; +static struct nxp_fspi_devtype_data imx8ulp_data = { + .rxfifo = SZ_512, /* (64 * 64 bits) */ + .txfifo = SZ_1K, /* (128 * 64 bits) */ + .ahb_buf_size = SZ_2K, /* (256 * 64 bits) */ + .quirks = 0, + .lut_num = 16, + .little_endian = true, /* little-endian */ +}; + struct nxp_fspi { void __iomem *iobase; void __iomem *ahb_addr; @@ -1295,6 +1304,7 @@ static const struct of_device_id nxp_fspi_dt_ids[] = { { .compatible = "nxp,imx8mp-fspi", .data = (void *)&imx8mm_data, }, { .compatible = "nxp,imx8qxp-fspi", .data = (void *)&imx8qxp_data, }, { .compatible = "nxp,imx8dxl-fspi", .data = (void *)&imx8dxl_data, }, + { .compatible = "nxp,imx8ulp-fspi", .data = (void *)&imx8ulp_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, nxp_fspi_dt_ids);