User LEDs control

88 views
Skip to first unread message

Joshua Park

unread,
Oct 11, 2020, 3:01:06 PM10/11/20
to BeagleBoard
Hi all,

I am trying to change the user LEDs but I am unable to make permanent changes to the files in /sys/devices/platform/leds/leds. Can someone help me out? 

Thanks in advance.

Joshua Park

unread,
Oct 11, 2020, 3:34:45 PM10/11/20
to BeagleBoard
Also, I figure that I process is controlling the blinking of user LED 1 since that is the only one I cannot change. Can anyone tell me what this process is and if I can stop it from controlling LED 1?

jonnymo

unread,
Oct 11, 2020, 5:54:41 PM10/11/20
to Beagle Board
I'm not sure what board you have or what kernel you are running, however on a Beaglebone Black running a 4.19 kernel, the LED settings are located in the bone-common.dtsi file:
Note: From the BBB schematic, led1 is connected to the Ethernet port, so perhaps you are trying to control usr0 LED. 
Ex:
  /opt/source/dtb-4.19-ti/src/arm/am335x-bone-common.dtsi

        leds {
                pinctrl-names = "default";
                pinctrl-0 = <&user_leds_s0>;

                compatible = "gpio-leds";

                led2 {
                        label = "beaglebone:green:usr0";
                        gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
                        default-state = "off";
                };

                led3 {
                        label = "beaglebone:green:usr1";
                        gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "mmc0";
                        default-state = "off";
                };

                led4 {
                        label = "beaglebone:green:usr2";
                        gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "cpu0";
                        default-state = "off";
                };

                led5 {
                        label = "beaglebone:green:usr3";
                        gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "mmc1";
                        default-state = "off";
                };
        };

Cheers,

Jon

--
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 beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/acfff9b2-a632-47a7-a4f0-29991e4475c5n%40googlegroups.com.

Mark A. Yoder

unread,
Oct 12, 2020, 10:44:51 AM10/12/20
to BeagleBoard
This may be off topic, but I have some notes on how to switch a GPIO pin to be an LED.


--Mark

Reply all
Reply to author
Forward
0 new messages