Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 940B1C001DF for ; Sat, 15 Jul 2023 18:24:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0461586154; Sat, 15 Jul 2023 20:24:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1689445481; bh=iKybqlqHHP6Z6PrROnfuzDQtblljSsKfrhuGDekJdLA=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=YiOw7gejdAbOYQGZA9oiXcFKMHUGxpxJq45Z75D7kLtgbs6ivxwbilZmJgT/Wrbt4 sz4D38qgT1wLHuUTV5SdLvuseGb3Pjohm0vI2VDOEGh2uTvYwfD5Q0ijLTRQmMtp1q lhDMJR54VgLGWDLh5cvXlUZl7U6ZAZT4cDuuUUyMMUrWbBlVs9OZje5biLP8Obpiwn 4U0IPSRkL6aUloTAL8BciqTiXqXEZyax87o5tJjPfJ40WgYJWFloILj+Px6yZH1Iw6 fiQuXgHTFp7ZDPOmrXZpPGmm2TGA7QU4HVg/4sfoCHdN3L6vhsLNrvgBeZDATjdVa6 2SQXvzJb4k2uw== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5B9A586146; Sat, 15 Jul 2023 20:24:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1689445479; bh=iKybqlqHHP6Z6PrROnfuzDQtblljSsKfrhuGDekJdLA=; h=From:To:Cc:Subject:Date:From; b=rOtsIs2L/zhxbci8pvOw1HgJuDsFUoVjJLEMEEp+oaox7lpDENwmC/AvrgQw7DIDF ZvgHgal3fleL6w1mz+Cxjkz9pcCKSeQ//11Cza0HEWEAJJdYxIp0BZ0tnh0yX92CzZ gEbsx/BVw3EEfa8iVw/BLJYtdkL0o22beErPmn+VVz2+TEkN65IEqoX1YROcCP9TiD VfKVYwYoFWo3cloCFgUkS6qdbBS8QQrh8XNfXq1/vkDpxRTajQDLqQDxgyhakpr0ou oEf4Va7vdl76RN8PUKrtBiMptWDiSgDW1kDs7R8zTg/r3E7Q6OpD5KkotfYf6PNghx lo7u9o97VWfHQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic Subject: [PATCH] ARM: dts: imx: Switch USB1 port control to GPIO on Data Modul i.MX8M Plus eDM SBC Date: Sat, 15 Jul 2023 20:24:16 +0200 Message-Id: <20230715182416.788761-1-marex@denx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The USB_PWR signal operation is not reliable on this DWC3 controller instance in case the signal is active high. Switch to GPIO control, which always behaves correctly. Perform the change in u-boot extras until this hits Linux upstream. Signed-off-by: Marek Vasut --- Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic --- .../dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi index dd0f34f3447..eafe9b9308c 100644 --- a/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi +++ b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi @@ -4,6 +4,7 @@ */ #include "imx8mp-u-boot.dtsi" +#include "imx8mp-pinfunc.h" / { aliases { @@ -17,6 +18,17 @@ dmo,ram-coding-gpios = <&gpio3 20 0>, <&gpio4 3 0>, <&gpio4 1 0>; }; + reg_usb1_vbus: regulator-usb1-vbus { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb1_vbus>; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "USB1_PWR"; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -113,6 +125,10 @@ bootph-pre-ram; }; +&usb3_phy0 { + vbus-supply = <®_usb1_vbus>; +}; + &usdhc2 { bootph-pre-ram; sd-uhs-sdr104; @@ -128,3 +144,17 @@ &wdog1 { bootph-pre-ram; }; + +&iomuxc { + usb1-grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x80 + >; + }; + + pinctrl_usb1_vbus: usb1-vbus-grp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x6 + >; + }; +}; -- 2.40.1