From: Rob Herring <robh@kernel.org>
To: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Mark Brown <broonie@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
andi.shyti@kernel.org, conor+dt@kernel.org,
linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
andre.draszik@linaro.org, peter.griffin@linaro.org,
willmcvicker@google.com, kernel-team@android.com
Subject: Re: [PATCH] spi: dt-bindings: samsung: make dma properties not required
Date: Mon, 4 Mar 2024 10:56:35 -0600 [thread overview]
Message-ID: <20240304165635.GA739022-robh@kernel.org> (raw)
In-Reply-To: <CAPLW+4kjXK=EWx__h0bX0rJMrL33E=t4YDzSOfObmvtG9aS+jg@mail.gmail.com>
On Sat, Mar 02, 2024 at 10:23:16AM -0600, Sam Protsenko wrote:
> On Sat, Mar 2, 2024 at 3:36 AM Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
> >
> >
> >
> > On 01.03.2024 22:42, Mark Brown wrote:
> > > On Fri, Mar 01, 2024 at 01:28:35PM -0600, Sam Protsenko wrote:
> > >> On Fri, Mar 1, 2024 at 5:55 AM Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
> > >
> > >>> Since the addition of the driver in 2009, the driver selects between DMA
> > >>> and polling mode depending on the transfer length - DMA mode for
> > >>> transfers bigger than the FIFO depth, polling mode otherwise. All
> > >>> versions of the IP support polling mode, make the dma properties not
> > >>> required.
> > >
> > >> AFAIU, the device tree has nothing to do with drivers, it's about
> > >> hardware description. Does making DMA properties not required here
> >
> > correct
> >
> > >> mean that there are some HW out there which doesn't integrate DMA in
> >
> > no, to me it means that the IP can work without DMA, only in PIO mode,
> > regardless if DMA is integrated or not. Not required means that the
> > property is not mandatory, which is what I'm trying to achieve here.
> >
> > >> SPI blocks? Even if this change is ok (I'm not sure), the
> > >> argumentation doesn't look sound to me.
> >
> > switching to PIO mode in the driver for sizes smaller than FIFO depths
> > in the driver guarantees that all existing compatibles support PIO mode.
> >
> > Are you saying that if there is a physical line between an IP and DMA
> > controller, then the DMA properties must always be specified in dt? I
> > thought they can be marked as optional in this case, and that's what I
> > did with this patch.
> >
>
> No, I would wait for maintainers to clarify on that bit. Change itself
> can be ok. But the commit message shouldn't mention the driver,
> because the driver uses (depends on) device tree, not vice versa. The
> device tree can be used in other projects as well (like U-Boot and
> OP-TEE), so it should be designed to be universal and not depend on
> kernel drivers. The commit message should be based on particular HW
> layout features and how the patch makes the bindings describe that HW
> better. It shouldn't rely on driver implementations.
If the controller is DMA capable then it should have dma properties. The
compatible should be enough to tell if it is a case of 'can only work
with DMA'. Otherwise, it is going to be up to a specific user. Even
within Linux, you may have a serial port that doesn't use DMA for the
console, but uses it for the tty or serdev.
Of course, if a new device is added without DMA properties and they
are added later on, then they are going to be optional even though the
DMA support is always there. I can't fully understand everyone's h/w.
Rob
next prev parent reply other threads:[~2024-03-04 16:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 11:55 [PATCH] spi: dt-bindings: samsung: make dma properties not required Tudor Ambarus
2024-03-01 19:28 ` Sam Protsenko
2024-03-01 20:42 ` Mark Brown
2024-03-02 9:36 ` Tudor Ambarus
2024-03-02 16:23 ` Sam Protsenko
2024-03-04 16:56 ` Rob Herring [this message]
2024-03-04 18:15 ` Tudor Ambarus
2024-03-05 5:08 ` Jaewon Kim
2024-03-05 20:42 ` Mark Brown
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=20240304165635.GA739022-robh@kernel.org \
--to=robh@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=semen.protsenko@linaro.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/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