dts: riscv: espressif: esp32: move power-states to soc dts files

CPU idle states are not board specific. This patch moves ESP32 idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g. peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2023-07-19 12:05:47 +02:00 committed by Carles Cufí
parent c008bf1720
commit 5eee169cf0
8 changed files with 52 additions and 86 deletions

View file

@ -26,22 +26,6 @@
watchdog0 = &wdt0; watchdog0 = &wdt0;
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <660>;
exit-latency-us = <105>;
};
};
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
user_button1: button_1 { user_button1: button_1 {
@ -53,7 +37,6 @@
&cpu0 { &cpu0 {
clock-frequency = <ESP32_CLK_CPU_160M>; clock-frequency = <ESP32_CLK_CPU_160M>;
cpu-power-states = <&deep_sleep &light_sleep>;
}; };
&uart0 { &uart0 {

View file

@ -26,22 +26,6 @@
watchdog0 = &wdt0; watchdog0 = &wdt0;
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <660>;
exit-latency-us = <105>;
};
};
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
button0: button0 { button0: button0 {
@ -53,7 +37,6 @@
&cpu0 { &cpu0 {
clock-frequency = <ESP32_CLK_CPU_160M>; clock-frequency = <ESP32_CLK_CPU_160M>;
cpu-power-states = <&deep_sleep &light_sleep>;
}; };
&uart0 { &uart0 {

View file

@ -26,27 +26,10 @@
i2c-0 = &i2c0; i2c-0 = &i2c0;
watchdog0 = &wdt0; watchdog0 = &wdt0;
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <660>;
exit-latency-us = <105>;
};
};
}; };
&cpu0 { &cpu0 {
clock-frequency = <ESP32_CLK_CPU_160M>; clock-frequency = <ESP32_CLK_CPU_160M>;
cpu-power-states = <&deep_sleep &light_sleep>;
}; };
&uart0 { &uart0 {

View file

@ -33,28 +33,10 @@
zephyr,shell-uart = &uart0; zephyr,shell-uart = &uart0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <2000>;
exit-latency-us = <212>;
};
};
}; };
&cpu0 { &cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>; clock-frequency = <ESP32_CLK_CPU_240M>;
cpu-power-states = <&light_sleep &deep_sleep>;
}; };
&cpu1 { &cpu1 {

View file

@ -26,22 +26,6 @@
zephyr,flash = &flash0; zephyr,flash = &flash0;
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <2000>;
exit-latency-us = <212>;
};
};
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
user_button: user_button { user_button: user_button {
@ -53,7 +37,6 @@
&cpu0 { &cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>; clock-frequency = <ESP32_CLK_CPU_240M>;
cpu-power-states = <&deep_sleep &light_sleep>;
}; };
&uart0 { &uart0 {

View file

@ -33,6 +33,23 @@
device_type = "cpu"; device_type = "cpu";
compatible = "espressif,riscv"; compatible = "espressif,riscv";
reg = <0>; reg = <0>;
cpu-power-states = <&light_sleep &deep_sleep>;
};
};
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <660>;
exit-latency-us = <105>;
}; };
}; };

View file

@ -28,6 +28,7 @@
device_type = "cpu"; device_type = "cpu";
compatible = "cdns,tensilica-xtensa-lx6"; compatible = "cdns,tensilica-xtensa-lx6";
reg = <0>; reg = <0>;
cpu-power-states = <&light_sleep &deep_sleep>;
}; };
cpu1: cpu@1 { cpu1: cpu@1 {
@ -38,6 +39,23 @@
}; };
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <2000>;
exit-latency-us = <212>;
};
};
wifi: wifi { wifi: wifi {
compatible = "espressif,esp32-wifi"; compatible = "espressif,esp32-wifi";
status = "disabled"; status = "disabled";

View file

@ -34,6 +34,23 @@
device_type = "cpu"; device_type = "cpu";
compatible = "cdns,tensilica-xtensa-lx7"; compatible = "cdns,tensilica-xtensa-lx7";
reg = <0>; reg = <0>;
cpu-power-states = <&light_sleep &deep_sleep>;
};
};
power-states {
light_sleep: light_sleep {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <200>;
exit-latency-us = <60>;
};
deep_sleep: deep_sleep {
compatible = "zephyr,power-state";
power-state-name = "soft-off";
min-residency-us = <2000>;
exit-latency-us = <212>;
}; };
}; };