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.

IO PAD Configuration in Deep Sleep State

Other Parts Discussed in Thread: AM3352

Dear All,


We have Beagle Bone black prototyped board which has "AM3352" processor and running with Ti Kernel OS of version-3.12. In our requirement we need to configure the few GPIO pins to hold their configurations either in active mode or deep sleep mode. Basically we need to retain GPIO Pins in Deep sleep mdoe.

For Example:  Assume that I want to make GPIO2_7 pin in active mode as "OUTPUT_ PULLUP " and deep sleep mode as "OUTPUT_PULLDOWN" and I made my dts file for the same. Please see below for the dts code.

         am33xx_pinmux: pinmux@44e10800 {
                 pinctrl-names = "default";
                 pinctrl-0 = <&clkout2_pin>;

                 user_leds_default: user_leds_default {
                         pinctrl-single,pins = <

0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7)  /* lcd_data1.gpio2_7     

    >;

   };

 user_leds_sleep: user_leds_sleep {
                        pinctrl-single,pins = <


                                 0xa4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)

  >;

};

Now the real problem is, in my prototype board for both of the cases I am seeing the pin is in HIGH State(3.3V) only if I probe it and it's not going into LOW state as per my configuration in deep sleep mode. But the same thing If I tried it in Beagle bone black I am seeing the expected result(HIGH in Active mode and LOW in Deep Sleep mode). The difference is the Processor here(Beagle Bone black-AM3358 and Our Prototype Board-AM3352).

Can any please suggest, why it's not working in our board and what else I should do it to make it work?

How can I start debugging it?

Is the processor real make difference?(I don't think so this is the problem).

Thanks in advance,

-Pavan

  • Hi,

    The processor does not cause the difference here. Are you running exactly the same software on both boards? Is your external hardware identical? Please check this wiki for details on how to configure this: http://processors.wiki.ti.com/index.php/Linux_Core_Power_Management_User's_Guide#IO_Pad_Configuration There is an additional definition you need to make in the driver.

  • Thanks for your reply,

    Not exactly the same software, but there is a bit difference on hardware design.


    I did studied this link, What is the additional definition that should I do it in the driver?

  • It should be something like the example given in the wiki:

    "The driver then defines the sleep state in addition to the default state:

    &davinci_mdio {
            pinctrl-names = "default", "sleep";
            pinctrl-0 = <&davinci_mdio_default>;
            pinctrl-1 = <&davinci_mdio_sleep>;
            ...
    "
  • Dear Biser,

    Now we are able to latch IO pins in DS0 mode, by changing modifications in DTS file.

    Earlier we were configuring inside "user_leds_default and user_leds_sleep" section of pin muxing, since it's not giving the result, we tried to configure from "davinci_mdio_default and davinci_mdio_sleep", it started working.

    We would like to know why it's not working if I configure inside "user_leds_default" section?, but it's working with Beagle bone black.


    I have attached the two dtsi file "am335x-bone-common_led.dtsi " & "am335x-bone-common_davinci.dtsi " for your reference.

    "am335x-bone-common_led.dtsi " file containing the IO Pins latching under user_leds section and not working.
    "am335x-bone-common_davinci.dtsi" file containing the IO Pins latching under davinci_mdio section and working one.

    ********************* am335x-bone-common_led.dtsi *********************

    user_leds_default: user_leds_default {
    pinctrl-single,pins = <

    0xa0 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data0.gpio2_6 D0/Away_LED */
    //0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data1.gpio2_7 D1/Error_LED */
    0xa8 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data2.gpio2_8 D2/H/F_LED */
    0xac (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data3.gpio2_9 D3/Alarm_LED */
    0xb0 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data4.gpio2_10 D4/RGB1_Cnt0 */
    0xb4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data5.gpio2_11 D5/RGB1_Cnt1 */
    0xb8 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data6.gpio2_12 D6/RGB1_Cnt2 */
    0xbc (PIN_OUTPUT_PULLUP | MUX_MODE7) /* lcd_data7.gpio2_13 D7/RGB2_Cnt1 */

    /* IO Pin latching configs */
    0xE4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* SPI-CS */
    0x5C (PIN_OUTPUT_PULLUP | MUX_MODE7) /* 3G_CODEC_EN */
    0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* Batt ON */
    0x40 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* radio reset */
    0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* D1/Error_LED */
    >;
    };

    user_leds_sleep: user_leds_sleep {
    pinctrl-single,pins = <

    0xa0 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data0.gpio2_6 D0/Away_LED */
    //0xa4 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data1.gpio2_7 D1/Error_LED */
    0xa8 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data2.gpio2_8 D2/H/F_LED */
    0xac (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data3.gpio2_9 D3/Alarm_LED */
    0xb0 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data4.gpio2_10 D4/RGB1_Cnt0 */
    0xb4 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data5.gpio2_11 D5/RGB1_Cnt1 */
    0xb8 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data6.gpio2_12 D6/RGB1_Cnt2 */
    0xbc (PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_data7.gpio2_13 D7/RGB2_Cnt1 */

    /* IO Pin latching configs */
    0xE4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* SPI-CS */
    0x5C (PIN_OUTPUT_PULLUP | MUX_MODE7) /* 3G_CODEC_EN */
    0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* Batt ON */
    0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* radio reset */
    0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* D1/Error_LED */

    >;
    };

    ****************************am335x-bone-common_davinci.dtsi *********************************
    davinci_mdio_default: davinci_mdio_default {
    pinctrl-single,pins = <
    /* MDIO */
    0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
    0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */

    /* IO Pin latching configs */
    0xE4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* SPI-CS */
    0x5C (PIN_OUTPUT_PULLUP | MUX_MODE7) /* 3G_CODEC_EN */
    0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* Batt ON */
    0x40 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* radio reset */
    0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* D1/Error_LED */
    >;
    };

    davinci_mdio_sleep: davinci_mdio_sleep {
    pinctrl-single,pins = <
    /* MDIO reset value */
    0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)

    /* IO Pin latching configs */
    0xE4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* SPI-CS */
    0x5C (PIN_OUTPUT_PULLUP | MUX_MODE7) /* 3G_CODEC_EN */
    0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* Batt ON */
    0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* radio reset */
    0xa4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* D1/Error_LED */
    >;
    };

    thanks alot Biser..

    Thanks,
    -Pavan
  • I guess you don't have an "user_leds" driver in your code.

  • I checked it's there and included in my kernel image