board testing with u-boot command line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

board testing with u-boot command line

2,746 Views
dluberger
Contributor V

I have a new custom board, and i want to do things like test gpio connections, test my display etc. my display, for example, is being held in a disabled state (i.e., the backlight and logic power supplies) so i can't even see if the backlight works.

i'm having trouble compiling and flashing u-boot, so i was wondering: using the i.mx6ull evk sd card demo, can i use the u-boot command line to toggle gpios and do other things like set a test image on the lcd if it comes up? i see that i can read and write registers directly, and i also see there is a gpio command, but i can't get any of it to work because i don't know the proper syntax to go with the demo sd u-boot build.

how can i test my board with the demo sd u-boot, without having to modify and re-compile underlying c-code?

0 Kudos
Reply
2 Replies

2,045 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello David Luberger,

The following thread may be of help in regards of toggling GPIOs in U-boot:

https://community.nxp.com/thread/345948

I would also recommend looking at the unit tests available as part of the Linux BSP. You can find more information on this on the Linux BSP documentation. There is a test that may help you test the screen for example.

I hope this helps!

Regards,

0 Kudos
Reply

2,045 Views
dluberger
Contributor V

Thanks for your reply.  The thread you link regarding GPIO from u-boot unfortunately isn't much help, because all it says is "set iomixing for for your board" using the appropriate board.c file (in my case presumably that's <uboot>/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c) and that there should already be iomuxing examples, but it doesn't say at all what I should be looking for. I see a lot of functions that have "iomux" in them, but this is all incredibly vague.  every pad on the IC seems to be called out somewhere, but there's nothing in this file that tells me what or how I call anything from the u-boot gpio api.  The u-boot gpio api wants something like a bank number and an io number, and none of that is specified in the board.c file.  The "instructions" then go on to say to "use the u-boot gpio api" and it links to what I assume is the source code for the gpio tool, but there is no clue at all in that c file as to how the gpio tool is actually used.  I don't see a list of gpio numbers that the tool wants, nothing that maps, for example, the actual processor io named "gpio01_05" to a number or a bank and number that I can toggle or set using the u-boot gpio command.  I feel even more confused and lost now than I did before.

For the display stuff, you mention using the linux BSP, which I believe I downloaded, but none of those files make sense either.  What I've been doing all along so far is: building u-boot, running dd to place the u-boot-imx file on the sd card, and building the device tree, kernel, and linux file system and copying those to the sd card.  I've tried messing around with the yocto project stuff, but that documentation is incredibly hard to follow, and while I think I've successfully run a bitbake command once, I'm not seeing a lot of info on how to modify build like how I'm modifying config and c files in u-boot and the kernel directly with my current method, and on top of that, I've tried building with the yocto project 2 times now, and both times it took literally all day and night to complete the build, so i don't want to keep going through that.

I tried looking at the document "i.MX Linux® User's Guide, Rev. L4.9.88_2.0.0-ga, 05/2018" in section 8 it mentions that there are "a number of graphics tools, tests, and example programs that are built and installed in the Linux rootfs" but I don't even have linux up and running yet.  right now I'm (trying) to do everything from u-boot because I'm stuck on an issue where the filesystem isn't loading (stuck on the console message "Waiting for root device /dev/mmcblk0p2", although that's definitely the right device and partition, and I've recreated partitions, reformatted, everything, on multiple sd cards, thought the sd cards and hardware interface have to be correct because i can load u-boot and the kernel).

0 Kudos
Reply