activity-led usage

Yegor Yefremov yegorslists at googlemail.com
Tue Sep 30 12:29:56 CEST 2025


Hi all,

I added the following LED definition to the am335x-baltos.dts:

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

                compatible = "gpio-leds";

                led-power {
                        label = "led-red";
                        gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                        default-state = "on";
                };
        };
        user_leds: user-leds-pins {
                pinctrl-single,pins = <
                        AM33XX_PADCONF(AM335X_PIN_MII1_COL,
PIN_OUTPUT_PULLDOWN, MUX_MODE7)     /* mii1_col.gpio3_0 PWR LED */
                >;
        };

The gpio-leds driver is working and I can toggle the led-red via the
led command.

Then, I created an am335x-baltos-u-boot.dtsi file with the following content:

/ {
    config {
        u-boot,activity-led = "led-red";
    };
};

I have also tried "led-power" instead of "led-red".

In my final DTS files I have the following nodes:

        leds {
                pinctrl-names = "default";
                pinctrl-0 = <0x56>;
                compatible = "gpio-leds";

                led-power {
                        label = "led-red";
                        gpios = <0x57 0x00 0x01>;
                        default-state = "on";
                };
        };

        config {
                u-boot,activity-led = "led-red";
        };

U-Boot cannot find the activity-led node.
ofnode_options_get_by_phandle("activity-led", &led_node); returns -22,
because ofnode_path("/options/u-boot") fails.

When driver debug is enabled, I also see the following messages:

bind node config
Device 'config' has no compatible string

My am335x-baltos-u-boot.dtsi code is similar to what I could find in
arch/arm/dts for the boot-led usage.

Where should I debug further?

Best regards,
Yegor


More information about the U-Boot mailing list