All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guochun Mao <guochun.mao@mediatek.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 18/20] spi: mtk_qspi: add qspi driver for MT7629 SoC
Date: Thu, 11 Oct 2018 14:03:17 +0800	[thread overview]
Message-ID: <1539237797.13207.21.camel@mhfsdcap03> (raw)
In-Reply-To: <CAMty3ZBPo5SLrrubovm3ZbiKiJDfE78q1mzR=_kzDXTJSQwTAA@mail.gmail.com>

Hi Jagan,

On Thu, 2018-10-04 at 21:31 +0530, Jagan Teki wrote:
> On Tue, Oct 2, 2018 at 4:38 PM Ryder Lee <ryder.lee@mediatek.com> wrote:
> >
> > From: Guochun Mao <guochun.mao@mediatek.com>
> >
> > This patch adds MT7629 qspi driver for accessing SPI NOR flash.
> >
> > Cc: Jagan Teki <jagan@openedev.com>
> > Signed-off-by: Guochun Mao <guochun.mao@mediatek.com>
> > ---
> >  drivers/spi/Kconfig    |   7 +
> >  drivers/spi/Makefile   |   1 +
> >  drivers/spi/mtk_qspi.c | 406 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 414 insertions(+)
> >  create mode 100644 drivers/spi/mtk_qspi.c
> >
> > +
> > +/* NOR flash commands */
> > +#define MTK_QSPI_OP_WREN           0x6
> > +#define MTK_QSPI_OP_READ_QUAD      0x6B
> > +#define MTK_QSPI_OP_READ_DUAL      0x3B
> > +#define MTK_QSPI_OP_FAST_READ      0xB
> > +#define MTK_QSPI_OP_READ           0x3
> > +#define MTK_QSPI_OP_PP             0x2
> 
> NAK, we don't allow flash commands in spi. Better handle via spi-mem
> or flash side.

I saw fsl_qspi.c also use flash commands to distinguish operations for
different setting. 

Due to controller IP's design, Flash register access is different from
data access for our controller IP, it has to set specific controller's
registers for specific operation.
It seems that spi-mem will not handle this issue, it's specific
controller's business.

About read flash register and read data,
Could you give some suggestions about how to distinguish these two kinds
of ops?
so that we can do properly setting for controller.

Could we implement this driver without considering 0x65/0x71 flash
command those that will have address parameters?
And it seems that, Uboot will not use quad read or dual read?

BR,

Guochun

  parent reply	other threads:[~2018-10-11  6:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  6:13 [U-Boot] [PATCH 00/20] Add support for MediaTek SoCs - MT7623n / MT7629 Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 01/20] tools: MediaTek: add MTK boot header generation to mkimage Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 02/20] arm: MediaTek: add basic support for MT7629 boards Ryder Lee
2018-10-02 14:29   ` Matthias Brugger
2018-10-02  6:13 ` [U-Boot] [PATCH 03/20] arm: MediaTek: add basic support for MT7623 boards Ryder Lee
2018-10-02 14:27   ` Matthias Brugger
2018-10-02 15:20     ` Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 04/20] arm: dts: MediaTek: add MT7629 reference board support Ryder Lee
2018-10-02 13:07   ` Matthias Brugger
2018-10-02 13:34     ` Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 05/20] arm: dts: MediaTek: add MT7623 Bananapi R2 " Ryder Lee
2018-10-02 13:10   ` Matthias Brugger
2018-10-02 13:36     ` Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 06/20] configs: MediaTek: add MT7629 reference " Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 07/20] configs: MediaTek: add MT7623 Bananapi R2 " Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 08/20] clk: MediaTek: add clock driver for MT7629 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 09/20] clk: MediaTek: add clock driver for MT7623 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 10/20] timer: MediaTek: add timer driver for MediaTek SoCs Ryder Lee
2018-10-02 14:20   ` Matthias Brugger
2018-10-02  6:13 ` [U-Boot] [PATCH 11/20] watchdog: MediaTek: add watchdog " Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 12/20] pinctrl: MediaTek: add pinctrl driver for MT7629 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 13/20] pinctrl: MediaTek: add pinctrl driver for MT7623 SoC Ryder Lee
2018-10-02 14:31   ` Matthias Brugger
2018-10-02  6:13 ` [U-Boot] [PATCH 14/20] power domain: MediaTek: add power domain driver for MT7629 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 15/20] power domain: MediaTek: add power domain driver for MT7623 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 16/20] serial: 16550: allow the driver to support MediaTek serial Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 17/20] ram: MediaTek: add DDR3 driver for MT7629 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 18/20] spi: mtk_qspi: add qspi " Ryder Lee
2018-10-04 16:01   ` Jagan Teki
2018-10-08 13:00     ` Guochun Mao
2018-10-11  6:03     ` Guochun Mao [this message]
2018-10-02  6:13 ` [U-Boot] [PATCH 19/20] mmc: mtk-sd: add SD/MMC host controller driver for MT7623 SoC Ryder Lee
2018-10-02  6:13 ` [U-Boot] [PATCH 20/20] MAINTAINERS: add an entry for MediaTek Ryder Lee
2018-10-02 15:08 ` [U-Boot] [PATCH 00/20] Add support for MediaTek SoCs - MT7623n / MT7629 Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539237797.13207.21.camel@mhfsdcap03 \
    --to=guochun.mao@mediatek.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.