Skip to content

Instantly share code, notes, and snippets.

@webratz
Created May 27, 2014 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webratz/07b9a8ee83891c195eb3 to your computer and use it in GitHub Desktop.
Save webratz/07b9a8ee83891c195eb3 to your computer and use it in GitHub Desktop.
BeagleBone Black led trigger DTS
/* stripped down sample for triggering a gpio as led by the kernel*/
/* to compile: dtc -O dtb -o BB-MX1-00A0.dtbo -b 0 -@ pinctrl_mx_0.dts */
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "BB-TEST1";
version = "00A0";
/* declare all pins we use exclusively for us */
exclusive-use =
"P9.28";
/* STAT LED configuration part 1*/
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
mx_led_pins: pinmux_mx_led_pins {
pinctrl-single,pins = <
0x19c 0x07 /* P9_28 | MODE7 | STAT LED*/
>;
};
};
};
/* STAT LED configuration part 2*/
fragment@3 {
target = <&ocp>;
__overlay__ {
mx_leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&mx_led_pins>;
status_led {
label = "mx:status_led";
gpios = <&gpio4 17 0>; /* gpio4 is gpio3 */
linux,default-trigger = "heartbeat";
default-state = "on";
};
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment