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.

AM4376: gpiochip: Persistence not supported for GPIO

Part Number: AM4376

Hi,

we are seeing these dmesg lines saying e.g. "gpio gpiochip6: Persistence not supported for GPIO 6" .

Is there a particular configuration in the device tree that is causing this?

I looked through the low-level Linux gpio code and there is a state called PIN_CONFIG_PERSIST_STATE, but I could not see if there is a configuration using this.

Here is a section of dmesg

[   34.853984] gpio gpiochip6: Persistence not supported for GPIO 6
[   34.855642] gpio gpiochip4: Persistence not supported for GPIO 19
[   34.857270] gpio gpiochip6: Persistence not supported for GPIO 3
[   34.858801] gpio gpiochip4: Persistence not supported for GPIO 20
[   34.860407] gpio gpiochip6: Persistence not supported for GPIO 2
[   34.862961] gpio gpiochip5: Persistence not supported for GPIO 3
[   34.864732] gpio gpiochip6: Persistence not supported for GPIO 1
[   34.866316] gpio gpiochip6: Persistence not supported for GPIO 0
[   34.867911] gpio gpiochip4: Persistence not supported for GPIO 0
[   34.869504] gpio gpiochip0: Persistence not supported for GPIO 29
[   34.871076] gpio gpiochip6: Persistence not supported for GPIO 28
[   34.873564] gpio gpiochip1: Persistence not supported for GPIO 12
[   34.876392] gpio gpiochip1: Persistence not supported for GPIO 13
[   34.878749] gpio gpiochip1: Persistence not supported for GPIO 14
[   34.881078] gpio gpiochip1: Persistence not supported for GPIO 15
[   34.884388] gpio gpiochip1: Persistence not supported for GPIO 8
[   34.886432] gpio gpiochip1: Persistence not supported for GPIO 9
[   34.888484] gpio gpiochip1: Persistence not supported for GPIO 10
[   34.890668] gpio gpiochip6: Persistence not supported for GPIO 27
[   34.894658] gpio gpiochip1: Persistence not supported for GPIO 11
[   34.897142] gpio gpiochip1: Persistence not supported for GPIO 1
[   34.899923] gpio gpiochip1: Persistence not supported for GPIO 0
[   34.903817] gpio gpiochip1: Persistence not supported for GPIO 2
[   34.906287] gpio gpiochip1: Persistence not supported for GPIO 3
[   34.908448] gpio gpiochip1: Persistence not supported for GPIO 4
[   34.910904] gpio gpiochip1: Persistence not supported for GPIO 5
[   34.916825] gpio gpiochip0: Persistence not supported for GPIO 3
Thanks,
--Gunter
  • Hi, 

    do you have any updates on this type dmesg output?

    Thanks!

    --Gunter

  • Hi Gunter,

    The expert whom this thread is assigned to is already out of the office for the holidays.

    I reviewed the kernel (v4.19) gpio driver, and believe GPIO persistence is not supported on AM437x, there is no configuration to enable such support.

    You can see in kernel function gpiod_set_transitory() in gpiolib.c, which the kernel message is printed, the flag packed is set with PIN_CONFIG_PERSIST_STATE, then calls the platform driver's set_config() function.

    2774         packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE,             
    2775                                           !transitory);                         
    2776         gpio = gpio_chip_hwgpio(desc);                                          
    2777         rc = chip->set_config(chip, gpio, packed);

    For AM437x, set_config() is defined as omap_gpio_set_config() in gpio-omap.c, which only supports setting INPUT_DEBOUNCE.

    1076         if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)       
    1077                 return -ENOTSUPP; 

    By the way, the kernel message "Persistence not supported for GPIO xxx" is a kernel debug message, which is only informative. You won't see such message if kernel debug is not enabled.

  • Hi Bin,

    thanks for reviewing this. 

    The customer was observing that these messages come out so late in the boot, in the kernel log you can see it is at 33sec. Is there another module being loaded late to print out those messages?

    Thanks!

    --Gunter

  • Hi Gunter,

    Sorry, I missed your update.

    I am currently in the mid of a work, and will be back to you early next week if not earlier.