This patch series includes Tegra210 deepsleep or LP0 support with
deep sleep exit through RTC alarm wake and power button wake events.
This series also includes save and restore of PLLs, clocks, OSC contexts
for basic LP0 exit.
This patch series is doesn't support for 100% suspend/resume to fully
functional state and we are working on some more drivers suspend and
resume implementations.
Sowjanya Komatineni (12):
irqchip: tegra: do not disable COP IRQ during suspend
pinctrl: tegra: add suspend and resume support
clk: tegra: save and restore PLLs state for system
clk: tegra: add support for peripheral clock suspend and resume
clk: tegra: add support for OSC clock resume
clk: tegra: add suspend resume support for DFLL clock
clk: tegra: support for Tegra210 clocks suspend-resume
soc/tegra: pmc: allow support for more tegra wake models
soc/tegra: pmc: add pmc wake support for tegra210
gpio: tegra: implement wake event support for Tegra210 and prior GPIO
soc/tegra: pmc: configure tegra deep sleep control settings
arm64: tegra: enable wake from deep sleep on RTC alarm.
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 7 +
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 +-
drivers/clk/tegra/clk-dfll.c | 82 ++++++
drivers/clk/tegra/clk-dfll.h | 2 +
drivers/clk/tegra/clk-divider.c | 19 ++
drivers/clk/tegra/clk-pll-out.c | 25 ++
drivers/clk/tegra/clk-pll.c | 220 ++++++++++++--
drivers/clk/tegra/clk-tegra-fixed.c | 15 +
drivers/clk/tegra/clk-tegra210.c | 382 +++++++++++++++++++++++++
drivers/clk/tegra/clk.c | 74 ++++-
drivers/clk/tegra/clk.h | 18 ++
drivers/gpio/gpio-tegra.c | 109 ++++++-
drivers/irqchip/irq-tegra.c | 10 +-
drivers/pinctrl/tegra/pinctrl-tegra.c | 68 ++++-
drivers/pinctrl/tegra/pinctrl-tegra.h | 3 +
drivers/pinctrl/tegra/pinctrl-tegra114.c | 1 +
drivers/pinctrl/tegra/pinctrl-tegra124.c | 1 +
drivers/pinctrl/tegra/pinctrl-tegra20.c | 1 +
drivers/pinctrl/tegra/pinctrl-tegra210.c | 1 +
drivers/pinctrl/tegra/pinctrl-tegra30.c | 1 +
drivers/soc/tegra/pmc.c | 159 +++++++++-
21 files changed, 1167 insertions(+), 36 deletions(-)
--
2.7.4
BPMP-lite still need IRQ function to finish SC7 suspend sequence for
Tegra210.
This patch has fix for leaving the COP IRQ enabled for Tegra210 during
interrupt controller suspend operation.
Signed-off-by: Sowjanya Komatineni <[email protected]>
---
drivers/irqchip/irq-tegra.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c
index 0abc0cd1c32e..1882373fa1fd 100644
--- a/drivers/irqchip/irq-tegra.c
+++ b/drivers/irqchip/irq-tegra.c
@@ -53,18 +53,24 @@ static unsigned int num_ictlrs;
struct tegra_ictlr_soc {
unsigned int num_ictlrs;
+ bool has_bpmpl;
};
+static const struct tegra_ictlr_soc *soc;
+
static const struct tegra_ictlr_soc tegra20_ictlr_soc = {
.num_ictlrs = 4,
+ .has_bpmpl = false,
};
static const struct tegra_ictlr_soc tegra30_ictlr_soc = {
.num_ictlrs = 5,
+ .has_bpmpl = false,
};
static const struct tegra_ictlr_soc tegra210_ictlr_soc = {
.num_ictlrs = 6,
+ .has_bpmpl = true,
};
static const struct of_device_id ictlr_matches[] = {
@@ -157,7 +163,8 @@ static int tegra_ictlr_suspend(void)
lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS);
/* Disable COP interrupts */
- writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
+ if (!soc->has_bpmpl)
+ writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
/* Disable CPU interrupts */
writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
@@ -286,7 +293,6 @@ static int __init tegra_ictlr_init(struct device_node *node,
{
struct irq_domain *parent_domain, *domain;
const struct of_device_id *match;
- const struct tegra_ictlr_soc *soc;
unsigned int i;
int err;
--
2.7.4
On Tue, May 21, 2019 at 04:31:12PM -0700, Sowjanya Komatineni wrote:
> BPMP-lite still need IRQ function to finish SC7 suspend sequence for
> Tegra210.
>
> This patch has fix for leaving the COP IRQ enabled for Tegra210 during
> interrupt controller suspend operation.
>
> Signed-off-by: Sowjanya Komatineni <[email protected]>
> ---
> drivers/irqchip/irq-tegra.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c
> index 0abc0cd1c32e..1882373fa1fd 100644
> --- a/drivers/irqchip/irq-tegra.c
> +++ b/drivers/irqchip/irq-tegra.c
> @@ -53,18 +53,24 @@ static unsigned int num_ictlrs;
>
> struct tegra_ictlr_soc {
> unsigned int num_ictlrs;
> + bool has_bpmpl;
Maybe spell out "has_bpmp_lite" to avoid potential confusion.
> };
>
> +static const struct tegra_ictlr_soc *soc;
> +
Can you make this a field in struct tegra_ictlr_info to avoid having too
many global variables?
> static const struct tegra_ictlr_soc tegra20_ictlr_soc = {
> .num_ictlrs = 4,
> + .has_bpmpl = false,
> };
>
> static const struct tegra_ictlr_soc tegra30_ictlr_soc = {
> .num_ictlrs = 5,
> + .has_bpmpl = false,
> };
>
> static const struct tegra_ictlr_soc tegra210_ictlr_soc = {
> .num_ictlrs = 6,
> + .has_bpmpl = true,
> };
>
> static const struct of_device_id ictlr_matches[] = {
> @@ -157,7 +163,8 @@ static int tegra_ictlr_suspend(void)
> lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS);
>
> /* Disable COP interrupts */
> - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
> + if (!soc->has_bpmpl)
> + writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
Maybe adjust the comment to explain. It may not immediately be obvious
to anyone how BPMP-lite is related to COP.
>
> /* Disable CPU interrupts */
> writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
> @@ -286,7 +293,6 @@ static int __init tegra_ictlr_init(struct device_node *node,
> {
> struct irq_domain *parent_domain, *domain;
> const struct of_device_id *match;
> - const struct tegra_ictlr_soc *soc;
As mentioned above, perhaps keep this here and assign this to lic->soc
later on so that we have only a single global variable.
Thierry
> unsigned int i;
> int err;
>
> --
> 2.7.4
>
On Tue, May 21, 2019 at 04:31:11PM -0700, Sowjanya Komatineni wrote:
> This patch series includes Tegra210 deepsleep or LP0 support with
> deep sleep exit through RTC alarm wake and power button wake events.
There doesn't seem to be support for waking up from a power button
press. Is that in a patch that you didn't send out yet, or are you still
working on that?
The recipient list on this is very trimmed. I'm not sure if this was on
purpose. I'm fine if you want to keep it that way until things settle
down a bit, but eventually the subsystem maintainers will need to see
these, so make sure to Cc them when you think the patches are ready.
Thierry
>
> This series also includes save and restore of PLLs, clocks, OSC contexts
> for basic LP0 exit.
>
> This patch series is doesn't support for 100% suspend/resume to fully
> functional state and we are working on some more drivers suspend and
> resume implementations.
>
> Sowjanya Komatineni (12):
> irqchip: tegra: do not disable COP IRQ during suspend
> pinctrl: tegra: add suspend and resume support
> clk: tegra: save and restore PLLs state for system
> clk: tegra: add support for peripheral clock suspend and resume
> clk: tegra: add support for OSC clock resume
> clk: tegra: add suspend resume support for DFLL clock
> clk: tegra: support for Tegra210 clocks suspend-resume
> soc/tegra: pmc: allow support for more tegra wake models
> soc/tegra: pmc: add pmc wake support for tegra210
> gpio: tegra: implement wake event support for Tegra210 and prior GPIO
> soc/tegra: pmc: configure tegra deep sleep control settings
> arm64: tegra: enable wake from deep sleep on RTC alarm.
>
> arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 7 +
> arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 +-
> drivers/clk/tegra/clk-dfll.c | 82 ++++++
> drivers/clk/tegra/clk-dfll.h | 2 +
> drivers/clk/tegra/clk-divider.c | 19 ++
> drivers/clk/tegra/clk-pll-out.c | 25 ++
> drivers/clk/tegra/clk-pll.c | 220 ++++++++++++--
> drivers/clk/tegra/clk-tegra-fixed.c | 15 +
> drivers/clk/tegra/clk-tegra210.c | 382 +++++++++++++++++++++++++
> drivers/clk/tegra/clk.c | 74 ++++-
> drivers/clk/tegra/clk.h | 18 ++
> drivers/gpio/gpio-tegra.c | 109 ++++++-
> drivers/irqchip/irq-tegra.c | 10 +-
> drivers/pinctrl/tegra/pinctrl-tegra.c | 68 ++++-
> drivers/pinctrl/tegra/pinctrl-tegra.h | 3 +
> drivers/pinctrl/tegra/pinctrl-tegra114.c | 1 +
> drivers/pinctrl/tegra/pinctrl-tegra124.c | 1 +
> drivers/pinctrl/tegra/pinctrl-tegra20.c | 1 +
> drivers/pinctrl/tegra/pinctrl-tegra210.c | 1 +
> drivers/pinctrl/tegra/pinctrl-tegra30.c | 1 +
> drivers/soc/tegra/pmc.c | 159 +++++++++-
> 21 files changed, 1167 insertions(+), 36 deletions(-)
>
> --
> 2.7.4
>