Hello
Im using IMX6QAI board.
I want to turn on the debugging LED (D9).
The register is DISP0_DAT21. and use this as GPIO5_IO15 (ALT5)
Not, C code.
I want to use it in lowlevel_init.S in u-boot as an assembly code.
Do u have any idea for that ?
please help me.
Solved! Go to Solution.
Hi kim
syntax for writing to register is given in lowlevel_init.S as:
ldr r0, =AIPS2_ON_BASE_ADDR |
ldr r1, =0x77777777
str r1, [r0, #0x0]
Main points below, refer to i.MX6DQ Reference Manual (rev.1 4/2013):
DISP0_DAT21 is GPIO5 module IO15 (bit 15 in register GPIOx_DR).
sect.28.5.3 GPIO direction register (GPIOx_GDIR),
sect.28.5.2 GPIO data register (GPIOx_DR),
sect.36.4.109 Pad Mux Register (IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA21)
GPIO5 module address is 0x020A_C000 from Table 2-2 "AIPS-1 memory map"
http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi kim
syntax for writing to register is given in lowlevel_init.S as:
ldr r0, =AIPS2_ON_BASE_ADDR |
ldr r1, =0x77777777
str r1, [r0, #0x0]
Main points below, refer to i.MX6DQ Reference Manual (rev.1 4/2013):
DISP0_DAT21 is GPIO5 module IO15 (bit 15 in register GPIOx_DR).
sect.28.5.3 GPIO direction register (GPIOx_GDIR),
sect.28.5.2 GPIO data register (GPIOx_DR),
sect.36.4.109 Pad Mux Register (IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA21)
GPIO5 module address is 0x020A_C000 from Table 2-2 "AIPS-1 memory map"
http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I coded urs in lowlevel_init.S
that was my code. but D9 doesn't work
Something missed?
.globl lowlevel_init
lowlevel_init:
inv_dcache
init_l2cc
init_aips
init_clock
mov pc, lr
ldr r0, = 0x020AC000
ldr r1, =0x00008000
str r1, [r0, #0x0]
str r1, [r0, #0x4]
ldr r0, = 0x020E0000
ldr r1, =0x00000015
str r1, [r0, #0x1C4]
Hi kim
please comment what are you doing with these codes.
Best regards
chip
Im solved.
I moved this code to cpu/.../start,S from lowlevel_init.S
I think something reset resigters of GPIO after .lowlevel_init.
It worked at the end of _arm_boot_start in start.S.
thanks for ur comments.