public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Richard Alpe" <richard@bit42.se>,
	linux-kernel@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Michael Walle" <michael@walle.cc>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: nvmem: Remove fsl,t1023-sfp in favor of fsl,layerscape-sfp
Date: Fri, 22 Mar 2024 18:14:51 +0000	[thread overview]
Message-ID: <20240322-stool-hardwired-036a30767775@spud> (raw)
In-Reply-To: <bcb82d05-3c8f-40f4-a8d3-a0d7c17497b3@linux.dev>

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

On Fri, Mar 22, 2024 at 12:26:10PM -0400, Sean Anderson wrote:
> On 3/22/24 03:01, Krzysztof Kozlowski wrote:
> > On 21/03/2024 17:21, Sean Anderson wrote:
> >> On 3/19/24 13:55, Conor Dooley wrote:
> >>> On Mon, Mar 18, 2024 at 11:48:06AM -0400, Sean Anderson wrote:
> >>>> On 3/18/24 11:40, Conor Dooley wrote:
> >>>>> On Mon, Mar 18, 2024 at 11:08:00AM -0400, Sean Anderson wrote:
> >>>>>> On 3/17/24 11:10, Conor Dooley wrote:
> >>>>>
> >>>>>>> Additionally, should
> >>>>>>> they fall back to t1023-sfp? I see that there's already some dts files
> >>>>>>> with these compatibles in them but seemingly no driver support as there
> >>>>>>> is for the t1023-sfp.
> >>>>>>
> >>>>>> I checked the reference manuals for these processors, and all of them use TA 2.0.
> >>>>>
> >>>>> Sounds like a fallback is suitable then, although that will require
> >>>>> updating the various dts files.
> >>>>
> >>>> Yes, a fallback (like what is done for the T-series) would be suitable,
> >>>> but given that these devicetrees have been in-tree for eight years I
> >>>> think it would be preferable to support the existing bindings for
> >>>> compatibility purposes.
> >>>
> >>> Just cos stuff snuck into the tree in dts files doesn't make it right
> >>> though, I'd rather the bindings were done correctly. I don't care if you
> >>> want to support all of the compatibles in the driver so that it works
> >>> with the existing devicetrees though, as long as you mention the
> >>> rationale in the commit message.
> >> 
> >> It doesn't really matter what the schema has as long as the driver supports
> >> existing device trees.
> > 
> > We do not talk about driver now but bindings. You add new compatibles on
> > a basis that they were already used. This cannot bypass regular review
> > comments, so if during regular review process we would require
> > fallbacks, then you are expected to listen to review also when
> > documenting existing compatibles. Otherwise everyone would prefer to
> > snuck in incorrect code and later document it "it was there!".
> 
> To be clear, the existing nodes look like
> 
> 	sfp: sfp@e8000 {
> 		compatible = "fsl,t1040-sfp";
> 		reg	   = <0xe8000 0x1000>;
> 	};
> 
> which is perfectly serviceable for read-only use (as the clock is only
> necessary for writing). As these devices are effectively identical, the
> compatible could also look like what the P-series has:

I'd rather you just picked the oldest device and used that as the
fallback, rather than introducing an "<blah>-sfp-2.0" compatible.
The 2.1 and 3.0 ones don't have anything like that.

> 	sfp: sfp@e8000 {
> 		compatible = "fsl,p2041-sfp", "fsl,qoriq-sfp-1.0";
> 		reg	   = <0xe8000 0x1000>;
> 	};

None of the seem to be documented either btw:
rg fsl,qoriq-sfp-1.0
arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
371:		compatible = "fsl,p5020-sfp", "fsl,qoriq-sfp-1.0";

arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
339:		compatible = "fsl,p2041-sfp", "fsl,qoriq-sfp-1.0";

arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
386:		compatible = "fsl,p4080-sfp", "fsl,qoriq-sfp-1.0";

arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
366:		compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";

arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
331:		compatible = "fsl,p5040-sfp", "fsl,qoriq-sfp-1.0";

> 
> but in either case, it is desirable for the driver to match based on the
> more-specific compatible (as well as the less-specific compatible) as we
> already have enough information from the more-specific compatible to
> select the correct implementation.
> 
> --Sean

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

  reply	other threads:[~2024-03-22 18:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16  0:20 [PATCH 1/2] dt-bindings: nvmem: Remove fsl,t1023-sfp in favor of fsl,layerscape-sfp Sean Anderson
2024-03-16  0:20 ` [PATCH 2/2] nvmem: Remove qoriq-efuse in favor of layerscape-sfp Sean Anderson
2024-03-18  8:32   ` richard
2024-03-18 15:08     ` Sean Anderson
2024-03-17 15:10 ` [PATCH 1/2] dt-bindings: nvmem: Remove fsl,t1023-sfp in favor of fsl,layerscape-sfp Conor Dooley
2024-03-18 15:08   ` Sean Anderson
2024-03-18 15:40     ` Conor Dooley
2024-03-18 15:48       ` Sean Anderson
2024-03-19 17:55         ` Conor Dooley
2024-03-21 16:21           ` Sean Anderson
2024-03-22  7:01             ` Krzysztof Kozlowski
2024-03-22 16:26               ` Sean Anderson
2024-03-22 18:14                 ` Conor Dooley [this message]
2024-03-22 18:26                   ` Sean Anderson
2024-03-17 21:12 ` Rob Herring
2024-03-18  8:16   ` richard

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=20240322-stool-hardwired-036a30767775@spud \
    --to=conor@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=richard@bit42.se \
    --cc=robh+dt@kernel.org \
    --cc=sean.anderson@linux.dev \
    --cc=srinivas.kandagatla@linaro.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