From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Jul 2022 14:04:59 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oFwpX-0035nf-TV for lore@lore.pengutronix.de; Mon, 25 Jul 2022 14:04:59 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oFwpV-0000OR-Cw; Mon, 25 Jul 2022 14:04:57 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFwpN-0000IP-0J; Mon, 25 Jul 2022 14:04:49 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oFwpM-0036bV-6h; Mon, 25 Jul 2022 14:04:48 +0200 Received: from afa by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oFwpK-005R6a-S2; Mon, 25 Jul 2022 14:04:46 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Mon, 25 Jul 2022 14:04:39 +0200 Message-Id: <20220725120445.1295669-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725120445.1295669-1-a.fatoum@pengutronix.de> References: <20220725120445.1295669-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 2/8] v7a: tf-a: update to v2.7 X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false We need at least v2.6 for FIP support, but there's a freshly released v2.7, so lets use that. This unfortunately means we need to carry a patch for the MC-1 because upstream broke it. To ensure the legacy image works for now, we need to set a new build option, but that will be removed soon enough with the switch to FIP. Signed-off-by: Ahmad Fatoum --- ...s-stm32mp1-align-DDR-regulators-with.patch | 105 ++++++++++++++++++ configs/platform-v7a/patches/tf-a-v2.7/series | 1 + configs/platform-v7a/platformconfig | 6 +- 3 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 configs/platform-v7a/patches/tf-a-v2.7/0001-fix-stm32mp1-fdts-stm32mp1-align-DDR-regulators-with.patch create mode 100644 configs/platform-v7a/patches/tf-a-v2.7/series diff --git a/configs/platform-v7a/patches/tf-a-v2.7/0001-fix-stm32mp1-fdts-stm32mp1-align-DDR-regulators-with.patch b/configs/platform-v7a/patches/tf-a-v2.7/0001-fix-stm32mp1-fdts-stm32mp1-align-DDR-regulators-with.patch new file mode 100644 index 000000000000..43777831b2cc --- /dev/null +++ b/configs/platform-v7a/patches/tf-a-v2.7/0001-fix-stm32mp1-fdts-stm32mp1-align-DDR-regulators-with.patch @@ -0,0 +1,105 @@ +From 9746daccb7611411a38169f20413ea8445310431 Mon Sep 17 00:00:00 2001 +From: Ahmad Fatoum +Date: Thu, 2 Jun 2022 06:28:31 +0200 +Subject: [PATCH] fix(stm32mp1): fdts: stm32mp1: align DDR regulators with new + driver + +With recent changes, TF-A now panics on LXA MC1, Avernger96 and Odyssey: + + NOTICE: CPU: STM32MP157C?? Rev.B + NOTICE: Model: Linux Automation MC-1 board + ERROR: regul ldo3: max value 750 is invalid + PANIC at PC : 0x2ffeebb7 + +as the driver takes great offense at the content of the device +tree. The parts in question were copy-pasted from ST DTs, but those +ST DTs were fixed by commit 67d95409baae +("refactor(stm32mp1-fdts): update regulator description"). + +Fix the breakage by transplanting the same changes into all STM32MP1 DTs. + +Fixes: bba9fdee589f ("feat(stm32mp1): add regulator framework compilation") +Change-Id: I143d0091625f62c313b3b71449c9ad99583d01c8 +Signed-off-by: Ahmad Fatoum +Origin: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/15370 +--- + fdts/stm32mp157a-avenger96.dts | 4 +--- + fdts/stm32mp157c-odyssey-som.dtsi | 4 +--- + fdts/stm32mp15xx-osd32.dtsi | 4 +--- + 3 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/fdts/stm32mp157a-avenger96.dts b/fdts/stm32mp157a-avenger96.dts +index b967736e4786..6ae97c7581d1 100644 +--- a/fdts/stm32mp157a-avenger96.dts ++++ b/fdts/stm32mp157a-avenger96.dts +@@ -115,10 +115,9 @@ + + vtt_ddr: ldo3 { + regulator-name = "vtt_ddr"; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <750000>; + regulator-always-on; + regulator-over-current-protection; ++ st,regulator-sink-source; + }; + + vdd_usb: ldo4 { +@@ -143,7 +142,6 @@ + vref_ddr: vref_ddr { + regulator-name = "vref_ddr"; + regulator-always-on; +- regulator-over-current-protection; + }; + + bst_out: boost { +diff --git a/fdts/stm32mp157c-odyssey-som.dtsi b/fdts/stm32mp157c-odyssey-som.dtsi +index 6bed33968f73..c4e13985a3f7 100644 +--- a/fdts/stm32mp157c-odyssey-som.dtsi ++++ b/fdts/stm32mp157c-odyssey-som.dtsi +@@ -140,10 +140,9 @@ + + vtt_ddr: ldo3 { + regulator-name = "vtt_ddr"; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <750000>; + regulator-always-on; + regulator-over-current-protection; ++ st,regulator-sink-source; + }; + + vdd_usb: ldo4 { +@@ -170,7 +169,6 @@ + vref_ddr: vref_ddr { + regulator-name = "vref_ddr"; + regulator-always-on; +- regulator-over-current-protection; + }; + + bst_out: boost { +diff --git a/fdts/stm32mp15xx-osd32.dtsi b/fdts/stm32mp15xx-osd32.dtsi +index 76a25613a14d..ca672356293c 100644 +--- a/fdts/stm32mp15xx-osd32.dtsi ++++ b/fdts/stm32mp15xx-osd32.dtsi +@@ -81,10 +81,9 @@ + + vtt_ddr: ldo3 { + regulator-name = "vtt_ddr"; +- regulator-min-microvolt = <500000>; +- regulator-max-microvolt = <750000>; + regulator-always-on; + regulator-over-current-protection; ++ st,regulator-sink-source; + }; + + vdd_usb: ldo4 { +@@ -110,7 +109,6 @@ + vref_ddr: vref_ddr { + regulator-name = "vref_ddr"; + regulator-always-on; +- regulator-over-current-protection; + }; + + bst_out: boost { +-- +2.30.2 + diff --git a/configs/platform-v7a/patches/tf-a-v2.7/series b/configs/platform-v7a/patches/tf-a-v2.7/series new file mode 100644 index 000000000000..79c39b07430a --- /dev/null +++ b/configs/platform-v7a/patches/tf-a-v2.7/series @@ -0,0 +1 @@ +0001-fix-stm32mp1-fdts-stm32mp1-align-DDR-regulators-with.patch diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig index c6de5a6397d7..640302b78895 100644 --- a/configs/platform-v7a/platformconfig +++ b/configs/platform-v7a/platformconfig @@ -197,14 +197,14 @@ PTXCONF_BOOTLOADER=y # PTXCONF_OPTEE is not set PTXCONF_TF_A=y PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot" -PTXCONF_TF_A_VERSION="v2.5" -PTXCONF_TF_A_MD5="465555f290f7bb785a3471d704ca33da" +PTXCONF_TF_A_VERSION="v2.7" +PTXCONF_TF_A_MD5="1d609ceb2bc01d650366118c58ca7336" PTXCONF_TF_A_ARCH_STRING="aarch32" PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y # PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set PTXCONF_TF_A_ARM_ARCH_MAJOR=7 PTXCONF_TF_A_PLATFORMS="stm32mp1" -PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1" +PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1 STM32MP_USE_STM32IMAGE=1" PTXCONF_TF_A_ARTIFACTS="tf-a-*.stm32" # -- 2.30.2