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.

[参考译文] AM6412:从 Linux 读取/写入扩展 OTP

Guru**** 2482225 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1440681/am6412-read-write-to-extended-otp-from-linux

器件型号:AM6412

工具与软件:

尊敬的 TI 专家:
我们想利用扩展 OTP 来存储 MAC 地址。 我们找到了用于其他目的处理 TISCI 消息的 Linux 驱动程序(ti_sci)、并且我们扩展了该驱动程序以添加 OTP 消息(读取/写入/锁定/状态)。 我们创建了另一个内核驱动程序、该驱动程序利用新的 OTP 消息并为用户空间提供一个接口。  
我们还更新了 u-boot sec-cfg.yaml (otp_config)、以将 write_host_id 和 host_id 设置为12、以匹配 Linux host_id. 此外、host_perms 也设置为2。  
        otp_config:
                subhdr:
                        magic: 0x4081
                        size: 69
                write_host_id : 12
                otp_entry:
                        - #1
                                host_id: 12
                                host_perms: 2
                        - #2
                                host_id: 12
                                host_perms: 2
                        - #3
                                host_id: 12
                                host_perms: 2
                        - #4
                                host_id: 12
                                host_perms: 2
                                ....
我们遇到的问题是、我们对 OTP 消息获得了 NAK 响应或无响应。 消息似乎可以通过邮箱传输、并且进行了回调、但响应标志全为0 ((flags = 0x00000000)。
1.是否存在与方法相关的任何潜在问题?  我们没有计划存储对扩展 OTP 敏感的任何内容。
2.导致 NAK 的问题可能是什么? 我们如何确认/检查器件上的电路板安全配置是否正确?
3.您的建议将如何推进?
Anh-Tuan