iMx6Q sata register access.. thoughts?

cancel
Showing results for 
Search instead for 
Did you mean: 

iMx6Q sata register access.. thoughts?

Jump to solution
390 Views
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

Labels (2)
0 Kudos
1 Solution
277 Views
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

View solution in original post

0 Kudos
4 Replies
277 Views
igorpadykov
NXP TechSupport
NXP TechSupport

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!

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

277 Views
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 Kudos
277 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi John

I think you can try SDK SATA example

with jtag (step by step) and check.

Best regards

chip

278 Views
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 Kudos