AnsweredAssumed Answered

OCOTP write support on i.mx8m

Question asked by Richard Hu on Jul 18, 2018
Latest reply on Jun 6, 2019 by Marius Grigoras

Hello, Sir:


We'd like to burn MAC address after booting into linux system.
I check there is an ocotp node added in "fsl-imx8mq.dtsi".

    ocotp: ocotp-ctrl@30350000 {
        compatible = "fsl,imx8mq-ocotp", "fsl,imx7d-ocotp", "syscon";
        reg = <0 0x30350000 0 0x10000>;
        clocks = <&clk IMX8MQ_CLK_OCOTP_ROOT>;
        /* For nvmem subnodes */
        #address-cells = <1>;
        #size-cells = <1>;

But i check fsl_otp.c

There is no corresponding ocotp register mapping table for i.mx8m to be added.

So, i make an experiment to enable FSL_OTP driver in kernel configuration.

Symbol: FSL_OTP [=n]                                                                                                                         │
  │ Type  : tristate                                                                                                                             │
  │ Prompt: Freescale On-Chip OTP Memory Support                                                                                                 │
  │   Location:                                                                                                                                  │
  │     -> Device Drivers                                                                                                                        │
  │ (1)   -> Character devices                                                                                                                   │
  │   Defined at drivers/char/Kconfig:94                                                                                                         │
  │   Depends on: HAS_IOMEM [=y] && OF [=y]

And i use following command to burn MAC address into HW_OCOTP_MAC_ADDR1 and HW_OCOTP_MAC_ADDR0.

Then this board can only boot from serial downloand mode. (I think the fuses of boot mode are changed).
It explans the register mapping is wrong in fsl_otp.c .

My question is that fsl_otp.c doesn't support i.mx8m, why ocotp node is still added in fsl-imx8mq.dtsi?
Is there any plan to support fsl_otp.c for i.mx8m?