* [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-23 17:29 ` Mark Brown
2026-03-27 12:36 ` Andreas Kemnade
2026-03-23 15:02 ` [PATCH 2/8] ARM: dts: ti: omap4: Add pbias SIM regulator Thomas Richard
` (6 subsequent siblings)
7 siblings, 2 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Add support for the pbias SIM regulator found on OMAP4 (for USB I/O cell).
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/regulator/pbias-regulator.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
index cd5a0d7e44555f04d1e44470036c6e3d9feb7be6..10c4940e73635293bebd26bf99a9067eb6e39107 100644
--- a/drivers/regulator/pbias-regulator.c
+++ b/drivers/regulator/pbias-regulator.c
@@ -81,6 +81,16 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
.name = "pbias_sim_omap3"
};
+static const struct pbias_reg_info pbias_sim_omap4 = {
+ .enable = BIT(28) | BIT(20),
+ .enable_mask = BIT(31) | BIT(28) | BIT(20),
+ .vmode = BIT(31),
+ .enable_time = 100,
+ .pbias_volt_table = pbias_volt_table_3_0V,
+ .n_voltages = 2,
+ .name = "pbias_sim_omap4"
+};
+
static const struct pbias_reg_info pbias_mmc_omap4 = {
.enable = BIT(26) | BIT(22),
.enable_mask = BIT(26) | BIT(25) | BIT(22),
@@ -108,6 +118,7 @@ static struct of_regulator_match pbias_matches[] = {
{ .name = "pbias_sim_omap3", .driver_data = (void *)&pbias_sim_omap3},
{ .name = "pbias_mmc_omap4", .driver_data = (void *)&pbias_mmc_omap4},
{ .name = "pbias_mmc_omap5", .driver_data = (void *)&pbias_mmc_omap5},
+ { .name = "pbias_sim_omap4", .driver_data = (void *)&pbias_sim_omap4},
};
#define PBIAS_NUM_REGS ARRAY_SIZE(pbias_matches)
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4
2026-03-23 15:02 ` [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
@ 2026-03-23 17:29 ` Mark Brown
2026-03-27 12:36 ` Andreas Kemnade
1 sibling, 0 replies; 16+ messages in thread
From: Mark Brown @ 2026-03-23 17:29 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
On Mon, Mar 23, 2026 at 04:02:42PM +0100, Thomas Richard wrote:
> Add support for the pbias SIM regulator found on OMAP4 (for USB I/O cell).
> @@ -108,6 +118,7 @@ static struct of_regulator_match pbias_matches[] = {
> { .name = "pbias_sim_omap3", .driver_data = (void *)&pbias_sim_omap3},
> { .name = "pbias_mmc_omap4", .driver_data = (void *)&pbias_mmc_omap4},
> { .name = "pbias_mmc_omap5", .driver_data = (void *)&pbias_mmc_omap5},
> + { .name = "pbias_sim_omap4", .driver_data = (void *)&pbias_sim_omap4},
> };
This is a new compatible, it needs bindings adding.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4
2026-03-23 15:02 ` [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
2026-03-23 17:29 ` Mark Brown
@ 2026-03-27 12:36 ` Andreas Kemnade
2026-03-27 13:18 ` Thomas Richard
1 sibling, 1 reply; 16+ messages in thread
From: Andreas Kemnade @ 2026-03-27 12:36 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
On Mon, 23 Mar 2026 16:02:42 +0100
Thomas Richard <thomas.richard@bootlin.com> wrote:
> Add support for the pbias SIM regulator found on OMAP4 (for USB I/O cell).
>
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
> ---
> drivers/regulator/pbias-regulator.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
> index cd5a0d7e44555f04d1e44470036c6e3d9feb7be6..10c4940e73635293bebd26bf99a9067eb6e39107 100644
> --- a/drivers/regulator/pbias-regulator.c
> +++ b/drivers/regulator/pbias-regulator.c
> @@ -81,6 +81,16 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
> .name = "pbias_sim_omap3"
> };
>
> +static const struct pbias_reg_info pbias_sim_omap4 = {
> + .enable = BIT(28) | BIT(20),
> + .enable_mask = BIT(31) | BIT(28) | BIT(20),
> + .vmode = BIT(31),
BIT(27)? or am I mixing something up?
Regards,
Andreas
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4
2026-03-27 12:36 ` Andreas Kemnade
@ 2026-03-27 13:18 ` Thomas Richard
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-27 13:18 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
Hello Andreas,
Thanks for the review.
On 3/27/26 1:36 PM, Andreas Kemnade wrote:
> On Mon, 23 Mar 2026 16:02:42 +0100
> Thomas Richard <thomas.richard@bootlin.com> wrote:
>
>> Add support for the pbias SIM regulator found on OMAP4 (for USB I/O cell).
>>
>> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
>> ---
>> drivers/regulator/pbias-regulator.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
>> index cd5a0d7e44555f04d1e44470036c6e3d9feb7be6..10c4940e73635293bebd26bf99a9067eb6e39107 100644
>> --- a/drivers/regulator/pbias-regulator.c
>> +++ b/drivers/regulator/pbias-regulator.c
>> @@ -81,6 +81,16 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
>> .name = "pbias_sim_omap3"
>> };
>>
>> +static const struct pbias_reg_info pbias_sim_omap4 = {
>> + .enable = BIT(28) | BIT(20),
>> + .enable_mask = BIT(31) | BIT(28) | BIT(20),
>> + .vmode = BIT(31),
>
> BIT(27)? or am I mixing something up?
No you're right, I did a mistake.
I'll send a v2 in the next few days to address this, Mark's and Conor's
feedback, as well as few other issues I identified.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/8] ARM: dts: ti: omap4: Add pbias SIM regulator
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
2026-03-23 15:02 ` [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-23 15:02 ` [PATCH 3/8] mfd: omap-usb-host: Cleanup header includes Thomas Richard
` (5 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Add the pbias SIM regulator node for OMAP4.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
arch/arm/boot/dts/ti/omap/omap4-l4.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
index 4881dd6743930dee65eaeab802d1e3766f480ce0..6904a84a1700527443cee19f62870904082eb48a 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
@@ -697,6 +697,12 @@ pbias_mmc_reg: pbias_mmc_omap4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
};
+
+ pbias_sim_reg: pbias_sim_omap4 {
+ regulator-name = "pbias_sim_omap4";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ };
};
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 3/8] mfd: omap-usb-host: Cleanup header includes
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
2026-03-23 15:02 ` [PATCH 1/8] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
2026-03-23 15:02 ` [PATCH 2/8] ARM: dts: ti: omap4: Add pbias SIM regulator Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-31 15:45 ` Lee Jones
2026-03-23 15:02 ` [PATCH 4/8] mfd: omap-usb-host: Sanitize error path in the probe() Thomas Richard
` (4 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Remove unused includes (linux/kernel.h, linux/types.h and linux/delay.h).
Sort the remaining ones alphabetically.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/mfd/omap-usb-host.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 4d29a6e2ed87abf2a0f6d5a704525baaa6f0cbcb..4e066a17cef0400edbfcb3012a16ceee06e52140 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -6,19 +6,15 @@
* Author: Keshava Munegowda <keshava_mgowda@ti.com>
* Author: Roger Quadros <rogerq@ti.com>
*/
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
-#include <linux/platform_device.h>
+#include <linux/err.h>
+#include <linux/module.h>
#include <linux/platform_data/usb-omap.h>
+#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
-#include <linux/err.h>
#include "omap-usb.h"
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 3/8] mfd: omap-usb-host: Cleanup header includes
2026-03-23 15:02 ` [PATCH 3/8] mfd: omap-usb-host: Cleanup header includes Thomas Richard
@ 2026-03-31 15:45 ` Lee Jones
0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2026-03-31 15:45 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
On Mon, 23 Mar 2026, Thomas Richard wrote:
> Remove unused includes (linux/kernel.h, linux/types.h and linux/delay.h).
> Sort the remaining ones alphabetically.
What about 'linux/slab.h'?
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
> ---
> drivers/mfd/omap-usb-host.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 4d29a6e2ed87abf2a0f6d5a704525baaa6f0cbcb..4e066a17cef0400edbfcb3012a16ceee06e52140 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -6,19 +6,15 @@
> * Author: Keshava Munegowda <keshava_mgowda@ti.com>
> * Author: Roger Quadros <rogerq@ti.com>
> */
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/types.h>
> -#include <linux/slab.h>
> -#include <linux/delay.h>
> #include <linux/clk.h>
> #include <linux/dma-mapping.h>
> -#include <linux/platform_device.h>
> +#include <linux/err.h>
> +#include <linux/module.h>
> #include <linux/platform_data/usb-omap.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/of.h>
> #include <linux/of_platform.h>
This is still not alphabetical.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 4/8] mfd: omap-usb-host: Sanitize error path in the probe()
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (2 preceding siblings ...)
2026-03-23 15:02 ` [PATCH 3/8] mfd: omap-usb-host: Cleanup header includes Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-23 15:02 ` [PATCH 5/8] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
` (3 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Use dev_err_probe() to simplify the code and standardize the error output.
Remove -ENOMEM messages, there's already enough output.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/mfd/omap-usb-host.c | 81 +++++++++++++++++++--------------------------
1 file changed, 34 insertions(+), 47 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 4e066a17cef0400edbfcb3012a16ceee06e52140..ac974285be341fa579ef198d1893b77af428b5f8 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -546,22 +546,17 @@ static int usbhs_omap_probe(struct platform_device *pdev)
dev->platform_data = pdata;
}
- if (!pdata) {
- dev_err(dev, "Missing platform data\n");
- return -ENODEV;
- }
+ if (!pdata)
+ return dev_err_probe(dev, -ENODEV, "Missing platform data\n");
- if (pdata->nports > OMAP3_HS_USB_PORTS) {
- dev_info(dev, "Too many num_ports <%d> in platform_data. Max %d\n",
- pdata->nports, OMAP3_HS_USB_PORTS);
- return -ENODEV;
- }
+ if (pdata->nports > OMAP3_HS_USB_PORTS)
+ return dev_err_probe(dev, -ENODEV,
+ "Too many num_ports <%d> in platform_data. Max %d\n",
+ pdata->nports, OMAP3_HS_USB_PORTS);
omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
- if (!omap) {
- dev_err(dev, "Memory allocation failed\n");
+ if (!omap)
return -ENOMEM;
- }
omap->uhh_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(omap->uhh_base))
@@ -614,7 +609,6 @@ static int usbhs_omap_probe(struct platform_device *pdev)
omap->hsic60m_clk = devm_kzalloc(dev, i, GFP_KERNEL);
if (!omap->utmi_clk || !omap->hsic480m_clk || !omap->hsic60m_clk) {
- dev_err(dev, "Memory allocation failed\n");
ret = -ENOMEM;
goto err_mem;
}
@@ -648,9 +642,8 @@ static int usbhs_omap_probe(struct platform_device *pdev)
omap->ehci_logic_fck = devm_clk_get(dev,
"usbhost_120m_fck");
if (IS_ERR(omap->ehci_logic_fck)) {
- ret = PTR_ERR(omap->ehci_logic_fck);
- dev_err(dev, "usbhost_120m_fck failed:%d\n",
- ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->ehci_logic_fck),
+ "usbhost_120m_fck failed\n");
goto err_mem;
}
}
@@ -660,36 +653,36 @@ static int usbhs_omap_probe(struct platform_device *pdev)
/* for OMAP4+ i.e. USBHS REV2+ */
omap->utmi_p1_gfclk = devm_clk_get(dev, "utmi_p1_gfclk");
if (IS_ERR(omap->utmi_p1_gfclk)) {
- ret = PTR_ERR(omap->utmi_p1_gfclk);
- dev_err(dev, "utmi_p1_gfclk failed error:%d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->utmi_p1_gfclk),
+ "utmi_p1_gfclk failed error\n");
goto err_mem;
}
omap->utmi_p2_gfclk = devm_clk_get(dev, "utmi_p2_gfclk");
if (IS_ERR(omap->utmi_p2_gfclk)) {
- ret = PTR_ERR(omap->utmi_p2_gfclk);
- dev_err(dev, "utmi_p2_gfclk failed error:%d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->utmi_p2_gfclk),
+ "utmi_p2_gfclk failed error\n");
goto err_mem;
}
omap->xclk60mhsp1_ck = devm_clk_get(dev, "refclk_60m_ext_p1");
if (IS_ERR(omap->xclk60mhsp1_ck)) {
- ret = PTR_ERR(omap->xclk60mhsp1_ck);
- dev_err(dev, "refclk_60m_ext_p1 failed error:%d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->xclk60mhsp1_ck),
+ "refclk_60m_ext_p1 failed error\n");
goto err_mem;
}
omap->xclk60mhsp2_ck = devm_clk_get(dev, "refclk_60m_ext_p2");
if (IS_ERR(omap->xclk60mhsp2_ck)) {
- ret = PTR_ERR(omap->xclk60mhsp2_ck);
- dev_err(dev, "refclk_60m_ext_p2 failed error:%d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->xclk60mhsp2_ck),
+ "refclk_60m_ext_p2 failed error\n");
goto err_mem;
}
omap->init_60m_fclk = devm_clk_get(dev, "refclk_60m_int");
if (IS_ERR(omap->init_60m_fclk)) {
- ret = PTR_ERR(omap->init_60m_fclk);
- dev_err(dev, "refclk_60m_int failed error:%d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->init_60m_fclk),
+ "refclk_60m_int failed error\n");
goto err_mem;
}
@@ -706,9 +699,9 @@ static int usbhs_omap_probe(struct platform_device *pdev)
*/
omap->utmi_clk[i] = devm_clk_get(dev, clkname);
if (IS_ERR(omap->utmi_clk[i])) {
- ret = PTR_ERR(omap->utmi_clk[i]);
- dev_err(dev, "Failed to get clock : %s : %d\n",
- clkname, ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->utmi_clk[i]),
+ "Failed to get clock : %s\n",
+ clkname);
goto err_mem;
}
@@ -716,9 +709,9 @@ static int usbhs_omap_probe(struct platform_device *pdev)
"usb_host_hs_hsic480m_p%d_clk", i + 1);
omap->hsic480m_clk[i] = devm_clk_get(dev, clkname);
if (IS_ERR(omap->hsic480m_clk[i])) {
- ret = PTR_ERR(omap->hsic480m_clk[i]);
- dev_err(dev, "Failed to get clock : %s : %d\n",
- clkname, ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->hsic480m_clk[i]),
+ "Failed to get clock : %s\n",
+ clkname);
goto err_mem;
}
@@ -726,9 +719,9 @@ static int usbhs_omap_probe(struct platform_device *pdev)
"usb_host_hs_hsic60m_p%d_clk", i + 1);
omap->hsic60m_clk[i] = devm_clk_get(dev, clkname);
if (IS_ERR(omap->hsic60m_clk[i])) {
- ret = PTR_ERR(omap->hsic60m_clk[i]);
- dev_err(dev, "Failed to get clock : %s : %d\n",
- clkname, ret);
+ ret = dev_err_probe(dev, PTR_ERR(omap->hsic60m_clk[i]),
+ "Failed to get clock : %s\n",
+ clkname);
goto err_mem;
}
}
@@ -737,16 +730,14 @@ static int usbhs_omap_probe(struct platform_device *pdev)
ret = clk_set_parent(omap->utmi_p1_gfclk,
omap->xclk60mhsp1_ck);
if (ret != 0) {
- dev_err(dev, "xclk60mhsp1_ck set parent failed: %d\n",
- ret);
+ dev_err_probe(dev, ret, "xclk60mhsp1_ck set parent failed\n");
goto err_mem;
}
} else if (is_ehci_tll_mode(pdata->port_mode[0])) {
ret = clk_set_parent(omap->utmi_p1_gfclk,
omap->init_60m_fclk);
if (ret != 0) {
- dev_err(dev, "P0 init_60m_fclk set parent failed: %d\n",
- ret);
+ dev_err_probe(dev, ret, "P0 init_60m_fclk set parent failed\n");
goto err_mem;
}
}
@@ -755,16 +746,14 @@ static int usbhs_omap_probe(struct platform_device *pdev)
ret = clk_set_parent(omap->utmi_p2_gfclk,
omap->xclk60mhsp2_ck);
if (ret != 0) {
- dev_err(dev, "xclk60mhsp2_ck set parent failed: %d\n",
- ret);
+ dev_err_probe(dev, ret, "xclk60mhsp2_ck set parent failed\n");
goto err_mem;
}
} else if (is_ehci_tll_mode(pdata->port_mode[1])) {
ret = clk_set_parent(omap->utmi_p2_gfclk,
omap->init_60m_fclk);
if (ret != 0) {
- dev_err(dev, "P1 init_60m_fclk set parent failed: %d\n",
- ret);
+ dev_err_probe(dev, ret, "P1 init_60m_fclk set parent failed\n");
goto err_mem;
}
}
@@ -775,17 +764,15 @@ static int usbhs_omap_probe(struct platform_device *pdev)
if (dev->of_node) {
ret = of_platform_populate(dev->of_node,
usbhs_child_match_table, NULL, dev);
-
if (ret) {
- dev_err(dev, "Failed to create DT children: %d\n", ret);
+ dev_err_probe(dev, ret, "Failed to create DT children\n");
goto err_mem;
}
} else {
ret = omap_usbhs_alloc_children(pdev);
if (ret) {
- dev_err(dev, "omap_usbhs_alloc_children failed: %d\n",
- ret);
+ dev_err_probe(dev, ret, "omap_usbhs_alloc_children failed\n");
goto err_mem;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 5/8] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (3 preceding siblings ...)
2026-03-23 15:02 ` [PATCH 4/8] mfd: omap-usb-host: Sanitize error path in the probe() Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-23 19:55 ` Conor Dooley
2026-03-23 15:02 ` [PATCH 6/8] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property Thomas Richard
` (2 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Convert OMAP HS USB Host binding to DT schema. The 'ti,hwmods' property is
not mandatory anymore as it is no longer required when the omap-usb-host
node is a child of a new interconnect target (ti,sysc).
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
.../devicetree/bindings/mfd/omap-usb-host.txt | 103 ----------------
.../devicetree/bindings/mfd/ti,omap-usb-host.yaml | 131 +++++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 132 insertions(+), 103 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt b/Documentation/devicetree/bindings/mfd/omap-usb-host.txt
deleted file mode 100644
index a0d8c30c2631e534cae50dfc7183cd04e744f31f..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt
+++ /dev/null
@@ -1,103 +0,0 @@
-OMAP HS USB Host
-
-Required properties:
-
-- compatible: should be "ti,usbhs-host"
-- reg: should contain one register range i.e. start and length
-- ti,hwmods: must contain "usb_host_hs"
-
-Optional properties:
-
-- num-ports: number of USB ports. Usually this is automatically detected
- from the IP's revision register but can be overridden by specifying
- this property. A maximum of 3 ports are supported at the moment.
-
-- portN-mode: String specifying the port mode for port N, where N can be
- from 1 to 3. If the port mode is not specified, that port is treated
- as unused. When specified, it must be one of the following.
- "ehci-phy",
- "ehci-tll",
- "ehci-hsic",
- "ohci-phy-6pin-datse0",
- "ohci-phy-6pin-dpdm",
- "ohci-phy-3pin-datse0",
- "ohci-phy-4pin-dpdm",
- "ohci-tll-6pin-datse0",
- "ohci-tll-6pin-dpdm",
- "ohci-tll-3pin-datse0",
- "ohci-tll-4pin-dpdm",
- "ohci-tll-2pin-datse0",
- "ohci-tll-2pin-dpdm",
-
-- single-ulpi-bypass: Must be present if the controller contains a single
- ULPI bypass control bit. e.g. OMAP3 silicon <= ES2.1
-
-- clocks: a list of phandles and clock-specifier pairs, one for each entry in
- clock-names.
-
-- clock-names: should include:
- For OMAP3
- * "usbhost_120m_fck" - 120MHz Functional clock.
-
- For OMAP4+
- * "refclk_60m_int" - 60MHz internal reference clock for UTMI clock mux
- * "refclk_60m_ext_p1" - 60MHz external ref. clock for Port 1's UTMI clock mux.
- * "refclk_60m_ext_p2" - 60MHz external ref. clock for Port 2's UTMI clock mux
- * "utmi_p1_gfclk" - Port 1 UTMI clock mux.
- * "utmi_p2_gfclk" - Port 2 UTMI clock mux.
- * "usb_host_hs_utmi_p1_clk" - Port 1 UTMI clock gate.
- * "usb_host_hs_utmi_p2_clk" - Port 2 UTMI clock gate.
- * "usb_host_hs_utmi_p3_clk" - Port 3 UTMI clock gate.
- * "usb_host_hs_hsic480m_p1_clk" - Port 1 480MHz HSIC clock gate.
- * "usb_host_hs_hsic480m_p2_clk" - Port 2 480MHz HSIC clock gate.
- * "usb_host_hs_hsic480m_p3_clk" - Port 3 480MHz HSIC clock gate.
- * "usb_host_hs_hsic60m_p1_clk" - Port 1 60MHz HSIC clock gate.
- * "usb_host_hs_hsic60m_p2_clk" - Port 2 60MHz HSIC clock gate.
- * "usb_host_hs_hsic60m_p3_clk" - Port 3 60MHz HSIC clock gate.
-
-Required properties if child node exists:
-
-- #address-cells: Must be 1
-- #size-cells: Must be 1
-- ranges: must be present
-
-Properties for children:
-
-The OMAP HS USB Host subsystem contains EHCI and OHCI controllers.
-See Documentation/devicetree/bindings/usb/generic-ehci.yaml and
-Documentation/devicetree/bindings/usb/generic-ohci.yaml.
-
-Example for OMAP4:
-
-usbhshost: usbhshost@4a064000 {
- compatible = "ti,usbhs-host";
- reg = <0x4a064000 0x800>;
- ti,hwmods = "usb_host_hs";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- usbhsohci: ohci@4a064800 {
- compatible = "ti,ohci-omap3";
- reg = <0x4a064800 0x400>;
- interrupt-parent = <&gic>;
- interrupts = <0 76 0x4>;
- };
-
- usbhsehci: ehci@4a064c00 {
- compatible = "ti,ehci-omap";
- reg = <0x4a064c00 0x400>;
- interrupt-parent = <&gic>;
- interrupts = <0 77 0x4>;
- };
-};
-
-&usbhshost {
- port1-mode = "ehci-phy";
- port2-mode = "ehci-tll";
- port3-mode = "ehci-phy";
-};
-
-&usbhsehci {
- phys = <&hsusb1_phy 0 &hsusb3_phy>;
-};
diff --git a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..7831ad891229aee650d83adcd82405c9dde472a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,omap-usb-host.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OMAP HS USB Host
+
+maintainers:
+ - Thomas Richard <thomas.richard@bootlin.com>
+
+description: |
+ description
+
+properties:
+ compatible:
+ const: ti,usbhs-host
+
+ reg:
+ maxItems: 1
+
+ ti,hwmods:
+ const: usb_host_hs
+
+ num-ports:
+ description:
+ number of USB ports. Usually this is automatically detected from the IP's
+ revision register but can be overridden by specifying this property. A
+ maximum of 3 ports are supported at the moment.
+ maximum: 3
+
+ single-ulpi-bypass:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Must be present if the controller contains a single ULPI bypass control
+ bit. e.g. OMAP3 silicon <= ES2.1ULPI bypass control bit.
+ e.g. OMAP3 silicon <= ES2.1.
+
+ clocks:
+ description: clock-specifier
+
+ clock-names:
+ oneOf:
+ - items:
+ - const: usbhost_120m_fck
+ - items:
+ - const: refclk_60m_int
+ - const: refclk_60m_ext_p1
+ - const: refclk_60m_ext_p2
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ ranges: true
+
+patternProperties:
+ "^port[0-3]-mode$":
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ String specifying the port mode for port N, where N can be from 1 to 3.
+ the port mode is not specified, that port is treated as unused. When
+ specified, it must be one of the following.
+ enum:
+ - ehci-phy
+ - ehci-tll
+ - ehci-hsic
+ - ohci-phy-6pin-datse0
+ - ohci-phy-6pin-dpdm
+ - ohci-phy-3pin-datse0
+ - ohci-phy-4pin-dpdm
+ - ohci-tll-6pin-datse0
+ - ohci-tll-6pin-dpdm
+ - ohci-tll-3pin-datse0
+ - ohci-tll-4pin-dpdm
+ - ohci-tll-2pin-datse0
+ - ohci-tll-2pin-dpdm
+
+ "^usb@":
+ type: object
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ patternProperties:
+ "^usb@": true
+ then:
+ required:
+ - ranges
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ bus {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ usbhshost: usbhshost@4a064000 {
+ compatible = "ti,usbhs-host";
+ reg = <0x4a064000 0x800>;
+ ti,hwmods = "usb_host_hs";
+ port1-mode = "ehci-phy";
+ port2-mode = "ehci-tll";
+ port3-mode = "ehci-phy";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ usbhsohci: usb@4a064800 {
+ compatible = "ti,ohci-omap3";
+ reg = <0x4a064800 0x400>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 76 0x4>;
+ };
+
+ usbhsehci: usb@4a064c00 {
+ compatible = "ti,ehci-omap";
+ reg = <0x4a064c00 0x400>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 77 0x4>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 7d10988cbc62b77515aa1a1fee1c7d3e594869fa..28da3ac5896681bcdab29c23c98eff3612dc181d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19397,6 +19397,7 @@ W: http://linux.omap.com/
Q: http://patchwork.kernel.org/project/linux-omap/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
F: Documentation/devicetree/bindings/arm/ti/omap.yaml
+F: Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
F: arch/arm/configs/omap2plus_defconfig
F: arch/arm/mach-omap2/
F: drivers/bus/omap*.[ch]
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 5/8] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema
2026-03-23 15:02 ` [PATCH 5/8] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
@ 2026-03-23 19:55 ` Conor Dooley
0 siblings, 0 replies; 16+ messages in thread
From: Conor Dooley @ 2026-03-23 19:55 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Thomas Petazzoni,
linux-omap, linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 9358 bytes --]
On Mon, Mar 23, 2026 at 04:02:46PM +0100, Thomas Richard wrote:
> Convert OMAP HS USB Host binding to DT schema. The 'ti,hwmods' property is
> not mandatory anymore as it is no longer required when the omap-usb-host
> node is a child of a new interconnect target (ti,sysc).
>
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
> ---
> .../devicetree/bindings/mfd/omap-usb-host.txt | 103 ----------------
> .../devicetree/bindings/mfd/ti,omap-usb-host.yaml | 131 +++++++++++++++++++++
> MAINTAINERS | 1 +
> 3 files changed, 132 insertions(+), 103 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt b/Documentation/devicetree/bindings/mfd/omap-usb-host.txt
> deleted file mode 100644
> index a0d8c30c2631e534cae50dfc7183cd04e744f31f..0000000000000000000000000000000000000000
> --- a/Documentation/devicetree/bindings/mfd/omap-usb-host.txt
> +++ /dev/null
> @@ -1,103 +0,0 @@
> -OMAP HS USB Host
> -
> -Required properties:
> -
> -- compatible: should be "ti,usbhs-host"
> -- reg: should contain one register range i.e. start and length
> -- ti,hwmods: must contain "usb_host_hs"
> -
> -Optional properties:
> -
> -- num-ports: number of USB ports. Usually this is automatically detected
> - from the IP's revision register but can be overridden by specifying
> - this property. A maximum of 3 ports are supported at the moment.
> -
> -- portN-mode: String specifying the port mode for port N, where N can be
> - from 1 to 3. If the port mode is not specified, that port is treated
> - as unused. When specified, it must be one of the following.
> - "ehci-phy",
> - "ehci-tll",
> - "ehci-hsic",
> - "ohci-phy-6pin-datse0",
> - "ohci-phy-6pin-dpdm",
> - "ohci-phy-3pin-datse0",
> - "ohci-phy-4pin-dpdm",
> - "ohci-tll-6pin-datse0",
> - "ohci-tll-6pin-dpdm",
> - "ohci-tll-3pin-datse0",
> - "ohci-tll-4pin-dpdm",
> - "ohci-tll-2pin-datse0",
> - "ohci-tll-2pin-dpdm",
> -
> -- single-ulpi-bypass: Must be present if the controller contains a single
> - ULPI bypass control bit. e.g. OMAP3 silicon <= ES2.1
> -
> -- clocks: a list of phandles and clock-specifier pairs, one for each entry in
> - clock-names.
> -
> -- clock-names: should include:
> - For OMAP3
> - * "usbhost_120m_fck" - 120MHz Functional clock.
> -
> - For OMAP4+
> - * "refclk_60m_int" - 60MHz internal reference clock for UTMI clock mux
> - * "refclk_60m_ext_p1" - 60MHz external ref. clock for Port 1's UTMI clock mux.
> - * "refclk_60m_ext_p2" - 60MHz external ref. clock for Port 2's UTMI clock mux
> - * "utmi_p1_gfclk" - Port 1 UTMI clock mux.
> - * "utmi_p2_gfclk" - Port 2 UTMI clock mux.
> - * "usb_host_hs_utmi_p1_clk" - Port 1 UTMI clock gate.
> - * "usb_host_hs_utmi_p2_clk" - Port 2 UTMI clock gate.
> - * "usb_host_hs_utmi_p3_clk" - Port 3 UTMI clock gate.
> - * "usb_host_hs_hsic480m_p1_clk" - Port 1 480MHz HSIC clock gate.
> - * "usb_host_hs_hsic480m_p2_clk" - Port 2 480MHz HSIC clock gate.
> - * "usb_host_hs_hsic480m_p3_clk" - Port 3 480MHz HSIC clock gate.
> - * "usb_host_hs_hsic60m_p1_clk" - Port 1 60MHz HSIC clock gate.
> - * "usb_host_hs_hsic60m_p2_clk" - Port 2 60MHz HSIC clock gate.
> - * "usb_host_hs_hsic60m_p3_clk" - Port 3 60MHz HSIC clock gate.
> -
> -Required properties if child node exists:
> -
> -- #address-cells: Must be 1
> -- #size-cells: Must be 1
> -- ranges: must be present
> -
> -Properties for children:
> -
> -The OMAP HS USB Host subsystem contains EHCI and OHCI controllers.
> -See Documentation/devicetree/bindings/usb/generic-ehci.yaml and
> -Documentation/devicetree/bindings/usb/generic-ohci.yaml.
> -
> -Example for OMAP4:
> -
> -usbhshost: usbhshost@4a064000 {
> - compatible = "ti,usbhs-host";
> - reg = <0x4a064000 0x800>;
> - ti,hwmods = "usb_host_hs";
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges;
> -
> - usbhsohci: ohci@4a064800 {
> - compatible = "ti,ohci-omap3";
> - reg = <0x4a064800 0x400>;
> - interrupt-parent = <&gic>;
> - interrupts = <0 76 0x4>;
> - };
> -
> - usbhsehci: ehci@4a064c00 {
> - compatible = "ti,ehci-omap";
> - reg = <0x4a064c00 0x400>;
> - interrupt-parent = <&gic>;
> - interrupts = <0 77 0x4>;
> - };
> -};
> -
> -&usbhshost {
> - port1-mode = "ehci-phy";
> - port2-mode = "ehci-tll";
> - port3-mode = "ehci-phy";
> -};
> -
> -&usbhsehci {
> - phys = <&hsusb1_phy 0 &hsusb3_phy>;
> -};
> diff --git a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..7831ad891229aee650d83adcd82405c9dde472a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> @@ -0,0 +1,131 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/ti,omap-usb-host.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: OMAP HS USB Host
> +
> +maintainers:
> + - Thomas Richard <thomas.richard@bootlin.com>
> +
> +description: |
> + description
> +
> +properties:
> + compatible:
> + const: ti,usbhs-host
> +
> + reg:
> + maxItems: 1
> +
> + ti,hwmods:
> + const: usb_host_hs
> +
> + num-ports:
> + description:
> + number of USB ports. Usually this is automatically detected from the IP's
> + revision register but can be overridden by specifying this property. A
> + maximum of 3 ports are supported at the moment.
> + maximum: 3
> +
> + single-ulpi-bypass:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + Must be present if the controller contains a single ULPI bypass control
> + bit. e.g. OMAP3 silicon <= ES2.1ULPI bypass control bit.
> + e.g. OMAP3 silicon <= ES2.1.
> +
> + clocks:
> + description: clock-specifier
> +
> + clock-names:
> + oneOf:
> + - items:
> + - const: usbhost_120m_fck
> + - items:
> + - const: refclk_60m_int
> + - const: refclk_60m_ext_p1
> + - const: refclk_60m_ext_p2
Looks like half the clocks are missing?
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 1
> +
> + ranges: true
> +
> +patternProperties:
> + "^port[0-3]-mode$":
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + String specifying the port mode for port N, where N can be from 1 to 3.
> + the port mode is not specified, that port is treated as unused. When
> + specified, it must be one of the following.
> + enum:
> + - ehci-phy
> + - ehci-tll
> + - ehci-hsic
> + - ohci-phy-6pin-datse0
> + - ohci-phy-6pin-dpdm
> + - ohci-phy-3pin-datse0
> + - ohci-phy-4pin-dpdm
> + - ohci-tll-6pin-datse0
> + - ohci-tll-6pin-dpdm
> + - ohci-tll-3pin-datse0
> + - ohci-tll-4pin-dpdm
> + - ohci-tll-2pin-datse0
> + - ohci-tll-2pin-dpdm
> +
> + "^usb@":
> + type: object
Can this include a ref to whatever binding describes these devices?
Looks like there's two, one for ochi and echi, at 400 and 800?
> +
> +required:
> + - compatible
> + - reg
> +
> +allOf:
> + - if:
> + patternProperties:
> + "^usb@": true
> + then:
> + required:
> + - ranges
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + bus {
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + usbhshost: usbhshost@4a064000 {
> + compatible = "ti,usbhs-host";
> + reg = <0x4a064000 0x800>;
> + ti,hwmods = "usb_host_hs";
> + port1-mode = "ehci-phy";
> + port2-mode = "ehci-tll";
> + port3-mode = "ehci-phy";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + usbhsohci: usb@4a064800 {
> + compatible = "ti,ohci-omap3";
> + reg = <0x4a064800 0x400>;
> + interrupt-parent = <&gic>;
> + interrupts = <0 76 0x4>;
> + };
> +
> + usbhsehci: usb@4a064c00 {
> + compatible = "ti,ehci-omap";
> + reg = <0x4a064c00 0x400>;
> + interrupt-parent = <&gic>;
> + interrupts = <0 77 0x4>;
> + };
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 7d10988cbc62b77515aa1a1fee1c7d3e594869fa..28da3ac5896681bcdab29c23c98eff3612dc181d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19397,6 +19397,7 @@ W: http://linux.omap.com/
> Q: http://patchwork.kernel.org/project/linux-omap/list/
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> F: Documentation/devicetree/bindings/arm/ti/omap.yaml
> +F: Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> F: arch/arm/configs/omap2plus_defconfig
> F: arch/arm/mach-omap2/
> F: drivers/bus/omap*.[ch]
>
> --
> 2.53.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 6/8] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (4 preceding siblings ...)
2026-03-23 15:02 ` [PATCH 5/8] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-23 15:02 ` [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support Thomas Richard
2026-03-23 15:02 ` [PATCH 8/8] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host Thomas Richard
7 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
Add the 'pbias-supply' property, it is used to specify the voltage
regulator that provides the bias voltage for USB cell.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
index 7831ad891229aee650d83adcd82405c9dde472a8..8ec354ac2bcb6e381744506f6afc57a04d460df1 100644
--- a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
@@ -56,6 +56,11 @@ properties:
ranges: true
+ pbias-supply:
+ description:
+ It is used to specify the voltage regulator that provides the bias
+ voltage for certain analog or I/O pads.
+
patternProperties:
"^port[0-3]-mode$":
$ref: /schemas/types.yaml#/definitions/string
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (5 preceding siblings ...)
2026-03-23 15:02 ` [PATCH 6/8] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
2026-03-31 16:55 ` Lee Jones
2026-03-23 15:02 ` [PATCH 8/8] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host Thomas Richard
7 siblings, 1 reply; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
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 <thomas.richard@bootlin.com>
---
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..9e254e00183e940b775d5bde6e891f0d26af27b0 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -15,6 +15,9 @@
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
+#include <linux/regulator/consumer.h>
+#include <linux/string_choices.h>
+
#include "omap-usb.h"
@@ -95,6 +98,8 @@ struct usbhs_hcd_omap {
struct usbhs_omap_platform_data *pdata;
u32 usbhs_rev;
+
+ struct regulator *pbias;
};
/*-------------------------------------------------------------------------*/
@@ -270,6 +275,25 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
}
}
+static int omap_usbhs_set_pbias(struct device *dev, bool power_on)
+{
+ struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
+ int ret;
+
+ if (!omap->pbias)
+ return 0;
+
+ if (power_on)
+ ret = regulator_enable(omap->pbias);
+ else
+ ret = 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 = dev_get_drvdata(dev);
@@ -278,6 +302,10 @@ static int usbhs_runtime_resume(struct device *dev)
dev_dbg(dev, "usbhs_runtime_resume\n");
+ r = omap_usbhs_set_pbias(dev, true);
+ if (r)
+ return r;
+
omap_tll_enable(pdata);
if (!IS_ERR(omap->ehci_logic_fck))
@@ -355,7 +383,7 @@ static int usbhs_runtime_suspend(struct device *dev)
omap_tll_disable(pdata);
- return 0;
+ return omap_usbhs_set_pbias(dev, false);
}
static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
@@ -564,6 +592,11 @@ static int usbhs_omap_probe(struct platform_device *pdev)
omap->pdata = pdata;
+ omap->pbias = 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);
@@ -759,6 +792,10 @@ static int usbhs_omap_probe(struct platform_device *pdev)
}
initialize:
+ ret = omap_usbhs_set_pbias(dev, true);
+ if (ret)
+ goto err_mem;
+
omap_usbhs_init(dev);
if (dev->of_node) {
@@ -806,6 +843,8 @@ static void usbhs_omap_remove(struct platform_device *pdev)
of_platform_depopulate(&pdev->dev);
else
device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
+
+ omap_usbhs_set_pbias(&pdev->dev, false);
}
static const struct dev_pm_ops usbhsomap_dev_pm_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support
2026-03-23 15:02 ` [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support Thomas Richard
@ 2026-03-31 16:55 ` Lee Jones
2026-03-31 18:19 ` Thomas Richard
0 siblings, 1 reply; 16+ messages in thread
From: Lee Jones @ 2026-03-31 16:55 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
On Mon, 23 Mar 2026, Thomas Richard wrote:
> 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 <thomas.richard@bootlin.com>
> ---
> 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..9e254e00183e940b775d5bde6e891f0d26af27b0 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -15,6 +15,9 @@
> #include <linux/pm_runtime.h>
> #include <linux/of.h>
> #include <linux/of_platform.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/string_choices.h>
> +
?
>
> #include "omap-usb.h"
>
> @@ -95,6 +98,8 @@ struct usbhs_hcd_omap {
> struct usbhs_omap_platform_data *pdata;
>
> u32 usbhs_rev;
> +
> + struct regulator *pbias;
> };
> /*-------------------------------------------------------------------------*/
>
> @@ -270,6 +275,25 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
> }
> }
>
> +static int omap_usbhs_set_pbias(struct device *dev, bool power_on)
> +{
> + struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
> + int ret;
> +
> + if (!omap->pbias)
> + return 0;
> +
> + if (power_on)
> + ret = regulator_enable(omap->pbias);
> + else
> + ret = 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 = dev_get_drvdata(dev);
> @@ -278,6 +302,10 @@ static int usbhs_runtime_resume(struct device *dev)
>
> dev_dbg(dev, "usbhs_runtime_resume\n");
>
> + r = omap_usbhs_set_pbias(dev, true);
> + if (r)
> + return r;
> +
> omap_tll_enable(pdata);
>
> if (!IS_ERR(omap->ehci_logic_fck))
> @@ -355,7 +383,7 @@ static int usbhs_runtime_suspend(struct device *dev)
>
> omap_tll_disable(pdata);
>
> - return 0;
> + return omap_usbhs_set_pbias(dev, false);
> }
>
> static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
> @@ -564,6 +592,11 @@ static int usbhs_omap_probe(struct platform_device *pdev)
>
> omap->pdata = pdata;
>
> + omap->pbias = 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");
You need to check for '-ENODEV' here or you are ignoring the optional part.
> +
> /* Initialize the TLL subsystem */
> omap_tll_init(pdata);
>
> @@ -759,6 +792,10 @@ static int usbhs_omap_probe(struct platform_device *pdev)
> }
>
> initialize:
> + ret = omap_usbhs_set_pbias(dev, true);
> + if (ret)
> + goto err_mem;
Since this regulator is also managed by 'usbhs_runtime_resume' and
'usbhs_runtime_suspend', could manually enabling it here in probe and
disabling it in remove interfere with the reference counting during runtime
PM transitions? Should we consider relying entirely on runtime PM to manage
its state?
> +
> omap_usbhs_init(dev);
>
> if (dev->of_node) {
> @@ -806,6 +843,8 @@ static void usbhs_omap_remove(struct platform_device *pdev)
> of_platform_depopulate(&pdev->dev);
> else
> device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
> +
> + omap_usbhs_set_pbias(&pdev->dev, false);
> }
>
> static const struct dev_pm_ops usbhsomap_dev_pm_ops = {
>
> --
> 2.53.0
>
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support
2026-03-31 16:55 ` Lee Jones
@ 2026-03-31 18:19 ` Thomas Richard
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-31 18:19 UTC (permalink / raw)
To: Lee Jones
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
Hello Lee,
On 3/31/26 6:55 PM, Lee Jones wrote:
> On Mon, 23 Mar 2026, Thomas Richard wrote:
>
>> 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 <thomas.richard@bootlin.com>
>> ---
>> 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..9e254e00183e940b775d5bde6e891f0d26af27b0 100644
>> --- a/drivers/mfd/omap-usb-host.c
>> +++ b/drivers/mfd/omap-usb-host.c
>> @@ -15,6 +15,9 @@
>> #include <linux/pm_runtime.h>
>> #include <linux/of.h>
>> #include <linux/of_platform.h>
>> +#include <linux/regulator/consumer.h>
>> +#include <linux/string_choices.h>
>> +
>
> ?
>
>>
>> #include "omap-usb.h"
>>
>> @@ -95,6 +98,8 @@ struct usbhs_hcd_omap {
>> struct usbhs_omap_platform_data *pdata;
>>
>> u32 usbhs_rev;
>> +
>> + struct regulator *pbias;
>> };
>> /*-------------------------------------------------------------------------*/
>>
>> @@ -270,6 +275,25 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
>> }
>> }
>>
>> +static int omap_usbhs_set_pbias(struct device *dev, bool power_on)
>> +{
>> + struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
>> + int ret;
>> +
>> + if (!omap->pbias)
>> + return 0;
>> +
>> + if (power_on)
>> + ret = regulator_enable(omap->pbias);
>> + else
>> + ret = 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 = dev_get_drvdata(dev);
>> @@ -278,6 +302,10 @@ static int usbhs_runtime_resume(struct device *dev)
>>
>> dev_dbg(dev, "usbhs_runtime_resume\n");
>>
>> + r = omap_usbhs_set_pbias(dev, true);
>> + if (r)
>> + return r;
>> +
>> omap_tll_enable(pdata);
>>
>> if (!IS_ERR(omap->ehci_logic_fck))
>> @@ -355,7 +383,7 @@ static int usbhs_runtime_suspend(struct device *dev)
>>
>> omap_tll_disable(pdata);
>>
>> - return 0;
>> + return omap_usbhs_set_pbias(dev, false);
>> }
>>
>> static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
>> @@ -564,6 +592,11 @@ static int usbhs_omap_probe(struct platform_device *pdev)
>>
>> omap->pdata = pdata;
>>
>> + omap->pbias = 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");
>
> You need to check for '-ENODEV' here or you are ignoring the optional part.
>
>> +
>> /* Initialize the TLL subsystem */
>> omap_tll_init(pdata);
>>
>> @@ -759,6 +792,10 @@ static int usbhs_omap_probe(struct platform_device *pdev)
>> }
>>
>> initialize:
>> + ret = omap_usbhs_set_pbias(dev, true);
>> + if (ret)
>> + goto err_mem;
>
> Since this regulator is also managed by 'usbhs_runtime_resume' and
> 'usbhs_runtime_suspend', could manually enabling it here in probe and
> disabling it in remove interfere with the reference counting during runtime
> PM transitions? Should we consider relying entirely on runtime PM to manage
> its state?
>
Thanks a lot for the review. I already sent a v2, do not spend your time
on this version. This comment is also valid for v2 (and the headers
one), but I fixed -ENODEV in v2.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 8/8] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host
2026-03-23 15:02 [PATCH 0/8] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (6 preceding siblings ...)
2026-03-23 15:02 ` [PATCH 7/8] mfd: omap-usb-host: Add pbias regulator support Thomas Richard
@ 2026-03-23 15:02 ` Thomas Richard
7 siblings, 0 replies; 16+ messages in thread
From: Thomas Richard @ 2026-03-23 15:02 UTC (permalink / raw)
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, linux-kernel, devicetree,
Thomas Richard
On OMAP4 add the pbias SIM regulator to the OMAP HS USB Host.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
arch/arm/boot/dts/ti/omap/omap4-l4.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
index 6904a84a1700527443cee19f62870904082eb48a..c5e097f9cd17b0ff0966437a9deeff3bdf8134a1 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi
@@ -301,6 +301,7 @@ usbhshost: usbhshost@0 {
clock-names = "refclk_60m_int",
"refclk_60m_ext_p1",
"refclk_60m_ext_p2";
+ pbias-supply = <&pbias_sim_reg>;
usbhsohci: usb@800 {
compatible = "ti,ohci-omap3";
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread