devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Use sl28cpld driver for the LS1028A-QDS QIXIS FPGA
@ 2022-01-27 17:21 Vladimir Oltean
  2022-01-27 17:21 ` [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vladimir Oltean @ 2022-01-27 17:21 UTC (permalink / raw)
  To: Shawn Guo, Lee Jones
  Cc: Andrew Lunn, Florian Fainelli, Claudiu Manoil, Rob Herring,
	Li Yang, Michael Walle, netdev, devicetree, linux-kernel,
	linux-arm-kernel

Patches 1-2 are intended for Lee Jones (mfd) and patch 3 for Shawn Guo
(devicetree). Included all in the same patchset because they're small
and depend on each other.

With these changes, the mdio mux on the NXP LS1028A-QDS boards, which is
controlled through the QIXIS FPGA, works properly without the need for
any additional driver.

Vladimir Oltean (3):
  mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA
  dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to
    sl28cpld
  arm64: dts: ls1028a-qds: make the QIXIS CPLD use the simple-mfd-i2c.c
    driver

 .../devicetree/bindings/mfd/kontron,sl28cpld.yaml        | 4 +++-
 arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts        | 9 +++++----
 drivers/mfd/simple-mfd-i2c.c                             | 1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA
  2022-01-27 17:21 [PATCH 0/3] Use sl28cpld driver for the LS1028A-QDS QIXIS FPGA Vladimir Oltean
@ 2022-01-27 17:21 ` Vladimir Oltean
  2022-01-28  8:44   ` Lee Jones
  2022-01-27 17:21 ` [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld Vladimir Oltean
  2022-01-27 17:21 ` [PATCH 3/3] arm64: dts: ls1028a-qds: make the QIXIS CPLD use the simple-mfd-i2c.c driver Vladimir Oltean
  2 siblings, 1 reply; 8+ messages in thread
From: Vladimir Oltean @ 2022-01-27 17:21 UTC (permalink / raw)
  To: Shawn Guo, Lee Jones
  Cc: Andrew Lunn, Florian Fainelli, Claudiu Manoil, Rob Herring,
	Li Yang, Michael Walle, netdev, devicetree, linux-kernel,
	linux-arm-kernel

As Michael mentions in the description of commit 3abee4579484 ("mfd: Add
simple regmap based I2C driver"), "If a device wants to use this as its
MFD core driver, it has to add an individual compatible string."

The QIXIS FPGA on the LS1028A-QDS boards has a similar purpose to the
Kontron SL28 CPLD: it deals with board power-on reset timing, muxing,
etc.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index 51536691ad9d..fee709fed97a 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -63,6 +63,7 @@ static int simple_mfd_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "fsl,ls1028a-qds-qixis-i2c" },
 	{ .compatible = "kontron,sl28cpld" },
 	{}
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld
  2022-01-27 17:21 [PATCH 0/3] Use sl28cpld driver for the LS1028A-QDS QIXIS FPGA Vladimir Oltean
  2022-01-27 17:21 ` [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA Vladimir Oltean
@ 2022-01-27 17:21 ` Vladimir Oltean
  2022-02-11 13:01   ` Rob Herring
  2022-01-27 17:21 ` [PATCH 3/3] arm64: dts: ls1028a-qds: make the QIXIS CPLD use the simple-mfd-i2c.c driver Vladimir Oltean
  2 siblings, 1 reply; 8+ messages in thread
From: Vladimir Oltean @ 2022-01-27 17:21 UTC (permalink / raw)
  To: Shawn Guo, Lee Jones
  Cc: Andrew Lunn, Florian Fainelli, Claudiu Manoil, Rob Herring,
	Li Yang, Michael Walle, netdev, devicetree, linux-kernel,
	linux-arm-kernel

The LS1028A-QDS QIXIS FPGA has no problem working with the
simple-mfd-i2c.c driver, so extend the list of compatible strings to
include that part.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
index eb3b43547cb6..8c1216eb36ee 100644
--- a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
+++ b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
@@ -16,7 +16,9 @@ description: |
 
 properties:
   compatible:
-    const: kontron,sl28cpld
+    enum:
+      - fsl,ls1028a-qds-qixis-i2c
+      - kontron,sl28cpld
 
   reg:
     description:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] arm64: dts: ls1028a-qds: make the QIXIS CPLD use the simple-mfd-i2c.c driver
  2022-01-27 17:21 [PATCH 0/3] Use sl28cpld driver for the LS1028A-QDS QIXIS FPGA Vladimir Oltean
  2022-01-27 17:21 ` [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA Vladimir Oltean
  2022-01-27 17:21 ` [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld Vladimir Oltean
@ 2022-01-27 17:21 ` Vladimir Oltean
  2 siblings, 0 replies; 8+ messages in thread
From: Vladimir Oltean @ 2022-01-27 17:21 UTC (permalink / raw)
  To: Shawn Guo, Lee Jones
  Cc: Andrew Lunn, Florian Fainelli, Claudiu Manoil, Rob Herring,
	Li Yang, Michael Walle, netdev, devicetree, linux-kernel,
	linux-arm-kernel

The MDIO mux on the LS1028A-QDS never worked in mainline. The device
tree was submitted as-is, and there is a downstream driver for the QIXIS
FPGA:
https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/drivers/soc/fsl/qixis_ctrl.c?h=lf-5.10.72-2.2.0

That driver is very similar to the already existing drivers/mfd/simple-mfd-i2c.c,
and the hardware works with the simple-mfd-i2c driver, so there isn't
any reason to upstream the other one.

This change adapts the compatible string and child node format of the
FPGA node, so that the simple-mfd-i2c driver accepts it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
index 177bc1405f0f..6bd58fd9c90f 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
@@ -314,17 +314,18 @@ sgtl5000: audio-codec@a {
 	};
 
 	fpga@66 {
-		compatible = "fsl,ls1028aqds-fpga", "fsl,fpga-qixis-i2c",
-			     "simple-mfd";
+		compatible = "fsl,ls1028a-qds-qixis-i2c";
 		reg = <0x66>;
+		#address-cells = <1>;
+		#size-cells = <0>;
 
-		mux: mux-controller {
+		mux: mux-controller@54 {
 			compatible = "reg-mux";
+			reg = <0x54>;
 			#mux-control-cells = <1>;
 			mux-reg-masks = <0x54 0xf0>; /* 0: reg 0x54, bits 7:4 */
 		};
 	};
-
 };
 
 &i2c1 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA
  2022-01-27 17:21 ` [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA Vladimir Oltean
@ 2022-01-28  8:44   ` Lee Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2022-01-28  8:44 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Shawn Guo, Andrew Lunn, Florian Fainelli, Claudiu Manoil,
	Rob Herring, Li Yang, Michael Walle, netdev, devicetree,
	linux-kernel, linux-arm-kernel

On Thu, 27 Jan 2022, Vladimir Oltean wrote:

> As Michael mentions in the description of commit 3abee4579484 ("mfd: Add
> simple regmap based I2C driver"), "If a device wants to use this as its
> MFD core driver, it has to add an individual compatible string."
> 
> The QIXIS FPGA on the LS1028A-QDS boards has a similar purpose to the
> Kontron SL28 CPLD: it deals with board power-on reset timing, muxing,
> etc.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/mfd/simple-mfd-i2c.c | 1 +
>  1 file changed, 1 insertion(+)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld
  2022-01-27 17:21 ` [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld Vladimir Oltean
@ 2022-02-11 13:01   ` Rob Herring
  2022-02-11 13:24     ` Vladimir Oltean
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2022-02-11 13:01 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Shawn Guo, Lee Jones, Andrew Lunn, Florian Fainelli,
	Claudiu Manoil, Li Yang, Michael Walle, netdev, devicetree,
	linux-kernel, linux-arm-kernel

On Thu, Jan 27, 2022 at 07:21:04PM +0200, Vladimir Oltean wrote:
> The LS1028A-QDS QIXIS FPGA has no problem working with the
> simple-mfd-i2c.c driver, so extend the list of compatible strings to
> include that part.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> index eb3b43547cb6..8c1216eb36ee 100644
> --- a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> +++ b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> @@ -16,7 +16,9 @@ description: |
>  
>  properties:
>    compatible:
> -    const: kontron,sl28cpld
> +    enum:
> +      - fsl,ls1028a-qds-qixis-i2c
> +      - kontron,sl28cpld

Is there some relationship between these besides happening to use the 
same driver? Sharing a generic driver is not a reason to have the same 
binding doc.

Your DT has a mux-controller which is undocuemnted in this binding.

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld
  2022-02-11 13:01   ` Rob Herring
@ 2022-02-11 13:24     ` Vladimir Oltean
  2022-02-11 13:29       ` Michael Walle
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir Oltean @ 2022-02-11 13:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: Shawn Guo, Lee Jones, Andrew Lunn, Florian Fainelli,
	Claudiu Manoil, Leo Li, Michael Walle, netdev, devicetree,
	linux-kernel, linux-arm-kernel

On Fri, Feb 11, 2022 at 07:01:42AM -0600, Rob Herring wrote:
> On Thu, Jan 27, 2022 at 07:21:04PM +0200, Vladimir Oltean wrote:
> > The LS1028A-QDS QIXIS FPGA has no problem working with the
> > simple-mfd-i2c.c driver, so extend the list of compatible strings to
> > include that part.
> > 
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> > index eb3b43547cb6..8c1216eb36ee 100644
> > --- a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
> > @@ -16,7 +16,9 @@ description: |
> >  
> >  properties:
> >    compatible:
> > -    const: kontron,sl28cpld
> > +    enum:
> > +      - fsl,ls1028a-qds-qixis-i2c
> > +      - kontron,sl28cpld
> 
> Is there some relationship between these besides happening to use the 
> same driver? Sharing a generic driver is not a reason to have the same 
> binding doc.
> 
> Your DT has a mux-controller which is undocuemnted in this binding.
> 
> Rob

I'd guess they are both programmable FPGA's/CPLD's that are used for
board control. What I don't know is whether the sources for the Kontron
bit stream are derived in any way from the QIXIS.

I can look into adding a separate binding doc for the QIXIS anyway.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld
  2022-02-11 13:24     ` Vladimir Oltean
@ 2022-02-11 13:29       ` Michael Walle
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Walle @ 2022-02-11 13:29 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Rob Herring, Shawn Guo, Lee Jones, Andrew Lunn, Florian Fainelli,
	Claudiu Manoil, Leo Li, netdev, devicetree, linux-kernel,
	linux-arm-kernel

Am 2022-02-11 14:24, schrieb Vladimir Oltean:
> On Fri, Feb 11, 2022 at 07:01:42AM -0600, Rob Herring wrote:
>> On Thu, Jan 27, 2022 at 07:21:04PM +0200, Vladimir Oltean wrote:
>> > The LS1028A-QDS QIXIS FPGA has no problem working with the
>> > simple-mfd-i2c.c driver, so extend the list of compatible strings to
>> > include that part.
>> >
>> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>> > ---
>> >  Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
>> > index eb3b43547cb6..8c1216eb36ee 100644
>> > --- a/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
>> > +++ b/Documentation/devicetree/bindings/mfd/kontron,sl28cpld.yaml
>> > @@ -16,7 +16,9 @@ description: |
>> >
>> >  properties:
>> >    compatible:
>> > -    const: kontron,sl28cpld
>> > +    enum:
>> > +      - fsl,ls1028a-qds-qixis-i2c
>> > +      - kontron,sl28cpld
>> 
>> Is there some relationship between these besides happening to use the
>> same driver? Sharing a generic driver is not a reason to have the same
>> binding doc.

Ahh didn't notice this. Yes that should probably go into an own binding.

>> Your DT has a mux-controller which is undocuemnted in this binding.
>> 
>> Rob
> 
> I'd guess they are both programmable FPGA's/CPLD's that are used for
> board control. What I don't know is whether the sources for the Kontron
> bit stream are derived in any way from the QIXIS.

I can 100% guarantee that is not the case ;)

> I can look into adding a separate binding doc for the QIXIS anyway.

-michael

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-11 13:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 17:21 [PATCH 0/3] Use sl28cpld driver for the LS1028A-QDS QIXIS FPGA Vladimir Oltean
2022-01-27 17:21 ` [PATCH 1/3] mfd: simple-mfd-i2c: add compatible string for LS1028A-QDS FPGA Vladimir Oltean
2022-01-28  8:44   ` Lee Jones
2022-01-27 17:21 ` [PATCH 2/3] dt-bindings: mfd: add "fsl,ls1028a-qds-qixis-i2c" compatible to sl28cpld Vladimir Oltean
2022-02-11 13:01   ` Rob Herring
2022-02-11 13:24     ` Vladimir Oltean
2022-02-11 13:29       ` Michael Walle
2022-01-27 17:21 ` [PATCH 3/3] arm64: dts: ls1028a-qds: make the QIXIS CPLD use the simple-mfd-i2c.c driver Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).