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/AM5728: GPIO configuration issue

Part Number: AM5728

Tool/software: Linux

Hello All,

I'm suing latest SDK version ti-processor-sdk-linux-am57xx-evm-04.02.00.09 and our custom board. I configured few gpio's in dts file as below:

gpio2_pins: gpio2_pins {
pinctrl-single,pins = <
0x0DC (PIN_OUTPUT_PULLDOWN | MUX_MODE14) /* AG8 - gpio2_30  */
0x0E0 (PIN_OUTPUT_PULLDOWN | MUX_MODE14) /* AH7 - gpio2_31 */
>;
};

&gpio2 {
pinctrl-0 = <&gpio2_pins>;
status = "okay";

};

I'm able to test as GPIO, but i have seen the below message in kernel log

[ 0.488326] omap_gpio 48055000.gpio: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/gpio2_pins, deferring probe

1. Could anyone suggest how to avoid this?

2. Is this will cause any issue?

3. In uboot, few gpio's we want tobe configure as GPIO and in HIGH state. Can i add in mux_data.h file? In this where do i need to add? Is thier any restriction on no of GIPO's to add?

Thanks.

  • Hi Chandrashekar,

    I will have a look on your questions and come back to you shortly.

    Meanwhile please make sure you are aligned with below wiki:

    processors.wiki.ti.com/.../Processor_SDK_Linux_GPIO_Driver_Overview

    Regards,
    Pavel
  • Chandrashekar P said:
    gpio2_pins: gpio2_pins {
    pinctrl-single,pins = <
    0x0DC (PIN_OUTPUT_PULLDOWN | MUX_MODE14) /* AG8 - gpio2_30  */
    0x0E0 (PIN_OUTPUT_PULLDOWN | MUX_MODE14) /* AH7 - gpio2_31 */
    >;
    };

    In linux kernel DTS or in u-boot DTS you make this GPIO pinmux? Note that only MMC pinmux is done in kernel, all the rest (including GPIO) is done in u-boot SPL/MLO. Check the below e2e thread for more info:

    Regards,
    Pavel

  • Thanks Pavel,

    If i need one more clarification from you,

    1). if we change the "am57xx-beagle-x15.dts" file in u-boot (arch/arm/dts/) and build the u-boot copy the MLO and u-boot.img file to boot folder of SD card is fine or do we need to need to .dtb file to some location of SD card?

    2). Example: i need to enable the lcd as display unit not the hdmi, do we need to configure in u-boot  "am57xx-beagle-x15.dts" file is enough.  No need to do anything in kernel dts? Because the configuration we doing is only at uboot stage, if we are not enabl ein kernel what will happen. We need dtb while booting kernel also rt?

    3). Do we need to configure on both the side u-boot and kernel dtb side?

    Thanks.

  • Chandrashekar P said:
    1). if we change the "am57xx-beagle-x15.dts" file in u-boot (arch/arm/dts/) and build the u-boot copy the MLO and u-boot.img file to boot folder of SD card is fine or do we need to need to .dtb file to some location of SD card?

    Yes, MLO and u-boot.img files are fine and enough. The u-boot DTS file is embedded into the MLO/u-boot image, there is no separate u-boot DTB file. We have only one DTB file for linux kernel (linux-kernel/arch/arm/boot/dts/)

    Chandrashekar P said:
    2). Example: i need to enable the lcd as display unit not the hdmi, do we need to configure in u-boot  "am57xx-beagle-x15.dts" file is enough.  No need to do anything in kernel dts? Because the configuration we doing is only at uboot stage, if we are not enabl ein kernel what will happen. We need dtb while booting kernel also rt?

    Regarding LCD pinmux config, u-boot file is enough.

    Chandrashekar P said:
    3). Do we need to configure on both the side u-boot and kernel dtb side?

    Regarding pinmux config, u-boot only is enough.

    Regards,
    Pavel

  • Thanks Pavel,

    How do we check the dts pinmux configuration in u-boot level. Like in kernel we can "cat /sys/kernel/debug/pinctrl/4a003400.pinmux/pinmux-pins".

    About display i have done as same done in kernel dts file, but no backlight? How to verify the display integration in u-boot. Please suggest how to debug display integration in u-boot.

    Thanks
  • Chandrashekar,

    Chandrashekar P said:
    How do we check the dts pinmux configuration in u-boot level. Like in kernel we can "cat /sys/kernel/debug/pinctrl/4a003400.pinmux/pinmux-pins".

    You can directly read the Control Module CTRL_CORE_PAD_x registers with u-boot md (memory display) command.

    Chandrashekar P said:
    About display i have done as same done in kernel dts file, but no backlight? How to verify the display integration in u-boot. Please suggest how to debug display integration in u-boot.

    Check and compare (between u-boot and kernel) all the display related Control Module registers, PRCM registers and Display subsystem registers.

    Regards,
    Pavel