2023-01-20 00:47:16

by Bryan Brattlof

[permalink] [raw]
Subject: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node

The am62x supports a single Voltage and Thermal Management (VTM) module
located in the wakeup domain with two associated temperature monitors
located in hot spots of the die.

Signed-off-by: Bryan Brattlof <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi | 33 +++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 8 +++++
arch/arm64/boot/dts/ti/k3-am62.dtsi | 6 +++-
3 files changed, 46 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi

diff --git a/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi
new file mode 100644
index 0000000000000..a358757e26f07
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dt-bindings/thermal/thermal.h>
+
+thermal_zones: thermal-zones {
+ main0_thermal: main0-thermal {
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 0>;
+
+ trips {
+ main0_crit: main0-crit {
+ temperature = <105000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+ };
+
+ main1_thermal: main1-thermal {
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 1>;
+
+ trips {
+ main1_crit: main1-crit {
+ temperature = <105000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
index 38dced6b4fef9..91ec9887ac6d1 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
@@ -40,4 +40,12 @@ wkup_i2c0: i2c@2b200000 {
clock-names = "fck";
status = "disabled";
};
+
+ wkup_vtm0: temperature-sensor@b00000 {
+ compatible = "ti,j7200-vtm";
+ reg = <0x00 0xb00000 0x00 0x400>,
+ <0x00 0xb01000 0x00 0x400>;
+ power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>;
+ #thermal-sensor-cells = <1>;
+ };
};
diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
index 37fcbe7a3c336..74cf1b4d7a6ad 100644
--- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
@@ -80,6 +80,7 @@ cbass_main: bus@f0000 {
<0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,

/* Wakeup Domain Range */
+ <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
<0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>,
<0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>;

@@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
- ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
+ ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
+ <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
<0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>;
};
};
+
+ #include "k3-am62-thermal.dtsi"
};

/* Now include the peripherals for each bus segments */
--
2.39.0


2023-01-28 05:23:38

by Vignesh Raghavendra

[permalink] [raw]
Subject: Re: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node

Hi Bryan,

On 1/20/2023 6:00 AM, Bryan Brattlof wrote:
> @@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 {
> compatible = "simple-bus";
> #address-cells = <2>;
> #size-cells = <2>;
> - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
> + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */

You would need to update unit address in node name as well:
cbass_wakeup: bus@b00000 {

> + <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
> <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>;
> };
> };
> +
> + #include "k3-am62-thermal.dtsi"
> };

Regards
Vignesh

2023-01-31 01:58:01

by Bryan Brattlof

[permalink] [raw]
Subject: Re: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node

Hi Vignesh!

On January 28, 2023 thus sayeth Raghavendra, Vignesh:
> Hi Bryan,
>
> On 1/20/2023 6:00 AM, Bryan Brattlof wrote:
> > @@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 {
> > compatible = "simple-bus";
> > #address-cells = <2>;
> > #size-cells = <2>;
> > - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
> > + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
>
> You would need to update unit address in node name as well:
> cbass_wakeup: bus@b00000 {

Ah! I missed that. I'll get this fixed

~Bryan

2023-04-03 13:06:13

by Christian Gmeiner

[permalink] [raw]
Subject: Re: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node

> Hi Vignesh!
>
> On January 28, 2023 thus sayeth Raghavendra, Vignesh:
> > Hi Bryan,
> >
> > On 1/20/2023 6:00 AM, Bryan Brattlof wrote:
> > > @@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 {
> > > compatible = "simple-bus";
> > > #address-cells = <2>;
> > > #size-cells = <2>;
> > > - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
> > > + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
> >
> > You would need to update unit address in node name as well:
> > cbass_wakeup: bus@b00000 {
>
> Ah! I missed that. I'll get this fixed

Any update on this? Would be great if these changes could make it into
the next merge window.

--
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

2023-04-03 14:13:49

by Bryan Brattlof

[permalink] [raw]
Subject: Re: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node

Hi Christian!

On April 3, 2023 thus sayeth Christian Gmeiner:
> > Hi Vignesh!
> >
> > On January 28, 2023 thus sayeth Raghavendra, Vignesh:
> > > Hi Bryan,
> > >
> > > On 1/20/2023 6:00 AM, Bryan Brattlof wrote:
> > > > @@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 {
> > > > compatible = "simple-bus";
> > > > #address-cells = <2>;
> > > > #size-cells = <2>;
> > > > - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
> > > > + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
> > >
> > > You would need to update unit address in node name as well:
> > > cbass_wakeup: bus@b00000 {
> >
> > Ah! I missed that. I'll get this fixed
>
> Any update on this? Would be great if these changes could make it into
> the next merge window.
>

You got me :) I let this fall off my radar... I'll send out v3 by today
or tomorrow to restart the review process.

Thank you for reviewing and for the reminder Christian
~Bryan