linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] add i.MX8ULP scmi power domain
@ 2021-11-17  3:27 Peng Fan (OSS)
  2021-11-17  3:27 ` [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file Peng Fan (OSS)
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-11-17  3:27 UTC (permalink / raw)
  To: robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, ping.bai, aisheng.dong, devicetree,
	linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

This patchset is to add device tree support for i.MX8ULP SCMI firmware,
and enable it for USDHC node

Peng Fan (3):
  dt-bindings: power: imx8ulp: add power domain header file
  arm64: dts: imx8ulp: add scmi firmware node
  arm64: dts: imx8ulp: add power domain entry for usdhc

 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 38 ++++++++++++++++++++++
 include/dt-bindings/power/imx8ulp-power.h  | 26 +++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 include/dt-bindings/power/imx8ulp-power.h

-- 
2.25.1


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

* [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file
  2021-11-17  3:27 [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan (OSS)
@ 2021-11-17  3:27 ` Peng Fan (OSS)
  2021-11-29 22:14   ` Rob Herring
  2021-11-17  3:27 ` [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node Peng Fan (OSS)
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-11-17  3:27 UTC (permalink / raw)
  To: robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, ping.bai, aisheng.dong, devicetree,
	linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add i.MX8ULP power domain header file

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 include/dt-bindings/power/imx8ulp-power.h | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 include/dt-bindings/power/imx8ulp-power.h

diff --git a/include/dt-bindings/power/imx8ulp-power.h b/include/dt-bindings/power/imx8ulp-power.h
new file mode 100644
index 000000000000..a556b2e96df1
--- /dev/null
+++ b/include/dt-bindings/power/imx8ulp-power.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ *  Copyright 2021 NXP
+ */
+
+#ifndef __DT_BINDINGS_IMX8ULP_POWER_H__
+#define __DT_BINDINGS_IMX8ULP_POWER_H__
+
+#define IMX8ULP_PD_DMA1		0
+#define IMX8ULP_PD_FLEXSPI2	1
+#define IMX8ULP_PD_USB0		2
+#define IMX8ULP_PD_USDHC0	3
+#define IMX8ULP_PD_USDHC1	4
+#define IMX8ULP_PD_USDHC2_USB1	5
+#define IMX8ULP_PD_DCNANO	6
+#define IMX8ULP_PD_EPDC		7
+#define IMX8ULP_PD_DMA2		8
+#define IMX8ULP_PD_GPU2D	9
+#define IMX8ULP_PD_GPU3D	10
+#define IMX8ULP_PD_HIFI4	11
+#define IMX8ULP_PD_ISI		12
+#define IMX8ULP_PD_MIPI_CSI	13
+#define IMX8ULP_PD_MIPI_DSI	14
+#define IMX8ULP_PD_PXP		15
+
+#endif
-- 
2.25.1


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

* [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node
  2021-11-17  3:27 [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan (OSS)
  2021-11-17  3:27 ` [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file Peng Fan (OSS)
@ 2021-11-17  3:27 ` Peng Fan (OSS)
  2021-12-08 12:10   ` Shawn Guo
  2021-11-17  3:27 ` [PATCH 3/3] arm64: dts: imx8ulp: add power domain entry for usdhc Peng Fan (OSS)
  2021-11-17  3:43 ` [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan
  3 siblings, 1 reply; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-11-17  3:27 UTC (permalink / raw)
  To: robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, ping.bai, aisheng.dong, devicetree,
	linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

i.MX8ULP use scmi firmware based power domain and sensor support.
So add the firmware node and the sram it uses.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
index fb8714379026..d567ef93f8d8 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/clock/imx8ulp-clock.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/imx8ulp-power.h>
 
 #include "imx8ulp-pinfunc.h"
 
@@ -102,6 +103,40 @@ sosc: clock-sosc {
 		#clock-cells = <0>;
 	};
 
+	sram@2201f000 {
+		compatible = "mmio-sram";
+		reg = <0x0 0x2201f000 0x0 0x1000>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x0 0x2201f000 0x1000>;
+
+		scmi_buf: scmi_buf@0 {
+			compatible = "arm,scmi-shmem";
+			reg = <0x0 0x400>;
+		};
+	};
+
+	firmware {
+		scmi {
+			compatible = "arm,scmi-smc";
+			arm,smc-id = <0xc20000fe>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			shmem = <&scmi_buf>;
+
+			scmi_devpd: protocol@11 {
+				reg = <0x11>;
+				#power-domain-cells = <1>;
+			};
+
+			scmi_sensor: protocol@15 {
+				reg = <0x15>;
+				#thermal-sensor-cells = <0>;
+			};
+		};
+	};
+
 	soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
2.25.1


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

* [PATCH 3/3] arm64: dts: imx8ulp: add power domain entry for usdhc
  2021-11-17  3:27 [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan (OSS)
  2021-11-17  3:27 ` [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file Peng Fan (OSS)
  2021-11-17  3:27 ` [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node Peng Fan (OSS)
@ 2021-11-17  3:27 ` Peng Fan (OSS)
  2021-11-17  3:43 ` [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan
  3 siblings, 0 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2021-11-17  3:27 UTC (permalink / raw)
  To: robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, ping.bai, aisheng.dong, devicetree,
	linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add power domain for USDHC node.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
index d567ef93f8d8..edac63cf3668 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
@@ -329,6 +329,7 @@ usdhc0: mmc@298d0000 {
 					 <&cgc1 IMX8ULP_CLK_XBAR_AD_DIVPLAT>,
 					 <&pcc4 IMX8ULP_CLK_USDHC0>;
 				clock-names = "ipg", "ahb", "per";
+				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC0>;
 				fsl,tuning-start-tap = <20>;
 				fsl,tuning-step= <2>;
 				bus-width = <4>;
@@ -343,6 +344,7 @@ usdhc1: mmc@298e0000 {
 					 <&cgc1 IMX8ULP_CLK_NIC_PER_DIVPLAT>,
 					 <&pcc4 IMX8ULP_CLK_USDHC1>;
 				clock-names = "ipg", "ahb", "per";
+				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC1>;
 				fsl,tuning-start-tap = <20>;
 				fsl,tuning-step= <2>;
 				bus-width = <4>;
@@ -357,6 +359,7 @@ usdhc2: mmc@298f0000 {
 					 <&cgc1 IMX8ULP_CLK_NIC_PER_DIVPLAT>,
 					 <&pcc4 IMX8ULP_CLK_USDHC2>;
 				clock-names = "ipg", "ahb", "per";
+				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
 				fsl,tuning-start-tap = <20>;
 				fsl,tuning-step= <2>;
 				bus-width = <4>;
-- 
2.25.1


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

* RE: [PATCH 0/3] add i.MX8ULP scmi power domain
  2021-11-17  3:27 [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2021-11-17  3:27 ` [PATCH 3/3] arm64: dts: imx8ulp: add power domain entry for usdhc Peng Fan (OSS)
@ 2021-11-17  3:43 ` Peng Fan
  2021-12-07  2:34   ` Peng Fan
  3 siblings, 1 reply; 9+ messages in thread
From: Peng Fan @ 2021-11-17  3:43 UTC (permalink / raw)
  To: Peng Fan (OSS), robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, dl-linux-imx, Jacky Bai, Aisheng Dong,
	devicetree, linux-arm-kernel, linux-kernel

> Subject: [PATCH 0/3] add i.MX8ULP scmi power domain

Forget to mention, this patchset based on:
https://lkml.org/lkml/2021/11/12/74

Thanks,
Peng.

> 
> From: Peng Fan <peng.fan@nxp.com>
> 
> This patchset is to add device tree support for i.MX8ULP SCMI firmware, and
> enable it for USDHC node
> 
> Peng Fan (3):
>   dt-bindings: power: imx8ulp: add power domain header file
>   arm64: dts: imx8ulp: add scmi firmware node
>   arm64: dts: imx8ulp: add power domain entry for usdhc
> 
>  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 38
> ++++++++++++++++++++++  include/dt-bindings/power/imx8ulp-power.h
> | 26 +++++++++++++++
>  2 files changed, 64 insertions(+)
>  create mode 100644 include/dt-bindings/power/imx8ulp-power.h
> 
> --
> 2.25.1


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

* Re: [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file
  2021-11-17  3:27 ` [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file Peng Fan (OSS)
@ 2021-11-29 22:14   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-11-29 22:14 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: robh+dt, kernel, festevam, devicetree, linux-kernel, ping.bai,
	aisheng.dong, Peng Fan, shawnguo, linux-arm-kernel, s.hauer,
	linux-imx

On Wed, 17 Nov 2021 11:27:38 +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add i.MX8ULP power domain header file
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  include/dt-bindings/power/imx8ulp-power.h | 26 +++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644 include/dt-bindings/power/imx8ulp-power.h
> 

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

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

* RE: [PATCH 0/3] add i.MX8ULP scmi power domain
  2021-11-17  3:43 ` [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan
@ 2021-12-07  2:34   ` Peng Fan
  0 siblings, 0 replies; 9+ messages in thread
From: Peng Fan @ 2021-12-07  2:34 UTC (permalink / raw)
  To: Peng Fan (OSS), robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, dl-linux-imx, Jacky Bai, Aisheng Dong,
	devicetree, linux-arm-kernel, linux-kernel

Hi Shawn,

> Subject: RE: [PATCH 0/3] add i.MX8ULP scmi power domain
> 
> > Subject: [PATCH 0/3] add i.MX8ULP scmi power domain
> 
> Forget to mention, this patchset based on:
> https://lkml.org/lkml/2021/11/12/74

Since the i.MX8ULP dtsi landed in your tree now, do you have
time to give a look for this patchset?

Thanks,
Peng.

> 
> Thanks,
> Peng.
> 
> >
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > This patchset is to add device tree support for i.MX8ULP SCMI
> > firmware, and enable it for USDHC node
> >
> > Peng Fan (3):
> >   dt-bindings: power: imx8ulp: add power domain header file
> >   arm64: dts: imx8ulp: add scmi firmware node
> >   arm64: dts: imx8ulp: add power domain entry for usdhc
> >
> >  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 38
> > ++++++++++++++++++++++  include/dt-bindings/power/imx8ulp-power.h
> > | 26 +++++++++++++++
> >  2 files changed, 64 insertions(+)
> >  create mode 100644 include/dt-bindings/power/imx8ulp-power.h
> >
> > --
> > 2.25.1


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

* Re: [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node
  2021-11-17  3:27 ` [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node Peng Fan (OSS)
@ 2021-12-08 12:10   ` Shawn Guo
  2021-12-08 13:22     ` Peng Fan
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2021-12-08 12:10 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: robh+dt, s.hauer, kernel, festevam, linux-imx, ping.bai,
	aisheng.dong, devicetree, linux-arm-kernel, linux-kernel,
	Peng Fan

On Wed, Nov 17, 2021 at 11:27:39AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> i.MX8ULP use scmi firmware based power domain and sensor support.
> So add the firmware node and the sram it uses.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> index fb8714379026..d567ef93f8d8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> @@ -6,6 +6,7 @@
>  #include <dt-bindings/clock/imx8ulp-clock.h>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/power/imx8ulp-power.h>
>  
>  #include "imx8ulp-pinfunc.h"
>  
> @@ -102,6 +103,40 @@ sosc: clock-sosc {
>  		#clock-cells = <0>;
>  	};
>  
> +	sram@2201f000 {
> +		compatible = "mmio-sram";
> +		reg = <0x0 0x2201f000 0x0 0x1000>;
> +
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0x0 0x2201f000 0x1000>;
> +
> +		scmi_buf: scmi_buf@0 {

Hyphen is more recommended than underscore for node name.  Or just
follow the naming in arm,scmi.yaml example?

Shawn

> +			compatible = "arm,scmi-shmem";
> +			reg = <0x0 0x400>;
> +		};
> +	};
> +
> +	firmware {
> +		scmi {
> +			compatible = "arm,scmi-smc";
> +			arm,smc-id = <0xc20000fe>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			shmem = <&scmi_buf>;
> +
> +			scmi_devpd: protocol@11 {
> +				reg = <0x11>;
> +				#power-domain-cells = <1>;
> +			};
> +
> +			scmi_sensor: protocol@15 {
> +				reg = <0x15>;
> +				#thermal-sensor-cells = <0>;
> +			};
> +		};
> +	};
> +
>  	soc@0 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> -- 
> 2.25.1
> 

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

* RE: [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node
  2021-12-08 12:10   ` Shawn Guo
@ 2021-12-08 13:22     ` Peng Fan
  0 siblings, 0 replies; 9+ messages in thread
From: Peng Fan @ 2021-12-08 13:22 UTC (permalink / raw)
  To: Shawn Guo, Peng Fan (OSS)
  Cc: robh+dt, s.hauer, kernel, festevam, dl-linux-imx, Jacky Bai,
	Aisheng Dong, devicetree, linux-arm-kernel, linux-kernel

Hi Shawn,

> Subject: Re: [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node
> 
> On Wed, Nov 17, 2021 at 11:27:39AM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > i.MX8ULP use scmi firmware based power domain and sensor support.
> > So add the firmware node and the sram it uses.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 35
> > ++++++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > index fb8714379026..d567ef93f8d8 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > @@ -6,6 +6,7 @@
> >  #include <dt-bindings/clock/imx8ulp-clock.h>
> >  #include <dt-bindings/gpio/gpio.h>
> >  #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +#include <dt-bindings/power/imx8ulp-power.h>
> >
> >  #include "imx8ulp-pinfunc.h"
> >
> > @@ -102,6 +103,40 @@ sosc: clock-sosc {
> >  		#clock-cells = <0>;
> >  	};
> >
> > +	sram@2201f000 {
> > +		compatible = "mmio-sram";
> > +		reg = <0x0 0x2201f000 0x0 0x1000>;
> > +
> > +		#address-cells = <1>;
> > +		#size-cells = <1>;
> > +		ranges = <0 0x0 0x2201f000 0x1000>;
> > +
> > +		scmi_buf: scmi_buf@0 {
> 
> Hyphen is more recommended than underscore for node name.  

Just send out v2 to address this issue.

Or just
> follow the naming in arm,scmi.yaml example?

No need to follow its name there, it support many protocols
and need different shmem for performance and others.

Thanks,
Peng.


> 
> Shawn
> 
> > +			compatible = "arm,scmi-shmem";
> > +			reg = <0x0 0x400>;
> > +		};
> > +	};
> > +
> > +	firmware {
> > +		scmi {
> > +			compatible = "arm,scmi-smc";
> > +			arm,smc-id = <0xc20000fe>;
> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +			shmem = <&scmi_buf>;
> > +
> > +			scmi_devpd: protocol@11 {
> > +				reg = <0x11>;
> > +				#power-domain-cells = <1>;
> > +			};
> > +
> > +			scmi_sensor: protocol@15 {
> > +				reg = <0x15>;
> > +				#thermal-sensor-cells = <0>;
> > +			};
> > +		};
> > +	};
> > +
> >  	soc@0 {
> >  		compatible = "simple-bus";
> >  		#address-cells = <1>;
> > --
> > 2.25.1
> >

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

end of thread, other threads:[~2021-12-08 13:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  3:27 [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan (OSS)
2021-11-17  3:27 ` [PATCH 1/3] dt-bindings: power: imx8ulp: add power domain header file Peng Fan (OSS)
2021-11-29 22:14   ` Rob Herring
2021-11-17  3:27 ` [PATCH 2/3] arm64: dts: imx8ulp: add scmi firmware node Peng Fan (OSS)
2021-12-08 12:10   ` Shawn Guo
2021-12-08 13:22     ` Peng Fan
2021-11-17  3:27 ` [PATCH 3/3] arm64: dts: imx8ulp: add power domain entry for usdhc Peng Fan (OSS)
2021-11-17  3:43 ` [PATCH 0/3] add i.MX8ULP scmi power domain Peng Fan
2021-12-07  2:34   ` Peng Fan

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).