[RFC PATCH 0/5] Add QPIC SPI NAND driver support

Md Sadre Alam quic_mdalam at quicinc.com
Tue Oct 31 05:03:02 PDT 2023


Hi Miquel,

This series is RFC for QPIC NAND driver design for
both SPI NAND and RAW NAND.

We have already discuss this design in the below link

https://patchwork.kernel.org/project/linux-arm-msm/patch/1602307902-16761-3-git-send-email-mdalam@codeaurora.org/#25270814

Since QPIC controller support both raw and as wel as
serial nand, In these patch series I am trying to write
these driver as per above discussion.

As per this design we are having new drivrs for:

1) SPI-NAND Driver
2) RAW-NAND Driver
3) QPIC-COMMON-API Driver
4) ECC ENGINE Driver

Could you plese review these RFC patches and let me know
if i am doing as per design and my code are proper so that
i can proceed further.

I have testd SPI NAND enumeration with this new design.

Command supported currently by spi nand driver
1) RESET
2) READ ID
3) GET FEATURE
4) SET FEATURE

Currently READ_PAGE, WRITE_PAGE are dummy API. Will write
this later on after your review.

One more thisng wanted to add here Since for QPIC ECC engine
its not a separte HW IP, and only one register is there to control ECC
enable/disable. So for just for one register writing a separte driver
is fine or not?
In dt I have added like as below 

 bch: qpic_ecc {
                      compatible = "qcom,ipq9574-ecc";
                      status = "ok";
              };

Is this ok ?

Thanks,
Alam.

Md Sadre Alam (5):
  mtd: nand: ecc-qcom: Add support for ECC Engine Driver
  arm64: dts: qcom: ipq9574: Add ecc engine support
  mtd: nand: qpic_common: Add support for qpic common API
  spi: qpic: Add support for qpic spi nand driver
  arm64: dts: qcom: ipq9574: Add support for SPI nand

 arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts |  56 +-
 arch/arm64/boot/dts/qcom/ipq9574.dtsi       |  33 +
 drivers/mtd/nand/Kconfig                    |   7 +
 drivers/mtd/nand/Makefile                   |   1 +
 drivers/mtd/nand/ecc-qcom.c                 | 198 +++++
 drivers/mtd/nand/qpic_common.c              | 840 ++++++++++++++++++++
 drivers/spi/Kconfig                         |   7 +
 drivers/spi/Makefile                        |   1 +
 drivers/spi/spi-qpic-snand.c                | 604 ++++++++++++++
 include/linux/mtd/nand-qpic-common.h        | 641 +++++++++++++++
 10 files changed, 2360 insertions(+), 28 deletions(-)
 create mode 100644 drivers/mtd/nand/ecc-qcom.c
 create mode 100644 drivers/mtd/nand/qpic_common.c
 create mode 100644 drivers/spi/spi-qpic-snand.c
 create mode 100644 include/linux/mtd/nand-qpic-common.h

-- 
2.34.1




More information about the linux-mtd mailing list