U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/5] imx: imx9: Imply IMX_TMU
@ 2025-03-21  1:31 Adam Ford
  2025-03-21  1:31 ` [PATCH V2 2/5] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU Adam Ford
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Adam Ford @ 2025-03-21  1:31 UTC (permalink / raw)
  To: u-boot
  Cc: aford, marek.vasut, festevam, Adam Ford, Stefano Babic,
	NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li,
	Christoph Stoidner, Yannic Moog, Sean Anderson, Quentin Schulz,
	Simon Glass, Sumit Garg, Marek Vasut, Hou Zhiqiang,
	Michael Trimarchi

If the CPU Information is displayed from imx8_cpu, it displays the
cpu temperature grade and operating temperature if CONFIG_IMX9 is defined.
This behavior is similar to what happens arch/arm/mach-imx/cpu.c except that
the latter checks for CONFIG_IMX_THERMAL or CONFIG_IMX_TMU.  In preparation
to make imx8_cpu act like the previous implementation for any CPU, make IMX9
imply IMX_TMU so it will be always displayed unless a user decides to
disable it.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 arch/arm/mach-imx/imx9/Kconfig | 1 +
 1 file changed, 1 insertion(+)

V2:  New to series

diff --git a/arch/arm/mach-imx/imx9/Kconfig b/arch/arm/mach-imx/imx9/Kconfig
index 49220c0955e..c3e758e103a 100644
--- a/arch/arm/mach-imx/imx9/Kconfig
+++ b/arch/arm/mach-imx/imx9/Kconfig
@@ -10,6 +10,7 @@ config IMX9
 	select BINMAN
 	select HAS_CAAM
 	select ROM_UNIFIED_SECTIONS
+	imply IMX_TMU
 
 config IMX93
 	bool
-- 
2.45.2


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

* [PATCH V2 2/5] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU
  2025-03-21  1:31 [PATCH V2 1/5] imx: imx9: Imply IMX_TMU Adam Ford
@ 2025-03-21  1:31 ` Adam Ford
  2025-03-21  1:31 ` [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX Adam Ford
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Adam Ford @ 2025-03-21  1:31 UTC (permalink / raw)
  To: u-boot
  Cc: aford, marek.vasut, festevam, Adam Ford, Stefano Babic,
	NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li,
	Christoph Stoidner, Wadim Egorov, Yannic Moog, Simon Glass,
	Sean Anderson, Quentin Schulz, Sumit Garg, Marek Vasut,
	Hou Zhiqiang, Michael Trimarchi

Much of the data that is display by imx8_cpu.c is also displayed from
arch/arm/mach-imx/cpu.c, except the temperature grade and active
temperature are only displayed when SoC is an i.MX9. Since IMX9 now
implies IMX_TMU, change this to check for IMX_THERMAL or IMX_TMU
in the same way it's done in mach-imx/cpu.c to enable displaying
this information for any SoC with either of these configs enabled.

Before:
CPU:   NXP i.MX8MP Rev1.1 A53 at 1200 MHz
Model: Beacon EmbeddedWorks i.MX8MPlus Development kit

After:
CPU:   NXP i.MX8MP Rev1.1 A53 at 1200 MHz
CPU:   Industrial temperature grade  (-40C to 105C) at 28C
Model: Beacon EmbeddedWorks i.MX8MPlus Development kit

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 drivers/cpu/imx8_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

V2:  No change

diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 53d31b3c0bf..faa6a0704a6 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -177,7 +177,7 @@ static int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
 	ret = snprintf(buf, size, "NXP i.MX%s Rev%s %s at %u MHz",
 		       plat->type, plat->rev, plat->name, plat->freq_mhz);
 
-	if (IS_ENABLED(CONFIG_IMX9)) {
+	if (IS_ENABLED(CONFIG_IMX_THERMAL) || IS_ENABLED(CONFIG_IMX_TMU)) {
 		switch (get_cpu_temp_grade(&minc, &maxc)) {
 		case TEMP_AUTOMOTIVE:
 			grade = "Automotive temperature grade ";
-- 
2.45.2


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

* [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21  1:31 [PATCH V2 1/5] imx: imx9: Imply IMX_TMU Adam Ford
  2025-03-21  1:31 ` [PATCH V2 2/5] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU Adam Ford
@ 2025-03-21  1:31 ` Adam Ford
  2025-03-21  1:55   ` Marek Vasut
  2025-03-21  1:31 ` [PATCH V2 4/5] arm64: imx: imx8mn-beacon: " Adam Ford
  2025-03-21  1:31 ` [PATCH V2 5/5] arm64: imx: imx8mp-beacon: " Adam Ford
  3 siblings, 1 reply; 11+ messages in thread
From: Adam Ford @ 2025-03-21  1:31 UTC (permalink / raw)
  To: u-boot
  Cc: aford, marek.vasut, festevam, Adam Ford, Stefano Babic,
	NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li, Wadim Egorov,
	Christoph Stoidner, Yannic Moog, Sean Anderson, Simon Glass,
	Quentin Schulz, Sumit Garg, Marek Vasut, Hou Zhiqiang,
	Michael Trimarchi

Enable CPU_IMX to register the ARM core and identify the
speed and temperature information using the driver model.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 configs/imx8mm_beacon_defconfig | 2 ++
 1 file changed, 2 insertions(+)
V2:  No Change

diff --git a/configs/imx8mm_beacon_defconfig b/configs/imx8mm_beacon_defconfig
index 56e18893b77..bcb60a63795 100644
--- a/configs/imx8mm_beacon_defconfig
+++ b/configs/imx8mm_beacon_defconfig
@@ -84,6 +84,8 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_SPL_CLK_IMX8MM=y
 CONFIG_CLK_IMX8MM=y
+CONFIG_CPU=y
+CONFIG_CPU_IMX=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x42800000
 CONFIG_FASTBOOT_BUF_SIZE=0x20000000
-- 
2.45.2


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

* [PATCH V2 4/5] arm64: imx: imx8mn-beacon: Enable CPU_IMX
  2025-03-21  1:31 [PATCH V2 1/5] imx: imx9: Imply IMX_TMU Adam Ford
  2025-03-21  1:31 ` [PATCH V2 2/5] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU Adam Ford
  2025-03-21  1:31 ` [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX Adam Ford
@ 2025-03-21  1:31 ` Adam Ford
  2025-03-21  1:31 ` [PATCH V2 5/5] arm64: imx: imx8mp-beacon: " Adam Ford
  3 siblings, 0 replies; 11+ messages in thread
From: Adam Ford @ 2025-03-21  1:31 UTC (permalink / raw)
  To: u-boot
  Cc: aford, marek.vasut, festevam, Adam Ford, Stefano Babic,
	NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li, Yannic Moog,
	Wadim Egorov, Christoph Stoidner, Sean Anderson, Simon Glass,
	Quentin Schulz, Sumit Garg, Marek Vasut, Hou Zhiqiang,
	Michael Trimarchi

Enable CPU_IMX to register the ARM core and identify the
speed and temperature information using the driver model.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 configs/imx8mn_beacon_defconfig | 2 ++
 1 file changed, 2 insertions(+)
V2:  No Change

diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_beacon_defconfig
index 69af7cee092..93b32155aa9 100644
--- a/configs/imx8mn_beacon_defconfig
+++ b/configs/imx8mn_beacon_defconfig
@@ -93,6 +93,8 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_SPL_CLK_IMX8MN=y
 CONFIG_CLK_IMX8MN=y
+CONFIG_CPU=y
+CONFIG_CPU_IMX=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x42800000
 CONFIG_FASTBOOT_BUF_SIZE=0x40000000
-- 
2.45.2


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

* [PATCH V2 5/5] arm64: imx: imx8mp-beacon: Enable CPU_IMX
  2025-03-21  1:31 [PATCH V2 1/5] imx: imx9: Imply IMX_TMU Adam Ford
                   ` (2 preceding siblings ...)
  2025-03-21  1:31 ` [PATCH V2 4/5] arm64: imx: imx8mn-beacon: " Adam Ford
@ 2025-03-21  1:31 ` Adam Ford
  3 siblings, 0 replies; 11+ messages in thread
From: Adam Ford @ 2025-03-21  1:31 UTC (permalink / raw)
  To: u-boot
  Cc: aford, marek.vasut, festevam, Adam Ford, Stefano Babic,
	NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li,
	Christoph Stoidner, Yannic Moog, Sean Anderson, Quentin Schulz,
	Simon Glass, Sumit Garg, Marek Vasut, Hou Zhiqiang,
	Michael Trimarchi

Enable CPU_IMX to register the ARM core and identify the
speed and temperature information using the driver model.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 configs/imx8mp_beacon_defconfig | 2 ++
 1 file changed, 2 insertions(+)
V2:  No Change

diff --git a/configs/imx8mp_beacon_defconfig b/configs/imx8mp_beacon_defconfig
index 9709f628f9c..2893270d0c1 100644
--- a/configs/imx8mp_beacon_defconfig
+++ b/configs/imx8mp_beacon_defconfig
@@ -88,6 +88,8 @@ CONFIG_SPL_DM=y
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_SPL_CLK_IMX8MP=y
 CONFIG_CLK_IMX8MP=y
+CONFIG_CPU=y
+CONFIG_CPU_IMX=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x42800000
 CONFIG_FASTBOOT_BUF_SIZE=0x20000000
-- 
2.45.2


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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21  1:31 ` [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX Adam Ford
@ 2025-03-21  1:55   ` Marek Vasut
  2025-03-21  2:00     ` Adam Ford
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2025-03-21  1:55 UTC (permalink / raw)
  To: Adam Ford, u-boot
  Cc: aford, festevam, NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li,
	Wadim Egorov, Christoph Stoidner, Yannic Moog, Sean Anderson,
	Simon Glass, Quentin Schulz, Sumit Garg, Marek Vasut,
	Hou Zhiqiang, Michael Trimarchi

On 3/21/25 2:31 AM, Adam Ford wrote:
> Enable CPU_IMX to register the ARM core and identify the
> speed and temperature information using the driver model.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
I am tempted to say, imply this for all iMX8M and iMX9 in arch/... 
Kconfig , so it gets consistently enabled for everyone .

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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21  1:55   ` Marek Vasut
@ 2025-03-21  2:00     ` Adam Ford
  2025-03-21  2:27       ` Marek Vasut
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Ford @ 2025-03-21  2:00 UTC (permalink / raw)
  To: Marek Vasut
  Cc: u-boot, aford, festevam, NXP i.MX U-Boot Team, Tom Rini, Peng Fan,
	Ye Li, Wadim Egorov, Christoph Stoidner, Yannic Moog,
	Sean Anderson, Simon Glass, Quentin Schulz, Sumit Garg,
	Marek Vasut, Hou Zhiqiang, Michael Trimarchi

On Thu, Mar 20, 2025 at 8:55 PM Marek Vasut <marek.vasut@mailbox.org> wrote:
>
> On 3/21/25 2:31 AM, Adam Ford wrote:
> > Enable CPU_IMX to register the ARM core and identify the
> > speed and temperature information using the driver model.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> I am tempted to say, imply this for all iMX8M and iMX9 in arch/...
> Kconfig , so it gets consistently enabled for everyone .

I was not super excited to change the behavior for everyone.  Since
the IMX9 always displayed it, it seems safe, since there would be no
obvious change in behavior.  Making this implied for everyone would
result in a change in behavior.

adam

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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21  2:00     ` Adam Ford
@ 2025-03-21  2:27       ` Marek Vasut
  2025-03-21 12:10         ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2025-03-21  2:27 UTC (permalink / raw)
  To: Adam Ford
  Cc: u-boot, aford, festevam, NXP i.MX U-Boot Team, Tom Rini, Peng Fan,
	Ye Li, Wadim Egorov, Christoph Stoidner, Yannic Moog,
	Sean Anderson, Simon Glass, Quentin Schulz, Sumit Garg,
	Marek Vasut, Hou Zhiqiang, Michael Trimarchi

On 3/21/25 3:00 AM, Adam Ford wrote:
> On Thu, Mar 20, 2025 at 8:55 PM Marek Vasut <marek.vasut@mailbox.org> wrote:
>>
>> On 3/21/25 2:31 AM, Adam Ford wrote:
>>> Enable CPU_IMX to register the ARM core and identify the
>>> speed and temperature information using the driver model.
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>> I am tempted to say, imply this for all iMX8M and iMX9 in arch/...
>> Kconfig , so it gets consistently enabled for everyone .
> 
> I was not super excited to change the behavior for everyone.  Since
> the IMX9 always displayed it, it seems safe, since there would be no
> obvious change in behavior.  Making this implied for everyone would
> result in a change in behavior.
Yes, I know. But then, I can safely say it is desired on hardware I 
maintain, I think we could try and run a quick poll and see if others 
see it the same way ?

Either way is fine by me, feel free to ignore this suggestion.

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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21  2:27       ` Marek Vasut
@ 2025-03-21 12:10         ` Fabio Estevam
  2025-03-21 13:27           ` Adam Ford
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2025-03-21 12:10 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Adam Ford, u-boot, aford, NXP i.MX U-Boot Team, Tom Rini,
	Peng Fan, Ye Li, Wadim Egorov, Christoph Stoidner, Yannic Moog,
	Sean Anderson, Simon Glass, Quentin Schulz, Sumit Garg,
	Marek Vasut, Hou Zhiqiang, Michael Trimarchi

On Thu, Mar 20, 2025 at 11:27 PM Marek Vasut <marek.vasut@mailbox.org> wrote:

> Yes, I know. But then, I can safely say it is desired on hardware I
> maintain, I think we could try and run a quick poll and see if others
> see it the same way ?

I think it is a good idea to imply the thermal driver at the SoC level
instead of per board.

Thanks

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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21 12:10         ` Fabio Estevam
@ 2025-03-21 13:27           ` Adam Ford
  2025-03-21 13:59             ` Marek Vasut
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Ford @ 2025-03-21 13:27 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Marek Vasut, u-boot, aford, NXP i.MX U-Boot Team, Tom Rini,
	Peng Fan, Ye Li, Wadim Egorov, Christoph Stoidner, Yannic Moog,
	Sean Anderson, Simon Glass, Quentin Schulz, Sumit Garg,
	Marek Vasut, Hou Zhiqiang, Michael Trimarchi

On Fri, Mar 21, 2025 at 7:10 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> On Thu, Mar 20, 2025 at 11:27 PM Marek Vasut <marek.vasut@mailbox.org> wrote:
>
> > Yes, I know. But then, I can safely say it is desired on hardware I
> > maintain, I think we could try and run a quick poll and see if others
> > see it the same way ?
>
> I think it is a good idea to imply the thermal driver at the SoC level
> instead of per board.

OK.  I'll spin a V3 which implies the respective thermal driver at the
SoC level for IMX8 and 8M families, since those are what are supported
in the CPU driver.  Should I expand this list beyond those?  I am not
sure how far back to go.

thanks,

adam

>
> Thanks

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

* Re: [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX
  2025-03-21 13:27           ` Adam Ford
@ 2025-03-21 13:59             ` Marek Vasut
  0 siblings, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2025-03-21 13:59 UTC (permalink / raw)
  To: Adam Ford, Fabio Estevam
  Cc: u-boot, aford, NXP i.MX U-Boot Team, Tom Rini, Peng Fan, Ye Li,
	Wadim Egorov, Christoph Stoidner, Yannic Moog, Sean Anderson,
	Simon Glass, Quentin Schulz, Sumit Garg, Marek Vasut,
	Hou Zhiqiang, Michael Trimarchi

On 3/21/25 2:27 PM, Adam Ford wrote:
> On Fri, Mar 21, 2025 at 7:10 AM Fabio Estevam <festevam@gmail.com> wrote:
>>
>> On Thu, Mar 20, 2025 at 11:27 PM Marek Vasut <marek.vasut@mailbox.org> wrote:
>>
>>> Yes, I know. But then, I can safely say it is desired on hardware I
>>> maintain, I think we could try and run a quick poll and see if others
>>> see it the same way ?
>>
>> I think it is a good idea to imply the thermal driver at the SoC level
>> instead of per board.
> 
> OK.  I'll spin a V3 which implies the respective thermal driver at the
> SoC level for IMX8 and 8M families, since those are what are supported
> in the CPU driver.  Should I expand this list beyond those?  I am not
> sure how far back to go.
8/8M and newer seems like the right way, thanks !

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

end of thread, other threads:[~2025-03-21 13:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21  1:31 [PATCH V2 1/5] imx: imx9: Imply IMX_TMU Adam Ford
2025-03-21  1:31 ` [PATCH V2 2/5] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU Adam Ford
2025-03-21  1:31 ` [PATCH V2 3/5] arm64: imx: imx8mm-beacon: Enable CPU_IMX Adam Ford
2025-03-21  1:55   ` Marek Vasut
2025-03-21  2:00     ` Adam Ford
2025-03-21  2:27       ` Marek Vasut
2025-03-21 12:10         ` Fabio Estevam
2025-03-21 13:27           ` Adam Ford
2025-03-21 13:59             ` Marek Vasut
2025-03-21  1:31 ` [PATCH V2 4/5] arm64: imx: imx8mn-beacon: " Adam Ford
2025-03-21  1:31 ` [PATCH V2 5/5] arm64: imx: imx8mp-beacon: " Adam Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox