This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: Inquiry Regarding MAC Address Storage on AM62x's ext_otp Region

Part Number: AM623

Tool/software:

Hi Hong

Customers now have the requirement to store and read MAC addresses in the ext_otp area of am62x. According to the instructions provided by TI_SCI and E2E, we attempted to read and write ext_otp through the TISCI command during the U-Boot stage and also used the OP-TEE in SDK10 to operate the ext_otp. However, neither method was successful in achieving the read and write operations.

During the U-Boot Stage:
• We integrated read and write operations for ext_otp within the TI_SCI driver. However, we encountered the following error message: "ti_sci system-controller@44043000: Message not acknowledged."

Using OP-TEE:
• Client-Side Operation: When attempting to operate on ext_otp through the OP-TEE client at the user level, we received an error message.

root@OK62xx:/# /run/media/boot-mmcblk1p1/fltest_otptest

write mmr

row=1 val= 0x200 mask=0x1fffe00

row=2 val= 0x0 mask=0xffff

ERR [568] TEEC:TEEC_InvokeCommand:730: TEE_IOC_INVOKE failed

fltest_otptest: TEEC_InvokeCommand(PREPARE) failed 0xffff0000 origin 0x2

• Driver-Side Operation: We also directly integrated ext_otp operations within the OP-TEE driver, which did not produce any error messages. However, the write operation did not take effect, and the read data remained the default value of 0.

                    NOTICE:  BL31: v2.8(release):fa0a23c5-dirty
                    NOTICE:  BL31: Built : 09:11:17, Nov 15 2024
                    I/TC: 
                    I/TC: OP-TEE version: 4.2.0-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) #13 Wed Nov 27 01:15:51 UTC 2024 aarch64
                    I/TC: WARNING: This OP-TEE configuration might be insecure!
                    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
                    I/TC: Primary CPU initializing
                    I/TC: GIC redistributor base address not provided
                    I/TC: Assuming default GIC group status and modifier
                    I/TC: ########init_ti_sci
                    I/TC: mmr_val is 0
                    I/TC: SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
                    I/TC: ti_sci_write_otp
                    I/TC: ###gpio_base is 9b800000
                    I/TC: row=0 val= 0x44 mask=0x1fffffc 
                    I/TC: row=1 val= 0x0 mask=0x1ff 
                    I/TC: mmrIdx: 0,rowStart: 0, rowColStart: 2, rowEnd: 1, rowColEnd: 8 
                    I/TC: ti_sci_read_otp_mmr
                    I/TC: mmr_val is 0

Our client's requirements are as follows:
Each of the two Ethernet ports on the AM62x devices should use a globally unique MAC address. One MAC address should be provided by TI, and the other needs to be batch programmed into the ext_otp region of each AM62x.
• The KeyWriter tool cannot batch program different MAC addresses into different AM62x devices. Implementing this through OP-TEE or during the kernel stage using TI_SCI to operate ext_otp would allow our production test equipment to automatically batch program different MAC addresses into different AM62x devices.
In actual use cases, the MAC address stored in the ext_otp region should be read during the U-Boot stage, placed into a register, and set as the MAC address for eth1 after the Linux system boots. The KeyWriter tool cannot achieve this functionality.
Could you please confirm if it is possible to operate on ext_otp within the Linux environment and provide guidance on how to do so?

Best regards

Ethan