[openwrt/openwrt] mediatek: mt7981: add reserved memory to support pstore
LEDE Commits
lede-commits at lists.infradead.org
Mon May 29 05:08:34 PDT 2023
dangole pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/5d0d04e2384ebd54d14e1f5d80ad74602f8fc17f
commit 5d0d04e2384ebd54d14e1f5d80ad74602f8fc17f
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Sun Mar 19 19:00:51 2023 +0100
mediatek: mt7981: add reserved memory to support pstore
Add reserved memory for pstore/ramoops to device tree used by Linux
as well as U-Boot.
Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
(cherry picked from commit 3eb354f999a3687f9ae547899b0f5ec2b10185ab)
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
.../patches/052-mt7981-enable-pstore.patch | 38 ++++++++++++++++++++++
.../arch/arm64/boot/dts/mediatek/mt7981.dtsi | 7 ++++
2 files changed, 45 insertions(+)
diff --git a/package/boot/uboot-mediatek/patches/052-mt7981-enable-pstore.patch b/package/boot/uboot-mediatek/patches/052-mt7981-enable-pstore.patch
new file mode 100644
index 0000000000..9bfea8f737
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/052-mt7981-enable-pstore.patch
@@ -0,0 +1,38 @@
+--- a/arch/arm/dts/mt7981.dtsi
++++ b/arch/arm/dts/mt7981.dtsi
+@@ -32,6 +32,35 @@
+ };
+ };
+
++ psci {
++ compatible = "arm,psci-0.2";
++ method = "smc";
++ };
++
++ reserved-memory {
++ #address-cells = <2>;
++ #size-cells = <2>;
++ ranges;
++
++ /* 64 KiB reserved for ramoops/pstore */
++ ramoops at 42ff0000 {
++ compatible = "ramoops";
++ reg = <0 0x42ff0000 0 0x10000>;
++ record-size = <0x1000>;
++ };
++
++ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
++ secmon_reserved: secmon at 43000000 {
++ reg = <0 0x43000000 0 0x30000>;
++ no-map;
++ };
++
++ wmcpu_emi: wmcpu-reserved at 4fc00000 {
++ no-map;
++ reg = <0 0x4fc00000 0 0x00100000>;
++ };
++ };
++
+ gpt_clk: gpt_dummy20m {
+ compatible = "fixed-clock";
+ clock-frequency = <13000000>;
diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
index 07a8c06979..17038a2484 100644
--- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
+++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi
@@ -164,6 +164,13 @@
#size-cells = <2>;
ranges;
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops at 42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ record-size = <0x1000>;
+ };
+
/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
secmon_reserved: secmon at 43000000 {
reg = <0 0x43000000 0 0x30000>;
More information about the lede-commits
mailing list