2022-10-26 13:07:40

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH 00/11] ARM: at91: fixes and enhancement

Hi,

The following series adds:
- one fix for self-refresh on SAMA7G5 (patch 1/11)
- thermal management support for SAMA7G5 (patches 2/11-9/11)
- 2 cleanup patches (patches 10/11, 11/11)

Thank you,
Claudiu Beznea

Claudiu Beznea (11):
ARM: at91: pm: avoid soft resetting AC DLL
ARM: dts: at91: sama7g5: add otpc node
ARM: dts: at91: add io-channel-cells to adc node
ARM: dts: at91: sama7g5: add cells for temperature calibration
ARM: dts: at91: sama7g5: add temperature sensor
ARM: dts: at91: sama7g5: add thermal zones node
ARM: configs: at91: sama7: use make savedefconfig
ARM: configs: at91: sama7: add config for microchip otpc
ARM: configs: at91: sama7: add config for thermal management
ARM: dts: at91: sama7g5: use generic name for securam
ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators

arch/arm/boot/dts/at91-sam9x60ek.dts | 4 --
arch/arm/boot/dts/sama7g5.dtsi | 67 +++++++++++++++++++++++++++-
arch/arm/configs/sama7_defconfig | 9 +++-
arch/arm/mach-at91/pm_suspend.S | 7 ++-
include/soc/at91/sama7-ddr.h | 5 ++-
5 files changed, 83 insertions(+), 9 deletions(-)

--
2.34.1



2022-10-26 13:08:08

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH 06/11] ARM: dts: at91: sama7g5: add thermal zones node

Add thermal zones node with its associated trips and cooling-maps.
It uses CPUFreq as cooling device for temperatures in the interval
[90, 100) degrees Celsius and describe the temperature of 100 degrees
Celsius as critical temperature. System will be is shutting down when
reaching critical temperature.

Signed-off-by: Claudiu Beznea <[email protected]>
---
arch/arm/boot/dts/sama7g5.dtsi | 42 ++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index 52829be04427..fb517f9aff30 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -17,6 +17,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mfd/at91-usart.h>
#include <dt-bindings/nvmem/microchip,sama7g5-otpc.h>
+#include <dt-bindings/thermal/thermal.h>

/ {
model = "Microchip SAMA7G5 family SoC";
@@ -36,6 +37,7 @@ cpu0: cpu@0 {
clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>;
clock-names = "cpu";
operating-points-v2 = <&cpu_opp_table>;
+ #cooling-cells = <2>; /* min followed by max */
};
};

@@ -74,6 +76,46 @@ opp-1000000002 {
};
};

+ thermal-zones {
+ cpu_thermal: cpu-thermal {
+ polling-delay-passive = <1000>;
+ polling-delay = <5000>;
+ thermal-sensors = <&thermal_sensor>;
+
+ trips {
+ cpu_normal: cpu-alert0 {
+ temperature = <90000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ cpu_hot: cpu-alert1 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ cpu_critical: cpu-critical {
+ temperature = <100000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_normal>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+
+ map1 {
+ trip = <&cpu_hot>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
clocks {
slow_xtal: slow_xtal {
compatible = "fixed-clock";
--
2.34.1


2022-10-26 13:17:14

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH 11/11] ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators

Remove status = "okay" for sam9x60ek regulator as okay is the default
status.

Signed-off-by: Claudiu Beznea <[email protected]>
---
arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index 4ba52ba11dc6..d929c1ba5789 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -76,7 +76,6 @@ vdd_1v8: fixed-regulator-vdd_1v8 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
- status = "okay";
};

vdd_1v15: fixed-regulator-vdd_1v15 {
@@ -85,7 +84,6 @@ vdd_1v15: fixed-regulator-vdd_1v15 {
regulator-min-microvolt = <1150000>;
regulator-max-microvolt = <1150000>;
regulator-always-on;
- status = "okay";
};

vdd1_3v3: fixed-regulator-vdd1_3v3 {
@@ -94,7 +92,6 @@ vdd1_3v3: fixed-regulator-vdd1_3v3 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
- status = "okay";
};

vdd2_3v3: regulator-fixed-vdd2_3v3 {
@@ -103,7 +100,6 @@ vdd2_3v3: regulator-fixed-vdd2_3v3 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
- status = "okay";
};
};

--
2.34.1


2022-10-26 13:18:27

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH 10/11] ARM: dts: at91: sama7g5: use generic name for securam

Use generic sram name for securam.

Signed-off-by: Claudiu Beznea <[email protected]>
---
arch/arm/boot/dts/sama7g5.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index fb517f9aff30..1f7093b3755b 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -204,7 +204,7 @@ nand_controller: nand-controller {
};
};

- securam: securam@e0000000 {
+ securam: sram@e0000000 {
compatible = "microchip,sama7g5-securam", "atmel,sama5d2-securam", "mmio-sram";
reg = <0xe0000000 0x4000>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 18>;
--
2.34.1


2022-11-01 15:39:00

by Claudiu Beznea

[permalink] [raw]
Subject: Re: [PATCH 00/11] ARM: at91: fixes and enhancement

On 26.10.2022 15:41, Claudiu Beznea wrote:
> Hi,
>
> The following series adds:
> - one fix for self-refresh on SAMA7G5 (patch 1/11)
> - thermal management support for SAMA7G5 (patches 2/11-9/11)
> - 2 cleanup patches (patches 10/11, 11/11)
>
> Thank you,
> Claudiu Beznea
>
> Claudiu Beznea (11):
> ARM: at91: pm: avoid soft resetting AC DLL

Applied to at91-fixes.

> ARM: dts: at91: sama7g5: add otpc node

Applid to at91-dt after after s/optc@/efuse@ for node.

> ARM: dts: at91: add io-channel-cells to adc node
> ARM: dts: at91: sama7g5: add cells for temperature calibration
> ARM: dts: at91: sama7g5: add temperature sensor
> ARM: dts: at91: sama7g5: add thermal zones node

Applied to at91-dt.

> ARM: configs: at91: sama7: use make savedefconfig
> ARM: configs: at91: sama7: add config for microchip otpc
> ARM: configs: at91: sama7: add config for thermal management

Applied to at91-defconfig.

> ARM: dts: at91: sama7g5: use generic name for securam
> ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators

Applied to at91-dt, thanks!

>
> arch/arm/boot/dts/at91-sam9x60ek.dts | 4 --
> arch/arm/boot/dts/sama7g5.dtsi | 67 +++++++++++++++++++++++++++-
> arch/arm/configs/sama7_defconfig | 9 +++-
> arch/arm/mach-at91/pm_suspend.S | 7 ++-
> include/soc/at91/sama7-ddr.h | 5 ++-
> 5 files changed, 83 insertions(+), 9 deletions(-)
>