summaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/patches-6.1/421-firmware-qcom-scm-disable-SDI-on-Google-WiFi.patch
blob: ff788c5c56609819c9c5d0717aa37f52aaab903c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From a658ad57c2b9d46eb5395c7bb8cf83b8e0f289e7 Mon Sep 17 00:00:00 2001
From: Brian Norris <computersforpeace@gmail.com>
Date: Fri, 28 Jul 2023 12:02:19 +0200
Subject: [PATCH 2/3] firmware: qcom: scm: disable SDI on Google WiFi

Google WiFi seems to have SDI (Secure Debug Image) enabled by default which
prevents normal reboot from working causing the board to just hang after
reboot is called.

So lets disable SDI during SCM probe on Google WiFi boards in order to
avoid a state where WDT will kick in and then the board will just hang
in the debug mode.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/firmware/qcom_scm.c | 7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -1435,6 +1435,13 @@ static int qcom_scm_probe(struct platfor
 	if (download_mode)
 		qcom_scm_set_download_mode(true);
 
+	/*
+	 * Factory firmware leaves SDI (a debug interface), which prevents
+	 * clean reboot.
+	 */
+	if (of_machine_is_compatible("google,wifi"))
+		qcom_scm_disable_sdi();
+
 	return 0;
 }