[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <909f0c92-d110-4253-903e-5c81e21e12c9@nvidia.com>
Date: Tue, 25 Mar 2025 10:36:29 +0000
From: Jon Hunter <jonathanh@...dia.com>
To: Mark Brown <broonie@...nel.org>
Cc: Vishwaroop A <va@...dia.com>, krzk+dt@...nel.org, robh@...nel.org,
conor+dt@...nel.org, thierry.reding@...il.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-spi@...r.kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: spi: Add DT schema for Tegra SPIDEV
controller
Hi Mark,
On 27/11/2024 17:31, Mark Brown wrote:
> On Wed, Nov 27, 2024 at 05:24:01PM +0000, Jon Hunter wrote:
>> On 27/11/2024 16:09, Mark Brown wrote:
>
>>> I understand what he's trying to accomplish, it's the same thing as
>>> what everyone who wants to put a raw spidev compatible in their DT is
>>> trying to do. The way to do this would be something like a DT overlay
>>> that describes whatever is actually connected, or just customise the DT
>>> locally.
>
>> We could certainly use an overlay, but how do we handle the kernel side? My
>> understanding is that per patch 3/3 we need to reference a compatible string
>> the kernel is aware of. I guess we could use an existing one, but feels like
>> a massive hack. It would be nice if there is something generic we can use
>> for this like 'linux,spidev'.
>
>> I see that ACPI has something and it does print a warning that this should
>> not be used in production systems.
>
> You can put 'spidev' in as the compatible and get the warning, we don't
> require specific compatibles if the Linux device ID is good enough. If
> you genuinely just have bare wires you're probably able to cope with the
> warning. If something is actually connected you should use the
> compatible for whatever that is, if spidev makes sense for it then
> that'd be OK to add to spidev.
We finally got back to this. Looks like just having 'spidev' as the
compatible does not work. Apparently, it use to work and yes you would
get the warning, but that no longer seems to be the case. I see a few
others have been doing similar things and hacking their device-trees in
different ways [0].
I completely agree that ideally we would have a proper compatible string
for this because after all device-tree describes the hardware. One
use-case that we use is external loop back for verifying SPI by simply
connecting MOSI to the MISO. Would it be acceptable to have a compatible
string for external loopback connections?
Thanks
Jon
[0]
https://stackoverflow.com/questions/53634892/linux-spidev-why-it-shouldnt-be-directly-in-devicetree
--
nvpublic
Powered by blists - more mailing lists