Hi,
on a 3.14 kernel I copied am335x-boneblack.dts and made my own:
am335x-boneblack-res-1.dts
to this I added:
/* --> define custom leds pinmux */
&am33xx_pinmux {
traffic_leds_s0: traffic_leds_s0 {
pinctrl-single,pins = <
0x78 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio1_28, P9_12 60 $PIN: 30 OUTPUT MODE7 - traffic-1 LED */
0x44 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio1_17, P9_23 49 $PIN: 17 OUTPUT MODE7 - traffic-2 LED */
0x1A4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio3_19, P9_27 115 $PIN: 105 OUTPUT MODE7 - traffic-3 LED */
0x34 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio1_13, P8_11 45 $PIN: 13 OUTPUT MODE7 - traffic-4 LED */
0x30 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio1_12, P8_12 44 $PIN: 12 OUTPUT MODE7 - traffic-5 LED */
0x28 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio0_26, P8_14 26 $PIN: 10 OUTPUT MODE7 - traffic-6 LED */
0x3c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*
.gpio1_15, P8_15 47 $PIN 15 OUTPUT MODE7 - traffic-7 LED */
>;
};
};
/* <-- define custom leds pinmux */
and
/* --> define custom leds */
gpio_leds {
pinctrl-names = "default";
pinctrl-0 = <&traffic_leds_s0>;
compatible = "gpio-leds";
led@1 {
label = "trfcl1:red";
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@2 {
label = "trfcl1:amber";
gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@3 {
label = "trfcl1:green";
gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@4 {
label = "trfcl2:red";
gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@5 {
label = "trfcl2:amber";
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@6 {
label = "trfcl2:green";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@7 {
label = "trfcl3:red";
gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
};
/* <-- define custom leds */
Then you need to build this new flat device tree and load it to your board.
Hope this helps,
Robert
--
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].
For more options, visit https://groups.google.com/d/optout.