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.

Am335x- Setting default GPIO pin value in DTS on SDK8.0

Dears,

I have a generic requirement, I need to set some gpio pins let it default pull up, and user space could use the sys gpio command to change the status

, but I can't implement on SDK8.0, my follow as below.

1. I select gpio 1_14、gpio1_17、gpio3_19 of BBB and set the DTS file

gpio1_pins_default: gpio1_pins_default {
        pinctrl-single,pins = <
            0x38 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V13) gpmc_ad14.gpio1[14] */
            0x44 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V14) gpmc_a1.gpio1[17] */
        >;
 };

gpio3_pins_default: gpio3_pins_default {
        pinctrl-single,pins = <
            0x1a4 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (C13) mcasp0_fsr.gpio3[19] */
        >;
 };

&gpio1 {
    pinctrl-names = "default";
    pinctrl-0 = <&gpio1_pins_default>;

    status = "okay";
};
&gpio3 {
    pinctrl-names = "default";
    pinctrl-0 = <&gpio3_pins_default>;

    status = "okay";
};

2. when system into the kernel mode, those gpio status are pull up, but those still are the same pull up when I use the sys command to change the status to be pull down

echo 46 > /sys/class/gpio/export
echo 49 > /sys/class/gpio/export
echo 115 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio46/direction
echo out > /sys/class/gpio/gpio49/direction
echo out > /sys/class/gpio/gpio115/direction
echo 0 > /sys/class/gpio/gpio46/value
echo 0 > /sys/class/gpio/gpio49/value
echo 0 > /sys/class/gpio/gpio115/value

please give me a suggestion about the question, thanks.

B.R.

Joe

  • Hi Joe,

    I will forward this to the SW team.

  • Hi Joe,

    Do you probe gpio pins with a scope? Or do you just read the value of the corresponding gpio pin?
    I have no problem toggling the value of gpio46, gpio49 & gpio115 on my beaglebone black (running SDK8.0), without doing any modifications to the dts.

    Best Regards,
    Yordan
  • Hi Yordan,

    I used the scope to measure the signal, that signal didn't change.

    Could you follow my step to check, thanks.

    B.R.

    Joe
  • Hi Joe,

    My setup is beglebone black, with SDK8.0 running on it, NO modifications to the source code.

    I follow the steps described here: for gpio46. Gpio46 is muxed on P8_16 (gpio1_14).

    I run a simple script, which consist of a couple of echos:

     echo 1 > /sys/class/gpio/gpio46/value                                                                                                              

     echo 0 > /sys/class/gpio/gpio46/value                                                                                                              

     echo 1 > /sys/class/gpio/gpio46/value                                                                                                              

     echo 0 > /sys/class/gpio/gpio46/value

    The result on the scope for gpio1_14 is:

    As you can see gpio1_14 pin is toggling. 

    Best Regards, 

    Yordan