From patchwork Mon Sep 14 15:34:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1363732 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NXsGkJ8f; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bqr850KkPz9sPB for ; Tue, 15 Sep 2020 01:37:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57D0C82353; Mon, 14 Sep 2020 17:35:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NXsGkJ8f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 968AF81BEB; Mon, 14 Sep 2020 17:35:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 38CF181BEB for ; Mon, 14 Sep 2020 17:35:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id d20so511439qka.5 for ; Mon, 14 Sep 2020 08:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=REAFlc6mz/48MKjBcRs9+fUy/MqHrypT/s1sHbV4ah0=; b=NXsGkJ8f7wOmAoJ7zO2KZRHV2qYimMCcQvVqTM8IhbLT5aSi6eiLECiflVUMnMDPmF OIpurjo6PPE/ShhX4cWcpy94Ouge/3LB2IDyfJ/d4+6tSDVxw1kNJ5SQaGngZDUwrp8A j0WfIdygBdoIVv/zTXGv3f1d7XRP0FebY1nn8BRA+Om7ndcMApog88zwpGcf/R3Zzrw/ Zq3O4UsJOGSbX+BpJ47HsqjXyTr3o8XgZk+SPkQbpVJqJgsaxjo8el+bv4a2vKut8XPX 7NlQwhQmR2tX7tjGds6OSYMAm3KY1C48U9PhFvjFQTF2hHXdbzjoBeaAGL3vnAQ02qX8 b9vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=REAFlc6mz/48MKjBcRs9+fUy/MqHrypT/s1sHbV4ah0=; b=dY4CZFCTJ/oU9fCxQe1vpNsw+iIJRzlFWofs2vrvgMgwFpeNcM6G//Z8/7z5tcqd1E t9sDRtcy91UXv8PZvuirpBP1y0SmCMQTgVprr+3VZD6wxEF5jx4yW1BKdzwQXBJmrTYi MJfk1oiYqTOMTnVhbuIIs8WvC2iCQRLEivNn8SZJ87NHm2bPoiaElqykAQkarzszV7kM YKHrfwSr/vF0XO8aNvXluTWOPbL1+iHlODm3I1/mxdGkDpHIxizo+UdOCdxwKoBGZqAp 8uYtdZqFDJeWtUoPmMK6pVKSzsjLMhR1s0yh8qd2OrYgwBLMZOm5lnnQEDnINCBPWxqT ym5w== X-Gm-Message-State: AOAM5330bCvWX8SxeB8wyWnzPHdlxtUBlfUWrwYv0c9mLbG5Gs5KwyL2 Fh7Bm/woMhSIImAUlLjevUzaP4sHn2S/YcQD X-Google-Smtp-Source: ABdhPJzOnMN2VzQWYpzTFY9/6Mz80SvQuEzA5sxrx7llVdlXzVz4pkrHT4KeArhDiCfigbAwSXvwEQ== X-Received: by 2002:a37:8405:: with SMTP id g5mr13351635qkd.248.1600097725581; Mon, 14 Sep 2020 08:35:25 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id b34sm15246955qtc.73.2020.09.14.08.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 08:35:25 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, uboot-snps-arc@synopsys.com Cc: Marek Vasut , Horatiu Vultur , Eugeniy Paltsev , Jagan Teki , Heinrich Schuchardt , Sean Anderson , Alexey Brodkin , Daniel Schwierzeck , Gregory CLEMENT , Lars Povlsen , Ley Foon Tan , Simon Goldschmidt Subject: [PATCH v3 06/10] spi: dw: Configure ctrlr0 layout based on compatible string Date: Mon, 14 Sep 2020 11:34:59 -0400 Message-Id: <20200914153503.91983-7-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200914153503.91983-1-seanga2@gmail.com> References: <20200914153503.91983-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Ctrlr0 can have several different layouts depending on the specific device (dw-apb-ssi vs dwc-ssi), and specific version. Update the driver to support three specific configurations: dw-apb-ssi 16-bit (default), dw-apb-ssi 32-bit, and dwc-ssi. dw-apb-ssi 16-bit (versions up to 3.22) is the version of the device on Altera Cyclone V, Arria V, and Arria 10 SoCFPGAs; and MSCC Ocelot and Jaguar2 SoCs. This is the version this driver supported before this change. The layout of ctrlr0 is: | 31 .. 16 | | other stuff | | 15 .. 10 | 9 .. 8 | 7 .. 6 | 5 .. 4 | 3 .. 0 | | other stuff | tmod | mode | frf | dfs | dw-apb-ssi 32-bit (versions 3.23 and up) is the version of the device on Intel Quark D20000 SoCs; Intel Stratix 10 and Agilex SoCFPGAs; Cobham UT32M0R500 SoCs; and Canaaan Kendryte K210 SoCs. The layout of ctrlr0 is: | 31 .. 23 | 22 .. 21 | 20 .. 16 | | other stuff | spi_frf | dfs_32 | | 15 .. 10 | 9 .. 8 | 7 .. 6 | 5 .. 4 | 3 .. 0 | | other stuff | tmod | mode | frf | dfs | The contents of the lower 16 bits have not changed, but the semantics have. dfs "...is only valid when SSI_MAX_XFER_SIZE is configured to 16." If SSI_MAX_XFER_SIZE is 32, then dfs_32 must be used instead. I have been unable to determine if SSI_MAX_XFER_SIZE is a runtime constant, or if it is possible to detect its value at runtime. Devices with an SSI_MAX_XFER_SIZE of 16 can use the older ctrl0 layout. spi_frf is used to configure dual and quad spi, which this driver does not yet support. dwc-ssi is the version of the device on Intel Keem Bay SoCs; and Canaan Kendryte K210 SoCs. The layout of ctrlr0 is: | 31 .. 24 | 23 .. 22 | 21 .. 16 | | other stuff | spi_frf | other stuff | | 15 .. 12 | 11 .. 10 | 9 .. 8 | 7 .. 6 | 4 .. 0 | | other stuff | tmod | mode | frf | dfs_32 | The semantics of the fields have not changed since the previous version. However, SSI_MAX_XFER_SIZE is effectively always 32. To support these three different layouts, we model our approach on the one which the Linux kernel has taken. Each SoC which uses this device has had its own compatible string added. In addition, a few generic compatible strings have been added. During probe, the driver calls an init function stored in driver_data. This init function is responsible for supplying the update_cr0 function, as well as doing any SoC-specific initialization. At the moment, there is no SoC-specific work to be done. In addition, there is a generic init function which tries to detect the device type based on its version. This is used when the non-specific "snps,dw-apb-ssi" compatible string is matched. Although the Intel Quark D20000 is not supported by either U-Boot or Linux, I have added a compatible string for its version, since it was the earliest documented version I could find which included a reference to the DFS_32 field. The style of and information behind this commit is based on the Linux MMIO driver for these devices. Specific reference was made to the series adding support for Intel Keem Bay SoCs [1]. [1] https://lore.kernel.org/linux-spi/20200505130618.554-1-wan.ahmad.zainie.wan.mohamad@intel.com/ Signed-off-by: Sean Anderson Tested-by Eugeniy Paltsev --- Changes in v3: - Prefix log messages with SPI@
Changes in v2: - Configure ctrlr0 register layout based on compatible string - Split documentation off into its own patch drivers/spi/designware_spi.c | 208 ++++++++++++++++++++++++++++++----- 1 file changed, 178 insertions(+), 30 deletions(-) diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 110846a16e..863353bbe1 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -3,6 +3,7 @@ * Designware master SPI core controller driver * * Copyright (C) 2014 Stefan Roese + * Copyright (C) 2020 Sean Anderson * * Very loosely based on the Linux driver: * drivers/spi/spi-dw.c, which is: @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -54,28 +56,43 @@ #define DW_SPI_DR 0x60 /* Bit fields in CTRLR0 */ -#define SPI_DFS_OFFSET 0 +#define CTRLR0_DFS_MASK GENMASK(3, 0) -#define SPI_FRF_OFFSET 4 -#define SPI_FRF_SPI 0x0 -#define SPI_FRF_SSP 0x1 -#define SPI_FRF_MICROWIRE 0x2 -#define SPI_FRF_RESV 0x3 +#define CTRLR0_FRF_MASK GENMASK(5, 4) +#define CTRLR0_FRF_SPI 0x0 +#define CTRLR0_FRF_SSP 0x1 +#define CTRLR0_FRF_MICROWIRE 0x2 +#define CTRLR0_FRF_RESV 0x3 -#define SPI_MODE_OFFSET 6 -#define SPI_SCPH_OFFSET 6 -#define SPI_SCOL_OFFSET 7 +#define CTRLR0_MODE_MASK GENMASK(7, 6) +#define CTRLR0_MODE_SCPH 0x1 +#define CTRLR0_MODE_SCPOL 0x2 -#define SPI_TMOD_OFFSET 8 -#define SPI_TMOD_MASK (0x3 << SPI_TMOD_OFFSET) -#define SPI_TMOD_TR 0x0 /* xmit & recv */ -#define SPI_TMOD_TO 0x1 /* xmit only */ -#define SPI_TMOD_RO 0x2 /* recv only */ -#define SPI_TMOD_EPROMREAD 0x3 /* eeprom read mode */ +#define CTRLR0_TMOD_MASK GENMASK(9, 8) +#define CTRLR0_TMOD_TR 0x0 /* xmit & recv */ +#define CTRLR0_TMOD_TO 0x1 /* xmit only */ +#define CTRLR0_TMOD_RO 0x2 /* recv only */ +#define CTRLR0_TMOD_EPROMREAD 0x3 /* eeprom read mode */ -#define SPI_SLVOE_OFFSET 10 -#define SPI_SRL_OFFSET 11 -#define SPI_CFS_OFFSET 12 +#define CTRLR0_SLVOE_OFFSET 10 +#define CTRLR0_SRL_OFFSET 11 +#define CTRLR0_CFS_MASK GENMASK(15, 12) + +/* The next two fields are only present on version 4.* */ +#define CTRLR0_DFS_32_MASK GENMASK(20, 16) + +#define CTRLR0_SPI_FRF_MASK GENMASK(22, 21) +#define CTRLR0_SPI_FRF_BYTE 0x0 +#define CTRLR0_SPI_FRF_DUAL 0x1 +#define CTRLR0_SPI_FRF_QUAD 0x2 + +/* Bit fields in CTRLR0 based on DWC_ssi_databook.pdf v1.01a */ +#define DWC_SSI_CTRLR0_DFS_MASK GENMASK(4, 0) +#define DWC_SSI_CTRLR0_FRF_MASK GENMASK(7, 6) +#define DWC_SSI_CTRLR0_MODE_MASK GENMASK(9, 8) +#define DWC_SSI_CTRLR0_TMOD_MASK GENMASK(11, 10) +#define DWC_SSI_CTRLR0_SRL_OFFSET 13 +#define DWC_SSI_CTRLR0_SPI_FRF_MASK GENMASK(23, 22) /* Bit fields in SR, 7 bits */ #define SR_MASK GENMASK(6, 0) /* cover 7 bits */ @@ -87,6 +104,11 @@ #define SR_TX_ERR BIT(5) #define SR_DCOL BIT(6) +/* Bit fields in VERSION */ +#define VERSION_MAJOR_MASK GENMASK(31, 24) +#define VERSION_MINOR_HIGH_MASK GENMASK(23, 16) +#define VERSION_MINOR_LOW_MASK GENMASK(15, 8) + #define RX_TIMEOUT 1000 /* timeout in ms */ struct dw_spi_platdata { @@ -99,6 +121,8 @@ struct dw_spi_priv { struct reset_ctl_bulk resets; struct gpio_desc cs_gpio; /* External chip-select gpio */ + u32 (*update_cr0)(struct dw_spi_priv *priv); + void __iomem *regs; unsigned long bus_clk_rate; unsigned int freq; /* Default frequency */ @@ -127,6 +151,86 @@ static inline void dw_write(struct dw_spi_priv *priv, u32 offset, u32 val) __raw_writel(val, priv->regs + offset); } +static u32 dw_spi_dw16_update_cr0(struct dw_spi_priv *priv) +{ + return FIELD_PREP(CTRLR0_DFS_MASK, priv->bits_per_word - 1) + | FIELD_PREP(CTRLR0_FRF_MASK, priv->type) + | FIELD_PREP(CTRLR0_MODE_MASK, priv->mode) + | FIELD_PREP(CTRLR0_TMOD_MASK, priv->tmode); +} + +static u32 dw_spi_dw32_update_cr0(struct dw_spi_priv *priv) +{ + return FIELD_PREP(CTRLR0_DFS_32_MASK, priv->bits_per_word - 1) + | FIELD_PREP(CTRLR0_FRF_MASK, priv->type) + | FIELD_PREP(CTRLR0_MODE_MASK, priv->mode) + | FIELD_PREP(CTRLR0_TMOD_MASK, priv->tmode); +} + +static u32 dw_spi_dwc_update_cr0(struct dw_spi_priv *priv) +{ + return FIELD_PREP(DWC_SSI_CTRLR0_DFS_MASK, priv->bits_per_word - 1) + | FIELD_PREP(DWC_SSI_CTRLR0_FRF_MASK, priv->type) + | FIELD_PREP(DWC_SSI_CTRLR0_MODE_MASK, priv->mode) + | FIELD_PREP(DWC_SSI_CTRLR0_TMOD_MASK, priv->tmode); +} + +static int dw_spi_dw16_init(struct udevice *bus, struct dw_spi_priv *priv) +{ + priv->update_cr0 = dw_spi_dw16_update_cr0; + return 0; +} + +static int dw_spi_dw32_init(struct udevice *bus, struct dw_spi_priv *priv) +{ + priv->update_cr0 = dw_spi_dw32_update_cr0; + return 0; +} + +static void dw_spi_print_version(struct dw_spi_priv *priv, u32 version, + char *driver) +{ + char *fmt; + + if (driver) + fmt = "SPI@%p: Device version %c.%c%c%c matches driver version %s\n"; + else + fmt = "SPI@%p: Device version %c.%c%c%c does not match any driver%.0s\n"; + + log_info(fmt, priv->regs, version >> 24, version >> 16, version >> 8, + version, driver); +} + +static int dw_spi_dw_generic_init(struct udevice *bus, struct dw_spi_priv *priv) +{ + u32 version; + + log_warning("SPI@%p: Compatible string did not specify device version.\n", + priv->regs); + + version = dw_read(priv, DW_SPI_VERSION); + switch (FIELD_GET(VERSION_MAJOR_MASK, version)) { + case '3': + if (FIELD_GET(VERSION_MINOR_HIGH_MASK, version) < '2' || + FIELD_GET(VERSION_MINOR_LOW_MASK, version) < '3') { + dw_spi_print_version(priv, version, "<3.23"); + return dw_spi_dw16_init(bus, priv); + } + case '4': + dw_spi_print_version(priv, version, ">=3.23"); + return dw_spi_dw32_init(bus, priv); + default: + dw_spi_print_version(priv, version, NULL); + return -ENOTSUPP; + } +} + +static int dw_spi_dwc_init(struct udevice *bus, struct dw_spi_priv *priv) +{ + priv->update_cr0 = dw_spi_dwc_update_cr0; + return 0; +} + static int request_gpio_cs(struct udevice *bus) { #if CONFIG_IS_ENABLED(DM_GPIO) && !defined(CONFIG_SPL_BUILD) @@ -161,6 +265,10 @@ static int dw_spi_ofdata_to_platdata(struct udevice *bus) /* Use 500KHz as a suitable default */ plat->frequency = dev_read_u32_default(bus, "spi-max-frequency", 500000); + + if (dev_read_bool(bus, "spi-slave")) + return -EINVAL; + log_info("SPI@%p max-frequency=%d\n", plat->regs, plat->frequency); return request_gpio_cs(bus); @@ -260,8 +368,11 @@ static int dw_spi_reset(struct udevice *bus) return 0; } +typedef int (*dw_spi_init_t)(struct udevice *bus, struct dw_spi_priv *priv); + static int dw_spi_probe(struct udevice *bus) { + dw_spi_init_t init = (dw_spi_init_t)dev_get_driver_data(bus); struct dw_spi_platdata *plat = dev_get_platdata(bus); struct dw_spi_priv *priv = dev_get_priv(bus); int ret; @@ -277,6 +388,12 @@ static int dw_spi_probe(struct udevice *bus) if (ret) return ret; + if (!init) + return -EINVAL; + ret = init(bus, priv); + if (ret) + return ret; + /* Currently only bits_per_word == 8 supported */ priv->bits_per_word = 8; @@ -407,23 +524,18 @@ static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen, if (flags & SPI_XFER_BEGIN) external_cs_manage(dev, false); - cr0 = (priv->bits_per_word - 1) | (priv->type << SPI_FRF_OFFSET) | - (priv->mode << SPI_MODE_OFFSET) | - (priv->tmode << SPI_TMOD_OFFSET); - if (rx && tx) - priv->tmode = SPI_TMOD_TR; + priv->tmode = CTRLR0_TMOD_TR; else if (rx) - priv->tmode = SPI_TMOD_RO; + priv->tmode = CTRLR0_TMOD_RO; else /* - * In transmit only mode (SPI_TMOD_TO) input FIFO never gets + * In transmit only mode (CTRL0_TMOD_TO) input FIFO never gets * any data which breaks our logic in poll_transfer() above. */ - priv->tmode = SPI_TMOD_TR; + priv->tmode = CTRLR0_TMOD_TR; - cr0 &= ~SPI_TMOD_MASK; - cr0 |= (priv->tmode << SPI_TMOD_OFFSET); + cr0 = priv->update_cr0(priv); priv->len = bitlen >> 3; log_debug("rx=%p tx=%p len=%d [bytes]\n", rx, tx, priv->len); @@ -477,7 +589,7 @@ static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen, static int dw_spi_set_speed(struct udevice *bus, uint speed) { - struct dw_spi_platdata *plat = bus->platdata; + struct dw_spi_platdata *plat = dev_get_platdata(bus); struct dw_spi_priv *priv = dev_get_priv(bus); u16 clk_div; @@ -549,7 +661,43 @@ static const struct dm_spi_ops dw_spi_ops = { }; static const struct udevice_id dw_spi_ids[] = { - { .compatible = "snps,dw-apb-ssi" }, + /* Generic compatible strings */ + + { .compatible = "snps,dw-apb-ssi", .data = (ulong)dw_spi_dw_generic_init }, + { .compatible = "snps,dw-apb-ssi-3.20a", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "snps,dw-apb-ssi-3.22a", .data = (ulong)dw_spi_dw16_init }, + /* + * The exact version of the Intel Quark D20000 SPI device is documented + * as 3.23*, so a "patch" version is not included. + */ + { .compatible = "snps,dw-apb-ssi-3.23", .data = (ulong)dw_spi_dw32_init }, + { .compatible = "snps,dw-apb-ssi-4.00a", .data = (ulong)dw_spi_dw32_init }, + /* + * Similarly, the version of spi0-2 on the Canaan Kendryte K210 is + * undocumented, and was determined empherically to be 4.01*. + */ + { .compatible = "snps,dw-apb-ssi-4.01", .data = (ulong)dw_spi_dw32_init }, + { .compatible = "snps,dwc-ssi-1.01a", .data = (ulong)dw_spi_dwc_init }, + + /* Compatible strings for specific SoCs */ + + /* + * Both the Cyclone V and Arria V share a device tree and have the same + * version of this device. This compatible string is used for those + * devices, and is not used for sofpgas in general. + */ + { .compatible = "altr,socfpga-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "altr,socfpga-arria10-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "canaan,kendryte-k210-spi", .data = (ulong)dw_spi_dw32_init }, + { .compatible = "canaan,kendryte-k210-ssi", .data = (ulong)dw_spi_dwc_init }, + /* FIXME: next two should be dw_spi_dw32_init; but they need testing */ + { .compatible = "intel,stratix10-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "intel,agilex-spi", .data = (ulong)dw_spi_dw16_init }, + /* FIXME: is this the correct version for the next four? */ + { .compatible = "mscc,ocelot-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "mscc,jaguar2-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "snps,axs10x-spi", .data = (ulong)dw_spi_dw16_init }, + { .compatible = "snps,hsdk-spi", .data = (ulong)dw_spi_dw16_init }, { } };