From nobody Mon Mar 23 21:28:13 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F31193B3C18 for ; Mon, 23 Mar 2026 15:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774278188; cv=none; b=auEZgDmVyBt+koaN3YoAqlxFPk3d0fu9VIAlPKiCfhWfx2ZrE9ohnWjkyaEJTfRNlG0FJUQM7Nijk0X61rKHgndLtTL/0/9p4d7j70Qmy/jqIShYjwD+hv2rcM0/pCQxO9komYvtgkJ0fkZFI0CF+VOpDyGR3p3OuTefoFlkxhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774278188; c=relaxed/simple; bh=p3ek0DJZ6dB5BRbHVbnnupyq4AxNJh+QqudvnzMubQI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ToQpN9nu6qrcjFhI2YZPxB4Q6Lf+xAw3V3N9rfW82YY3j8WV5fXtcnmElCbHbwFzGrTfgyHqkVGqwS9XYeitBv6utrfFyHIAf/J1/8YwU64OUVUJA2VvH1jQ52/v35vMNAyrqDQ5GKU6P7IuYYyuDIk8pdMsVxaq4uDAZRGkSRM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=CA0W/K+7; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="CA0W/K+7" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id C07924E427B1; Mon, 23 Mar 2026 15:03:05 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 93BCC5FEF6; Mon, 23 Mar 2026 15:03:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1B05F10450FFB; Mon, 23 Mar 2026 16:03:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1774278184; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=VQsfiU7pydAF8i4b/kHlBnS6SzX1tiqz2w4BnOsq9ws=; b=CA0W/K+72mkvKUBbOXbiX9FmqZuYVoK9tqAQnq5zCjgQzp62OyT6mT83di687D4StxIgkV ZeSLaBtLuRS/EUVunxh6qfST89sZRXB08mM4DeCld4dF0wBVGo+PBfI5k7pzGZPKxXeSWK 86KlXJz2MI0fsd8uuXYBlTPWB0YjKU8X4uCqk1TME6XjT4quZnkpYZsr+XpH7TFOKjG0PA 46STu/qKf6FmRzz5fCJ21wJlmmGj7DbvvwP49AH851tWp4xXrMPdAgvtmFGLWDL/WTzg1c RZpFczHjjbaSZ3lj4UCTvhx7yXfTV1cgh48hoSEMUkbxQyoKVvVy+gL+FtMiHQ== From: Thomas Richard Date: Mon, 23 Mar 2026 16:02:48 +0100 Subject: [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260323-omap4-fix-usb-support-v1-7-b668132124ac@bootlin.com> References: <20260323-omap4-fix-usb-support-v1-0-b668132124ac@bootlin.com> In-Reply-To: <20260323-omap4-fix-usb-support-v1-0-b668132124ac@bootlin.com> To: Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones Cc: Thomas Petazzoni , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Thomas Richard X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add pbias regulator support to enable SIM_VDDS supply and unlock USB I/O cell. Previously, this was handled by the bootloader, now the kernel can take responsibility for managing the PBIAS regulator, ensuring correct operation regardless of the bootloader. Signed-off-by: Thomas Richard --- drivers/mfd/omap-usb-host.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index ac974285be341fa579ef198d1893b77af428b5f8..9e254e00183e940b775d5bde6e8= 91f0d26af27b0 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include + =20 #include "omap-usb.h" =20 @@ -95,6 +98,8 @@ struct usbhs_hcd_omap { struct usbhs_omap_platform_data *pdata; =20 u32 usbhs_rev; + + struct regulator *pbias; }; /*------------------------------------------------------------------------= -*/ =20 @@ -270,6 +275,25 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmo= de) } } =20 +static int omap_usbhs_set_pbias(struct device *dev, bool power_on) +{ + struct usbhs_hcd_omap *omap =3D dev_get_drvdata(dev); + int ret; + + if (!omap->pbias) + return 0; + + if (power_on) + ret =3D regulator_enable(omap->pbias); + else + ret =3D regulator_disable(omap->pbias); + + if (ret) + dev_err(dev, "pbias reg %s failed\n", str_enable_disable(power_on)); + + return ret; +} + static int usbhs_runtime_resume(struct device *dev) { struct usbhs_hcd_omap *omap =3D dev_get_drvdata(dev); @@ -278,6 +302,10 @@ static int usbhs_runtime_resume(struct device *dev) =20 dev_dbg(dev, "usbhs_runtime_resume\n"); =20 + r =3D omap_usbhs_set_pbias(dev, true); + if (r) + return r; + omap_tll_enable(pdata); =20 if (!IS_ERR(omap->ehci_logic_fck)) @@ -355,7 +383,7 @@ static int usbhs_runtime_suspend(struct device *dev) =20 omap_tll_disable(pdata); =20 - return 0; + return omap_usbhs_set_pbias(dev, false); } =20 static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap, @@ -564,6 +592,11 @@ static int usbhs_omap_probe(struct platform_device *pd= ev) =20 omap->pdata =3D pdata; =20 + omap->pbias =3D devm_regulator_get_optional(dev, "pbias"); + if (IS_ERR(omap->pbias)) + return dev_err_probe(dev, PTR_ERR(omap->pbias), + "unable to get pbias regulator\n"); + /* Initialize the TLL subsystem */ omap_tll_init(pdata); =20 @@ -759,6 +792,10 @@ static int usbhs_omap_probe(struct platform_device *pd= ev) } =20 initialize: + ret =3D omap_usbhs_set_pbias(dev, true); + if (ret) + goto err_mem; + omap_usbhs_init(dev); =20 if (dev->of_node) { @@ -806,6 +843,8 @@ static void usbhs_omap_remove(struct platform_device *p= dev) of_platform_depopulate(&pdev->dev); else device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child); + + omap_usbhs_set_pbias(&pdev->dev, false); } =20 static const struct dev_pm_ops usbhsomap_dev_pm_ops =3D { --=20 2.53.0