From patchwork Sun Feb 2 12:59:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11361579 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67555921 for ; Sun, 2 Feb 2020 13:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4448820658 for ; Sun, 2 Feb 2020 13:00:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JgIz0s5w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbgBBNAD (ORCPT ); Sun, 2 Feb 2020 08:00:03 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:43336 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgBBNAD (ORCPT ); Sun, 2 Feb 2020 08:00:03 -0500 Received: by mail-yw1-f68.google.com with SMTP id f204so9471670ywc.10; Sun, 02 Feb 2020 05:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AH44IHY8LM9hNPEbRtsEm9RIhekLfcrQmhRGmajQBHY=; b=JgIz0s5wSKGBK+tfeB5/vDAeI091XJabpzldKR9UAgT7pUXlJhhRG5HCDBI5LeKfic Czkl7Js+nI6YwGu4UXoN9oPjZqLGLeDYTnn+m2bo3FGLo4OzdYElucGW886I+Rz3JdC9 OX1yzKc/bUZyKyP3MdPowqOhhdcpiN+8WIHZ1l5quntT1INEmQ2oaeLEOBBMBegZbvbc jHlXkx4UL7Snn9psqzZa+EPnLs7z1hbAaU4xuxTWP0t9VgawcsH3vtNergQT5pFOER57 aOmCkJpKdgjgN0JpMWCwHkid8uEPyhFBjusCkDfrShvbsvthHYTMKNbX33rnbe5f99g6 qgUw== 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:mime-version :content-transfer-encoding; bh=AH44IHY8LM9hNPEbRtsEm9RIhekLfcrQmhRGmajQBHY=; b=UGtYqyJNqisoB3+OX6VQGEqtWroxiJwJB6Wh3RWfanYpvqOXIjU9nxxX0eFVCiz3Fg +6AobjhDwUNQaz3+W34yMBL1wNzbcZnmkRaq2cB+MhlvLSQjxmCg+F4IOfiPeVb5nc/B EH6f3BeQMl5kEdQar83kCOQrOHH2HpKhExS+jwP+Yo4Xd9RzC0RbksRtDF4n8v35eZed CpNPy4H5S0WlgYtAmMacyduouHa4Q/Gw87TKdoGUrF5Oui8cSZXLCDehiBBK41xd6V4x jJh1p+BnWo2z+DjOkl7sAqkFF42tRTmAAcgA9kV2VLKEo8i7vCPhds3KMqALtUt0rASK v7Gw== X-Gm-Message-State: APjAAAUy+vMIWljeBI7+2OaxLg2W/PfqyOoIRGIgo1zmrHC8c+BIOqak 1Ks5BlFvVlWjxjsmoVnkkgGuisYaMHI= X-Google-Smtp-Source: APXvYqy+sjtTqD37PK/Ym1JLqM0bJO+tVP/hDjqdMipCl/DoBz8JAHptrKJ0YAzBNhEkhgjpLJA9RA== X-Received: by 2002:a0d:d1c6:: with SMTP id t189mr14350608ywd.393.1580648401835; Sun, 02 Feb 2020 05:00:01 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m137sm7090013ywd.108.2020.02.02.05.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 05:00:01 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: Han Xu , Adam Ford , Yogesh Gaur , Ashish Kumar , Mark Brown , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 1/5] spi: fspi: enable fspi on imx8qxp and imx8mm Date: Sun, 2 Feb 2020 06:59:46 -0600 Message-Id: <20200202125950.1825013-1-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Han Xu Pull in this patch from NXP's upstream repo to enable fspi on imx8qxp and imx8mm Signed-off-by: Han Xu Signed-off-by: Adam Ford --- V2: Reorder s-o-b lines to give credit in proper order. diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index 8c5084a3a617..00c7899428a1 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -324,6 +324,22 @@ static const struct nxp_fspi_devtype_data lx2160a_data = { .little_endian = true, /* little-endian */ }; +static const struct nxp_fspi_devtype_data imx8mm_data = { + .rxfifo = SZ_512, /* (64 * 64 bits) */ + .txfifo = SZ_1K, /* (128 * 64 bits) */ + .ahb_buf_size = SZ_2K, /* (256 * 64 bits) */ + .quirks = 0, + .little_endian = true, /* little-endian */ +}; + +static const struct nxp_fspi_devtype_data imx8qxp_data = { + .rxfifo = SZ_512, /* (64 * 64 bits) */ + .txfifo = SZ_1K, /* (128 * 64 bits) */ + .ahb_buf_size = SZ_2K, /* (256 * 64 bits) */ + .quirks = 0, + .little_endian = true, /* little-endian */ +}; + struct nxp_fspi { void __iomem *iobase; void __iomem *ahb_addr; @@ -1076,6 +1092,8 @@ static int nxp_fspi_resume(struct device *dev) static const struct of_device_id nxp_fspi_dt_ids[] = { { .compatible = "nxp,lx2160a-fspi", .data = (void *)&lx2160a_data, }, + { .compatible = "nxp,imx8mm-fspi", .data = (void *)&imx8mm_data, }, + { .compatible = "nxp,imx8qxp-fspi", .data = (void *)&imx8qxp_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, nxp_fspi_dt_ids); From patchwork Sun Feb 2 12:59:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11361581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04393921 for ; Sun, 2 Feb 2020 13:00:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC90B20658 for ; Sun, 2 Feb 2020 13:00:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BcLLBaeo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbgBBNAH (ORCPT ); Sun, 2 Feb 2020 08:00:07 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:36475 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgBBNAG (ORCPT ); Sun, 2 Feb 2020 08:00:06 -0500 Received: by mail-yw1-f65.google.com with SMTP id n184so10516379ywc.3; Sun, 02 Feb 2020 05:00:05 -0800 (PST) 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=e6rN6yJZ4eWmG/f569Zn9OH6A2Ob5WD1MTBuZuc6gi8=; b=BcLLBaeoTaZLKReT7xF4F380ZCod3MrDwYOq1eGTKZIqQMNmr/gbg7LiBc2mA2N0iG WFS59R7WRetlc/VIrBYgx7UAHtA5axveGDhJDGDTKfxjTZr5i8n9fTCYYGGiF1FsRTj/ 7g1c8UYiok0vKv/IDcAXqKagTPllBhPvvG40EgkYEABz+U0iGnZf/YwWnmQnzVGmNOqe oJVfDLUqkBD1frBo0JfA+4FYGgFai5IO5sAzpX6MdM46TgBXUIt5O1eYstP2Vq8FKf7i E2pvLkUffEnd4hICkRz/YirAScywfADg/ll1QZ0CXZoXVfHHPVhIHuJ25hWb4ms+mOsh ckRQ== 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=e6rN6yJZ4eWmG/f569Zn9OH6A2Ob5WD1MTBuZuc6gi8=; b=kO6bt//qkML27/CIsr5X8eZVC/II3EJObnIrJl/aIAcBBHp7927WUTG6jM07Eb9g1q quMGWpxJocdvnjsy7MFUoqM7UaR843PEBSoDCAyxrWko2sg1wtnMuDdC4SneuEEifepZ dVZtlZVdFs/Qt+fOYZbFQYa0SkZrsheB1Y9IYE2+QilP8Im1RfJArm5oWAH1aAs4KO3c xKdDGV1CAYm7ITHRtn6df+Zc5rL0hSYNOOWxGVA/i1WpSzuMqnHeODxvPSidumxMRFzX /1JK3XG6dgAC+l2sMVc2g/r0pG+eOA5ByrPpFohb32hjV0KpRc64V32whfJhCYUb4hD6 Pbvw== X-Gm-Message-State: APjAAAVlfzHyjs+MFF5PPXqMRQ3HGg1J8nHk1vYaRG4Vfgm4dxv8IVI4 QnTkhb8EhHMZVf5uMGkLheGUr5QEmD8= X-Google-Smtp-Source: APXvYqx70kY7wgGOPXJWRZfeWiF9DHnZy7tefw85FuCVEcE9QFZkCaWdjfQvnlYHtM2j9I6yKoVLNA== X-Received: by 2002:a81:6055:: with SMTP id u82mr9702017ywb.35.1580648403893; Sun, 02 Feb 2020 05:00:03 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m137sm7090013ywd.108.2020.02.02.05.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 05:00:03 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: Han Xu , Adam Ford , Yogesh Gaur , Ashish Kumar , Mark Brown , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 2/5] spi: fspi: dynamically alloc AHB memory Date: Sun, 2 Feb 2020 06:59:47 -0600 Message-Id: <20200202125950.1825013-2-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200202125950.1825013-1-aford173@gmail.com> References: <20200202125950.1825013-1-aford173@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Han Xu Apply patch from NXP upstream repo to dynamically allocate AHB memory as needed. Signed-off-by: Han Xu Signed-off-by: Adam Ford --- V2: Reorder s-o-b lines to give credit in proper order. diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index 00c7899428a1..23abf5ae318e 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -307,6 +307,7 @@ #define POLL_TOUT 5000 #define NXP_FSPI_MAX_CHIPSELECT 4 +#define NXP_FSPI_MIN_IOMAP SZ_4M struct nxp_fspi_devtype_data { unsigned int rxfifo; @@ -345,6 +346,8 @@ struct nxp_fspi { void __iomem *ahb_addr; u32 memmap_phy; u32 memmap_phy_size; + u32 memmap_start; + u32 memmap_len; struct clk *clk, *clk_en; struct device *dev; struct completion c; @@ -657,12 +660,35 @@ static void nxp_fspi_select_mem(struct nxp_fspi *f, struct spi_device *spi) f->selected = spi->chip_select; } -static void nxp_fspi_read_ahb(struct nxp_fspi *f, const struct spi_mem_op *op) +static int nxp_fspi_read_ahb(struct nxp_fspi *f, const struct spi_mem_op *op) { + u32 start = op->addr.val; u32 len = op->data.nbytes; + /* if necessary, ioremap before AHB read */ + if ((!f->ahb_addr) || start < f->memmap_start || + start + len > f->memmap_start + f->memmap_len) { + if (f->ahb_addr) + iounmap(f->ahb_addr); + + f->memmap_start = start; + f->memmap_len = len > NXP_FSPI_MIN_IOMAP ? + len : NXP_FSPI_MIN_IOMAP; + + f->ahb_addr = ioremap_wc(f->memmap_phy + f->memmap_start, + f->memmap_len); + + if (!f->ahb_addr) { + dev_err(f->dev, "failed to alloc memory\n"); + return -ENOMEM; + } + } + /* Read out the data directly from the AHB buffer. */ - memcpy_fromio(op->data.buf.in, (f->ahb_addr + op->addr.val), len); + memcpy_fromio(op->data.buf.in, + f->ahb_addr + start - f->memmap_start, len); + + return 0; } static void nxp_fspi_fill_txfifo(struct nxp_fspi *f, @@ -822,7 +848,7 @@ static int nxp_fspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) */ if (op->data.nbytes > (f->devtype_data->rxfifo - 4) && op->data.dir == SPI_MEM_DATA_IN) { - nxp_fspi_read_ahb(f, op); + err = nxp_fspi_read_ahb(f, op); } else { if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT) nxp_fspi_fill_txfifo(f, op); @@ -992,9 +1018,8 @@ static int nxp_fspi_probe(struct platform_device *pdev) /* find the resources - controller memory mapped space */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fspi_mmap"); - f->ahb_addr = devm_ioremap_resource(dev, res); - if (IS_ERR(f->ahb_addr)) { - ret = PTR_ERR(f->ahb_addr); + if (IS_ERR(res)) { + ret = PTR_ERR(res); goto err_put_ctrl; } @@ -1073,6 +1098,9 @@ static int nxp_fspi_remove(struct platform_device *pdev) mutex_destroy(&f->lock); + if (f->ahb_addr) + iounmap(f->ahb_addr); + return 0; } From patchwork Sun Feb 2 12:59:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11361587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D43A014B4 for ; Sun, 2 Feb 2020 13:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2B8B20658 for ; Sun, 2 Feb 2020 13:00:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a75vYtUh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726947AbgBBNAJ (ORCPT ); Sun, 2 Feb 2020 08:00:09 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:39848 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbgBBNAI (ORCPT ); Sun, 2 Feb 2020 08:00:08 -0500 Received: by mail-yw1-f68.google.com with SMTP id h126so10504865ywc.6; Sun, 02 Feb 2020 05:00:07 -0800 (PST) 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=PfOxBTJAq7rO8Qs/IIR9mdFaCWzDGndxM56W0qKFsAU=; b=a75vYtUh5Rw+ngxoxAmQkogk5nJe9heNo+fnZRxSSEHgH73eFaWIHF5reUhTDOHEJQ aRnxGC4WbMoY4/UwuR6aHmk/dk9ay+DE550KAn/PzvUVIbz5RZeqjP+bime+eCCYGwpj 9Uvc6jHxEitN19jr219aKiZ519i/0Z3Utm4dj0rGiifnKtweBFniXv5J7SjkNJ0VdIsL pC1NZBPL6txaNR9fPe1VSSIhYAxbyEiIxAi/s9CONTP9MMSwfFPXd5r1MrsLPxmZNhQ6 0NRKahUUTnwHIrCsrt+FYHYL+pEGPIYvcK/6KPwna0hBExEQtbmNST7r/lRId4b2kBI5 3veA== 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=PfOxBTJAq7rO8Qs/IIR9mdFaCWzDGndxM56W0qKFsAU=; b=gGTHRn23QbUKjUhCZgMBE2l+lQYLuB5TLYrUBzugluXS5u3JYFKAZxN3YwS/JQZLKr CKDD4M/aSV/v2KifY4NGR6vtfkWY8FsUsLG/RFiefKA1bHWUV04WqSOTzO6G7/Z1mrWC t1TPrzYrRW7DbURmTWtReXRTeSfWtHHtMcKIiG2pYjssVQqECg+HTsCGSjJxvgFwEEhr 4SyU8tGIr0So2cTKhYjM7At6d47Rn49XFBSQhc4i17Y1PB1W5j0rUDJC8G8TdYhJBHAP e429b9qIGrx/PXfFb7TObnFQ06nZcvY6htnab238k1TcxYRGfdu8N7LoQ+mndPZh9ppa 9YCg== X-Gm-Message-State: APjAAAUZb3BZxCTSgYb6hy64YEKhceZofo1U45nb/ZLsp72lEadpdIDC +x+Owz6CLfk42uZPAfkowSA5yQ48azs= X-Google-Smtp-Source: APXvYqwDc7mA8g8RNuZ15bUqAjJpKzEa7MvRr95zljOsGFKvcY0P40xqocrFDYmUh+HokkR8uI2csQ== X-Received: by 2002:a81:39c4:: with SMTP id g187mr14378569ywa.42.1580648406315; Sun, 02 Feb 2020 05:00:06 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m137sm7090013ywd.108.2020.02.02.05.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 05:00:05 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: Han Xu , Adam Ford , Yogesh Gaur , Ashish Kumar , Mark Brown , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 3/5] spi: spi-nxp-fspi: Enable the Octal Mode in MCR0 Date: Sun, 2 Feb 2020 06:59:48 -0600 Message-Id: <20200202125950.1825013-3-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200202125950.1825013-1-aford173@gmail.com> References: <20200202125950.1825013-1-aford173@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Han Xu Apply patch from NXP upstream repo to Enable the octal combination mode in MCR0 Signed-off-by: Han Xu Signed-off-by: Adam Ford --- V2: Reorder s-o-b lines to give credit in proper order. diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index 23abf5ae318e..019f40e2917c 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -913,8 +913,9 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f) fspi_writel(f, FSPI_DLLBCR_OVRDEN, base + FSPI_DLLBCR); /* enable module */ - fspi_writel(f, FSPI_MCR0_AHB_TIMEOUT(0xFF) | FSPI_MCR0_IP_TIMEOUT(0xFF), - base + FSPI_MCR0); + fspi_writel(f, FSPI_MCR0_AHB_TIMEOUT(0xFF) | + FSPI_MCR0_IP_TIMEOUT(0xFF) | (u32) FSPI_MCR0_OCTCOMB_EN, + base + FSPI_MCR0); /* * Disable same device enable bit and configure all slave devices From patchwork Sun Feb 2 12:59:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11361583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA638921 for ; Sun, 2 Feb 2020 13:00:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9897320658 for ; Sun, 2 Feb 2020 13:00:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WqHN4WNp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbgBBNAN (ORCPT ); Sun, 2 Feb 2020 08:00:13 -0500 Received: from mail-yw1-f45.google.com ([209.85.161.45]:46809 "EHLO mail-yw1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbgBBNAM (ORCPT ); Sun, 2 Feb 2020 08:00:12 -0500 Received: by mail-yw1-f45.google.com with SMTP id z141so10004339ywd.13; Sun, 02 Feb 2020 05:00:11 -0800 (PST) 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=g41y4TduYyE4Zq7XaNgfQZ1uBYpJA8BiIYoPp6mgrtE=; b=WqHN4WNpKRHbz5KbVH2wcfUM4s+eLtY9OB1l0MbE5xT7J+rxS0aIn+7YdN6npIGcj4 ufTxwcx8G+4HpLKqBnUZ+rvW2TGwx78OtAVlQOf7mjYPqIFlD7Us5llDzZ5gjQtPWhQ7 chCniMaQ6xBLI1Key30/9fisPEg9efhoDskNpki8mmFHbofIif5s1tgZyfgCuGTz75/V lszW4MSOXINJDGYfCFGrAflmi7s0zwSPrQhaHvJjCvpMpn1ePJ1NKK1T6L/GtoTOAkdr kmylhWwtX6Ed9iSE6LJNIQm8SX68upoP9DQz4m3rCCK3LEnZqXgCu2DhTf7l2SXfOky6 OxTg== 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=g41y4TduYyE4Zq7XaNgfQZ1uBYpJA8BiIYoPp6mgrtE=; b=mcPq6O/W+lXvAvZdMPA76FjeFDxrHyMGTF2POIBFObpVOuAJhUzRaCwOy4/zQC4eQh aKIu+O5nIb2q/gIFPlKBD3Sp4Jg+pbgCDnzGJLOvCj28J9BiY8CHrJDukADenuSHEY41 vp9qZjC5Z4EPWV0IXGw53JX1PHqv9gcaZqO9+VrOl6Lr/hpfZFO9iBMU2IKIp1rGDJYn AZmhG1rL3SBchCIskTtXGUptJFYh5XfEH53t5Rrl3Tlt16ASunxKlv8/saRnCaMVeNAI DYNAXeu05qpmgaguUOW67gELuye4e+jFA+KGoY3uM7eai7/dgbg/zyP3HsRCP17zIK68 vALA== X-Gm-Message-State: APjAAAVxB2rOphDB1yL0GisoMw9cAQDvZIXXupLc9qLCmNLEquhZ0TQU JCZR4prIR4fMrRW1nPDz246zb5P/3Wg= X-Google-Smtp-Source: APXvYqxESfjVSs4DtOWtMq7VLTeIVuSJZKG8ga+iAtfaG5fC/Sjp0XF06H7gjLbeQcvU/yBzLMS43Q== X-Received: by 2002:a81:a703:: with SMTP id e3mr15769631ywh.71.1580648408393; Sun, 02 Feb 2020 05:00:08 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m137sm7090013ywd.108.2020.02.02.05.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 05:00:07 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: Adam Ford , Yogesh Gaur , Ashish Kumar , Mark Brown , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 4/5] dt-bindings: spi: spi-nxp-fspi: Add support for imx8mm, imx8qxp Date: Sun, 2 Feb 2020 06:59:49 -0600 Message-Id: <20200202125950.1825013-4-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200202125950.1825013-1-aford173@gmail.com> References: <20200202125950.1825013-1-aford173@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add support for nxp,imx8qxp-fspi and nxp,imx8mm-fspi do the bindings document. Signed-off-by: Adam Ford --- V2: No change diff --git a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt index 2cd67eb727d4..7ac60d9fe357 100644 --- a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt @@ -2,6 +2,9 @@ Required properties: - compatible : Should be "nxp,lx2160a-fspi" + "nxp,imx8qxp-fspi" + "nxp,imx8mm-fspi" + - reg : First contains the register location and length, Second contains the memory mapping address and length - reg-names : Should contain the resource reg names: From patchwork Sun Feb 2 12:59:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11361585 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A64601395 for ; Sun, 2 Feb 2020 13:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84F4020658 for ; Sun, 2 Feb 2020 13:00:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ijQUUDtG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726995AbgBBNAM (ORCPT ); Sun, 2 Feb 2020 08:00:12 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:39857 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbgBBNAM (ORCPT ); Sun, 2 Feb 2020 08:00:12 -0500 Received: by mail-yw1-f66.google.com with SMTP id h126so10505018ywc.6; Sun, 02 Feb 2020 05:00:11 -0800 (PST) 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=SsuOPfBklrufoFfToRN135Zc2rs5UCZymJ1rqf8A5fk=; b=ijQUUDtGpKwfUbhvL5SVvpt+vqVbACJ6PiX35Y/j3JCg7NaDX+nNFSzWxCY9E/N1as KJIQssRUYrJ5ld+sdSLiWQT9E2gNxGNdFY/oX0piRs9BzNuBEK/HbIbQKIjNgviAQnq9 mIwSnp/k7mxRI5y1lQ4VZyUsZdxrL65GNXGr5NXT/beG5LN/rl/Un2kFCUF4RqpQMCJ3 hNqY4MRMggzNmJ5mwJqGINLoxEJWLQO70fK6nhvoDmmskdGFHYtIE9nS/HD6aXZvm6k1 QGoty3d4PEiK/vAk9l/jlWPHACltCHxjsjYehOde4gXI1v3qJwEgchSPbFBAZIN7TZwS vUWw== 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=SsuOPfBklrufoFfToRN135Zc2rs5UCZymJ1rqf8A5fk=; b=DhOQmaZc1c+JH2t7pCvrWS1fUwQxsbfk+ET4rCclULluzs8+qwd3B/DVwq8ToYUVKv RxrkBh0HnBUfnLIzc9uxO89RM+PTgU/dFjCMtyvOcoiQG/quXRA1EYCUvXVrZLsiRUrO Rhv9xihD+Mejl6KhxiDXveQjij0U3PnMRgJC03xfB1fbWE0cw5ErBv1rWw0Nio4gVJgi uII/OqY2rJex6oXNo/r4jiz6bCDWZ9tkvc5b4ECIxCgiLxsGxHJFP36uzowdNbpdJWxm c2LgUW1m85OmZBK4mC/slRAA66cIs8HY2aL6R3fs/55umjB3i581nCgUbCRN74TV0WO5 3MCg== X-Gm-Message-State: APjAAAV2ocWocHneCi+Flaeu3lmSa7tJLIkXZuTCZG+uxyhheMOFueSE LJ4sb1tvCnkBcrAT98P0lSyjDnnv0NE= X-Google-Smtp-Source: APXvYqxcps2+b1RjCFnMPuOPzXi0K2uJFw8vIjvBLVbqj1s91p0IDLSQuX06wGYKgxezMcLqCo3DQw== X-Received: by 2002:a0d:e802:: with SMTP id r2mr15745234ywe.471.1580648410303; Sun, 02 Feb 2020 05:00:10 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m137sm7090013ywd.108.2020.02.02.05.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 05:00:09 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: Adam Ford , Han Xu , Yogesh Gaur , Ashish Kumar , Mark Brown , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 5/5] arm64: dts: enable fspi in imx8mm dts Date: Sun, 2 Feb 2020 06:59:50 -0600 Message-Id: <20200202125950.1825013-5-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200202125950.1825013-1-aford173@gmail.com> References: <20200202125950.1825013-1-aford173@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Pull in upstream patch from NXP repo to: enable fspi in imx8mm DT file Signed-off-by: Han Xu Signed-off-by: Adam Ford --- V2: Reorder s-o-b lines to give credit in proper order. diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 1e5e11592f7b..679769fe6cab 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -558,7 +558,21 @@ aips3: bus@30800000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges = <0x30800000 0x30800000 0x400000>; + ranges = <0x30800000 0x30800000 0x400000>, + <0x8000000 0x8000000 0x10000000>; + + flexspi: spi@30bb0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "nxp,imx8mm-fspi"; + reg = <0x30bb0000 0x10000>, <0x8000000 0x10000000>; + reg-names = "fspi_base", "fspi_mmap"; + interrupts = ; + clocks = <&clk IMX8MM_CLK_QSPI_ROOT>, + <&clk IMX8MM_CLK_QSPI_ROOT>; + clock-names = "fspi", "fspi_en"; + status = "disabled"; + }; ecspi1: spi@30820000 { compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";