ipq40xx: 6.1: adapt and refresh patches
[openwrt/staging/jow.git] / target / linux / ipq40xx / patches-6.1 / 421-firmware-qcom-scm-disable-SDI-on-Google-WiFi.patch
1 From a658ad57c2b9d46eb5395c7bb8cf83b8e0f289e7 Mon Sep 17 00:00:00 2001
2 From: Brian Norris <computersforpeace@gmail.com>
3 Date: Fri, 28 Jul 2023 12:02:19 +0200
4 Subject: [PATCH 2/3] firmware: qcom: scm: disable SDI on Google WiFi
5
6 Google WiFi seems to have SDI (Secure Debug Image) enabled by default which
7 prevents normal reboot from working causing the board to just hang after
8 reboot is called.
9
10 So lets disable SDI during SCM probe on Google WiFi boards in order to
11 avoid a state where WDT will kick in and then the board will just hang
12 in the debug mode.
13
14 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
15 ---
16 drivers/firmware/qcom_scm.c | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19 --- a/drivers/firmware/qcom_scm.c
20 +++ b/drivers/firmware/qcom_scm.c
21 @@ -1435,6 +1435,13 @@ static int qcom_scm_probe(struct platfor
22 if (download_mode)
23 qcom_scm_set_download_mode(true);
24
25 + /*
26 + * Factory firmware leaves SDI (a debug interface), which prevents
27 + * clean reboot.
28 + */
29 + if (of_machine_is_compatible("google,wifi"))
30 + qcom_scm_disable_sdi();
31 +
32 return 0;
33 }
34