iMx6Q sata register access.. thoughts?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

iMx6Q sata register access.. thoughts?

跳至解决方案
892 次查看
johnballance
Contributor III

Hi Folks,

I have an oddity here. Bare metal system. SATA registers return NULL at all addresses. Should I be able to read the SATA registers (before any OS running, just early stages of booting)?

Is there anything that HAS to be initialised before the registers return anything? ATM I cannot see anything that has to be set, but registers always return NULL. Booting Linux confirms the HW is running. .. I need to control it BEFORE linux.

Any thoughts appreciated.  MUST be doing something silly here..

Thanks

John

标签 (2)
0 项奖励
1 解答
779 次查看
johnballance
Contributor III

Hi Chip

Thanks for the code. I couldnt use it directly, but it did help me clarify the clock requirements for the SATA unit.

For what it is worth, If the SATA o/p of ENET_pll isnt enabled, and IOMUXC_GPR13 is not set correctly, Then the SATA registers will read as 0

Thanks

John

在原帖中查看解决方案

0 项奖励
4 回复数
779 次查看
igorpadykov
NXP Employee
NXP Employee

Hi John

I would recommend to check register

CCM CCM_CCGR5 (bits 5–4 sata clock (sata_clk_enable) ).

Also one can try attached baremetal example, based on SDK

i.MX 6Series Platform SDK

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

779 次查看
johnballance
Contributor III

Hi Chip

Answer appreciated, helpful in confirming what I've done, but not the

answer.

my issue:

At very start of raw code, just loaded by sd card loader:

Yes clocks are turned on in CCGR5. (whole reg is 0xffffffff)

Then I try reading 0x022000f8 (e.g.) before any mmu is on, i.e. physical

address and I get 0x0, as with all other sata regs.

This seems illogical, I would have expected to see something other than

0 in (at least) the version register at 0x22000f8

Am I being stupid, or do I need to set something else to at least have

some sata registers to interact with?

Thanks

John

Stop press! Just announced -

Free Standard Broadband for 6 months, unlimited data, and no minimum

contract

For full details of see http://www.JustAskJB.co.uk

<http://www.justaskjb.co.uk>

Intrigued? Call me

John Ballance C.Eng MIET - jwb@rosery.net - 07976 295923

0 项奖励
779 次查看
igorpadykov
NXP Employee
NXP Employee

Hi John

I think you can try SDK SATA example

with jtag (step by step) and check.

Best regards

chip

780 次查看
johnballance
Contributor III

Hi Chip

Thanks for the code. I couldnt use it directly, but it did help me clarify the clock requirements for the SATA unit.

For what it is worth, If the SATA o/p of ENET_pll isnt enabled, and IOMUXC_GPR13 is not set correctly, Then the SATA registers will read as 0

Thanks

John

0 项奖励