public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Francesco Dolcini <francesco@dolcini.it>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Conor Dooley <conor@kernel.org>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	Max Krummenacher <max.oss.09@gmail.com>
Subject: Re: SPI loopback tests
Date: Wed, 11 Mar 2026 17:27:08 +0100	[thread overview]
Message-ID: <c1aa519b-42c7-483d-bbb2-1625f35c14c7@kernel.org> (raw)
In-Reply-To: <20260310133254.GA51497@francesco-nb>

On 10/03/2026 14:32, Francesco Dolcini wrote:
> Hello all,
> 
> I am writing to you SPI, test and DT people with reference to some need
> we see in our testing infrastructure.
> 
> On our embedded boards we regularly (on mailine linux, on Linux LTS, and
> on multiple hardware) run SPI tests, using a loopback connection (SPI
> MISO/MOSI are connected together). The HW provide just some pin header
> and there is no actual SPI slave device connected.
> 
> So far to test this we had some out-of-tree DT overlay abusing the spidev
> compatible, however we'd like to move away from this approach and have a
> solution that is 100% in mainline.
> 
> Manually unbinding/binding the driver in userspace does not seems as an
> option, because there is no device node.
> 
> One option that I could think of would be to add a new compatible that
> to describe this single wire loopback connection (something like
> `linux,spi-miso-mosi-loopback`) that would bind to the spidev driver.

Or the modern board file way: a module which in initcall creates several
SW nodes and instantiates the spidev. You still would need to insmode it
of course, but that way no DT would be directly involved.

> 
> I am aware that you all DT maintainers shared in a pretty clear way your
> view on the abuse of the spidev multiple times.
> 
> What would you be your advice to handle the need of an SPI loopback
> test? Am I missing something and there is a solution already available?


Best regards,
Krzysztof

      parent reply	other threads:[~2026-03-11 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 13:32 SPI loopback tests Francesco Dolcini
2026-03-10 15:55 ` Mark Brown
2026-03-10 18:12   ` Conor Dooley
2026-03-10 18:26     ` Mark Brown
2026-03-11 10:10       ` Conor Dooley
2026-03-11 11:16         ` Mark Brown
2026-03-11 13:58           ` Conor Dooley
2026-03-11 16:27 ` Krzysztof Kozlowski [this message]

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=c1aa519b-42c7-483d-bbb2-1625f35c14c7@kernel.org \
    --to=krzk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=francesco@dolcini.it \
    --cc=linux-spi@vger.kernel.org \
    --cc=max.oss.09@gmail.com \
    --cc=robh@kernel.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