Skip to main content
Visitor II
January 25, 2022
Solved

How to disable Peripherals in stm32mp1 u boot source?

  • January 25, 2022
  • 4 replies
  • 1208 views

Hi,

We are using stm32mp157a processor in my custom board.In my custom board we have limited peripherals so i need to disable remaining peripherals like ltdc and hdmi ,etc. I disabled in dts files but it didn't effected. How can i disable peripherals in u boot?

    This topic has been closed for replies.
    Best answer by Kevin HUBER

    Hi @[Sindhu Vadde]​ ,

    If you only disable the peripherals, the size will remain the same. When you disable a peripheral, it will not be probed during the boot, but the code of the driver is still built and present in the final image.

    If you want to completely remove the code of a specific driver from your U-Boot, you have to disable the CONFIG that enable the build of the driver. You must run:

    make menuconfig

    Please have a look at the wiki: https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel

    And you disable the drivers that you do not need.

    But regarding your first request about "ltdc and hdmi", I don't understand because normally the driver related to HDMI is already disabled on U-Boot.

    The configuration that enables the hdmi video driver is VIDEO_SUNXI, which is disabled by default:

    0693W00000JO4jFQAT.png 

    And the configuration which allows to choose to use the HDMI is CONFIG_LCD_MODE :

    0693W00000JO4lkQAD.png But it is also disabled by default

    Maybe you are talking about the support of the DSI peripheral, in this case you can disable it by disabling DM_VIDEO :

    0693W00000JO4nkQAD.pngIf this configuration is disable, the compelte driver model to support video will be disabled, even the splash screen of u-boot will be turned off.

    Regards,

    Kevin

    4 replies

    Technical Moderator
    January 25, 2022

    Hi @Sindhu Vadde​ ,

    What do you mean by "it didn't effected" ?

    How do you notice they are not disabled after dts update ?

    Olivier

    Visitor II
    January 27, 2022

    Hi,

    The uboot image size is not reduced before disabling pheperials i observed image size and afer disabling it shoud reduced right? but after disbaling also i got same image size.

    Technical Moderator
    February 1, 2022

    Hi @[Sindhu Vadde]​ ,

    If you only disable the peripherals, the size will remain the same. When you disable a peripheral, it will not be probed during the boot, but the code of the driver is still built and present in the final image.

    If you want to completely remove the code of a specific driver from your U-Boot, you have to disable the CONFIG that enable the build of the driver. You must run:

    make menuconfig

    Please have a look at the wiki: https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel

    And you disable the drivers that you do not need.

    But regarding your first request about "ltdc and hdmi", I don't understand because normally the driver related to HDMI is already disabled on U-Boot.

    The configuration that enables the hdmi video driver is VIDEO_SUNXI, which is disabled by default:

    0693W00000JO4jFQAT.png 

    And the configuration which allows to choose to use the HDMI is CONFIG_LCD_MODE :

    0693W00000JO4lkQAD.png But it is also disabled by default

    Maybe you are talking about the support of the DSI peripheral, in this case you can disable it by disabling DM_VIDEO :

    0693W00000JO4nkQAD.pngIf this configuration is disable, the compelte driver model to support video will be disabled, even the splash screen of u-boot will be turned off.

    Regards,

    Kevin

    Technical Moderator
    February 9, 2022

    Hi @Sindhu Vadde​ ,

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'