U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Boon Khai Ng <boon.khai.ng@altera.com>
Cc: 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: Fri, 27 Feb 2026 08:07:56 -0600	[thread overview]
Message-ID: <20260227140756.GP1593142@bill-the-cat> (raw)
In-Reply-To: <20260227110434.5058-1-boon.khai.ng@altera.com>

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

On Fri, Feb 27, 2026 at 07:04:34PM +0800, Boon Khai Ng wrote:

> Add support for the bits-per-word device tree binding.
> 
> Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
> ---
>  drivers/spi/designware_spi.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
> index b520c727900..c41436a1dfb 100644
> --- a/drivers/spi/designware_spi.c
> +++ b/drivers/spi/designware_spi.c
> @@ -359,6 +359,7 @@ static int dw_spi_probe(struct udevice *bus)
>  	dw_spi_init_t init = (dw_spi_init_t)dev_get_driver_data(bus);
>  	struct dw_spi_plat *plat = dev_get_plat(bus);
>  	struct dw_spi_priv *priv = dev_get_priv(bus);
> +	u32 bits_per_word = 8;
>  	int ret;
>  	u32 version;
>  
> @@ -384,8 +385,19 @@ static int dw_spi_probe(struct udevice *bus)
>  		version >> 24, version >> 16, version >> 8, version,
>  		priv->max_xfer);
>  
> -	/* Currently only bits_per_word == 8 supported */
> -	priv->bits_per_word = 8;
> +	ret = ofnode_read_u32(dev_ofnode(bus), "bits-per-word", &bits_per_word);
> +	if (ret) {
> +		debug("%s no bits-per-word not found\n", __func__);
> +	} else {
> +		if (bits_per_word >= 4 && bits_per_word <= priv->max_xfer) {
> +			debug("%s %d bits-per-word found\n", __func__, bits_per_word);
> +		} else {
> +			printf("ignoring invalid bits-per-word %d\n", bits_per_word);
> +			bits_per_word = 8;
> +		}
> +	}
> +
> +	priv->bits_per_word = bits_per_word;
>  
>  	priv->tmode = 0; /* Tx & Rx */
>  

I don't see this binding in v7.0-rc1, did I miss it? Thanks.

-- 
Tom

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

  reply	other threads:[~2026-02-27 14:08 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 [this message]
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
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=20260227140756.GP1593142@bill-the-cat \
    --to=trini@konsulko.com \
    --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=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