On Tue, Dec 17, 2019 at 2:14 PM Nikolay <[email protected]> wrote: > > > 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?
Hi Nikolay, Once you "jump" from u-boot to the kernel, anything u-boot set for i/o will be reinitialized.. To keep the led in the same state as u-boot early in the kernel initilaion.. take a look at 'gpio-hog'.. Here is a quick example of a pin pulled high as early as possible.. https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BBGW-WL1835-00A0.dts#L191-L201 If you look at a scope, it'll still "blip", but it's as fast of a transition as possible.. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjStxO%3DJ_ejNkCpK-WJ1Wb_u9LewrWnQDqzfDvNYtOzYA%40mail.gmail.com.
