U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cole Munz <Munzzyy1@proton.me>
To: u-boot@lists.u-boot-project.org
Cc: Tom Rini <trini@konsulko.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Quentin Schulz <u-boot@0leil.net>,
	Kever Yang <kever.yang@rock-chips.com>,
	Simon Glass <sjg@chromium.org>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Boon Khai Ng <boon.khai.ng@altera.com>,
	Alexey Charkov <alchark@flipper.net>
Subject: [PATCH v2 0/2] spi: support devices with no wire in one direction
Date: Thu, 20 Aug 2026 15:26:09 +0000	[thread overview]
Message-ID: <cover.1787238071.git.Munzzyy1@proton.me> (raw)

The Flipper One display bus has no MISO wire. That pin is the
end-of-frame GPIO. The device tree says so with spi-rx-bus-width = <0>,
but the uclass dropped the value and the Rockchip driver clocked the
receive FIFO anyway, discarding every byte. Reported at
https://github.com/flipperdevices/u-boot/issues/33 from the boot log
there; Alexey has since confirmed the fix on the hardware.

Patch 1 maps bus width 0 to SPI_NO_TX/SPI_NO_RX, validates transfers
against the bits in dm_spi_xfer() and adds a sandbox test. Patch 2 has
the Rockchip driver pick its transfer mode from those bits, so the
unused FIFO stays out of the transfer.

Both went out on their own before:

https://lore.kernel.org/all/10e92a74c8a22cc2cd54f5dcccc31594016d4263.1787015208.git.Munzzyy1@proton.me/
https://lore.kernel.org/all/69c35eba7ee1a353107459b8f8032e92506a3fb1.1787045568.git.Munzzyy1@proton.me/

Rolled into one series now, since patch 1 has no user by itself. The
rk_spi mail had also gone out as a reply into the uclass thread, which
is what made b4 read it as a v2 of the prerequisite. Clean thread this
time. Sorry for the noise.

Changes in v2:
- validate NO_RX/NO_TX centrally in dm_spi_xfer() and return -EINVAL,
  matching Linux __spi_validate(), with a sandbox test for both
  rejections (suggested by Quentin)
- reworded the transfer mode comment in rk_spi.c claim_bus (Quentin)
- collected Alexey's Tested-by on patch 2 (Flipper One, warning gone,
  transmit-only display still works)
- added the maintainers get_maintainer.pl lists for the touched files
- one series with a cover letter instead of two stray patches

Cole Munz (2):
  spi: Handle spi-{tx,rx}-bus-width 0 as SPI_NO_TX/SPI_NO_RX
  spi: rockchip: skip the unused FIFO direction on a one-wire device

 drivers/spi/rk_spi.c     | 27 ++++++++++++++++++++++----
 drivers/spi/spi-uclass.c | 16 ++++++++++++++++
 include/spi.h            |  2 ++
 test/dm/spi.c            | 41 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 4 deletions(-)


base-commit: 527115ef6783cec49e5610c523c124b399011361
-- 
2.55.0



             reply	other threads:[~2026-08-20 15:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 15:26 Cole Munz [this message]
2026-08-20 15:26 ` [PATCH v2 1/2] spi: Handle spi-{tx, rx}-bus-width 0 as SPI_NO_TX/SPI_NO_RX Cole Munz
2026-08-20 15:49   ` [PATCH v2 1/2] spi: Handle spi-{tx,rx}-bus-width " Quentin Schulz
2026-08-20 15:26 ` [PATCH v2 2/2] spi: rockchip: skip the unused FIFO direction on a one-wire device Cole Munz
2026-08-20 15:57   ` Quentin Schulz
2026-08-20 17:00     ` Cole Munz
2026-08-21 10:12       ` Quentin Schulz
2026-08-21 10:55         ` Cole Munz

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=cover.1787238071.git.Munzzyy1@proton.me \
    --to=munzzyy1@proton.me \
    --cc=alchark@flipper.net \
    --cc=boon.khai.ng@altera.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=kever.yang@rock-chips.com \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@0leil.net \
    --cc=u-boot@lists.u-boot-project.org \
    /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