| Message ID | 20200420120921.12840-1-jagan@amarulasolutions.com |
|---|---|
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB7NB632AKGQEPISMOCY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D00433F086 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 20 Apr 2020 14:09:35 +0200 (CEST) Received: by mail-pj1-f72.google.com with SMTP id r5sf11042953pji.9 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 20 Apr 2020 05:09:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587384574; cv=pass; d=google.com; s=arc-20160816; b=cAC0qiF+cBGoEv0FSz+0QzEkrD6QJtJLOe4FiVbD0djJQJbK8W1Ght6Lm7aJan6CiP 7rn4UQBX9F5MgrPF8gWCTyU7XJZ4VOmEiD0ssbKv/FSryCqyPpny17c09juRz7RTznSe ttF8mpPxKJY7BmI5dXxU0CwmNa7z/cjB2mqaEfOSe3JUFS5R5E0J3C9gOSOVkTw9t/62 7ZfrMg2TWmg0Pnwdt7Z16j1i5YYljo7upb4azPTt/rLRurrG/a6u0C3Q3OPmYUbNECYY xM8Hl8HxjjGg08LVTOjrd5Jf1Kwr+tFfg4VZn3HnL2zJjBKpWF4OyrL3rngwaKjbVAhu gSNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:dkim-signature; bh=04rRp+5NyrPTrNdRJqljDPlOUnvXEUEWlmTyNNuus2Y=; b=DgSWJ90bKD46Z+lsqZkGaWKU4d9M3dgSKAU4YKDJ1o0KyLTppWFeJCzerGiSE91ymB I1aitrvgYNVCvEuwtpsd6ZAWZX8lIZsr9p7WPNtjhYL1yVuaSoRAbbxcQCWX5lk6PLlo S7+lDMdeLbtO20dFSNQlh+wnYp1aR2G5D2mDcpZ9cl2gSVsIdXu5GchM4awVUAkN38aD mrJXUYZ89/8xjW2epemHcSzYBkZNt8VOf4kzv0AAJEKwzpVLRSoV4Osy+WqQl1EdGNAM GzYHtTq27GJd2l8ggg73lzxF+DhvkAFRZDQWXD6rT95/9uCpypwoZkQE34zB+T6GQQkB +rmg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOaCpKer; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=04rRp+5NyrPTrNdRJqljDPlOUnvXEUEWlmTyNNuus2Y=; b=ArnoRrPpr4JscsN0lMgMf8Mu8Uj9+817jAWU897JRkWxPoPxYahodv8exDwnuBPVxz LxBIbvaTslgyW6AhwgFAWxbKuP0Co0Vo0CQ/IgxHkGMpFNQz1dXGr06iHPgxcJXfMqM7 /9jqDXWr5VeccC42ceuXLv4f61CplE7WiM9CU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=04rRp+5NyrPTrNdRJqljDPlOUnvXEUEWlmTyNNuus2Y=; b=fQiC3H0gyYF5LcYPcI1uLl/eXWM7j15w+BvSYg0b445Baa6dUyFmgF5hqKEYQw/b+/ YhHunCqrh4QrIPEBYCWNhlr+jcxAPePOdYsv5Qa7/X0gaidLTGpfswiXnCNSySz7zWjU Sw32yAtSxbY8ak1hK0zAwAwGfrc/cCGnDkNrVb1yLLqS+/U2SUzVIS6g8v7HDqNO94YO X71VSzOhtZBY1gAdlT5iYLzN8EVZt6rpfH9sYx3X9PSzG9lbXhnqPP8WGKl2zTVw6XNC GChUgrA1IFb92UrNbmqdoTcGVEbRirVE7uhQ9OoOhuPm9qxr4xfCGJqhRpFDYEhsV50b v+Mg== X-Gm-Message-State: AGi0Pub5XAAs5fljiXyVbbppvutXEM1FVAndVSYhPEq/7MapyO+FvtmW eMxXihmTm8Kx/u7wVyBOdrCr3kLq X-Google-Smtp-Source: APiQypIRE4mG4/Zq0LCVBGQzYmC31AfD4YyqDEPwaRErMzKa/tfBRGoTj2sRDMGAyPFsqXbFUac1fw== X-Received: by 2002:a17:90a:340c:: with SMTP id o12mr22393044pjb.22.1587384573770; Mon, 20 Apr 2020 05:09:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b58d:: with SMTP id a13ls9877072pls.0.gmail; Mon, 20 Apr 2020 05:09:33 -0700 (PDT) X-Received: by 2002:a17:90a:c481:: with SMTP id j1mr9172043pjt.5.1587384573282; Mon, 20 Apr 2020 05:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384573; cv=none; d=google.com; s=arc-20160816; b=KeXMhb7gP8rPuurosXkqjYlYJBm2HkJy9cpnCXVNWaT+sghcFrDQEfZux8Q/tqrg7M Im+Jmmp/lfTYp+kIj6MthpPAWl2tLQVGo0+ZVGW+TApJPxT1T2rlSyYARIu1+NPbeC0Y 2qVPThSm0cX+0sVknBRQQEi0HqIyJ6YXjgglfQvBQBuvjVZ00PBaVUXTU1HON/wK8bPE 0oRI64fsJ7knCAx4jJ7amKSItzPACSzpskfoqNqDszGyUgF1J5xtgrDpIUE+Hz6+5j7O n1K+vNFO4A7Ni8vvEx5HdddEXy/H2oKLevCnAY3LPUiF1vOJeXP20u3ex6EpOO6LIYVK lgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=oznJnMevBod8GYIHpZ9YgC933styLXhk9bV31LNgcgM=; b=o5yrE5uaKUmpDysV5JETC/U5F4dxpGfd8c1c6WV1QEvj+Y3AlFvmC0Iwb91gfN7QGq WmtTVi1BvYaEk++0fC5krqt+wEHjWub3YGfVikAaHwEhdTodUENApCCPJIB7jNQqsJNi XK5dPS6cK9Z+CNt40/airH28mfRlHHCPHPJ19/1qSGWRotdHG468urYChthUAVtc1iMP mPN3F94QGGCFZ9T/C/n2X/5M21MsyLTRMYzRL+1m/h28lgdi7ETXc356CD3wrh9njkpm wSr8fu552pKw091zMq2s90MEozGsG4llZxVtq2xMWj/VGltg74lSHseAL4zsn2JN+5VE X45A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOaCpKer; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f8sor1057754pgd.56.2020.04.20.05.09.32 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 20 Apr 2020 05:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:5952:: with SMTP id j18mr2583808pgm.272.1587384572092; Mon, 20 Apr 2020 05:09:32 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id o187sm920556pfb.12.2020.04.20.05.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:09:31 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Vignesh R <vigneshr@ti.com>, u-boot@lists.denx.de Cc: suneelglinux@gmail.com, sagar.kadam@sifive.com, bhargavshah1988@gmail.com, sjg@chromium.org, Bin Meng <bmeng.cn@gmail.com>, trini@konsulko.com, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH 0/3] spi: Support SPI I/O protocol lines Date: Mon, 20 Apr 2020 17:39:18 +0530 Message-Id: <20200420120921.12840-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOaCpKer; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
spi: Support SPI I/O protocol lines
|
|
Message
Jagan Teki
April 20, 2020, 12:09 p.m. UTC
Some of the SPI controllers have a special set of format registers that defines how the transfer initiated to the FIFO by means of I/O protocol lines. Each mode of transfer from slave would be required to configure the I/O protocol lines so-that the master would identify how many number I/O protocol lines were used and alter the protocol bits on the controller. To address this issue (on these kinds of SPI controllers) this series is trying to send the I/O protocol lines being used on particular transfers. patch 1: Transfer the opcode alone patch 2: Add SPI I/O protocol lines via spi->proto patch 3: Use spi->proto on SiFive SPI controller Any inputs? Jagan. Jagan Teki (3): spi: spi-mem: Xfer opcode alone for non spi-mem spi: Support SPI I/O protocol lines spi: sifive: Fix format register proto field drivers/spi/spi-mem.c | 68 +++++++++++++++++++++++++--------------- drivers/spi/spi-sifive.c | 11 +++++-- drivers/spi/spi-uclass.c | 7 +++++ include/spi.h | 9 ++++++ 4 files changed, 67 insertions(+), 28 deletions(-)
Comments
Hi Jagan, On 20/04/20 5:39 pm, Jagan Teki wrote: > Some of the SPI controllers have a special set of format > registers that defines how the transfer initiated to the > FIFO by means of I/O protocol lines. > > Each mode of transfer from slave would be required to configure > the I/O protocol lines so-that the master would identify how > many number I/O protocol lines were used and alter the protocol > bits on the controller. > > To address this issue (on these kinds of SPI controllers) this > series is trying to send the I/O protocol lines being used > on particular transfers. > > patch 1: Transfer the opcode alone Has this been tested on more than one SPI controller? Is this safe to do? > > patch 2: Add SPI I/O protocol lines via spi->proto > > patch 3: Use spi->proto on SiFive SPI controller > > Any inputs? Why cannot SiFive SPI controller implement spi_mem_ops? Is there a non flash SPI device that supports quad mode? > Jagan. > > Jagan Teki (3): > spi: spi-mem: Xfer opcode alone for non spi-mem > spi: Support SPI I/O protocol lines > spi: sifive: Fix format register proto field > > drivers/spi/spi-mem.c | 68 +++++++++++++++++++++++++--------------- > drivers/spi/spi-sifive.c | 11 +++++-- > drivers/spi/spi-uclass.c | 7 +++++ > include/spi.h | 9 ++++++ > 4 files changed, 67 insertions(+), 28 deletions(-) >
On Tue, Apr 21, 2020 at 12:49 PM Vignesh Raghavendra <vigneshr@ti.com> wrote: > > Hi Jagan, > > On 20/04/20 5:39 pm, Jagan Teki wrote: > > Some of the SPI controllers have a special set of format > > registers that defines how the transfer initiated to the > > FIFO by means of I/O protocol lines. > > > > Each mode of transfer from slave would be required to configure > > the I/O protocol lines so-that the master would identify how > > many number I/O protocol lines were used and alter the protocol > > bits on the controller. > > > > To address this issue (on these kinds of SPI controllers) this > > series is trying to send the I/O protocol lines being used > > on particular transfers. > > > > patch 1: Transfer the opcode alone > > Has this been tested on more than one SPI controller? Is this safe to do? Yes. Well it is the proper way for handling all types of use cases (like Linux tx/rx_nbits does). > > > > > patch 2: Add SPI I/O protocol lines via spi->proto > > > > patch 3: Use spi->proto on SiFive SPI controller > > > > Any inputs? > > Why cannot SiFive SPI controller implement spi_mem_ops? Is there a non > flash SPI device that supports quad mode? Adding this generic code in spi-mem looks like adding generic code to work for the sake of this controller. Eventually two code bases do the same job with some buswidth extension. Lets hold for some time for testing other boards. Jagan.