IMX8MP Yocto chane memory size and disable optee

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MP Yocto chane memory size and disable optee

3,684 Views
TerryBarnaby1
Contributor V

We have designed a board based on the iMX8MP and the iMX8MP EVK. This board has similar LPDDR4 memory, just 3 GBytes rather than 6 GBytes. We are trying to bring the board up using a standard iMX8MP EVK Yocto build to start with. It is booting to u-boot but then hanging after "DRAM: ". We understand that the memory size is hardcoded so we are trying to change that but we are unsure how there does not seem to be solid info on how to do this.

We have edited the uboot include/configs/imx8mp_evk.h setting PHYS_SDRAM_SIZE, PHYS_SDRAM_2 and PHYS_SDRAM_2_SIZE:

#define PHYS_SDRAM 0x40000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2 GB */
#define PHYS_SDRAM_2 0xC0000000
#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1 GB */

And edited the uboot arch/arm/dts/imx8mp-evk.dts:

memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0 0x80000000>,
<0x1 0x00000000 0 0x40000000>;
};

Although this runs on the EVK board and reports a memory size of 3GBytes at the uboot and Linux levels, it still hangs on our prototype board. We presume that the tee.bin and maybe bl31.bin have hard coded addresses as well, reading some things.

We are happy to disable optee for now, but can't see how. The manual "i.MX Yocto Project Users Guide" states:

5.6.10 OP-TEE enablement
OP-TEE requires three components: OP-TEE OS, OP-TEE client, and OP-TEE test. In addition, the kernel and U-Boot have
configurations. The OP-TEE OS resides in the bootloader while the OP-TEE client and test reside in the rootfs.
OP-TEE is enabled by default in this release. To disable OP-TEE, go to the meta-imx/meta-bsp/conf/layer.conf file and
comment out the DISTRO_FEATURES_append for OP-TEE and uncomment the removed line.

Bit the meta-imx/meta-bsp/conf/layer.conf file has no "DISTRO_FEATURES_append for OP-TEE".

 

1. Any ideas on how we disable the Yocto optee build for the imx8mp_evk ?

2. Any ideas on what should we change in the imx8mp_evk build for 3 GBytes rather than 6 GBytes of LPDDR4 (same memory type other than size) ?

Terry

0 Kudos
Reply
6 Replies

295 Views
bgaurav1718
Contributor III

Hi,

Even I am working on modification of RAM from 6 GB to 2 GB. Can you please share the steps I need to do in order to make the modifications? 

0 Kudos
Reply

3,518 Views
adde_ado
Contributor III

Hi Terry,

Have you find any solution how to disable OP-TEE?

Does MACHINE_FEATURES_remove_imx8qxpc0mek = "optee" works for you?

Best regards,

Adde

0 Kudos
Reply

3,512 Views
TerryBarnaby1
Contributor V

Yes, I managed to remove optee. In local.conf I added:

MACHINE_FEATURES_remove += "optee"
DISTRO_FEATURES_remove += "optee"
IMAGE_INSTALL_remove += "optee-test optee-os optee-client optee-examples"

How much of the above is actually needed I'm not sure.

Note that I am creating a kernel, dtb and the raw binary boot image  (with u-boot etc), for our custom board, separately from the Yocto build. I am not sure if modifications to the Yocto built raw binary boot image would also be needed somehow as the tee.bin and its startup is provided in the start of disk binary code block.

3,506 Views
adde_ado
Contributor III

Thank you very much for the information.

Best regards,

Adde

0 Kudos
Reply

3,672 Views
TerryBarnaby1
Contributor V

Thanks for the info, I will investigate.

0 Kudos
Reply

3,674 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

1\In the conf/loca.conf add MACHINE_FEATURES_remove_imx8qxpc0mek = "optee", you can use like this.

2\ As you change the lpddr4 siz, here you need to configure the LPDDR4 script and then use the parameters generate, the script link is here https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8MPlus-m865S-DDR-Register-Programmi...

Hope this can do help for you

0 Kudos
Reply