Skip to content

Commit

Permalink
sync with lx2160a_build / enable optee-os in linux
Browse files Browse the repository at this point in the history
Note "optee" must be explicitly added to DISTRO_FEATURES from loca.conf
since fsl-qoriq distro does not include it.
  • Loading branch information
Josua-SR committed Oct 27, 2024
1 parent 16d94c1 commit 38518cc
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From f8f241b35f9ac202f20019bfbefed3d2bb5f1d30 Mon Sep 17 00:00:00 2001
From: Josua Mayer <[email protected]>
Date: Sun, 27 Oct 2024 14:21:17 +0100
Subject: [PATCH 09/10] arm64: dts: lx2160a-cex6: enable optee-os

Signed-off-by: Josua Mayer <[email protected]>
---
.../boot/dts/freescale/fsl-lx2160a-cex6.dtsi | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex6.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex6.dtsi
index 1d97a25bc57f..c3174f0cab38 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex6.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex6.dtsi
@@ -4,6 +4,35 @@
//
// Copyright 2024 SolidRun Ltd.

+/ {
+ firmware {
+ /*
+ * This is counter-intuitive:
+ *
+ * U-Boot by default patches OS DTB adding /firmware/optee,
+ * and updates /reserved-memory/optee.
+ *
+ * When OS DTB already has /firmware/optee node however,
+ * U-Boot does nothing.
+ *
+ * Enable optee by deleting the /firmware/optee node.
+ */
+ /delete-node/ optee;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ optee@fc000000 {
+ reg = <0x00 0xfc000000 0x00 0x04000000>;
+ alignment = <0x200000>;
+ no-map;
+ };
+ };
+};
+
&crypto {
status = "okay";
};
--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 228a56145ce06aa5e491c4579f59cd6c7e1107b1 Mon Sep 17 00:00:00 2001
From: Josua Mayer <[email protected]>
Date: Sun, 27 Oct 2024 14:22:50 +0100
Subject: [PATCH 10/10] arm64: dts: lx2160a-cex7: enable optee-os

Signed-off-by: Josua Mayer <[email protected]>
---
.../boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
index feb6d02494df..024a119bcb7a 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
@@ -16,6 +16,33 @@ aliases {
crypto = &crypto;
};

+ firmware {
+ /*
+ * This is counter-intuitive:
+ *
+ * U-Boot by default patches OS DTB adding /firmware/optee,
+ * and updates /reserved-memory/optee.
+ *
+ * When OS DTB already has /firmware/optee node however,
+ * U-Boot does nothing.
+ *
+ * Enable optee by deleting the /firmware/optee node.
+ */
+ /delete-node/ optee;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ optee@fc000000 {
+ reg = <0x00 0xfc000000 0x00 0x04000000>;
+ alignment = <0x200000>;
+ no-map;
+ };
+ };
+
sb_3v3: regulator-sb3v3 {
compatible = "regulator-fixed";
regulator-name = "RT7290";
--
2.43.0

2 changes: 2 additions & 0 deletions recipes-kernel/linux/linux-qoriq_5.15.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ SRC_URI += "file://0001-arm64-dts-lx2160a-cex7-add-gpio-hog-for-fan-controll.pat
file://0006-arm64-dts-lx2160a-clearfog-itx-enable-pcie-nodes-for.patch \
file://0007-arm64-dts-lx2160a-extend-32-bit-and-add-64-bit-pci-r.patch \
file://0008-arm64-dts-lx2160a-cex6-evb-update-spi-bus-descriptio.patch \
file://0009-arm64-dts-lx2160a-cex6-enable-optee-os.patch \
file://0010-arm64-dts-lx2160a-cex7-enable-optee-os.patch \
"

# Enable non-default kernel configs
Expand Down

0 comments on commit 38518cc

Please sign in to comment.