public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/3] thermal: Integrate VTM and AVS driver
@ 2023-09-08 17:29 Udit Kumar
  2023-09-08 17:29 ` [RFC PATCH v2 1/3] thermal: k3: Add support for thermal in vtm Udit Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Udit Kumar @ 2023-09-08 17:29 UTC (permalink / raw)
  To: nm, vigneshr, bb, sjg
  Cc: peng.fan, ye.li, robimarko, u-boot, n-francis, Udit Kumar

VTM (Voltage and Thermal Manager) IP is used for following purpose
1) AVS class 0
2) Thermal management (setting thermal shutdown TSHUT) temperature.
3) SoC temperature reporting.

In origin boot flow, R5/SPL sets the AVS voltage using
by AVS driver, residing under UCLASS_MISC.

In this series At top level, following changes are done
- Moved avs driver to Thermal class
- Ported kernel driver (drivers/thermal/k3_j72xx_bandgap.c) which
supports TSHUT and temperature reporting
- Merged these two driver as one under UCLASS_THERMAL.

This series aims to
- set avs and thermal shutdown at R5/SPL stage
- At main u-boot stage, support thermal shutdown and temperature reporting


Also, j72xx_bandgap does complex math to get ADC value to temperature
conversion, This table is pretty static.
So at R5 SPL stage, instead of calculation, fixed values is used
for TSHUT values.
and #ifdef is used skip non needed code for SPL/R5 to reduce code size.

Change log
Changes in v2:
v1 : https://lore.kernel.org/all/20230901061500.2342452-1-u-kumar1@ti.com/
- Trying to merge AVS and kernel driver into 1
- Mark as RFC


Udit Kumar (3):
  thermal: k3: Add support for thermal in vtm
  arm: mach-k3: update board file to use thermal device
  arm: dts: k3: update device tree for vtm node

 arch/arm/dts/k3-j7200-mcu-wakeup.dtsi         |   9 +
 .../arm/dts/k3-j7200-r5-common-proc-board.dts |   6 -
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         |  10 +
 .../arm/dts/k3-j721e-r5-common-proc-board.dts |   7 -
 arch/arm/dts/k3-j721e-r5-sk.dts               |   7 -
 arch/arm/mach-k3/am654_init.c                 |   2 +-
 arch/arm/mach-k3/j721e_init.c                 |   2 +-
 configs/am65x_evm_r5_defconfig                |   3 +
 configs/am65x_evm_r5_usbdfu_defconfig         |   3 +
 configs/am65x_evm_r5_usbmsc_defconfig         |   3 +
 configs/am65x_hs_evm_r5_defconfig             |   3 +
 configs/j7200_evm_a72_defconfig               |   3 +
 configs/j7200_evm_r5_defconfig                |   3 +
 configs/j721e_evm_a72_defconfig               |   3 +
 configs/j721e_evm_r5_defconfig                |   3 +
 drivers/misc/Makefile                         |   1 -
 drivers/misc/k3_avs.c                         | 394 --------
 drivers/thermal/Kconfig                       |   7 +
 drivers/thermal/Makefile                      |   1 +
 drivers/thermal/k3_thermal.c                  | 928 ++++++++++++++++++
 20 files changed, 981 insertions(+), 417 deletions(-)
 delete mode 100644 drivers/misc/k3_avs.c
 create mode 100644 drivers/thermal/k3_thermal.c

-- 
2.34.1


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

end of thread, other threads:[~2023-09-30  6:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08 17:29 [RFC PATCH v2 0/3] thermal: Integrate VTM and AVS driver Udit Kumar
2023-09-08 17:29 ` [RFC PATCH v2 1/3] thermal: k3: Add support for thermal in vtm Udit Kumar
2023-09-08 17:29 ` [RFC PATCH v2 2/3] arm: mach-k3: update board file to use thermal device Udit Kumar
2023-09-08 17:29 ` [RFC PATCH v2 3/3] arm: dts: k3: update device tree for vtm node Udit Kumar
2023-09-30  6:41 ` [RFC PATCH v2 0/3] thermal: Integrate VTM and AVS driver Kumar, Udit

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