[PATCH 1/3] dt-bindings: spi: Add VIA/WonderMedia serial flash controller

Alexey Charkov alchark at gmail.com
Fri Jun 6 02:06:22 PDT 2025


On Fri, Jun 6, 2025 at 12:29 PM Krzysztof Kozlowski <krzk at kernel.org> wrote:
>
> On 15/05/2025 21:50, Alexey Charkov wrote:
> >>> +
> >>> +  "#address-cells":
> >>> +    const: 1
> >>> +
> >>> +  "#size-cells":
> >>> +    const: 0
> >>
> >> This follows the SPI binding, right? Drop these 2 and add a $ref to
> >> spi-controller.yaml.
> >
> > Need some advice here. While this controller speaks SPI protocol to
> > its connected flash chips, it's a special-purpose thing that doesn't
> > expose much SPI functionality to the outside world, nor can it drive
> > any SPI devices other than SPI NOR flash. Does that still qualify as
> > an SPI controller as far as the bindings are concerned?
> >
> > Happy to reference the spi-controller.yaml binding if so.
>
> SPI NOR flashes are still child devices of an SPI controller. You can
> look at other examples - aren't they all using spi-controller? Why this
> would be different? Unless you found some cases that are different, but
> then which ones?

No strong opinions here, and no expectation of any special treatment
:) Just wanted to consult on what's most appropriate.

My (subjective and perhaps unfounded) expectation when seeing
something advertise itself as an SPI controller was that it would be a
general purpose SPI master, to which one can e.g. connect an SPI
driven LCD screen and get it to work with generic Linux SPI
infrastructure - which would not be possible with this single-purpose
NOR-only flash controller. Given that I don't know how flexible or
restrictive other examples are in terms of driving arbitrary SPI
devices, I thought it's better to just ask.

What I'm getting from this exchange here is that I'd better use the
spi-controller binding and respective node names regardless of the
fact that this controller cannot drive arbitrary SPI devices beyond
NOR flash (which, as I'm getting, is irrelevant after all).

Best regards,
Alexey



More information about the linux-mtd mailing list