public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: "Ng, Boon Khai" <boon.khai.ng@altera.com>,
	U-boot Openlist <u-boot@lists.denx.de>,
	Tien Fong Chee <tien.fong.chee@altera.com>,
	Dinesh Maniyam <dinesh.maniyam@altera.com>,
	Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>,
	Chen Huei Lok <chen.huei.lok@altera.com>,
	Kok Kiang Hea <kok.kiang.hea@altera.com>
Subject: Re: [PATCH v1] spi: designware: add support for bits-per-word DT binding
Date: Wed, 4 Mar 2026 14:58:37 +0000	[thread overview]
Message-ID: <20260304-purify-activate-7bb0d1447dbd@spud> (raw)
In-Reply-To: <20260304143817.GS1388590@bill-the-cat>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-03-04 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 11:04 [PATCH v1] spi: designware: add support for bits-per-word DT binding Boon Khai Ng
2026-02-27 14:07 ` Tom Rini
2026-03-03  7:59   ` Ng, Boon Khai
2026-03-03 14:37     ` Tom Rini
2026-03-03 16:01       ` Conor Dooley
2026-03-03 17:00         ` Ng, Boon Khai
2026-03-03 17:05           ` Tom Rini
2026-03-04  2:41             ` Ng, Boon Khai
2026-03-04 14:38               ` Tom Rini
2026-03-04 14:58                 ` Conor Dooley [this message]
2026-03-10 10:55             ` Ng, Boon Khai
2026-03-13  1:43               ` Ng, Boon Khai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260304-purify-activate-7bb0d1447dbd@spud \
    --to=conor@kernel.org \
    --cc=alif.zakuan.yuslaimi@altera.com \
    --cc=boon.khai.ng@altera.com \
    --cc=chen.huei.lok@altera.com \
    --cc=dinesh.maniyam@altera.com \
    --cc=kok.kiang.hea@altera.com \
    --cc=tien.fong.chee@altera.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox