Hi forum,
I'm feeling really dumb and need some help. We have two LEDs, a yellow one connected to GPIO1_28 and a red one connected to GPIO1_43. The LEDs are active high, i.e. they will turn on when the corresponding GPIO line is active high.
We'd like to control them using the "gpio-leds" driver, but having trouble figuring out the correct syntax in the device tree.
Within &main_pmx0, I can define a group of LED pins like:
led_pins_default: led-pins-default {
pinctrl-single,pins = <
AM65X_IOPAD(0x01f0, PIN_OUTPUT, 7) /* (AD11) GPIO1_28 (LED D2 - Yellow) */
AM65X_IOPAD(0x022C, PIN_OUTPUT, 7) /* (AD26) GPIO1_43 (LED D3 - Red) */
>;
};
However, I cannot figure out the correct device tree syntax to enable these pins as individual LEDs so that they could be controlled via /sys/class/leds, or connected to kernel events.
Can anyone provide an example, perhaps with and without a kernel event?
Thanks, and apologies for not being able to figure this out from other examples. I think what is throwing me is that each GPIO port has a large number of pins on it, and that's not the case for most other processors.
Best regards!
Scott