Linux-ARM-Kernel Archive on lore.kernel.org
 help / Atom feed
* [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support
@ 2018-12-18 16:01 Aisheng Dong
  2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Aisheng Dong @ 2018-12-18 16:01 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Aisheng Dong, ulf.hansson, dongas86, khilman, linux-pm, rjw,
	dl-linux-imx, kernel, Fabio Estevam, shawnguo

SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs
to reuse the common part.

Dong Aisheng (3):
  dt-bindings: fsl: scu: add fallback compatible string for power domain
  dt-bindings: fsl: scu: add imx8qm scu power domain support
  firmware: imx: scu-pd: add fallback compatible string support

 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 8 ++++++--
 drivers/firmware/imx/scu-pd.c                               | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2018-12-18 16:01 [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
@ 2018-12-18 16:01 ` Aisheng Dong
  2018-12-28 23:28   ` Rob Herring
  2019-01-11  9:00   ` Shawn Guo
  2018-12-18 16:01 ` [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support Aisheng Dong
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 15+ messages in thread
From: Aisheng Dong @ 2018-12-18 16:01 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Aisheng Dong, Mark Rutland, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, devicetree, Rob Herring, dl-linux-imx, kernel,
	Fabio Estevam, shawnguo

SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs
to reuse the common part.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index c20f38e..849b671 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -58,7 +58,10 @@ This binding for the SCU power domain providers uses the generic power
 domain binding[2].
 
 Required properties:
-- compatible:		Should be "fsl,imx8qxp-scu-pd".
+- compatible:		Should be one of:
+			  "fsl,imx8qxp-scu-pd"
+			followed by "fsl,scu-pd"
+
 - #power-domain-cells:	Must be 1. Contains the Resource ID used by
 			SCU commands.
 			See detailed Resource ID list from:
@@ -145,7 +148,7 @@ firmware {
 		};
 
 		pd: imx8qx-pd {
-			compatible = "fsl,imx8qxp-scu-pd";
+			compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
 			#power-domain-cells = <1>;
 		};
 	};
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support
  2018-12-18 16:01 [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
  2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
@ 2018-12-18 16:01 ` Aisheng Dong
  2018-12-28 23:28   ` Rob Herring
  2018-12-18 16:01 ` [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
  2018-12-28  2:38 ` [PATCH 0/3] " Aisheng Dong
  3 siblings, 1 reply; 15+ messages in thread
From: Aisheng Dong @ 2018-12-18 16:01 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Aisheng Dong, Mark Rutland, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, devicetree, Rob Herring, dl-linux-imx, kernel,
	Fabio Estevam, shawnguo

Add imx8qm scu power domain support

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 849b671..b9b8eb6 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -59,6 +59,7 @@ domain binding[2].
 
 Required properties:
 - compatible:		Should be one of:
+			  "fsl,imx8qm-scu-pd",
 			  "fsl,imx8qxp-scu-pd"
 			followed by "fsl,scu-pd"
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support
  2018-12-18 16:01 [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
  2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
  2018-12-18 16:01 ` [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support Aisheng Dong
@ 2018-12-18 16:01 ` Aisheng Dong
  2019-01-12  1:39   ` Shawn Guo
  2018-12-28  2:38 ` [PATCH 0/3] " Aisheng Dong
  3 siblings, 1 reply; 15+ messages in thread
From: Aisheng Dong @ 2018-12-18 16:01 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Aisheng Dong, ulf.hansson, dongas86, khilman, linux-pm, rjw,
	Rob Herring, dl-linux-imx, kernel, Fabio Estevam, shawnguo

SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
Make the driver support the fallback compatible string "fsl,scu-pd" to
allow other SoCs to reuse the common part.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/firmware/imx/scu-pd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
index 407245f..1aaae98 100644
--- a/drivers/firmware/imx/scu-pd.c
+++ b/drivers/firmware/imx/scu-pd.c
@@ -321,6 +321,7 @@ static int imx_sc_pd_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id imx_sc_pd_match[] = {
+	{ .compatible = "fsl,scu-pd", &imx8qxp_scu_pd},
 	{ .compatible = "fsl,imx8qxp-scu-pd", &imx8qxp_scu_pd},
 	{ /* sentinel */ }
 };
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support
  2018-12-18 16:01 [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
                   ` (2 preceding siblings ...)
  2018-12-18 16:01 ` [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
@ 2018-12-28  2:38 ` " Aisheng Dong
  2018-12-28 13:24   ` Ulf Hansson
  3 siblings, 1 reply; 15+ messages in thread
From: Aisheng Dong @ 2018-12-28  2:38 UTC (permalink / raw)
  To: linux-arm-kernel, Rob Herring, devicetree
  Cc: ulf.hansson, dongas86, khilman, linux-pm, rjw, dl-linux-imx,
	kernel, Fabio Estevam, shawnguo

Sorry, missed DT guys.

Hi Rob & Ulf,

Would you help review this patch series?

Regards
Dong Aisheng

> -----Original Message-----
> From: Aisheng Dong
> Sent: Wednesday, December 19, 2018 12:01 AM
> 
> SCU power domain can be used in the same way by IMX8QXP and IMX8QM
> SoCs.
> Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs to reuse
> the common part.
> 
> Dong Aisheng (3):
>   dt-bindings: fsl: scu: add fallback compatible string for power domain
>   dt-bindings: fsl: scu: add imx8qm scu power domain support
>   firmware: imx: scu-pd: add fallback compatible string support
> 
>  Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 8 ++++++--
>  drivers/firmware/imx/scu-pd.c                               | 1 +
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> --
> 2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support
  2018-12-28  2:38 ` [PATCH 0/3] " Aisheng Dong
@ 2018-12-28 13:24   ` Ulf Hansson
  0 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2018-12-28 13:24 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: devicetree, dongas86, khilman, linux-pm, rjw, Rob Herring,
	dl-linux-imx, kernel, Fabio Estevam, shawnguo, linux-arm-kernel

On Fri, 28 Dec 2018 at 03:38, Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> Sorry, missed DT guys.
>
> Hi Rob & Ulf,
>
> Would you help review this patch series?

This is DT changes, so I didn't look until now.

>
> Regards
> Dong Aisheng
>
> > -----Original Message-----
> > From: Aisheng Dong
> > Sent: Wednesday, December 19, 2018 12:01 AM
> >
> > SCU power domain can be used in the same way by IMX8QXP and IMX8QM
> > SoCs.
> > Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs to reuse
> > the common part.
> >
> > Dong Aisheng (3):
> >   dt-bindings: fsl: scu: add fallback compatible string for power domain
> >   dt-bindings: fsl: scu: add imx8qm scu power domain support
> >   firmware: imx: scu-pd: add fallback compatible string support
> >
> >  Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 8 ++++++--
> >  drivers/firmware/imx/scu-pd.c                               | 1 +
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> >
> > --
> > 2.7.4
>

For series, feel free to add:

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for  power domain
  2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
@ 2018-12-28 23:28   ` Rob Herring
  2019-01-11  9:00   ` Shawn Guo
  1 sibling, 0 replies; 15+ messages in thread
From: Rob Herring @ 2018-12-28 23:28 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Aisheng Dong, Mark Rutland, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, devicetree, dl-linux-imx, kernel, Fabio Estevam,
	shawnguo, linux-arm-kernel

On Tue, 18 Dec 2018 16:01:20 +0000, Aisheng Dong wrote:
> SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
> Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs
> to reuse the common part.
> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support
  2018-12-18 16:01 ` [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support Aisheng Dong
@ 2018-12-28 23:28   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2018-12-28 23:28 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Aisheng Dong, Mark Rutland, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, devicetree, dl-linux-imx, kernel, Fabio Estevam,
	shawnguo, linux-arm-kernel

On Tue, 18 Dec 2018 16:01:25 +0000, Aisheng Dong wrote:
> Add imx8qm scu power domain support
> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
  2018-12-28 23:28   ` Rob Herring
@ 2019-01-11  9:00   ` Shawn Guo
  2019-01-11  9:06     ` Shawn Guo
  1 sibling, 1 reply; 15+ messages in thread
From: Shawn Guo @ 2019-01-11  9:00 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Mark Rutland, devicetree, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, Rob Herring, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
> Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs
> to reuse the common part.

This is not the practice we used to match devices with compatibilities,
i.e. coding the compatible string with the SoC name that firstly
introduces the device, and use the compatible as fallback for new SoCs.

Shawn

> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> index c20f38e..849b671 100644
> --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> @@ -58,7 +58,10 @@ This binding for the SCU power domain providers uses the generic power
>  domain binding[2].
>  
>  Required properties:
> -- compatible:		Should be "fsl,imx8qxp-scu-pd".
> +- compatible:		Should be one of:
> +			  "fsl,imx8qxp-scu-pd"
> +			followed by "fsl,scu-pd"
> +
>  - #power-domain-cells:	Must be 1. Contains the Resource ID used by
>  			SCU commands.
>  			See detailed Resource ID list from:
> @@ -145,7 +148,7 @@ firmware {
>  		};
>  
>  		pd: imx8qx-pd {
> -			compatible = "fsl,imx8qxp-scu-pd";
> +			compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
>  			#power-domain-cells = <1>;
>  		};
>  	};
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2019-01-11  9:00   ` Shawn Guo
@ 2019-01-11  9:06     ` Shawn Guo
  2019-01-11 10:48       ` Aisheng Dong
  0 siblings, 1 reply; 15+ messages in thread
From: Shawn Guo @ 2019-01-11  9:06 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Mark Rutland, devicetree, ulf.hansson, dongas86, linux-pm,
	khilman, rjw, Rob Herring, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

On Fri, Jan 11, 2019 at 05:00:11PM +0800, Shawn Guo wrote:
> On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> > SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
> > Let's add a "fsl,scu-pd" fallback compatible string to allow other SoCs
> > to reuse the common part.
> 
> This is not the practice we used to match devices with compatibilities,
> i.e. coding the compatible string with the SoC name that firstly
> introduces the device, and use the compatible as fallback for new SoCs.

For example, in imx8qm device tree, we can use compatible below to get
it work without change on kernel driver, while we still need to document
the compatible "fsl,imx8qm-scu-pd".

	compatible = "fsl,imx8qm-scu-pd", "fsl,imx8qxp-scu-pd";

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2019-01-11  9:06     ` Shawn Guo
@ 2019-01-11 10:48       ` Aisheng Dong
  2019-01-11 13:03         ` Shawn Guo
  0 siblings, 1 reply; 15+ messages in thread
From: Aisheng Dong @ 2019-01-11 10:48 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Mark Rutland, devicetree, ulf.hansson, dongas86, linux-pm,
	khilman, rjw, Rob Herring, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

Hi Shawn,

> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Friday, January 11, 2019 5:07 PM
> 
> On Fri, Jan 11, 2019 at 05:00:11PM +0800, Shawn Guo wrote:
> > On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> > > SCU power domain can be used in the same way by IMX8QXP and
> IMX8QM SoCs.
> > > Let's add a "fsl,scu-pd" fallback compatible string to allow other
> > > SoCs to reuse the common part.
> >
> > This is not the practice we used to match devices with
> > compatibilities, i.e. coding the compatible string with the SoC name
> > that firstly introduces the device, and use the compatible as fallback for new
> SoCs.
> 

This is suggested by Rob that if the future SoCs are likely to be compatible.
Then we can use a general fallback compatible string like "fsl,scu-pd".
https://patchwork.kernel.org/patch/10644815/

From SCU HW protocol point of view, they're indeed compatible.
Just varies a bit on the domains numbers. 
That's why we introduce "fsl,scu-pd".
But still keep SoC specific compatible string in case any special tricks
to ensure the ABI stability.

How do you think?

Regards
Dong Aisheng

> For example, in imx8qm device tree, we can use compatible below to get it
> work without change on kernel driver, while we still need to document the
> compatible "fsl,imx8qm-scu-pd".
> 
> 	compatible = "fsl,imx8qm-scu-pd", "fsl,imx8qxp-scu-pd";
> 
> Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2019-01-11 10:48       ` Aisheng Dong
@ 2019-01-11 13:03         ` Shawn Guo
  2019-01-11 15:24           ` Aisheng Dong
  2019-01-21 16:31           ` Rob Herring
  0 siblings, 2 replies; 15+ messages in thread
From: Shawn Guo @ 2019-01-11 13:03 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Mark Rutland, devicetree, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, Rob Herring, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

On Fri, Jan 11, 2019 at 10:48:21AM +0000, Aisheng Dong wrote:
> Hi Shawn,
> 
> > -----Original Message-----
> > From: Shawn Guo [mailto:shawnguo@kernel.org]
> > Sent: Friday, January 11, 2019 5:07 PM
> > 
> > On Fri, Jan 11, 2019 at 05:00:11PM +0800, Shawn Guo wrote:
> > > On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> > > > SCU power domain can be used in the same way by IMX8QXP and
> > IMX8QM SoCs.
> > > > Let's add a "fsl,scu-pd" fallback compatible string to allow other
> > > > SoCs to reuse the common part.
> > >
> > > This is not the practice we used to match devices with
> > > compatibilities, i.e. coding the compatible string with the SoC name
> > > that firstly introduces the device, and use the compatible as fallback for new
> > SoCs.
> > 
> 
> This is suggested by Rob that if the future SoCs are likely to be compatible.
> Then we can use a general fallback compatible string like "fsl,scu-pd".
> https://patchwork.kernel.org/patch/10644815/
> 
> From SCU HW protocol point of view, they're indeed compatible.
> Just varies a bit on the domains numbers. 
> That's why we introduce "fsl,scu-pd".
> But still keep SoC specific compatible string in case any special tricks
> to ensure the ABI stability.
> 
> How do you think?

Unless Rob is against the practice we have been used for long time on
i.MX, I would keep using it for i.MX8, i.e. instead of introducing a
generic compatible for fallback, simply falling on the compatible SoC
specified IP block.

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2019-01-11 13:03         ` Shawn Guo
@ 2019-01-11 15:24           ` Aisheng Dong
  2019-01-21 16:31           ` Rob Herring
  1 sibling, 0 replies; 15+ messages in thread
From: Aisheng Dong @ 2019-01-11 15:24 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Mark Rutland, devicetree, ulf.hansson, dongas86, khilman,
	linux-pm, rjw, Rob Herring, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Friday, January 11, 2019 9:03 PM
> On Fri, Jan 11, 2019 at 10:48:21AM +0000, Aisheng Dong wrote:
> > Hi Shawn,
> >
> > > -----Original Message-----
> > > From: Shawn Guo [mailto:shawnguo@kernel.org]
> > > Sent: Friday, January 11, 2019 5:07 PM
> > >
> > > On Fri, Jan 11, 2019 at 05:00:11PM +0800, Shawn Guo wrote:
> > > > On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> > > > > SCU power domain can be used in the same way by IMX8QXP and
> > > IMX8QM SoCs.
> > > > > Let's add a "fsl,scu-pd" fallback compatible string to allow
> > > > > other SoCs to reuse the common part.
> > > >
> > > > This is not the practice we used to match devices with
> > > > compatibilities, i.e. coding the compatible string with the SoC
> > > > name that firstly introduces the device, and use the compatible as
> > > > fallback for new
> > > SoCs.
> > >
> >
> > This is suggested by Rob that if the future SoCs are likely to be compatible.
> > Then we can use a general fallback compatible string like "fsl,scu-pd".
> >
> >
> > From SCU HW protocol point of view, they're indeed compatible.
> > Just varies a bit on the domains numbers.
> > That's why we introduce "fsl,scu-pd".
> > But still keep SoC specific compatible string in case any special
> > tricks to ensure the ABI stability.
> >
> > How do you think?
> 
> Unless Rob is against the practice we have been used for long time on i.MX, I
> would keep using it for i.MX8, i.e. instead of introducing a generic compatible
> for fallback, simply falling on the compatible SoC specified IP block.
> 

Hmm, i feel protocol based devices is slightly a bit different from our old practice.
See ARM and TI are all used generic compatible string.
Documentation/devicetree/bindings/arm/arm,scpi.txt
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt

If from firmware protocol point of view, they're defined SoC independent.
SW(driver) implementation might be a different on platforms due to special tricks
or implemented as platform independent.

Anyway, if you strongly against this, i will change to what you requested.

Regards
Dong Aisheng

> Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support
  2018-12-18 16:01 ` [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
@ 2019-01-12  1:39   ` Shawn Guo
  0 siblings, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2019-01-12  1:39 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: ulf.hansson, dongas86, linux-pm, khilman, rjw, Rob Herring,
	dl-linux-imx, kernel, Fabio Estevam, linux-arm-kernel

On Tue, Dec 18, 2018 at 04:01:29PM +0000, Aisheng Dong wrote:
> SCU power domain can be used in the same way by IMX8QXP and IMX8QM SoCs.
> Make the driver support the fallback compatible string "fsl,scu-pd" to
> allow other SoCs to reuse the common part.
> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Kevin Hilman <khilman@kernel.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  drivers/firmware/imx/scu-pd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
> index 407245f..1aaae98 100644
> --- a/drivers/firmware/imx/scu-pd.c
> +++ b/drivers/firmware/imx/scu-pd.c
> @@ -321,6 +321,7 @@ static int imx_sc_pd_probe(struct platform_device *pdev)
>  }
>  
>  static const struct of_device_id imx_sc_pd_match[] = {
> +	{ .compatible = "fsl,scu-pd", &imx8qxp_scu_pd},

As the fallback compatible, it makes more sense to put it at end of the
table.  I fixed it up and applied the series.

Shawn

>  	{ .compatible = "fsl,imx8qxp-scu-pd", &imx8qxp_scu_pd},
>  	{ /* sentinel */ }
>  };
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain
  2019-01-11 13:03         ` Shawn Guo
  2019-01-11 15:24           ` Aisheng Dong
@ 2019-01-21 16:31           ` Rob Herring
  1 sibling, 0 replies; 15+ messages in thread
From: Rob Herring @ 2019-01-21 16:31 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Aisheng Dong, Mark Rutland, ulf.hansson, dongas86, linux-pm,
	khilman, rjw, devicetree, dl-linux-imx, kernel, Fabio Estevam,
	linux-arm-kernel

On Fri, Jan 11, 2019 at 7:03 AM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Fri, Jan 11, 2019 at 10:48:21AM +0000, Aisheng Dong wrote:
> > Hi Shawn,
> >
> > > -----Original Message-----
> > > From: Shawn Guo [mailto:shawnguo@kernel.org]
> > > Sent: Friday, January 11, 2019 5:07 PM
> > >
> > > On Fri, Jan 11, 2019 at 05:00:11PM +0800, Shawn Guo wrote:
> > > > On Tue, Dec 18, 2018 at 04:01:20PM +0000, Aisheng Dong wrote:
> > > > > SCU power domain can be used in the same way by IMX8QXP and
> > > IMX8QM SoCs.
> > > > > Let's add a "fsl,scu-pd" fallback compatible string to allow other
> > > > > SoCs to reuse the common part.
> > > >
> > > > This is not the practice we used to match devices with
> > > > compatibilities, i.e. coding the compatible string with the SoC name
> > > > that firstly introduces the device, and use the compatible as fallback for new
> > > SoCs.
> > >
> >
> > This is suggested by Rob that if the future SoCs are likely to be compatible.
> > Then we can use a general fallback compatible string like "fsl,scu-pd".
> > https://patchwork.kernel.org/patch/10644815/
> >
> > From SCU HW protocol point of view, they're indeed compatible.
> > Just varies a bit on the domains numbers.
> > That's why we introduce "fsl,scu-pd".
> > But still keep SoC specific compatible string in case any special tricks
> > to ensure the ABI stability.
> >
> > How do you think?
>
> Unless Rob is against the practice we have been used for long time on
> i.MX, I would keep using it for i.MX8, i.e. instead of introducing a
> generic compatible for fallback, simply falling on the compatible SoC
> specified IP block.

That is certainly my preference and the traditional way to do
compatible in DT, but some reason folks don't like having old SoC
names in their shiny new SoC DT. So either way is fine. But I'd follow
what you do for the rest of i.MX which I guess is what Shawn suggests.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, back to index

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 16:01 [PATCH 0/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
2018-12-18 16:01 ` [PATCH 1/3] dt-bindings: fsl: scu: add fallback compatible string for power domain Aisheng Dong
2018-12-28 23:28   ` Rob Herring
2019-01-11  9:00   ` Shawn Guo
2019-01-11  9:06     ` Shawn Guo
2019-01-11 10:48       ` Aisheng Dong
2019-01-11 13:03         ` Shawn Guo
2019-01-11 15:24           ` Aisheng Dong
2019-01-21 16:31           ` Rob Herring
2018-12-18 16:01 ` [PATCH 2/3] dt-bindings: fsl: scu: add imx8qm scu power domain support Aisheng Dong
2018-12-28 23:28   ` Rob Herring
2018-12-18 16:01 ` [PATCH 3/3] firmware: imx: scu-pd: add fallback compatible string support Aisheng Dong
2019-01-12  1:39   ` Shawn Guo
2018-12-28  2:38 ` [PATCH 0/3] " Aisheng Dong
2018-12-28 13:24   ` Ulf Hansson

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox