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.

Linux/AM3354: GPIO read issue

Part Number: AM3354

Tool/software: Linux

 

DTS file:

gpio_pins: gpio_pins{

         pinctrl-single,pins = <

                       0x158 (PIN_INPUT_PULLDOWN | MUX_MODE2) /*(B16) spi0_d1.i2c1_sda */  

                       0x150 ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /*(A17) spi0_sclk.gpio0[2]*/

                       0x154 ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /*(B17) spi0_d0.gpio0[3] */

            >;

};

After loading the dtb file on the board able to see the grouped gpio pins as below

# cat /sys/kernel/debug/pinctrl/44e10880..*/pingroups

group: pinmux_gpio_pins

pin 86 (PIN86)

pin 84 (PIN84)

pin 85 (PIN85)

 

When we export the 86, 84 and 85 pins and tried to read the gpio pins are giving status 0 every time. Even the pins are changed to High and Low.

 

#echo '84' > /sys/class/gpio/export

#echo '85' > /sys/class/gpio/export

#echo '86' > /sys/class/gpio/export

 

#echo "in" > /sys/class/gpio/gpio84/direction

#echo "in" > /sys/class/gpio/gpio85/direction

#echo "in" > /sys/class/gpio/gpio86/direction

 

Default:

#echo "Gpio-84: "`cat /sys/class/gpio/gpio84/value`

Gpio-84: 0

#echo "Gpio-85: "`cat /sys/class/gpio/gpio85/value`

Gpio-85: 0

#echo "Gpio-86: "`cat /sys/class/gpio/gpio86/value`

Gpio-86: 0

 

After pull up:

#echo "Gpio-84: "`cat /sys/class/gpio/gpio84/value`

Gpio-84: 0

#echo "Gpio-85: "`cat /sys/class/gpio/gpio85/value`

Gpio-85: 0

#echo "Gpio-86: "`cat /sys/class/gpio/gpio86/value`

Gpio-86: 0

 

Please help to solve this issue.

Thanks in advance!