devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node
@ 2023-06-25 10:55 Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 1/4] arm64: dts: imx93: add thermal support Peng Fan (OSS)
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peng Fan (OSS) @ 2023-06-25 10:55 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

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

Add thermal, cma, cm33 node for i.MX93

Peng Fan (4):
  arm64: dts: imx93: add thermal support
  arm64: dts: imx93: add cma area for i.MX93 11x11 EVK
  arm64: dts: imx93: add cm33 node
  arm64: dts: imx93: enable CM33 for 11x11 EVK

 .../boot/dts/freescale/imx93-11x11-evk.dts    | 56 ++++++++++++++++++
 arch/arm64/boot/dts/freescale/imx93.dtsi      | 59 +++++++++++++++++++
 2 files changed, 115 insertions(+)

-- 
2.37.1


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

* [PATCH 1/4] arm64: dts: imx93: add thermal support
  2023-06-25 10:55 [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node Peng Fan (OSS)
@ 2023-06-25 10:55 ` Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 2/4] arm64: dts: imx93: add cma area for i.MX93 11x11 EVK Peng Fan (OSS)
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Peng Fan (OSS) @ 2023-06-25 10:55 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

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

Add tmu node and thermal-zones

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

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index 8643612ace8c..9aad073b491e 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/fsl,imx93-power.h>
+#include <dt-bindings/thermal/thermal.h>
 
 #include "imx93-pinfunc.h"
 
@@ -132,6 +133,38 @@ gic: interrupt-controller@48000000 {
 		interrupt-parent = <&gic>;
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <2000>;
+
+			thermal-sensors = <&tmu 0>;
+
+			trips {
+				cpu_alert: cpu-alert {
+					temperature = <80000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu-crit {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert>;
+					cooling-device =
+						<&A55_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+						<&A55_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
+
 	soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -343,6 +376,26 @@ anatop: anatop@44480000 {
 				reg = <0x44480000 0x10000>;
 			};
 
+			tmu: tmu@44482000 {
+				compatible = "fsl,qoriq-tmu";
+				reg = <0x44482000 0x1000>;
+				clocks = <&clk IMX93_CLK_TMC_GATE>;
+				little-endian;
+				fsl,tmu-range = <0x800000da 0x800000e9
+						 0x80000102 0x8000012a
+						 0x80000166 0x800001a7
+						 0x800001b6>;
+				fsl,tmu-calibration = <0x00000000 0x0000000e
+						       0x00000001 0x00000029
+						       0x00000002 0x00000056
+						       0x00000003 0x000000a2
+						       0x00000004 0x00000116
+						       0x00000005 0x00000195
+						       0x00000006 0x000001b2>;
+				#thermal-sensor-cells = <1>;
+			};
+
+
 			adc1: adc@44530000 {
 				compatible = "nxp,imx93-adc";
 				reg = <0x44530000 0x10000>;
-- 
2.37.1


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

* [PATCH 2/4] arm64: dts: imx93: add cma area for i.MX93 11x11 EVK
  2023-06-25 10:55 [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 1/4] arm64: dts: imx93: add thermal support Peng Fan (OSS)
@ 2023-06-25 10:55 ` Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 3/4] arm64: dts: imx93: add cm33 node Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK Peng Fan (OSS)
  3 siblings, 0 replies; 8+ messages in thread
From: Peng Fan (OSS) @ 2023-06-25 10:55 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

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

Add CMA region for DMA usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index c50f46f06f62..359ae86f4e7e 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -15,6 +15,20 @@ chosen {
 		stdout-path = &lpuart1;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		linux,cma {
+			compatible = "shared-dma-pool";
+			reusable;
+			alloc-ranges = <0 0x80000000 0 0x40000000>;
+			size = <0 0x10000000>;
+			linux,cma-default;
+		};
+	};
+
 	reg_vref_1v8: regulator-adc-vref {
 		compatible = "regulator-fixed";
 		regulator-name = "vref_1v8";
-- 
2.37.1


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

* [PATCH 3/4] arm64: dts: imx93: add cm33 node
  2023-06-25 10:55 [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 1/4] arm64: dts: imx93: add thermal support Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 2/4] arm64: dts: imx93: add cma area for i.MX93 11x11 EVK Peng Fan (OSS)
@ 2023-06-25 10:55 ` Peng Fan (OSS)
  2023-06-25 10:55 ` [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK Peng Fan (OSS)
  3 siblings, 0 replies; 8+ messages in thread
From: Peng Fan (OSS) @ 2023-06-25 10:55 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

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

Add CM33 node for i.MX93

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

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index 9aad073b491e..06b0c0150525 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -133,6 +133,12 @@ gic: interrupt-controller@48000000 {
 		interrupt-parent = <&gic>;
 	};
 
+	remoteproc-cm33 {
+		compatible = "fsl,imx93-cm33";
+		clocks = <&clk IMX93_CLK_CM33_GATE>;
+		status = "disabled";
+	};
+
 	thermal-zones {
 		cpu-thermal {
 			polling-delay-passive = <250>;
-- 
2.37.1


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

* [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK
  2023-06-25 10:55 [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2023-06-25 10:55 ` [PATCH 3/4] arm64: dts: imx93: add cm33 node Peng Fan (OSS)
@ 2023-06-25 10:55 ` Peng Fan (OSS)
  2023-06-25 11:20   ` Krzysztof Kozlowski
  3 siblings, 1 reply; 8+ messages in thread
From: Peng Fan (OSS) @ 2023-06-25 10:55 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

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

Add reserved memory node for rpmsg
Enable CM33 node with mailbox property included for doorbell.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../boot/dts/freescale/imx93-11x11-evk.dts    | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 359ae86f4e7e..5050848a8837 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -27,6 +27,38 @@ linux,cma {
 			size = <0 0x10000000>;
 			linux,cma-default;
 		};
+
+		vdev0vring0: vdev0vring0@a4000000 {
+			reg = <0 0xa4000000 0 0x8000>;
+			no-map;
+		};
+
+		vdev0vring1: vdev0vring1@a4008000 {
+			reg = <0 0xa4008000 0 0x8000>;
+			no-map;
+		};
+
+		vdev1vring0: vdev1vring0@a4000000 {
+			reg = <0 0xa4010000 0 0x8000>;
+			no-map;
+		};
+
+		vdev1vring1: vdev1vring1@a4018000 {
+			reg = <0 0xa4018000 0 0x8000>;
+			no-map;
+		};
+
+		rsc_table: rsc-table@2021f000 {
+			reg = <0 0x2021f000 0 0x1000>;
+			no-map;
+		};
+
+		vdevbuffer: vdevbuffer@a4020000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa4020000 0 0x100000>;
+			no-map;
+		};
+
 	};
 
 	reg_vref_1v8: regulator-adc-vref {
@@ -107,6 +139,16 @@ &lpuart1 { /* console */
 	status = "okay";
 };
 
+&{/remoteproc-cm33} {
+	mbox-names = "tx", "rx", "rxdb";
+	mboxes = <&mu1 0 1
+		  &mu1 1 1
+		  &mu1 3 1>;
+	memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+			<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
+	status = "okay";
+};
+
 &usdhc1 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc1>;
-- 
2.37.1


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

* Re: [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK
  2023-06-25 10:55 ` [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK Peng Fan (OSS)
@ 2023-06-25 11:20   ` Krzysztof Kozlowski
  2023-06-25 11:23     ` Peng Fan
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-25 11:20 UTC (permalink / raw)
  To: Peng Fan (OSS), robh+dt, krzysztof.kozlowski+dt, shawnguo,
	s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

On 25/06/2023 12:55, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add reserved memory node for rpmsg
> Enable CM33 node with mailbox property included for doorbell.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

...

>  	};
>  
>  	reg_vref_1v8: regulator-adc-vref {
> @@ -107,6 +139,16 @@ &lpuart1 { /* console */
>  	status = "okay";
>  };
>  
> +&{/remoteproc-cm33} {

That's not proper reference by label.

> +	mbox-names = "tx", "rx", "rxdb";
> +	mboxes = <&mu1 0 1
> +		  &mu1 1 1
> +		  &mu1 3 1>;

Three entries, not one. Anyway, why mboxes depend on the board? This is
quite surprising.

Best regards,
Krzysztof


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

* RE: [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK
  2023-06-25 11:20   ` Krzysztof Kozlowski
@ 2023-06-25 11:23     ` Peng Fan
  2023-06-25 11:25       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Peng Fan @ 2023-06-25 11:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Peng Fan (OSS), robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de
  Cc: kernel@pengutronix.de, festevam@gmail.com, dl-linux-imx,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

> Subject: Re: [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK
> 
> On 25/06/2023 12:55, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add reserved memory node for rpmsg
> > Enable CM33 node with mailbox property included for doorbell.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> 
> ...
> 
> >  	};
> >
> >  	reg_vref_1v8: regulator-adc-vref {
> > @@ -107,6 +139,16 @@ &lpuart1 { /* console */
> >  	status = "okay";
> >  };
> >
> > +&{/remoteproc-cm33} {
> 
> That's not proper reference by label.

Ok, will give it a true lable, such as "cm33"
> 
> > +	mbox-names = "tx", "rx", "rxdb";
> > +	mboxes = <&mu1 0 1
> > +		  &mu1 1 1
> > +		  &mu1 3 1>;
> 
> Three entries, not one. Anyway, why mboxes depend on the board? This is
> quite surprising.

The m33 firmware delivered by NXP use MU1 for doorbell, but others may
use other MUs, or even not use MUs. So I put it in board dts just for
NXP boards.

Thanks,
Peng.

> 
> Best regards,
> Krzysztof


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

* Re: [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK
  2023-06-25 11:23     ` Peng Fan
@ 2023-06-25 11:25       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-25 11:25 UTC (permalink / raw)
  To: Peng Fan, Peng Fan (OSS), robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de
  Cc: kernel@pengutronix.de, festevam@gmail.com, dl-linux-imx,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

On 25/06/2023 13:23, Peng Fan wrote:
>>
>> Three entries, not one. Anyway, why mboxes depend on the board? This is
>> quite surprising.
> 
> The m33 firmware delivered by NXP use MU1 for doorbell, but others may
> use other MUs, or even not use MUs. So I put it in board dts just for
> NXP boards.

OK

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-06-25 11:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-25 10:55 [PATCH 0/4] arm64: dts: imx93: add thermal/cma/cm33 node Peng Fan (OSS)
2023-06-25 10:55 ` [PATCH 1/4] arm64: dts: imx93: add thermal support Peng Fan (OSS)
2023-06-25 10:55 ` [PATCH 2/4] arm64: dts: imx93: add cma area for i.MX93 11x11 EVK Peng Fan (OSS)
2023-06-25 10:55 ` [PATCH 3/4] arm64: dts: imx93: add cm33 node Peng Fan (OSS)
2023-06-25 10:55 ` [PATCH 4/4] arm64: dts: imx93: enable CM33 for 11x11 EVK Peng Fan (OSS)
2023-06-25 11:20   ` Krzysztof Kozlowski
2023-06-25 11:23     ` Peng Fan
2023-06-25 11:25       ` Krzysztof Kozlowski

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