Detect whether running on i.MX6(UL/ULL) or i.MX7(S/D)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Detect whether running on i.MX6(UL/ULL) or i.MX7(S/D)

910件の閲覧回数
christian_mauderer
Contributor III

Hello,

I'm writing code that should run on either an i.MX7 (Solo or Dual) or an i.MX6UL/ULL. On the i.MX7, the boot loader initializes the ARM System Counter (especially enabling it in the CNTCR register). On the i.MX6 the used boot loader doesn't do that. Therefore I have to initialize the CNTCR register if it isn't already done. Now my problem: The register is located at different memory locations in the i.MX6 (0x021dc000) and i.MX7 (0x306c0000). The usual FDTs (like for example in Linux) do not provide that information.

Is there a way to detect whether I'm running on an i.MX6 or on an i.MX7?

I had a look at some of the registers accessible via ARM CP14 or CP15 like DBGDEVID or MIDR. But I haven't found one yet that is i.MX specific and where the i.MX reference manual would define a value (so I can be sure that it is still the same on a newer chip revision).

Best regards

Christian

0 件の賞賛
返信
4 返答(返信)

902件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi christian_maude

 

one can try to detect difference for example by reading fuses USB_PID,USB_VID

(description can be found in Chapter Fusemap Reference Manual) :

from ucl2.xml from mfg tool
<STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>

<STATE name="BootStrap" dev="MX7D" vid="15A2" pid="0076"/>

 

Best regards
igor

0 件の賞賛
返信

897件の閲覧回数
christian_mauderer
Contributor III

Hello Igor,

thanks for the response. But I think I would have the same problem that I don't know the registers. For reading the fuses I would have to use the OCOTP which is locatet at 0x30350000 on i.MX7 and at 0x021bc000 on i.MX6.

Beneath that the fuses could be changed, couldn't they? I forgot to mention that I work only on an OS that might have different end users.

Best regards

Christian Mauderer

0 件の賞賛
返信

890件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Christian

 

vid, pid fuses can not be changed. Also one can try to differentiate

them by ROM event ID structures described in

AN12853 i.MX ROMs Log Events

 

Best regards
igor

 

 

0 件の賞賛
返信

883件の閲覧回数
christian_mauderer
Contributor III

Hello Igor,

thanks for the additional information. So the VID and PID would be a good to detect a chip if I find some register location independent way to access them. I think that last part can be a bit difficult.

Best regards

Christian

0 件の賞賛
返信