On Thu, Oct 22, 2026 at 04:09:06AM -0700, E Shattow wrote: > add default mtdparts and mtdids consistent with Linux v7.3 Cadence QSPI > driver .get_name() handler cqspi_get_name() and jh7110-common.dtsi > > Signed-off-by: E Shattow <[email protected]> > --- > > This allows us to update the documentation to be slightly less likely > that the user would type the wrong offset by using mtd part names: > > - loady && sf update $loadaddr 0 $filesize > - StarFive # loady && sf update $loadaddr 0 $filesize > + loady && sf update $loadaddr spl > + StarFive # loady && sf update $loadaddr spl > > However that documentation update is planned for after the mtdparts > addition lands in release. It would be preferable to derive mtdparts > layout at runtime from device tree; if there is some way to do that > sensibly please offer some advice how to do so in the review. Thanks! > > Refer to discussion of mtd-id for SpacemiT K3 [1] and Linux v7.3 Cadence QSPI > driver [2]. > > 1: https://lore.kernel.org/u-boot/[email protected]/ > > 2: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-cadence-quadspi.c?h=v7.3#n1724 > > static const char *cqspi_get_name(struct spi_mem *mem) > { > struct cqspi_st *cqspi = > spi_controller_get_devdata(mem->spi->controller); > struct device *dev = &cqspi->pdev->dev; > > return devm_kasprintf(dev, GFP_KERNEL, "%s.%d", dev_name(dev), > spi_get_chipselect(mem->spi, 0)); > } > > In the typical situation for JH-7110 SoC then dev_name(dev) is "13010000.spi" > and spi_get_chipselect(mem->spi, 0) returns a value of zero. > > Changes in v2: > - use Linux v7.3 cqspi_get_name() typical result for mtdparts layout > name; this is done for compatibility in the non-default configuration > of matching cmdline mtdparts mtd-id when Linux MTD_OF_PARTS is disabled > --- > configs/starfive_visionfive2_defconfig | 4 ++++ > 1 file changed, 4 insertions(+)
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
