diff mbox series

[v3,11/13] ARM: dts: stm32mp: Add OP-TEE "/firmware" node to SPL dtb

Message ID 20211008195655.46046-12-mr.nuke.me@gmail.com
State Deferred
Delegated to: Tom Rini
Headers show
Series stm32mp1: Support falcon mode with OP-TEE payloads | expand

Commit Message

Alex G. Oct. 8, 2021, 7:56 p.m. UTC
The optee "/firmware" node is normally used to load the OP-TEE driver.
SPL does not use it this way, but instead uses it to patch the kernel
devicetree when booting OP-TEE. This seems weird, as OP-TEE -- which
would run after SPL -- is capable of patching the devicetree and
adding the required "/firmware" and "/reserved-memory" nodes.

However, OP-TEE's devicetree patching (CFG_DT=y) comes with a
significant boot time penalty. Measurements put it between 700 to 1800
milliseconds. SPL can also do this patching, without incurring a
measurable increase in boot time. This is the use case for falcon
mode, which is the main reason to launch OP-TEE from SPL.

Although some OP-TEE configurations do not require any pre-patching of
the devicetree, there are good use cases for doing so. As far as
concerns with adding the nodes twice, OP-TEE will not add the node if
it already-exists.

Add the "/firmware/optee" node the SPL devicetree.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
 arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
index 629451e731..fb60549f4d 100644
--- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
@@ -35,6 +35,7 @@ 
 		optee {
 			compatible = "linaro,optee-tz";
 			method = "smc";
+			u-boot,dm-spl;
 		};
 	};