[PATCH v1] spi: designware: add support for bits-per-word DT binding
Conor Dooley
conor at kernel.org
Wed Mar 4 15:58:37 CET 2026
On Wed, Mar 04, 2026 at 08:38:17AM -0600, Tom Rini wrote:
> On Wed, Mar 04, 2026 at 10:41:57AM +0800, Ng, Boon Khai wrote:
> >
> > >
> > > Thanks. And can we reasonably follow what Linux does here instead?
> > >
> >
> > We don't have ACPI in our devices, instead, i think that can be replaced
> > with DTS.
>
> I thought Conor said it could be auto-detected still, without ACPI, in
> Linux?
The controller capabilities are auto-detected. This has nothing to do
with ACPI AFAICT, I don't know why that was brought up. What it detects
is not an exact value though, the detected capability is the max of a
range. On Linux, the spi controller driver advertises the range it
supports. The spi device struct carries the bits_per_word that it wants
to use, and the controller driver looks into that struct to figure out
what supported bits_per_word setting to use in the transfer function.
It's not as simple as just reading the register in the controller and
setting the U-Boot drivers bits_per_word to the value, but I don't see
why U-Boot couldn't do what Linux does here.
If you search in spi-dw-core for bits_per_word, you should be able to
get a grasp of how it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260304/d14b64b8/attachment.sig>
More information about the U-Boot
mailing list