[PATCH 0/5] Add suspend/resume support in ti_sci driver for j7200

From: Thomas Richard
Date: Wed Nov 29 2023 - 10:31:33 EST


During suspend, some devices free their irqs and request them at resume.
But there are some devices which don't do it, and assume that it's done
by the resource allocator.
On j7200, during suspend to ram the SoC is powered-off, so the allocated
irqs are lost.
With this series, ti_sci has an internal list of allocated irqs. It will
restore these irqs during its resume_noirq.

Moreover, ti_sci checks that there is at least a reserved memory region for
lpm. These regions are used by TF-A and R5 SPL during suspend and resume.
We need to reserve some memory from the linux point of view to avoid any
memory corruption.

A new compatible (ti,j7200-sci) was created for this specific behavior.

Signed-off-by: Thomas Richard <thomas.richard@xxxxxxxxxxx>
---
Thomas Richard (5):
dt-bindings: arm: keystone: add ti,j7200-sci compatible
firmware: ti_sci: add suspend/resume support for irqs
arm64: dts: ti: k3-j7200: use ti,j7200-sci compatible
firmware: ti-sci: for j7200 before suspend check the reserved memory for lpm
arm64: dts: ti: k3-j7200: add reserved memory regions for lpm

.../devicetree/bindings/arm/keystone/ti,sci.yaml | 2 +
arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 10 ++
drivers/firmware/ti_sci.c | 191 ++++++++++++++++++++-
4 files changed, 196 insertions(+), 9 deletions(-)
---
base-commit: 2041413d851e6dccd5c91321498e1d159ea432f2
change-id: 20231129-j7200-tisci-s2r-69c219c33456

Best regards,
--
Thomas Richard <thomas.richard@xxxxxxxxxxx>