lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqJ8vHeQzMQwU8LcpwEZ9ZqvtTxsMJKNhGpgAHAZpK_FnQ@mail.gmail.com>
Date: Mon, 12 Aug 2024 17:29:55 -0600
From: Rob Herring <robh@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: Conor Dooley <conor@...nel.org>, Shawn Guo <shawnguo@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	"moderated list:ARM/FREESCALE LAYERSCAPE ARM ARCHITECTURE" <linux-arm-kernel@...ts.infradead.org>, 
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>, 
	imx@...ts.linux.dev
Subject: Re: [PATCH 1/1] arm64: dts: lx2160a: Change PCIe compatible string to fsl,ls2088a-pcie

On Mon, Aug 12, 2024 at 1:08 PM Frank Li <Frank.li@....com> wrote:
>
> On Mon, Aug 12, 2024 at 11:29:38AM -0600, Rob Herring wrote:
> > On Fri, Aug 9, 2024 at 11:11 AM Frank Li <Frank.li@....com> wrote:
> > >
> > > On Fri, Aug 09, 2024 at 04:07:25PM +0100, Conor Dooley wrote:
> > > > On Thu, Aug 08, 2024 at 12:15:03PM -0400, Frank Li wrote:
> > > > > On Thu, Aug 08, 2024 at 04:55:14PM +0100, Conor Dooley wrote:
> > > > > > On Thu, Aug 08, 2024 at 11:51:34AM -0400, Frank Li wrote:
> > > > > > > On Thu, Aug 08, 2024 at 04:34:32PM +0100, Conor Dooley wrote:
> > > > > > > > On Thu, Aug 08, 2024 at 11:31:20AM -0400, Frank Li wrote:
> > > > > > > > > The mass production lx2160 rev2 use designware PCIe Controller. Old Rev1
> > > > > > > > > which use mobivel PCIe controller was not supported. Although uboot
> > > > > > > > > fixup can change compatible string fsl,lx2160a-pcie to fsl,ls2088a-pcie
> > > > > > > > > since 2019, it is quite confused and should correctly reflect hardware
> > > > > > > > > status in fsl-lx2160a.dtsi.
> > > > > > > >
> > > > > > > > This does not begin to explain why removing the soc-specific compatible,
> > > > > > > > and instead putting the compatible for another soc is the right fix.
> > > > > > > > Come up with a new compatible for this device, that perhaps falls back
> > > > > > > > to the ls2088a, but this change doesn't seem right to me.
> > > > > > >
> > > > > > > It can't fallback to fsl,ls2088a-pcie if fsl,lx2160a-pcie exist, which are
> > > > > > > totally imcompatible between fsl,ls2088a-pcie and fsl,lx2160a-pcie.
> > > > > > >
> > > > > > > Previous dtb can work just because uboot dynamtic change fsl,lx2160a-pcie
> > > > > > > to fsl,ls2088a-pcie when boot kernel.
> > > > > > >
> > > > > > > fsl,lx2160a-pcie should be removed because Rev1 have not mass productioned.
> > > > > >
> > > > > > Please re-read what I wrote. I said to come up with a new compatible for
> > > > > > this device, not fall back from the existing fsl,lx2160a-pcie to
> > > > > > fsl,ls2088a-pcie.
> > > > >
> > > > > According to my understand, It needn't add new compatible string if nothing
> > > > > difference. for example, it use fsl,vf610-i2c for all i2c without add
> > > > > new soc-specific fsl,lx2160-i2c.
> > > >
> > > > No, you should have soc-specific compatibles regardless. Just because
> > > > you got away with it once, doesn't mean I'm not going to complain about
> > > > it here!
> > >
> > > Rob:
> > >         What's current policy for this? Not only for this one. If new SOC
> > > appear such as iMX10 (maybe many derived chip i.MX101, i.MX102...), there
> > > are bunch of IPs, Do we need add fsl,imx10* for everyone, which most part
> > > is exactly the same as old one and bloat binding doc.
> >
> > Yes, you do. Do you really know that something in the design hasn't
> > changed? Have you compared the RTL between the versions? The only way
> > to deal with quirks without changing the DT everytime is by having
> > specific compatibles *upfront*.
> >
> > The "bloat" is never that much because the IP really always changes.
> > QCom wanted to (and did) use IP version numbers for the same reasons.
> > Guess what, the IP version number changed on almost every SoC.
>
> It is quite dependent on IP itself. Some IP (such as I2C, SPI, UART) is
> quite mature. There are not user visual change in difference SOC. for
> example in drivers/pci/controller/dwc/pci-layerscape.c:
>
> static const struct of_device_id ls_pcie_of_match[] = {
>         { .compatible = "fsl,ls1012a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls1021a-pcie", .data = &ls1021a_drvdata },
>         { .compatible = "fsl,ls1028a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls1043a-pcie", .data = &ls1043a_drvdata },
>         { .compatible = "fsl,ls1046a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls2080a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls2085a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls2088a-pcie", .data = &layerscape_drvdata },
>         { .compatible = "fsl,ls1088a-pcie", .data = &layerscape_drvdata },
>
> Only 1021 and 1043 have difference, others just copy layerscape_drvdata.
> I met similar case in many other drivers.

My guess is some of these are the same die. I doubt FSL taped out 9
different die.

> Can we consider just add new compatible string only when visualable change
> happen?

Only if you know all possible errata already. So no. You asked for the
policy and I gave it.

> I am confused that some use old SOC compatible string directly, some add
> new SOC compatible without any actual change.

Because people don't like to use old SoC names with their shiny new
SoC. Or they just don't understand how compatible works. We push back
more on not having a fallback now, but the only thing the DT
maintainers have to go on is the drvdata differences or lack of.


> > The exceptions are really if different SoCs are just different
> > packaging or fusing.
> >
>
> I see.
>
> >
> > In this case, I'm inclined to say just match what u-boot creates, but
> > please make that abundantly clear with a comment in the .dts file and
> > explain the situation in the commit message. OTOH, just adding a new
> > "fsl,lx2160a-dw-pcie" compatible with "fsl,ls2088a-pcie" fallback
> > doesn't hurt, and we can just move on from creating a special case.
>
> It is small problem.
> In https://lore.kernel.org/all/CAOesGMhz8PYNG_bgMX-6gka77k1hJOZUv6xqJRqATaJ6mFbk6A@mail.gmail.com/
> There are still small number user use ver1 even NXP not support Rev1.
> According to my best knowledge, rev1 never mass producetion, only few out
> of NXP to do evaluation.

Do those users even care about new kernels? Personally, I'd drop it
and add it back when and if there are complaints.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ