Skip to content

RFC spi/HiSilicon v3xx: Support dual and quad mode through DMI quirks

John Garry linux-mtd linux-spi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3spi: Allow SPI controller override device buswidthdrivers/spi/spi.c include/linux/spi/spi.h+6 -19 replies
2/3spi: HiSilicon v3xx: Properly set CMD_CONFIG for Dual/Quad modesdrivers/spi/spi-hisi-sfc-v3xx.c+43 -01 reply
3/3spi: HiSilicon v3xx: Use DMI quirk to set controller buswidth override bitsdrivers/spi/spi-hisi-sfc-v3xx.c+55 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] spi/HiSilicon v3xx: Support dual and quad mode through DMI quirks

As discussed during the original HiSilicon v3xx SPI driver upstreaming, currently there is no method for the ACPI SPI Serial Bus Connection Resource Descriptor to define the data buswidth [0], [1].

So we can look to get the ACPI spec updated for this, and I have submitted a proposal for a new feature here:
https://bugzilla.tianocore.org/show_bug.cgi?id=2557

However I am not sure how successful that will be.

In the meantime, as an alternate approach, this RFC proposes to allow the SPI controller driver override the device buswidth. In this example, the driver uses DMI quirks to discover the host machine and set the buswidth override accordingly when the machine is known to support dual or quad mode of operation.

I also have included a fix for dual and quad modes in the driver.

Comments welcome. thanks.

[0] https://lore.kernel.org/linux-mtd/[email protected]/
[1] https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf,

     19.6.126

John Garry (3):
spi: Allow SPI controller override device buswidth
spi: HiSilicon v3xx: Properly set CMD_CONFIG for Dual/Quad modes
spi: HiSilicon v3xx: Use DMI quirk to set controller buswidth override
bits

 drivers/spi/spi-hisi-sfc-v3xx.c | 99 ++++++++++++++++++++++++++++++++-
 drivers/spi/spi.c               |  4 +-
 include/linux/spi/spi.h         |  3 +
 3 files changed, 104 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1