Skip to contentSkip to conversation

imx: sip: add call_imx_sip_ret2

PATCH New Peng Fan 2 participants 15 messages Apr 12, 2019 – Apr 26, 2019

Subsystems (5)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/8 imx: sip: add call_imx_sip_ret2

This function will be used by i.MX8 fuse driver.

---
 arch/arm/include/asm/mach-imx/sys_proto.h |  3 +++
 arch/arm/mach-imx/sip.c                   | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
arch/arm/include/asm/mach-imx/sys_proto.h +3 -0
index d0f866b630..4925dd7894 100644
@@ -134,4 +134,7 @@ int mxs_wait_mask_clr(struct mxs_register_32 *reg, u32 mask, u32 timeout);
 
 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
 			   unsigned long reg1, unsigned long reg2);
+unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0,
+				unsigned long *reg1, unsigned long reg2,
+				unsigned long reg3);
 #endif
arch/arm/mach-imx/sip.c +22 -0
index 813c2ae5e1..968e7cf309 100644
@@ -20,3 +20,25 @@ unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
 
 	return regs.regs[0];
 }
+
+/*
+ * Do an SMC call to return 2 registers by having reg1 passed in by reference
+ */
+unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0,
+				unsigned long *reg1, unsigned long reg2,
+				unsigned long reg3)
+{
+	struct pt_regs regs;
+
+	regs.regs[0] = id;
+	regs.regs[1] = reg0;
+	regs.regs[2] = *reg1;
+	regs.regs[3] = reg2;
+	regs.regs[4] = reg3;
+
+	smc_call(&regs);
+
+	*reg1 = regs.regs[1];
+
+	return regs.regs[0];
+}
Signature · 1 line
2.16.4
author
#1 lore raw

PATCH 2/8 imx8: fuse: add fuse driver

Add fuse write for i.MX8

---
 drivers/misc/imx8/Makefile |  1 +
 drivers/misc/imx8/fuse.c   | 86 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 drivers/misc/imx8/fuse.c
drivers/misc/imx8/Makefile +1 -0
index ee05893cbb..48fdb5b61c 100644
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 obj-y += scu_api.o scu.o
+obj-$(CONFIG_CMD_FUSE) += fuse.o
drivers/misc/imx8/fuse.c new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
2.16.4
#2 lore raw

PATCH 2/8 imx8: fuse: add fuse driver

Quoted 2 lines

Add fuse write for i.MX8

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author
#3 lore raw

PATCH 3/8 imx8qxp: mek: Enable CMD_FUSE

In reply to Peng Fan

Enable CMD_FUSE for i.MX8QXP MEK

---
 configs/imx8qxp_mek_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/imx8qxp_mek_defconfig +1 -0
index a94998b8b5..14e9da386a 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_CPU=y
 # CONFIG_CMD_IMPORTENV is not set
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DM=y
+CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
Signature · 1 line
2.16.4
#4 lore raw

PATCH 3/8 imx8qxp: mek: Enable CMD_FUSE

Quoted 2 lines

Enable CMD_FUSE for i.MX8QXP MEK

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author
#5 lore raw

PATCH 4/8 misc: imx8: add sc_misc_get_temp

In reply to Peng Fan

Add sc_misc_get_temp to support get temperature

---
 arch/arm/include/asm/arch-imx8/sci/sci.h          |  2 ++
 arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h |  1 +
 drivers/misc/imx8/scu_api.c                       | 28 +++++++++++++++++++++++
 3 files changed, 31 insertions(+)
arch/arm/include/asm/arch-imx8/sci/sci.h +2 -0
index d1621669e2..ccf45d71f7 100644
@@ -76,6 +76,8 @@ void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev);
 void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t status);
 void sc_misc_build_info(sc_ipc_t ipc, u32 *build, u32 *commit);
 int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val);
+int sc_misc_get_temp(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_temp_t temp,
+		     s16 *celsius, s8 *tenths);
 
 /* RM API */
 sc_bool_t sc_rm_is_memreg_owned(sc_ipc_t ipc, sc_rm_mr_t mr);
arch/arm/include/asm/arch-imx8/sci/svc/misc/api.h +1 -0
index 5d17b553d7..3629eb68d7 100644
@@ -26,5 +26,6 @@
 #define SC_MISC_REL_CONTAINER	2U	/* Release container */
 
 typedef u8 sc_misc_boot_status_t;
+typedef u8 sc_misc_temp_t;
 
 #endif /* SC_MISC_API_H */
drivers/misc/imx8/scu_api.c +28 -0
index d9c4d5d784..031bc0048b 100644
@@ -273,6 +273,34 @@ int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val)
 	return 0;
 }
 
+int sc_misc_get_temp(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_temp_t temp,
+		     s16 *celsius, s8 *tenths)
+{
+	struct udevice *dev = gd->arch.scu_dev;
+	int size = sizeof(struct sc_rpc_msg_s);
+	struct sc_rpc_msg_s msg;
+	int ret;
+
+	RPC_VER(&msg) = SC_RPC_VERSION;
+	RPC_SVC(&msg) = (u8)SC_RPC_SVC_MISC;
+	RPC_FUNC(&msg) = (u8)MISC_FUNC_GET_TEMP;
+	RPC_U16(&msg, 0U) = (u16)resource;
+	RPC_U8(&msg, 2U) = (u8)temp;
+	RPC_SIZE(&msg) = 2U;
+
+	ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size);
+	if (ret < 0)
+		return ret;
+
+	if (celsius)
+		*celsius = RPC_I16(&msg, 0U);
+
+	if (tenths)
+		*tenths = RPC_I8(&msg, 2U);
+
+	return 0;
+}
+
 /* RM */
 sc_bool_t sc_rm_is_memreg_owned(sc_ipc_t ipc, sc_rm_mr_t mr)
 {
Signature · 1 line
2.16.4
author
#6 lore raw

PATCH 5/8 thermal: add i.MX8 thermal driver

In reply to Peng Fan

Add i.MX8 thermal driver to support get temperature from SCU.

---
 drivers/thermal/Kconfig           |   9 ++
 drivers/thermal/Makefile          |   1 +
 drivers/thermal/imx_scu_thermal.c | 203 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 213 insertions(+)
 create mode 100644 drivers/thermal/imx_scu_thermal.c
drivers/thermal/Kconfig +9 -0
index a71b9be5fb..bdf8dc6fef 100644
@@ -17,6 +17,15 @@ config IMX_THERMAL
           cpufreq is used as the cooling device to throttle CPUs when the
           passive trip is crossed.
 
+config IMX_SCU_THERMAL
+	bool "Temperature sensor driver for NXP i.MX8"
+	depends on ARCH_IMX8
+	help
+	  Support for Temperature sensors on NXP i.MX8.
+	  It supports one critical trip point and one passive trip point. The
+	  boot is hold to the cool device to throttle CPUs when the passive
+	  trip is crossed
+
 config TI_DRA7_THERMAL
         bool "Temperature sensor driver for TI dra7xx SOCs"
         help
drivers/thermal/Makefile +1 -0
index cc75e387e4..ef2929d180 100644
@@ -5,4 +5,5 @@
 
 obj-$(CONFIG_DM_THERMAL) += thermal-uclass.o
 obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o
+obj-$(CONFIG_IMX_SCU_THERMAL) += imx_scu_thermal.o
 obj-$(CONFIG_TI_DRA7_THERMAL) += ti-bandgap.o
drivers/thermal/imx_scu_thermal.c new file +203 -0

203 lines not on this page · raw message

Signature · 1 line
2.16.4
author
#7 lore raw

PATCH 6/8 imx8: cpu: get temperature when print cpu desc

In reply to Peng Fan

Read the temperature when print cpu inforation.

---
 arch/arm/mach-imx/imx8/cpu.c | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +33 -2
index 4bbc956f9d..25b010489b 100644
@@ -11,6 +11,7 @@
 #include <dm/lists.h>
 #include <dm/uclass.h>
 #include <errno.h>
+#include <thermal.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch-imx/cpu.h>
@@ -571,15 +572,45 @@ const char *get_core_name(void)
 		return "?";
 }
 
+#if defined(CONFIG_IMX_SCU_THERMAL)
+static int cpu_imx_get_temp(void)
+{
+	struct udevice *thermal_dev;
+	int cpu_tmp, ret;
+
+	ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0",
+					&thermal_dev);
+
+	if (!ret) {
+		ret = thermal_get_temp(thermal_dev, &cpu_tmp);
+		if (ret)
+			return 0xdeadbeef;
+	} else {
+		return 0xdeadbeef;
+	}
+
+	return cpu_tmp;
+}
+#endif
+
 int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
 {
 	struct cpu_imx_platdata *plat = dev_get_platdata(dev);
+	int ret;
 
 	if (size < 100)
 		return -ENOSPC;
 
-	snprintf(buf, size, "NXP i.MX8%s Rev%s %s@%u MHz\n",
-		 plat->type, plat->rev, plat->name, plat->freq_mhz);
+	ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz",
+		       plat->type, plat->rev, plat->name, plat->freq_mhz);
+
+	if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) {
+		buf = buf + ret;
+		size = size - ret;
+		ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp());
+	}
+
+	snprintf(buf + ret, size - ret, "\n");
 
 	return 0;
 }
Signature · 1 line
2.16.4
#8 lore raw

PATCH 6/8 imx8: cpu: get temperature when print cpu desc

Hi Peng,

Quoted 20 lines · Peng Fan

Read the temperature when print cpu inforation.

---
 arch/arm/mach-imx/imx8/cpu.c | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +1 -0
index 4bbc956f9d..25b010489b 100644
@@ -11,6 +11,7 @@
 #include <dm/lists.h>
 #include <dm/uclass.h>
 #include <errno.h>
+#include <thermal.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch-imx/cpu.h>

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 577

Quoted 6 lines
arch/arm/mach-imx/imx8/cpu.c +3 -0
@@ -571,15 +572,45 @@ const char *get_core_name(void)
 		return "?";
 }
 
+#if defined(CONFIG_IMX_SCU_THERMAL)
+static int cpu_imx_get_temp(void)
+{

This generates a warning when CONFIG_IMX_SCU_THERMAL is not set, because it is called later:

Quoted 25 lines
arch/arm/mach-imx/imx8/cpu.c +19 -0
+	struct udevice *thermal_dev;
+	int cpu_tmp, ret;
+
+	ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0",
+					&thermal_dev);
+
+	if (!ret) {
+		ret = thermal_get_temp(thermal_dev, &cpu_tmp);
+		if (ret)
+			return 0xdeadbeef;
+	} else {
+		return 0xdeadbeef;
+	}
+
+	return cpu_tmp;
+}
+#endif
+
 int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
 {
 	struct cpu_imx_platdata *plat = dev_get_platdata(dev);
+	int ret;
 
 	if (size < 100)
 		return -ENOSPC;

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 610

Quoted 10 lines
arch/arm/mach-imx/imx8/cpu.c +7 -2
 
-	snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz\n",
-		 plat->type, plat->rev, plat->name, plat->freq_mhz);
+	ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz",
+		       plat->type, plat->rev, plat->name, plat->freq_mhz);
+
+	if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) {
+		buf = buf + ret;
+		size = size - ret;
+		ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp());
                                                        ^--- here it is

referenced.

Regards,
Stefano

Quoted 7 lines
arch/arm/mach-imx/imx8/cpu.c +3 -0
+	}
+
+	snprintf(buf + ret, size - ret, "\n");
 
 	return 0;
 }
Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author
#9 lore raw

PATCH 6/8 imx8: cpu: get temperature when print cpu desc

Hi Stefano.

Quoted 61 lines

Subject: Re: [PATCH 6/8] imx8: cpu: get temperature when print cpu desc

Hi Peng,

Quoted 5 lines · Peng Fan

Read the temperature when print cpu inforation.

---
 arch/arm/mach-imx/imx8/cpu.c | 35

+++++++++++++++++++++++++++++++++--

Quoted 15 lines
 1 file changed, 33 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-imx/imx8/cpu.c index 4bbc956f9d..25b010489b 100644

arch/arm/mach-imx/imx8/cpu.c +1 -0
@@ -11,6 +11,7 @@
 #include <dm/lists.h>
 #include <dm/uclass.h>
 #include <errno.h>
+#include <thermal.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch-imx/cpu.h>

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 577

Quoted 6 lines
arch/arm/mach-imx/imx8/cpu.c +3 -0
@@ -571,15 +572,45 @@ const char *get_core_name(void)
 		return "?";
 }
 
+#if defined(CONFIG_IMX_SCU_THERMAL)
+static int cpu_imx_get_temp(void)
+{

This generates a warning when CONFIG_IMX_SCU_THERMAL is not set, because it is called later:

Quoted 25 lines
arch/arm/mach-imx/imx8/cpu.c +19 -0
+	struct udevice *thermal_dev;
+	int cpu_tmp, ret;
+
+	ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0",
+					&thermal_dev);
+
+	if (!ret) {
+		ret = thermal_get_temp(thermal_dev, &cpu_tmp);
+		if (ret)
+			return 0xdeadbeef;
+	} else {
+		return 0xdeadbeef;
+	}
+
+	return cpu_tmp;
+}
+#endif
+
 int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)  {
 	struct cpu_imx_platdata *plat = dev_get_platdata(dev);
+	int ret;
 
 	if (size < 100)
 		return -ENOSPC;
 
Quoted 10 lines

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 610

Quoted 9 lines
arch/arm/mach-imx/imx8/cpu.c +7 -2
-	snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz\n",
-		 plat->type, plat->rev, plat->name, plat->freq_mhz);
+	ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz",
+		       plat->type, plat->rev, plat->name, plat->freq_mhz);
+
+	if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) {
+		buf = buf + ret;
+		size = size - ret;
+		ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp());
                                                        ^---

I not able to connect my PC to verify. But just thinking, When CONFIG_IMX_SCU_THERMAL not enabled, the compiler should optimize the if block? Because it is just "if (0)"

Regards,
Peng.

Quoted 22 lines

here it is referenced.

Regards,
Stefano

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void)

Quoted 7 lines
arch/arm/mach-imx/imx8/cpu.c +3 -0
+	}
+
+	snprintf(buf + ret, size - ret, "\n");
 
 	return 0;
 }
 

--
==============================================================
=======
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
==============================================================
=======

#10 lore raw

PATCH 6/8 imx8: cpu: get temperature when print cpu desc

Quoted 74 lines · Peng Fan

Hi Stefano.

Quoted 61 lines

Subject: Re: [PATCH 6/8] imx8: cpu: get temperature when print cpu desc

Hi Peng,

Quoted 5 lines · Peng Fan

Read the temperature when print cpu inforation.

---
 arch/arm/mach-imx/imx8/cpu.c | 35

+++++++++++++++++++++++++++++++++--

Quoted 15 lines
 1 file changed, 33 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-imx/imx8/cpu.c index 4bbc956f9d..25b010489b 100644

arch/arm/mach-imx/imx8/cpu.c +1 -0
@@ -11,6 +11,7 @@
 #include <dm/lists.h>
 #include <dm/uclass.h>
 #include <errno.h>
+#include <thermal.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch-imx/cpu.h>

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 577

Quoted 6 lines
arch/arm/mach-imx/imx8/cpu.c +3 -0
@@ -571,15 +572,45 @@ const char *get_core_name(void)
 		return "?";
 }
 
+#if defined(CONFIG_IMX_SCU_THERMAL)
+static int cpu_imx_get_temp(void)
+{

This generates a warning when CONFIG_IMX_SCU_THERMAL is not set, because it is called later:

Quoted 25 lines
arch/arm/mach-imx/imx8/cpu.c +19 -0
+	struct udevice *thermal_dev;
+	int cpu_tmp, ret;
+
+	ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0",
+					&thermal_dev);
+
+	if (!ret) {
+		ret = thermal_get_temp(thermal_dev, &cpu_tmp);
+		if (ret)
+			return 0xdeadbeef;
+	} else {
+		return 0xdeadbeef;
+	}
+
+	return cpu_tmp;
+}
+#endif
+
 int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)  {
 	struct cpu_imx_platdata *plat = dev_get_platdata(dev);
+	int ret;
 
 	if (size < 100)
 		return -ENOSPC;
 
Quoted 10 lines

arch/arm/mach-imx/imx8/cpu.c const char *get_core_name(void) · line 610

Quoted 9 lines
arch/arm/mach-imx/imx8/cpu.c +7 -2
-	snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz\n",
-		 plat->type, plat->rev, plat->name, plat->freq_mhz);
+	ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz",
+		       plat->type, plat->rev, plat->name, plat->freq_mhz);
+
+	if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) {
+		buf = buf + ret;
+		size = size - ret;
+		ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp());
                                                        ^---
Quoted 3 lines

I not able to connect my PC to verify. But just thinking, When CONFIG_IMX_SCU_THERMAL not enabled, the compiler should optimize the if block? Because it is just "if (0)"

But if compiler optimizes the block, I should not see the warning...

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author
#11 lore raw

PATCH 7/8 imx: imx8dx/qxp: enable thermal

In reply to Peng Fan

Add thermal dts node
Enable thermal in defconfig

---
 arch/arm/dts/fsl-imx8dx.dtsi  | 56 +++++++++++++++++++++++++++++++++++++++++++
 configs/imx8qxp_mek_defconfig |  2 ++
 2 files changed, 58 insertions(+)
arch/arm/dts/fsl-imx8dx.dtsi +56 -0
index 3b1a2a20e3..1c163afdcd 100644
@@ -11,6 +11,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/pads-imx8qxp.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
 	model = "Freescale i.MX8DX";
@@ -489,6 +490,61 @@
 		power-domains = <&pd_conn_enet1>;
 		status = "disabled";
 	};
+
+	tsens: thermal-sensor {
+		compatible = "nxp,imx8qxp-sc-tsens";
+		/* number of the temp sensor on the chip */
+		tsens-num = <2>;
+		#thermal-sensor-cells = <1>;
+	};
+
+	thermal_zones: thermal-zones {
+		/* cpu thermal */
+		cpu-thermal0 {
+			polling-delay-passive = <250>;
+			polling-delay = <2000>;
+			/*the slope and offset of the temp sensor */
+			thermal-sensors = <&tsens 0>;
+			trips {
+				cpu_alert0: trip0 {
+					temperature = <107000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				cpu_crit0: trip1 {
+					temperature = <127000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert0>;
+					cooling-device =
+					<&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+
+		drc-thermal0 {
+			polling-delay-passive = <250>;
+			polling-delay = <2000>;
+			thermal-sensors = <&tsens 1>;
+			status = "disabled";
+			trips {
+				drc_alert0: trip0 {
+					temperature = <107000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				drc_crit0: trip1 {
+					temperature = <127000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };
 
 &A35_0 {
configs/imx8qxp_mek_defconfig +2 -0
index 14e9da386a..f0da489645 100644
@@ -73,5 +73,7 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPL_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_SCU_THERMAL=y
 CONFIG_SPL_TINY_MEMSET=y
 # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.16.4
author
#12 lore raw

PATCH 8/8 imx8: mek: move HUSH_PARSER to defconfig

In reply to Peng Fan

Move HUSH_PARSER to defconfig, otherwise meet "
=> run netboot
Booting from net ...
Unknown command 'if' - try 'help' Unknown command 'then' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help' Unknown command '0x80280000' - try 'help' Unknown command 'if' - try 'help' Unknown command 'then' - try 'help' Unknown command 'then' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help'
"

---
 configs/imx8qxp_mek_defconfig | 1 +
 include/configs/imx8qxp_mek.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
configs/imx8qxp_mek_defconfig +1 -0
index f0da489645..38f0ff0bf3 100644
@@ -23,6 +23,7 @@ CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
 # CONFIG_CMD_IMPORTENV is not set
 CONFIG_CMD_CLK=y
include/configs/imx8qxp_mek.h +0 -1
index 312e30dc6c..1cff18e05e 100644
@@ -159,7 +159,6 @@
 #define CONFIG_BAUDRATE			115200
 
 /* Monitor Command Prompt */
-#define CONFIG_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 #define CONFIG_SYS_CBSIZE              2048
 #define CONFIG_SYS_MAXARGS             64
Signature · 1 line
2.16.4
#13 lore raw

PATCH 8/8 imx8: mek: move HUSH_PARSER to defconfig

Quoted 17 lines

Move HUSH_PARSER to defconfig, otherwise meet "
=> run netboot
Booting from net ...
Unknown command 'if' - try 'help' Unknown command 'then' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help' Unknown command '0x80280000' - try 'help' Unknown command 'if' - try 'help' Unknown command 'then' - try 'help' Unknown command 'then' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help' Unknown command 'else' - try 'help' Unknown command 'fi' - try 'help'
"

Quoted 1 line

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#14 lore raw

PATCH 1/8 imx: sip: add call_imx_sip_ret2

In reply to Peng Fan
Quoted 2 lines

This function will be used by i.MX8 fuse driver.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================