From patchwork Sun Jan 26 14:09:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11351853 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 1982E139A for ; Sun, 26 Jan 2020 14:09:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E46982071E for ; Sun, 26 Jan 2020 14:09:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mk4oCwNG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729187AbgAZOJc (ORCPT ); Sun, 26 Jan 2020 09:09:32 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:43333 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbgAZOJc (ORCPT ); Sun, 26 Jan 2020 09:09:32 -0500 Received: by mail-yw1-f67.google.com with SMTP id v126so3469747ywc.10; Sun, 26 Jan 2020 06:09:31 -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=AIBXGruVtXLWGDKFA1TCcvHJQqqB8GBIh9kNTOb/fuk=; b=Mk4oCwNGg6HxZOtQSZFkfJHL9c2GyiV2XZSrCjIZLjVPjFswi+0SA3YyY735R1464d GdbjNQpbIy74Y7/IXA+Zxf1q761kzZujmIa9tQOA9zWjNBXcXlp4aoTi2RjczfRToK7j g7xN+PI9jYpjf27CWaDNgToDXfzJ0/fTnu0wC8ZjWfvaX5pl6isPQ+xlQz18JttWgltn 15X8obeoJYk10blNGh+jlccabPGO06rOfqIXQdieCaOmLN3RfczNKpsSYOE2S+Q0oopx Hi/OOdbuNjJCajIGkP9AF1xHcjRZ2yB8MrN/WWwDf+7q3pTM54XQf89HTIufhSiYPRkU o4UA== 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=AIBXGruVtXLWGDKFA1TCcvHJQqqB8GBIh9kNTOb/fuk=; b=PcqR3A+wfO3lYb/pN15qqYHTBEJTLBL77Tm50YFhLUp4LdUS41UJJHame7JVN7oiNQ wZ49DgvCmejQcQky9WYgNP0H9hRkifZvUNah9CZGOPVCVeh+FrC3Z6Km1paN6IQ96lOZ kiwnomg+MVUOcWs8hRfdCNL1OZa/q+c9HO7UCBJElMmKTcWnjipUcfawU6Lw+tb8L0a2 vQxTcwxc+4nHVNVoOcOZgFnLBUoAZAxq6mh8FFRNb+CXFvu9We4+ayN8Qemzm/Vx4/0m 53citMoSo+1bl4HYz+7mxNG83NSrxyCBsDzl2Y6nubGPfUeSiwqOt3fZUg1BJ5Er7Erd HmTw== X-Gm-Message-State: APjAAAVYlimlLmZWf6++sOjE01Ut9DGhxtk+K4XVums5RLQLWHjtwHMO gTeW4GoXq4TH7vjuLurIfbfmpfI4JkY= X-Google-Smtp-Source: APXvYqzDzxEFyqha9UjT6YyU/ysiOH2LW1TWq1QPbgfRd5yEbDaYb4T5n+BpcGks0XD8Em3+6O8+YQ== X-Received: by 2002:a0d:ccd2:: with SMTP id o201mr8773523ywd.492.1580047770669; Sun, 26 Jan 2020 06:09:30 -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 a12sm5237214ywa.95.2020.01.26.06.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 06:09:30 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: han.xu@nxp.com, 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 1/5] spi: fspi: enable fspi on imx8qxp and imx8mm Date: Sun, 26 Jan 2020 08:09:08 -0600 Message-Id: <20200126140913.2139260-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: Adam Ford Signed-off-by: Han Xu 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 Jan 26 14:09:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11351863 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 DB1F71580 for ; Sun, 26 Jan 2020 14:09:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B959C20720 for ; Sun, 26 Jan 2020 14:09:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R4GqoCH0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387393AbgAZOJe (ORCPT ); Sun, 26 Jan 2020 09:09:34 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:43038 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbgAZOJe (ORCPT ); Sun, 26 Jan 2020 09:09:34 -0500 Received: by mail-yb1-f194.google.com with SMTP id k15so3619731ybd.10; Sun, 26 Jan 2020 06:09:33 -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=0znyjyYbiAbfIQWL1oHWminydK6nnqolmIPai4FHJsc=; b=R4GqoCH0iaDMWEwxpz1GR5oUF1M/PE+kqz3xfrZFKD3jO36TKruKc+faOYkaorNk/D DeQeNy5D9BzFVEmzmhmt7ldcFyWlbkECndL6WYGi+2dHcJmOTM5hphD7ATLRFTHy0Clv 6qug8RknOAOytZhosq2Mj6lbC7hNAdXnvnb/SZKEd6FrVJpcReBRiXvxv4VFKSalqBaI 2AHJWwykNlWagqtgLAPvXb+ELm74R8e314A3RWKmipUwoPfEt2/fq1rHwUZH3v8E/Kcq YZkCH887Srp+xO+17qyxEA6A/5aUKdXRIu8TH+J9BVYQsb9e8Ax8qDRDur1Vawvob5vT QyBg== 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=0znyjyYbiAbfIQWL1oHWminydK6nnqolmIPai4FHJsc=; b=gqOHYWPovDrVY05xbcdWqvufiN+viaHawL6tDK3jbn/75uVvbf4Ql8FNwfnLPPPmYw K7dw1ya/yVx19WX0rSpWW2Jj9sA43DOF0rTu1Rj+03Yo89xN05zilk8pSfa6rkAp4V27 ba15+M8wDWOb6WOhu8dtVs4XlJop7IUPD6ozaCh5dw/hkFHHtbgYqRo8Nl8/4yNMPIvt WcULZarmaQ8j4UAZgqovceVqW6QxynDANZf0XW1QyhkqIMczEjltBVhyKXJwnMuT1sbx yOhkMDlPsV+4pBhJphBwJFUkdi/s2+9BRM0O9RClH4XLdFeICOY05Y/mCnmz4vHOFThK V40A== X-Gm-Message-State: APjAAAU9P5SI1NYNwSC+b/YCbim1H7T5l3gAmEuwRthNhUI2FxRpjxbU /mKOtjz7CGXuZ/BtBMaN2FBayJbDSN0= X-Google-Smtp-Source: APXvYqyZvLUQmp2PTyVD65ywAO78sFlydfcTzGCK8FC8Fn/wQl9dllTay7iP+Tj7BKw2LabEC8Xomw== X-Received: by 2002:a25:d252:: with SMTP id j79mr9269996ybg.311.1580047772582; Sun, 26 Jan 2020 06:09:32 -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 a12sm5237214ywa.95.2020.01.26.06.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 06:09:32 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: han.xu@nxp.com, 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 2/5] spi: fspi: dynamically alloc AHB memory Date: Sun, 26 Jan 2020 08:09:09 -0600 Message-Id: <20200126140913.2139260-2-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200126140913.2139260-1-aford173@gmail.com> References: <20200126140913.2139260-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: Adam Ford Signed-off-by: Han Xu 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 Jan 26 14:09:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11351861 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 7E3531580 for ; Sun, 26 Jan 2020 14:09:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C81920720 for ; Sun, 26 Jan 2020 14:09:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JBg6jHKq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387442AbgAZOJg (ORCPT ); Sun, 26 Jan 2020 09:09:36 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:42084 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387435AbgAZOJg (ORCPT ); Sun, 26 Jan 2020 09:09:36 -0500 Received: by mail-yb1-f195.google.com with SMTP id z125so1532051ybf.9; Sun, 26 Jan 2020 06:09:35 -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=daWWos5KtEMJA9FX6DD1ge3+gsTuCafldU15qCzNObg=; b=JBg6jHKqCfQ/EPovFt5dmZcVRxMFRPh8xCo34IYw8p/FF56RVql3n/M0SsO4INFDCR te2K8GaEWuhx+Ancr5eGaWriyJ72lmhYBW5sAi9WbkZn5KEOw+UgzL/A7MoC+DvaNijP izDIGH2klMvbB+ZbGcr+KZydyTsmDuK5VboPPHhXV0nAD6fO57Q+keFVe9yZMYHHpa1b EyAPIfHZdRSIfX37fE6fezEJ7jYQeE11WqBzts6+KUapnfFV1EWWMtwBCAaitVCfov5M 82DrpIgm44Ov44l+bRUeSRJAiJ+/0sOc4DfSU89F+IDqcdOwV/IYx6/Ptq6pnJE0slYF qsoA== 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=daWWos5KtEMJA9FX6DD1ge3+gsTuCafldU15qCzNObg=; b=ExQypC1AINuUIIZT6xHzD0GVwva9KDb5Jb3lNMsCiHom0JKGulIqsKgiNoi40olCG6 IfhIL76gUSui7qbIJ9/aJuvZlfPLvA0h228DmVi5bsKai2O0DYjMHMKZFrkHuswoH48E P9CaDxr/CZmiQ9sUD4bEHL4bztOG/6o/WDflQqNvxGByGEaJ5CLLEa9Fa4NNdyAWNUvm 8B3sbAhkYGcB4N9nXV9xf3BYLqhuPJIeua2TcqsBxORQYB5KvCJXB7Ed/JM8FpZsi/WH RATNY+jpqC2zRSHnOrM4UuUf3D3PSp1TvATTlJxDtKEXe3w0e9N8Co4+KfTpkyfdzJRE SVYw== X-Gm-Message-State: APjAAAXQgoUD9qVIXtK3zjYRK2xcfh6/tKVtjgCvVbeomzVFwtydxoDl njmm01l3HyXdr+LMSkv3lWjUZzfMXAk= X-Google-Smtp-Source: APXvYqxbwclW7C7Ka+4RV7Kdv3OLTse91pIEErfd8duwb0LYIXWxyxCJjLGPfw2Do4AwA4IIR6O3pw== X-Received: by 2002:a25:d4c4:: with SMTP id m187mr10061540ybf.109.1580047774540; Sun, 26 Jan 2020 06:09:34 -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 a12sm5237214ywa.95.2020.01.26.06.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 06:09:34 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: han.xu@nxp.com, 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 3/5] spi: spi-nxp-fspi: Enable the Octal Mode in MCR0 Date: Sun, 26 Jan 2020 08:09:10 -0600 Message-Id: <20200126140913.2139260-3-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200126140913.2139260-1-aford173@gmail.com> References: <20200126140913.2139260-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: Adam Ford Signed-off-by: Han Xu 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 Jan 26 14:09:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11351859 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 40F85139A for ; Sun, 26 Jan 2020 14:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F80A214AF for ; Sun, 26 Jan 2020 14:09:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AwLGpNYc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387454AbgAZOJi (ORCPT ); Sun, 26 Jan 2020 09:09:38 -0500 Received: from mail-yw1-f54.google.com ([209.85.161.54]:37862 "EHLO mail-yw1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387435AbgAZOJi (ORCPT ); Sun, 26 Jan 2020 09:09:38 -0500 Received: by mail-yw1-f54.google.com with SMTP id l5so3488374ywd.4; Sun, 26 Jan 2020 06:09:37 -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=6ZHxAfX3Xl6MKW4bncP+VkEHGeKBmUb+6NPJXOCTjuU=; b=AwLGpNYcsS7qaP2kfjXCQkOJaqqUJBsbEzRWANhEt5/OrZzxbCDZDLB/OayyRM5HGz CEODHwEt2bNhFRu6QEuhXYqFsTteK0817t8C7TP4s3+Hr6elp/1cy4+KKmYXNuJuQwfC m2tuRoZKEL+YN+bjiltULlRwgQ0uD0drmO4P8tyERO0oimdR2m0Pyd4FYCDLDN/mY6+Y lMzyvzMzGfUDyTOkVVx6n4HHL7ikL5byMEGHTuyGSUGaVROZI7krzNlw3/VRFeaRPyp6 r6XaGY92QlMA2DIvBNXTHiVtWs7G9VXyhReIb8Etk8R7lSz/eFBXj+ySuRFbqN3up6kV ou7A== 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=6ZHxAfX3Xl6MKW4bncP+VkEHGeKBmUb+6NPJXOCTjuU=; b=uZ1hNvliR51azjiZ997+KkJVOEAB1Mzfkd0ylmPHUzb75+CgQkkDUdXnWKLLc1vxb5 JZNrEru+T+BSU5h4aX9LKDkUYlgKeDOAUqmi06y+m1Zklxo4pVgdYM+K6V4W1Pg2i0YF VcZg81Hb7QefloaKjFPVHyVd5tujEUtVxaTIC/OVbJG1ERuzOIiQAIylzfjJcHtJJxhD +8cihoclWtQxyfTUEFbfQ5Q1i5zfv3IX2zaDe5OG81GLxPTQuslQ4htpa+K29d+Owd5d p4e4m8pXi6PIqxMmXGcutcjfzyYR/6J9mvnwOLCPibozg6Dpnd4mVh/N4XIXSystsGom 2+fQ== X-Gm-Message-State: APjAAAVV6XjajuR7/khrJGmQEnykkkJ/aQ7w/0hWFKTVoxU0k/z5CyRD PLYru73/25GydQFDSEFSvhAbOLKAadM= X-Google-Smtp-Source: APXvYqxAXLFzS6e1uHJOkGKuUKH4syBdGutgLsnCvPMkTMI9Cv5OIx4fObe+2P64lD6bn+Fh2SQq/A== X-Received: by 2002:a81:3a06:: with SMTP id h6mr8962704ywa.170.1580047776433; Sun, 26 Jan 2020 06:09:36 -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 a12sm5237214ywa.95.2020.01.26.06.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 06:09:35 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: han.xu@nxp.com, 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 4/5] dt-bindings: spi: spi-nxp-fspi: Add support for imx8mm, imx8qxp Date: Sun, 26 Jan 2020 08:09:11 -0600 Message-Id: <20200126140913.2139260-4-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200126140913.2139260-1-aford173@gmail.com> References: <20200126140913.2139260-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 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 Jan 26 14:09:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11351857 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 7F861139A for ; Sun, 26 Jan 2020 14:09:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DB0820720 for ; Sun, 26 Jan 2020 14:09:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y/whYoNP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387470AbgAZOJk (ORCPT ); Sun, 26 Jan 2020 09:09:40 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:34608 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387465AbgAZOJj (ORCPT ); Sun, 26 Jan 2020 09:09:39 -0500 Received: by mail-yb1-f196.google.com with SMTP id w17so3652548ybm.1; Sun, 26 Jan 2020 06:09:39 -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=0waTrM+p0MNxst8w9Z5JQMayoehG4IUq+pQpCkmEaO8=; b=Y/whYoNP5vb88jRBSS1HcGmlCT6z7yURB0WKKZu9ViIR1Ye/BPkoagOfjw6OfNzaL3 KhDtMjA0we0C62kLbl1CANuDAOtxC0LVFs2YF3I7W37x6F9kH8nID3XO6uy3MyBKepyS cuXXX4qPn9UXTvCW5NoalPXUv+8DMHnDaH8Gg8/WyEnaLJJYbVf7yfqZEiJXsR1J+Np5 d0Vht7U4UMe5Sku2R58lebhMMFygcxKzke537fW7C3GrfWnhgxGpk1tARgl9vty8d/gn SGbEwJ8jx1lodEuq07i//FH9+0vdgpLG6s/Cc3CNs2TQr7nIS5edeOo8FIVf0QZz6o6D Pqwg== 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=0waTrM+p0MNxst8w9Z5JQMayoehG4IUq+pQpCkmEaO8=; b=NbugRJ9o5YODt2ZAxIPCYd7u5uypkg+C6ZdChtFVdGF6/WrbdfocSu8u+3y1D+ssXW 1CIgn/IiKRK2DczRsxVu3A1t9BgnxIZ1lq2hgZHz/QR/QaJ8jd9iMKJZ290uTLkdGVqj KtgmwY8HHPhilwvrLln4zzSzYyjPMPBOqSYJCMAXlBD93vbzXHWREtjeocmwsVH2WGoe cqn0W0goTnUnB4gt4Dj0Zh2TFmAygcOGMuWMpqR9paZBjWeRaCYO5l0MPmC9HK2+kShP ZGeyUYQsm3tLNTVWpVHoeH5KzhdA7r6pnNAQ2ghP1544MuSY4nLmJV/NWaWDPQ7WX2ng YcQg== X-Gm-Message-State: APjAAAVvV/7pgouBayDxoFgItxkR1EmQxprzLZlJGlzgn04NksHS5JPV IGCx2bE0j5Vv1eG4gn13CDKzOmHB90A= X-Google-Smtp-Source: APXvYqzlMdUSQYdwJJeaz15msbfWK+Z3P5aEgzbxzTYJ+IDLEk+5tn/w/276UKI8pyR+W6+/cki/aQ== X-Received: by 2002:a25:d1c9:: with SMTP id i192mr9426559ybg.493.1580047778366; Sun, 26 Jan 2020 06:09:38 -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 a12sm5237214ywa.95.2020.01.26.06.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 06:09:37 -0800 (PST) From: Adam Ford To: linux-spi@vger.kernel.org Cc: han.xu@nxp.com, 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 5/5] arm64: dts: enable fspi in imx8mm dts Date: Sun, 26 Jan 2020 08:09:12 -0600 Message-Id: <20200126140913.2139260-5-aford173@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200126140913.2139260-1-aford173@gmail.com> References: <20200126140913.2139260-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: Adam Ford Signed-off-by: Han Xu 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";