Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3580994imu; Mon, 10 Dec 2018 04:43:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/U6osr4PzsyIXKiWg6guj5umAkPoZ6GdwApFV2AE1Qfzucuzl1wVf0BiDfbHayHyVW0xa14 X-Received: by 2002:a63:6506:: with SMTP id z6mr10678552pgb.334.1544445804083; Mon, 10 Dec 2018 04:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544445804; cv=none; d=google.com; s=arc-20160816; b=XxJExnqebqMK/3h+JjpWTdOP24BHS044vWtGvMNDSvDu6KT96ioBhO003eMB3Vs7Ri bxLj7qi3vMVAvOF+hy+pWh+M6TgXvhjcxdapJ0e5fERifRW9VmMwEI7h9JyB6XgwZlOS NxyWL+OcwCgsHQTCECUWwAEf7TPRGQJY14uksrI7k39Gj+7X/dELGEgRaS+dYTW4itdj 6kDTQczxY7gAaEGC2YoA9VW6xaJJkX17NJItTGcczbWyi0WegdZwfRyBKAanGnkUFn6Q xAzyBJKhEKZ5dk/Co9oYVoo+GgPprgBkEAp9zvNiEjVWunFRIE3NzJm8dc2GU9VvlZKq QEhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=4bJvRFzcY2r7oHwyCxkOK46up3sqkS5U8i2eehy9D9s=; b=mvnTKnz1BkJkH4evN/oftftOwO69LsWskMH17KvGGrgjZqTiVjWc8KBQbf3ZMur4dT t9lINIPbs5AIDchnio/pO8OjO8WWnbSoOMCs79lG7cRcSctNa4nwrx67Uo0ihfee4gRg JFu9j3ZhjIKc+aXhBMm3ojVSFVVXa1zyJREBOVSr5ZMP9AZQEbXr4+Kyg8xdWaVSXEYq nudnwIBwI6xQMvjIwbqp1C6YgT5Clh98/C4AEwQ/ClOSrn68KtnbFf06D7Z1SpPlnwVc khkDgI6otebwO9SJDwzWD6UIIZjwBfjcTmWuYgBhqWVtvifzhJ46JK+5wN+BbXNpOu1W 4Swg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si10368433pfn.213.2018.12.10.04.43.08; Mon, 10 Dec 2018 04:43:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbeLJL2V (ORCPT + 99 others); Mon, 10 Dec 2018 06:28:21 -0500 Received: from mail.bootlin.com ([62.4.15.54]:57859 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbeLJL2V (ORCPT ); Mon, 10 Dec 2018 06:28:21 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 1608A2079D; Mon, 10 Dec 2018 12:28:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id CA4232037D; Mon, 10 Dec 2018 12:28:18 +0100 (CET) Date: Mon, 10 Dec 2018 12:28:18 +0100 From: Boris Brezillon To: Vignesh R Cc: Marek Vasut , Rob Herring , Brian Norris , Yogesh Gaur , Linux ARM Mailing List , , , Subject: Re: [PATCH 3/3] mtd: spi-nor: cadence-quadspi: Add support for Octal SPI controller Message-ID: <20181210122818.15de3232@bbrezillon> In-Reply-To: References: <20181003165603.2579-1-vigneshr@ti.com> <20181003165603.2579-4-vigneshr@ti.com> <20181210094513.6282d55e@bbrezillon> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Dec 2018 16:49:29 +0530 Vignesh R wrote: > On 10/12/18 2:15 PM, Boris Brezillon wrote: > > On Wed, 3 Oct 2018 22:26:03 +0530 > > Vignesh R wrote: > > > >> Cadence OSPI controller IP supports Octal IO (x8 IO lines), > >> It also has an integrated PHY. IP register layout is very > >> similar to existing QSPI IP except for additional bits to support Octal > >> and Octal DDR mode. Therefore, extend current driver to support Octal > >> mode. > >> > >> Signed-off-by: Vignesh R > >> --- > >> drivers/mtd/spi-nor/cadence-quadspi.c | 9 +++++++++ > >> 1 file changed, 9 insertions(+) > >> > >> diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c > >> index e24db817154e..48b00e75a879 100644 > >> --- a/drivers/mtd/spi-nor/cadence-quadspi.c > >> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c > >> @@ -101,6 +101,7 @@ struct cqspi_st { > >> #define CQSPI_INST_TYPE_SINGLE 0 > >> #define CQSPI_INST_TYPE_DUAL 1 > >> #define CQSPI_INST_TYPE_QUAD 2 > >> +#define CQSPI_INST_TYPE_OCTAL 3 > >> > >> #define CQSPI_DUMMY_CLKS_PER_BYTE 8 > >> #define CQSPI_DUMMY_BYTES_MAX 4 > >> @@ -898,6 +899,9 @@ static int cqspi_set_protocol(struct spi_nor *nor, const int read) > >> case SNOR_PROTO_1_1_4: > >> f_pdata->data_width = CQSPI_INST_TYPE_QUAD; > >> break; > >> + case SNOR_PROTO_1_1_8: > >> + f_pdata->data_width = CQSPI_INST_TYPE_OCTAL; > >> + break; > >> default: > >> return -EINVAL; > >> } > >> @@ -1205,6 +1209,7 @@ static int cqspi_setup_flash(struct cqspi_st *cqspi, struct device_node *np) > >> SNOR_HWCAPS_READ_FAST | > >> SNOR_HWCAPS_READ_1_1_2 | > >> SNOR_HWCAPS_READ_1_1_4 | > >> + SNOR_HWCAPS_READ_1_1_8 | > > > > Is this really supported on qspi versions of this IP? I guess not given > > the description in the commit message and the name of the new > > compatible (ospi instead of qspi). > > No, qspi version does not support Octal mode. I guess you are pointing > out its logically wrong for driver with "*-qspi" compatible to declare > SNOR_HWCAPS_READ_1_1_8 capability. Exactly. > Will update patch to declare SNOR_HWCAPS_READ_1_1_8 based on compatible. Thanks.