This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
I am working with a custom AM437x board, using TI-SDK version 4.3.0.5. I am trying to flip LEDs on and off, and I am able to do it using the gpio interface by exporting each gpio pin and then writing a 0 or 1 to the value file. But I believe that the LEDs should also be showing up in the /sys/class/leds directory, but they are not showing up there. The following is what I have in my dts file relating to the LEDs:
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&leds_pins_default>;
mute_led {
label = "am437x-UTI:red:usr0";
gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>; // Bank 4, pin 1
default-state = "off";
};
captions_led {
label = "am437x-UTI:blue:usr1";
gpios = <&gpio4 2 GPIO_ACTIVE_HIGH>; // Bank 4, pin 2
default-state = "off";
};
keypad_led {
label = "am437x-UTI:white:usr2";
gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; // Bank 4, pin 3
default-state = "off";
};
vol6_led {
label = "am437x-UTI:red:usr3";
gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; // Bank 4, pin 4
default-state = "off";
};
vol5_led {
label = "am437x-UTI:red:usr4";
gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; // Bank 4, pin 5
default-state = "off";
};
vol4_led {
label = "am437x-UTI:orange:usr5";
gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; // Bank 4, pin 6
default-state = "off";
};
vol3_led {
label = "am437x-UTI:green:usr6";
gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; // Bank 4, pin 7
default-state = "off";
};
vol2_led {
label = "am437x-UTI:green:usr7";
gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; // Bank 4, pin 8
default-state = "off";
};
vol1_led {
label = "am437x-UTI:green:usr8";
gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>; // Bank 4, pin 9
default-state = "off";
};
hfree_led {
label = "am437x-UTI:blue:usr9";
gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>; // Bank 4, pin 10
default-state = "off";
};
};
leds_pins_default: leds_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x9b4, PIN_OUTPUT | MUX_MODE7) /* (AD18) cam0_vd.gpio4[1] */
AM4372_IOPAD(0x9b8, PIN_OUTPUT | MUX_MODE7) /* (AC18) cam0_field.gpio4[2] */
AM4372_IOPAD(0x9bc, PIN_OUTPUT | MUX_MODE7) /* (AD17) cam0_wen.gpio4[3] */
AM4372_IOPAD(0x9c0, PIN_OUTPUT | MUX_MODE7) /* (AC20) cam0_pclk.gpio4[4] */
AM4372_IOPAD(0x9c4, PIN_OUTPUT | MUX_MODE7) /* (AB19) cam0_data8.gpio4[5] */
AM4372_IOPAD(0x9c8, PIN_OUTPUT | MUX_MODE7) /* (AA19) cam0_data9.gpio4[6] */
AM4372_IOPAD(0x9cc, PIN_OUTPUT | MUX_MODE7) /* (AC24) cam1_data9.gpio4[7] */
AM4372_IOPAD(0x9d0, PIN_OUTPUT | MUX_MODE7) /* (AD24) cam1_data8.gpio4[8] */
AM4372_IOPAD(0x9d4, PIN_OUTPUT | MUX_MODE7) /* (AD25) cam1_hd.gpio4[9] */
AM4372_IOPAD(0x9d8, PIN_OUTPUT | MUX_MODE7) /* (AC23) cam1_vd.gpio4[10] */
>;
};
&gpio4 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpio_4_pins_default>;
};