devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matti Lehtimäki" <matti.lehtimaki@gmail.com>
To: linux-arm-msm@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org,
	"Matti Lehtimäki" <matti.lehtimaki@gmail.com>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node
Date: Sat, 20 May 2023 15:19:33 +0300	[thread overview]
Message-ID: <20230520121933.15533-5-matti.lehtimaki@gmail.com> (raw)
In-Reply-To: <20230520121933.15533-1-matti.lehtimaki@gmail.com>

This enables userspace to signal the bootloader to go into the
bootloader or recovery mode.

The magic values can be found in both the downstream kernel and the LK
kernel (bootloader).

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
---
Changes in v2:
  - Always enable IMEM node
  - Move reboot-mode magic numbers to platform,
    those should be always the same
---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index 8644540f5aae..284b7c666fea 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -641,6 +641,20 @@ smd-edge {
 				label = "lpass";
 			};
 		};
+
+		sram@fe805000 {
+			compatible = "qcom,msm8226-imem", "syscon", "simple-mfd";
+			reg = <0xfe805000 0x1000>;
+
+			reboot-mode {
+				compatible = "syscon-reboot-mode";
+				offset = <0x65c>;
+
+				mode-bootloader = <0x77665500>;
+				mode-normal     = <0x77665501>;
+				mode-recovery   = <0x77665502>;
+			};
+		};
 	};
 
 	timer {
-- 
2.34.1


  parent reply	other threads:[~2023-05-20 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
2023-05-20 12:19 ` [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226 Matti Lehtimäki
2023-05-20 12:19 ` [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node Matti Lehtimäki
2023-05-22 16:03   ` Luca Weiss
2023-05-20 12:19 ` [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node Matti Lehtimäki
2023-05-22 16:09   ` Luca Weiss
2023-05-20 12:19 ` Matti Lehtimäki [this message]
2023-05-22 16:11   ` [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node Luca Weiss
2023-05-25  4:54 ` (subset) [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230520121933.15533-5-matti.lehtimaki@gmail.com \
    --to=matti.lehtimaki@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).