Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions meta-mchp-mpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Collection of OpenEmbedded/Yocto Project layers for MPU SoC.
| **SAMA5D2** | sama5d2-icp-sd | N/A | N/A |
| | sama5d2-ptc-ek-sd | sama5d2-ptc-ek | N/A |
| | sama5d2-xplained-sd | sama5d2-xplained | sama5d2-xplained-emmc |
| | sama5d2-xplained-optee-sd | N/A | N/A |
| **SAMA5D27** | sama5d27-som1-ek-sd | N/A | N/A |
| | sama5d27-som1-ek-optee-sd | N/A | N/A |
| | sama5d27-wlsom1-ek-sd | N/A | N/A |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Microchip supported machines are:
| **SAMA5D2** | sama5d2-icp-sd | N/A | N/A |
| | sama5d2-ptc-ek-sd | sama5d2-ptc-ek | N/A |
| | sama5d2-xplained-sd | sama5d2-xplained | sama5d2-xplained-emmc |
| | sama5d2-xplained-optee-sd | N/A | N/A |
| **SAMA5D27** | sama5d27-som1-ek-sd | N/A | N/A |
| | sama5d27-som1-ek-optee-sd | N/A | N/A |
| | sama5d27-wlsom1-ek-sd | N/A | N/A |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ RDEPENDS:packagegroup-mchp-security:append:sama5d27-som1-ek-optee-sd = "\
optee-os \
optee-test \
"

RDEPENDS:packagegroup-mchp-security:append:sama5d2-xplained-optee-sd = "\
optee-examples \
optee-os \
optee-test \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#@TYPE: Machine
#@Name: MICROCHIP SAMA5D2 Xplained SD
#@DESCRIPTION: Machine configuration for Microchip SAMA5D2 xplained sd board

require include/sama5d2.inc

KERNEL_DEVICETREE = "microchip/at91-sama5d2_xplained.dtb"
DT_MACHINE ?= "sama5d2_xplained"

IMAGE_FSTYPES += " tar.gz wic"

WKS_FILE = "sdimage-bootpart.wks"
IMAGE_BOOT_FILES = "BOOT.BIN u-boot.bin uboot.env sama5d2_xplained.itb tee.bin"

UBOOT_MACHINE ?= "sama5d2_xplained_mmc_optee_defconfig"
UBOOT_ENTRYPOINT = "0x24000000"
UBOOT_LOADADDRESS = "0x24000000"
UBOOT_ENV_SIZE = "0x1000"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " dt-overlay-mchp"

# Add deploy functions to the wic image dependency
do_image_wic[depends] += " u-boot-mchp:do_deploy"
do_image_wic[depends] += " dt-overlay-mchp:do_deploy"

MACHINEOVERRIDES =. "mpuall:sama5d2_xplained:"
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ AT91BOOTSTRAP_CONFIG:sama5d4-xplained ??= "${AT91BOOTSTRAP_MACHINE}nf_uboot_secu
AT91BOOTSTRAP_CONFIG:sama5d4-xplained-sd ??= "${AT91BOOTSTRAP_MACHINE}sd_uboot_secure"
AT91BOOTSTRAP_CONFIG:sama5d2-xplained ??= "${AT91BOOTSTRAP_MACHINE}-bsrdf_uboot"
AT91BOOTSTRAP_CONFIG:sama5d2-xplained-emmc ??= "${AT91BOOTSTRAP_MACHINE}emmc_uboot"
AT91BOOTSTRAP_CONFIG:sama5d2-xplained-optee-sd ??= "${AT91BOOTSTRAP_MACHINE}-opteesd_uboot"
AT91BOOTSTRAP_CONFIG:sama5d2-xplained-sd ??= "${AT91BOOTSTRAP_MACHINE}-bsrsd_uboot"
AT91BOOTSTRAP_CONFIG:sama5d2-ptc-ek-sd ??= "${AT91BOOTSTRAP_MACHINE}sd_uboot"
AT91BOOTSTRAP_CONFIG:sama5d27-som1-ek ??= "${AT91BOOTSTRAP_MACHINE}qspi_uboot"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 2a2ffef78fd7c0f13819d3f6e50c26688cc4a1d3 Mon Sep 17 00:00:00 2001
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Date: Wed, 8 Apr 2026 16:12:33 +0200
Subject: [PATCH] ARM: dts: at91: sama5d2_xplained: Fix memory when OP-TEE is
used

The RAM mapping is overridden by sama5d2-optee.dtsi, as the first 32MB
are reserved for OP-TEE. But the RAM size specified in the dtsi is
incorrect for sama5d2_xplained, so we have to set it back to correct
values.

Upstream-Status: [Submitted https://github.com/linux4microchip/u-boot-mchp/pull/3]
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
arch/arm/dts/at91-sama5d2_xplained.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/at91-sama5d2_xplained.dts b/arch/arm/dts/at91-sama5d2_xplained.dts
index 265d2d87afce..9bc0a3c7428b 100644
--- a/arch/arm/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/dts/at91-sama5d2_xplained.dts
@@ -16,7 +16,11 @@
};

memory {
+#ifdef CONFIG_CLK_SCMI
+ reg = <0x22000000 0x1E000000>;
+#else
reg = <0x20000000 0x20000000>;
+#endif
};

clocks {
--
2.47.3

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
video_mode_pda4=Unknown-1:480x272-16
video_mode_pda5=Unknown-1:800x480-16
video_mode_pda7=Unknown-1:800x480-16
video_mode_pda7b=Unknown-1:800x480-16
at91_pda_detect=run pda4300test; run pda7000test; run pda7000btest; run pda5000test; run pda4301test; run pda4301btest;
pda7000btest=test -n $display && test $display = 7000B && setenv display_var 'pda7b' && setenv video_mode ${video_mode_pda7b}
at91_set_display=test -n $pda && setenv display $pda
pda4300test=test -n $display && test $display = 4300 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
pda4301test=test -n $display && test $display = 4301 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
pda4301btest=test -n $display && test $display = 4301B && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
at91_prepare_bootargs=test -n $display_var && setenv bootargs ${bootargs} ${at91_video_bootargs}
at91_prepare_video_bootargs=test -n $display_var && setenv at91_video_bootargs video=${video_mode}
pda7000test=test -n $display && test $display = 7000 && setenv display_var 'pda7' && setenv video_mode ${video_mode_pda7}
at91_prepare_overlays_config=test -n $display_var && setenv at91_overlays_config '#'${display_var}
bootcmd=run at91_set_display; run at91_pda_detect; run at91_prepare_video_bootargs; run at91_prepare_bootargs; run at91_prepare_overlays_config; run bootcmd_boot;
pda5000test=test -n $display && test $display = 5000 && setenv display_var 'pda5' && setenv video_mode ${video_mode_pda5}
bootargs=console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait atmel.pm_modes=standby,ulp1
bootcmd_boot=fatload mmc 1:1 0x24000000 sama5d2_xplained.itb; bootm 0x24000000#kernel_dtb${at91_overlays_config}
bootdelay=1
ethact=gmac0
stderr=serial
stdin=serial
stdout=serial
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SRC_URI:append:sama5d2-xplained-optee-sd = " file://0001-ARM-dts-at91-sama5d2_xplained-Fix-memory-when-OP-TEE.patch"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_ARM_PSCI=y
CONFIG_ARM_PSCI_FW=y
CONFIG_HAVE_ARM_SMCCC=y
CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
CONFIG_ARM_SMCCC_SOC_ID=y
CONFIG_REGMAP_SMCCC=y
CONFIG_MAILBOX=y
CONFIG_ARM_SCMI_PROTOCOL=y
# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
CONFIG_COMMON_CLK_SCMI=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_PSCI_CPUIDLE=y
# CONFIG_ARM_PSCI_CPUIDLE_DOMAIN is not set
# CONFIG_ARM_AT91_CPUIDLE is not set
# CONFIG_ATMEL_PM is not set
CONFIG_ATMEL_SECURE_PM=y
# CONFIG_HW_RANDOM_ATMEL is not set
CONFIG_HW_RANDOM_OPTEE=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_AT91_SAMA5D2_UART0=y
CONFIG_EARLY_PRINTK=y
# CONFIG_SAMA5D4_WATCHDOG is not set
CONFIG_ARM_SMC_WATCHDOG=y
# CONFIG_RTC_DRV_AT91RM9200 is not set
CONFIG_RTC_DRV_OPTEE=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 87454ffaf249476c849dbb2fc5ae9b637ff7d7ba Mon Sep 17 00:00:00 2001
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Date: Tue, 24 Mar 2026 10:13:45 +0100
Subject: [PATCH] at91-sama5d2_xplained: include optee dtsi

Upstream-Status: Inappropriate [only specific to optee configuration]
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
index 5389f203eebe..7f6ac2256348 100644
--- a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
@@ -8,6 +8,7 @@
/dts-v1/;
#include "sama5d2.dtsi"
#include "sama5d2-pinfunc.h"
+#include "sama5d2-optee.dtsi"
#include <dt-bindings/mfd/atmel-flexcom.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
--
2.47.3

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_ARM_PSCI=y
CONFIG_ARM_PSCI_FW=y
CONFIG_HAVE_ARM_SMCCC=y
CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
CONFIG_ARM_SMCCC_SOC_ID=y
CONFIG_REGMAP_SMCCC=y
CONFIG_MAILBOX=y
CONFIG_ARM_SCMI_PROTOCOL=y
# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
CONFIG_COMMON_CLK_SCMI=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_PSCI_CPUIDLE=y
# CONFIG_ARM_PSCI_CPUIDLE_DOMAIN is not set
# CONFIG_ARM_AT91_CPUIDLE is not set
# CONFIG_ATMEL_PM is not set
CONFIG_ATMEL_SECURE_PM=y
# CONFIG_HW_RANDOM_ATMEL is not set
CONFIG_HW_RANDOM_OPTEE=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_AT91_SAMA5D2_UART0=y
CONFIG_EARLY_PRINTK=y
# CONFIG_SAMA5D4_WATCHDOG is not set
CONFIG_ARM_SMC_WATCHDOG=y
# CONFIG_RTC_DRV_AT91RM9200 is not set
CONFIG_RTC_DRV_OPTEE=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 00639b33c3cf473f2542d9398c220db23622de3c Mon Sep 17 00:00:00 2001
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Date: Tue, 24 Mar 2026 10:13:45 +0100
Subject: [PATCH 1/2] at91-sama5d2_xplained: include optee dtsi

Upstream-Status: Inappropriate [only specific to optee configuration]
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
index 0c8f9b4357cb..bc858176884d 100644
--- a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
@@ -8,6 +8,7 @@
/dts-v1/;
#include "sama5d2.dtsi"
#include "sama5d2-pinfunc.h"
+#include "sama5d2-optee.dtsi"
#include <dt-bindings/mfd/atmel-flexcom.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
--
2.47.3

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_ARM_PSCI=y
CONFIG_ARM_PSCI_FW=y
CONFIG_HAVE_ARM_SMCCC=y
CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
CONFIG_ARM_SMCCC_SOC_ID=y
CONFIG_REGMAP_SMCCC=y
CONFIG_MAILBOX=y
CONFIG_ARM_SCMI_PROTOCOL=y
# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
CONFIG_COMMON_CLK_SCMI=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_PSCI_CPUIDLE=y
# CONFIG_ARM_PSCI_CPUIDLE_DOMAIN is not set
# CONFIG_ARM_AT91_CPUIDLE is not set
# CONFIG_ATMEL_PM is not set
CONFIG_ATMEL_SECURE_PM=y
# CONFIG_HW_RANDOM_ATMEL is not set
CONFIG_HW_RANDOM_OPTEE=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_AT91_SAMA5D2_UART0=y
CONFIG_EARLY_PRINTK=y
# CONFIG_SAMA5D4_WATCHDOG is not set
CONFIG_ARM_SMC_WATCHDOG=y
# CONFIG_RTC_DRV_AT91RM9200 is not set
CONFIG_RTC_DRV_OPTEE=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 24d5c07a1108bec6d10f193b51b1393f77eb8ef1 Mon Sep 17 00:00:00 2001
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Date: Tue, 24 Mar 2026 10:13:45 +0100
Subject: [PATCH] at91-sama5d2_xplained: include optee dtsi

Upstream-Status: Inappropriate [only specific to optee configuration]
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
index a651be749291..1ab76ce98e8b 100644
--- a/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama5d2_xplained.dts
@@ -8,6 +8,7 @@
/dts-v1/;
#include "sama5d2.dtsi"
#include "sama5d2-pinfunc.h"
+#include "sama5d2-optee.dtsi"
#include <dt-bindings/mfd/atmel-flexcom.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
--
2.47.3

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ SRC_URI:append:\
sama5d27-som1-ek-optee-sd = " file://sama5-linux-optee.cfg \
file://sama5d2/0001-dts-include-optee-dtsi.patch \
"
SRC_URI:append:\
sama5d2-xplained-optee-sd = " file://sama5-linux-optee.cfg \
file://0001-at91-sama5d2_xplained-include-optee-dtsi.patch \
"
SRC_URI:append:sam9x60 = " file://at91_dt.cfg"
SRC_URI:append:\
sama7g5ek-optee-sd = " file://sama7g5ek-linux-optee.cfg \
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMPATIBLE_MACHINE:append = " |sama5d27-som1-ek-optee-sd|sama7g5ek-optee-sd"
COMPATIBLE_MACHINE:append = " |sama5d27-som1-ek-optee-sd|sama7g5ek-optee-sd|sama5d2-xplained-optee-sd"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
OPTEE_MCHP_VERSION = ""
OPTEE_MCHP_VERSION:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama7g5ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama5d2-xplained-optee-sd = "${BPN}-mchp-version.inc"

require ${OPTEE_MCHP_VERSION}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
OPTEE_MCHP_VERSION = ""
OPTEE_MCHP_VERSION:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama7g5ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama5d2-xplained-optee-sd = "${BPN}-mchp-version.inc"

require ${OPTEE_MCHP_VERSION}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ OPTEE_SYMLINK ?= "tee-${MACHINE}.${OPTEE_SUFFIX}"

OPTEE_PLATFORM_FLAVOR:sama5d27-som1-ek-optee-sd ??="sama5d27_som1_ek"
OPTEE_PLATFORM_FLAVOR:sama7g5ek-optee-sd ??="sama7g54_ek"
OPTEE_PLATFORM_FLAVOR:sama5d2-xplained-optee-sd ??="sama5d2_xplained"

EXTRA_OEMAKE += " PLATFORM_FLAVOR=${OPTEE_PLATFORM_FLAVOR} \
CFG_NVMEM_HUK=n \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
OPTEE_MCHP_VERSION = ""
OPTEE_MCHP_VERSION:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama7g5ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama5d2-xplained-optee-sd = "${BPN}-mchp-version.inc"

require ${OPTEE_MCHP_VERSION}

OPTEE_MCHP_OVERRIDES = ""
OPTEE_MCHP_OVERRIDES:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-overrides.inc"
OPTEE_MCHP_OVERRIDES:sama7g5ek-optee-sd = "${BPN}-mchp-overrides.inc"
OPTEE_MCHP_OVERRIDES:sama5d2-xplained-optee-sd = "${BPN}-mchp-overrides.inc"

require ${OPTEE_MCHP_OVERRIDES}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
OPTEE_MCHP_VERSION = ""
OPTEE_MCHP_VERSION:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama7g5ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama5d2-xplained-optee-sd = "${BPN}-mchp-version.inc"

require ${OPTEE_MCHP_VERSION}

OPTEE_MCHP_OVERRIDES = ""
OPTEE_MCHP_OVERRIDES:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-overrides.inc"
OPTEE_MCHP_OVERRIDES:sama7g5ek-optee-sd = "${BPN}-mchp-overrides.inc"
OPTEE_MCHP_OVERRIDES:sama5d2-xplained-optee-sd = "${BPN}-mchp-overrides.inc"

require ${OPTEE_MCHP_OVERRIDES}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
OPTEE_MCHP_VERSION = ""
OPTEE_MCHP_VERSION:sama5d27-som1-ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama7g5ek-optee-sd = "${BPN}-mchp-version.inc"
OPTEE_MCHP_VERSION:sama5d2-xplained-optee-sd = "${BPN}-mchp-version.inc"

require ${OPTEE_MCHP_VERSION}