On a custom cape board I have a power button and two LEDs, one red and one blue, connected on P9_12 and P8_11, respectively. Following the instructions on how to build U-Boot here: https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot, was able to mux both LEDs in the BeagleBone Black configuration am335x_evm_defconfig by including additional initialisation in the U-Boot v2019.04 u-boot/board/ti/am335x/mux.c :
Enter code here...static struct module_pin_mux gpio1_28_pin_mux[] = {
{OFFSET(gpmc_be1n), (MODE(7) | PULLDOWN_EN)}, /* RED LED GPIO60 <= P9_12 /
{-1},
};
static struct module_pin_mux gpio1_13_pin_mux[] = {
{OFFSET(gpmc_ad13), (MODE(7) | PULLDOWN_EN)}, / BLUE LED GPIO45 <= P8_11 */
{-1},
};
void enable_board_pin_mux(void)
{
configure_module_pin_mux(gpio1_28_pin_mux); /* LED RED ON ? */
configure_module_pin_mux(gpio1_13_pin_mux); /* LED BLUE ON ? */
/* Do board-specific muxes. /
if (board_is_beaglelogic()) {
/ BeagleLogic pinmux */
. . .
so on power on I can see a dimmed light on both LEDs. The question is how and where I can turn them on during the boot process or even let them blink? I am aware of the U-Boot LED driver and I tried to customise beagle led.c configuration with no luck. Is there an easy way to set the LEDs state high after the muxing, early during the U-Boot initialisation?
Any help is greatly appreciated!
Nikolay