]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ARM: imx6: dh-imx6: Enable USB OTG ID pin pull up in SPL
authorMarek Vasut <marek.vasut@mailbox.org>
Mon, 28 Jul 2025 22:38:34 +0000 (00:38 +0200)
committerFabio Estevam <festevam@gmail.com>
Thu, 7 Aug 2025 11:16:03 +0000 (08:16 -0300)
Enable SoC pull up for USB OTG ID pin in SPL. There is no dedicated pull up
resistor on the SoM itself, and the pull up is mandatory for correct USB OTG
ID pin detection. U-Boot proper already configures the USB OTG ID pin pull
up via DT pinctrl node entry.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
board/dhelectronics/dh_imx6/dh_imx6_spl.c

index a50763e1926cc6825a01c50b8360ec6befad6e1f..eb9bc93d97317a96d1fc33d67357817a7af20e12 100644 (file)
        (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm |   \
         PAD_CTL_SRE_FAST | PAD_CTL_HYS)
 
+#define OTG_PAD_CTRL                                                   \
+       (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm |  \
+        PAD_CTL_SRE_SLOW | PAD_CTL_HYS)
+
 static const struct mx6dq_iomux_ddr_regs dhcom6dq_ddr_ioregs = {
        .dram_sdclk_0   = 0x00020030,
        .dram_sdclk_1   = 0x00020030,
@@ -509,7 +513,7 @@ int board_mmc_init(struct bd_info *bis)
 
 /* USB */
 static iomux_v3_cfg_t const usb_pads[] = {
-       IOMUX_PADS(PAD_GPIO_1__USB_OTG_ID       | MUX_PAD_CTRL(NO_PAD_CTRL)),
+       IOMUX_PADS(PAD_GPIO_1__USB_OTG_ID       | MUX_PAD_CTRL(OTG_PAD_CTRL)),
        IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31      | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };