]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: spi-sg2044-nor: Add configurable chip_info
authorZixian Zeng <sycamoremoon376@gmail.com>
Sun, 20 Jul 2025 08:31:44 +0000 (16:31 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 24 Jul 2025 12:28:16 +0000 (13:28 +0100)
commit5653b4f8840801d9d141ba6a6c10e7cc15040c5b
tree6b7b5dd02acee580d6d1f6a2b28322b5c362fc32
parent7438379cfc47046f7507dfdb54906acf56288b9f
spi: spi-sg2044-nor: Add configurable chip_info

SG2044 and SG2042 have similar SPI-NOR flash controller design,
but have incompatibility which causes existing driver
not working on SG2042:
1. SPI-NOR flash controller on SG2042 have no OPT register.
2. FIFO trigger level on SG2042 should be strictly less than 8.

So introduce a new configurable chip_info structure to hold the
different configuration.

Link: https://github.com/sophgo/sophgo-doc/blob/main/SG2042/TRM/source/SPI-flash.rst
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
Reviewed-by: Chen Wang <unicorn_wang@outlook.com> & Tested-by: Chen Wang
Link: https://patch.msgid.link/20250720-sfg-spifmc-v4-2-033188ad801e@gmail.com
Reviewed-by: Chen Wang <unicorn_wang@outlook.com> & Tested-by: Chen Wang
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sg2044-nor.c