2019-10-10 08:24:32

by Jianxin Pan

[permalink] [raw]
Subject: [PATCH RESEND v2 0/4] arm64: meson: add support for A1 Power Domains

This patchset introduces a "Secure Power Doamin Controller". In A1/C1, power
controller registers such as PWRCTRL_FOCRSTN, PWRCTRL_PWR_OFF, PWRCTRL_MEM_PD
and PWRCTRL_ISO_EN, are in the secure domain, and should be accessed from ATF
by smc.

Changes since v1 at [0]:
- use APIs from sm driver
- rename pwrc_secure_get_power as Kevin suggested
- add comments for always on domains
- replace arch_initcall_sync with builtin_platform_driver
- fix coding style

[0] https://lore.kernel.org/linux-amlogic/[email protected]

Jianxin Pan (4):
dt-bindings: power: add Amlogic secure power domains bindings
firmware: meson_sm: Add secure power domain support
soc: amlogic: Add support for Secure power domains controller
arm64: dts: meson: a1: add secure power domain controller

.../bindings/power/amlogic,meson-sec-pwrc.yaml | 42 +++++
arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 7 +
drivers/firmware/meson/meson_sm.c | 2 +
drivers/soc/amlogic/Kconfig | 13 ++
drivers/soc/amlogic/Makefile | 1 +
drivers/soc/amlogic/meson-secure-pwrc.c | 203 +++++++++++++++++++++
include/dt-bindings/power/meson-a1-power.h | 32 ++++
include/linux/firmware/meson/meson_sm.h | 2 +
8 files changed, 302 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
create mode 100644 drivers/soc/amlogic/meson-secure-pwrc.c
create mode 100644 include/dt-bindings/power/meson-a1-power.h

--
2.7.4


2019-10-10 08:24:53

by Jianxin Pan

[permalink] [raw]
Subject: [PATCH RESEND v2 4/4] arm64: dts: meson: a1: add secure power domain controller

Enable power domain controller for Meson A1 SoC.

Signed-off-by: Jianxin Pan <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
index 7210ad0..5547913 100644
--- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
@@ -93,6 +93,13 @@
clock-names = "xtal", "pclk", "baud";
status = "disabled";
};
+
+ pwrc: power-controller {
+ compatible = "amlogic,meson-a1-pwrc";
+ #power-domain-cells = <1>;
+ secure-monitor = <&sm>;
+ status = "okay";
+ };
};

gic: interrupt-controller@ff901000 {
--
2.7.4