Part Number:PROCESSOR-SDK-OMAPL138
Tool/software: Linux
Hi,
I want to be able to toggle and set GPIO's on the OMAP-L138 LCDK via Linux. I am running the latest Linux out of the Processor SDK provided.
I have followed the instructions provided in this thread:
I have modified my arch/arm/mach-davinci/include/mach/mux.h to include
DA850_GPIO0_9, DA850_GPIO2_12, DA850_GPIO6_12,
I have modified arch/arm/mach-davinci/da850.c to include for PINMUX
MUX_CFG(DA850, GPIO0_9, 0, 24, 15, 8, false) MUX_CFG(DA850, GPIO2_12, 5, 12, 15, 8, false) MUX_CFG(DA850, GPIO6_12, 13, 12, 15, 8, false)
and I have also modified both arch/arm/mach-davinci/board-omapl138-hawk.c and arch/arm/mach-davinci/board-da850-evm.c to include
/* Configure the LED Pins D7, D6, D5, D4 for LCDK */ ret = davinci_cfg_reg(DA850_GPIO0_9); if (ret) pr_warn("%s:GPIO(0,9) mux setup failed\n", __func__); ret = davinci_cfg_reg(DA850_GPIO2_12); if (ret) pr_warn("%s:GPIO(2,12) mux setup failed\n", __func__); ret = davinci_cfg_reg(DA850_GPIO6_12); if (ret) pr_warn("%s:GPIO(6,12) mux setup failed\n", __func__); ret = davinci_cfg_reg(DA850_GPIO6_13); if (ret) pr_warn("%s:GPIO(6,13) mux setup failed\n", __func__);
However, when I access /sys/class/gpio and export the GPIO's I can't edit their values, they never change.
I am able to change their directions, however i cannot set the values.
I set echo 'out' > direction and it goes through, then when I do echo 1 > value, the value doesn't change.
/sys/kernel/debug/gpio shows the GPIO's that are exported through the sysfs, their directions can change but not the values.
What am I doing wrong here? Or what can I do to be able to toggle the GPIO's through the Linux system. I assumed I pinmuxed them all correctly.