intel / edison-u-boot

DISCONTINUATION OF PROJECT. This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
34 stars 24 forks source link

GPIO support #10

Open gabrielandrade2 opened 7 years ago

gabrielandrade2 commented 7 years ago

Hello,

I would like to know if the GPIO command inside u-boot is supported for the Edison. I need to set some of the pins as early as possible during the boot process and since the intel IFWI is not open, u-boot should be the way.

I was able to compile the source code from the v2015.10 branch with the #define CONFIG_CMD_GPIO enable on the edison.h file and the gpio command is now available inside u-boot,b ut I cannot set or clean any of the GPIO pins. I keep getting "Command 'gpio' failed: Error -22" at every command I try. Testing "gpio status -a" doesn't return anything.

This behavior made me believe that there is some code that make u-boot compilable with that define enable but it is not the correct code for the Edison GPIO. Am I correct?

Thanks in advance.

andy-shev commented 7 years ago

Handling GPIO requires a driver for GPIO and an underlying pin control support. I'm pretty sure that is absent in U-Boot for Merrifield and quite likely will be staying this way. Of course you might port it from recent Linux kernels (though in this case I would recommend to use my version of U-Boot).

andy-shev commented 7 years ago

@Akiyama-san

There is also native Linux way how to do that, I posted an example here.

P.S. This will require to use at least v4.8 Linux kernel (better to use it from my eds branch).