* [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
@ 2026-03-30 13:43 ` Thomas Richard
2026-03-31 8:21 ` Krzysztof Kozlowski
2026-03-30 13:43 ` [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator Thomas Richard
` (9 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:43 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 PBIAS internal regulator binding to DT schema.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
.../bindings/regulator/pbias-regulator.txt | 32 ------
.../bindings/regulator/ti,pbias-regulator.yaml | 125 +++++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 126 insertions(+), 32 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt b/Documentation/devicetree/bindings/regulator/pbias-regulator.txt
deleted file mode 100644
index acbcb452a69a..000000000000
--- a/Documentation/devicetree/bindings/regulator/pbias-regulator.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
-
-Required properties:
-- compatible:
- - should be "ti,pbias-dra7" for DRA7
- - should be "ti,pbias-omap2" for OMAP2
- - should be "ti,pbias-omap3" for OMAP3
- - should be "ti,pbias-omap4" for OMAP4
- - should be "ti,pbias-omap5" for OMAP5
- - "ti,pbias-omap" is deprecated
-- reg: pbias register offset from syscon base and size of pbias register.
-- syscon : phandle of the system control module
-- regulator-name : should be
- pbias_mmc_omap2430 for OMAP2430, OMAP3 SoCs
- pbias_sim_omap3 for OMAP3 SoCs
- pbias_mmc_omap4 for OMAP4 SoCs
- pbias_mmc_omap5 for OMAP5 and DRA7 SoC
-
-Optional properties:
-- Any optional property defined in bindings/regulator/regulator.txt
-
-Example:
-
- pbias_regulator: pbias_regulator {
- compatible = "ti,pbias-omap";
- reg = <0 0x4>;
- syscon = <&omap5_padconf_global>;
- pbias_mmc_reg: pbias_mmc_omap5 {
- regulator-name = "pbias_mmc_omap5";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- };
diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
new file mode 100644
index 000000000000..3e020d87701b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/ti,pbias-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PBIAS internal regulator
+
+maintainers:
+ - Thomas Richard <thomas.richard@bootlin.com>
+
+description: |
+ PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - ti,pbias-dra7
+ - ti,pbias-omap2
+ - ti,pbias-omap3
+ - ti,pbias-omap4
+ - ti,pbias-omap5
+ - const: ti,pbias-omap
+
+ reg:
+ maxItems: 1
+
+ syscon:
+ description: Phandle of the system control module
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+patternProperties:
+ '^pbias_*':
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - syscon
+
+additionalProperties: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,pbias-omap2
+ then:
+ patternProperties:
+ '^pbias_*':
+ properties:
+ regulator-name:
+ contains:
+ enum:
+ - pbias_mmc_omap2430
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,pbias-omap3
+ then:
+ patternProperties:
+ '^pbias_*':
+ properties:
+ regulator-name:
+ contains:
+ enum:
+ - pbias_mmc_omap2430
+ - pbias_sim_omap3
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,pbias-omap4
+ then:
+ patternProperties:
+ '^pbias_*':
+ properties:
+ regulator-name:
+ contains:
+ enum:
+ - pbias_mmc_omap4
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,pbias-dra7
+ - ti,pbias-omap5
+ then:
+ patternProperties:
+ '^pbias_*':
+ properties:
+ regulator-name:
+ contains:
+ enum:
+ - pbias_mmc_omap5
+
+examples:
+ - |
+ bus {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pbias_regulator: pbias_regulator@0 {
+ compatible = "ti,pbias-omap5", "ti,pbias-omap";
+ reg = <0 0x4>;
+ syscon = <&omap5_padconf_global>;
+ pbias_mmc_reg: pbias_mmc_omap5 {
+ regulator-name = "pbias_mmc_omap5";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index c3fe46d7c4bc..15052c0f5377 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19406,6 +19406,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/regulator/ti,pbias-regulator.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] 21+ messages in thread* Re: [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema
2026-03-30 13:43 ` [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema Thomas Richard
@ 2026-03-31 8:21 ` Krzysztof Kozlowski
2026-04-08 7:57 ` Thomas Richard
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-31 8:21 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
On Mon, Mar 30, 2026 at 03:43:58PM +0200, Thomas Richard wrote:
> +$id: http://devicetree.org/schemas/regulator/ti,pbias-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: PBIAS internal regulator
> +
> +maintainers:
> + - Thomas Richard <thomas.richard@bootlin.com>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - ti,pbias-dra7
> + - ti,pbias-omap2
> + - ti,pbias-omap3
> + - ti,pbias-omap4
> + - ti,pbias-omap5
> + - const: ti,pbias-omap
> +
> + reg:
> + maxItems: 1
> +
> + syscon:
> + description: Phandle of the system control module
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> +patternProperties:
> + '^pbias_*':
That wasn't in old binding and underscore is not allowed, so this needs
explanation. Old binding mentioned only the names.
> + type: object
> + $ref: regulator.yaml#
> + unevaluatedProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - syscon
> +
> +additionalProperties: false
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,pbias-omap2
> + then:
> + patternProperties:
> + '^pbias_*':
> + properties:
> + regulator-name:
> + contains:
> + enum:
> + - pbias_mmc_omap2430
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,pbias-omap3
> + then:
> + patternProperties:
> + '^pbias_*':
> + properties:
> + regulator-name:
> + contains:
> + enum:
> + - pbias_mmc_omap2430
> + - pbias_sim_omap3
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,pbias-omap4
> + then:
> + patternProperties:
> + '^pbias_*':
> + properties:
> + regulator-name:
> + contains:
> + enum:
> + - pbias_mmc_omap4
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,pbias-dra7
> + - ti,pbias-omap5
> + then:
> + patternProperties:
> + '^pbias_*':
> + properties:
> + regulator-name:
> + contains:
> + enum:
> + - pbias_mmc_omap5
> +
> +examples:
> + - |
> + bus {
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + pbias_regulator: pbias_regulator@0 {
Drop unused labels
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema
2026-03-31 8:21 ` Krzysztof Kozlowski
@ 2026-04-08 7:57 ` Thomas Richard
2026-04-08 12:38 ` Rob Herring
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-04-08 7:57 UTC (permalink / raw)
To: Krzysztof Kozlowski
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
Hello Krzysztof,
On 3/31/26 10:21 AM, Krzysztof Kozlowski wrote:
> On Mon, Mar 30, 2026 at 03:43:58PM +0200, Thomas Richard wrote:
>> +$id: http://devicetree.org/schemas/regulator/ti,pbias-regulator.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: PBIAS internal regulator
>> +
>> +maintainers:
>> + - Thomas Richard <thomas.richard@bootlin.com>
>> +
>> +description: |
>
> Do not need '|' unless you need to preserve formatting.
>
>> + PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - ti,pbias-dra7
>> + - ti,pbias-omap2
>> + - ti,pbias-omap3
>> + - ti,pbias-omap4
>> + - ti,pbias-omap5
>> + - const: ti,pbias-omap
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + syscon:
>> + description: Phandle of the system control module
>> + $ref: /schemas/types.yaml#/definitions/phandle
>> +
>> +patternProperties:
>> + '^pbias_*':
>
> That wasn't in old binding and underscore is not allowed, so this needs
> explanation. Old binding mentioned only the names.
I did it to match existing devicetrees.
I guess I should define properties like 'pbias-mmc' and 'pbias-sim',
then update node names in devicetrees to match binding.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema
2026-04-08 7:57 ` Thomas Richard
@ 2026-04-08 12:38 ` Rob Herring
0 siblings, 0 replies; 21+ messages in thread
From: Rob Herring @ 2026-04-08 12:38 UTC (permalink / raw)
To: Thomas Richard
Cc: Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Thomas Petazzoni,
linux-omap, linux-kernel, devicetree
On Wed, Apr 08, 2026 at 09:57:20AM +0200, Thomas Richard wrote:
> Hello Krzysztof,
>
> On 3/31/26 10:21 AM, Krzysztof Kozlowski wrote:
> > On Mon, Mar 30, 2026 at 03:43:58PM +0200, Thomas Richard wrote:
> >> +$id: http://devicetree.org/schemas/regulator/ti,pbias-regulator.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: PBIAS internal regulator
> >> +
> >> +maintainers:
> >> + - Thomas Richard <thomas.richard@bootlin.com>
> >> +
> >> +description: |
> >
> > Do not need '|' unless you need to preserve formatting.
> >
> >> + PBIAS internal regulator for SD card dual voltage i/o pads on OMAP SoCs.
> >> +
> >> +properties:
> >> + compatible:
> >> + items:
> >> + - enum:
> >> + - ti,pbias-dra7
> >> + - ti,pbias-omap2
> >> + - ti,pbias-omap3
> >> + - ti,pbias-omap4
> >> + - ti,pbias-omap5
> >> + - const: ti,pbias-omap
> >> +
> >> + reg:
> >> + maxItems: 1
> >> +
> >> + syscon:
> >> + description: Phandle of the system control module
> >> + $ref: /schemas/types.yaml#/definitions/phandle
> >> +
> >> +patternProperties:
> >> + '^pbias_*':
> >
> > That wasn't in old binding and underscore is not allowed, so this needs
> > explanation. Old binding mentioned only the names.
>
> I did it to match existing devicetrees.
> I guess I should define properties like 'pbias-mmc' and 'pbias-sim',
> then update node names in devicetrees to match binding.
For this ancient stuff, I would just leave the dts files alone. Just
explain that in the commit message.
Your pattern should be '^pbias_' though.
Rob
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
2026-03-30 13:43 ` [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema Thomas Richard
@ 2026-03-30 13:43 ` Thomas Richard
2026-03-31 8:22 ` Krzysztof Kozlowski
2026-03-30 13:44 ` [PATCH v2 03/11] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
` (8 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:43 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
Define pbias_sim_omap4 regulator for OMAP4. This regulators drives SIM_VDDS
supply and allows to unlock USB I/O cell.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
index 3e020d87701b..908fbb46b5cf 100644
--- a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
@@ -89,6 +89,7 @@ allOf:
contains:
enum:
- pbias_mmc_omap4
+ - pbias_sim_omap4
- if:
properties:
--
2.53.0
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator
2026-03-30 13:43 ` [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator Thomas Richard
@ 2026-03-31 8:22 ` Krzysztof Kozlowski
2026-04-08 7:58 ` Thomas Richard
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-31 8:22 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
On Mon, Mar 30, 2026 at 03:43:59PM +0200, Thomas Richard wrote:
> Define pbias_sim_omap4 regulator for OMAP4. This regulators drives SIM_VDDS
> supply and allows to unlock USB I/O cell.
>
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
> ---
> Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> index 3e020d87701b..908fbb46b5cf 100644
> --- a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> @@ -89,6 +89,7 @@ allOf:
> contains:
> enum:
> - pbias_mmc_omap4
> + - pbias_sim_omap4
Names cannot be fixed, because they represent different board naming.
Why growing the deprecated style?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator
2026-03-31 8:22 ` Krzysztof Kozlowski
@ 2026-04-08 7:58 ` Thomas Richard
2026-04-08 12:41 ` Rob Herring
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-04-08 7:58 UTC (permalink / raw)
To: Krzysztof Kozlowski
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
Hello Krzysztof,
On 3/31/26 10:22 AM, Krzysztof Kozlowski wrote:
> On Mon, Mar 30, 2026 at 03:43:59PM +0200, Thomas Richard wrote:
>> Define pbias_sim_omap4 regulator for OMAP4. This regulators drives SIM_VDDS
>> supply and allows to unlock USB I/O cell.
>>
>> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
>> ---
>> Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>> index 3e020d87701b..908fbb46b5cf 100644
>> --- a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>> +++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>> @@ -89,6 +89,7 @@ allOf:
>> contains:
>> enum:
>> - pbias_mmc_omap4
>> + - pbias_sim_omap4
>
> Names cannot be fixed, because they represent different board naming.
> Why growing the deprecated style?
Okay, so I'll drop all if statements, add a regex which matches
regulator names and fix the regulator name in the driver.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator
2026-04-08 7:58 ` Thomas Richard
@ 2026-04-08 12:41 ` Rob Herring
2026-04-08 13:01 ` Thomas Richard
0 siblings, 1 reply; 21+ messages in thread
From: Rob Herring @ 2026-04-08 12:41 UTC (permalink / raw)
To: Thomas Richard
Cc: Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Thomas Petazzoni,
linux-omap, linux-kernel, devicetree
On Wed, Apr 08, 2026 at 09:58:15AM +0200, Thomas Richard wrote:
> Hello Krzysztof,
>
> On 3/31/26 10:22 AM, Krzysztof Kozlowski wrote:
> > On Mon, Mar 30, 2026 at 03:43:59PM +0200, Thomas Richard wrote:
> >> Define pbias_sim_omap4 regulator for OMAP4. This regulators drives SIM_VDDS
> >> supply and allows to unlock USB I/O cell.
> >>
> >> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
> >> ---
> >> Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> >> index 3e020d87701b..908fbb46b5cf 100644
> >> --- a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> >> +++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> >> @@ -89,6 +89,7 @@ allOf:
> >> contains:
> >> enum:
> >> - pbias_mmc_omap4
> >> + - pbias_sim_omap4
> >
> > Names cannot be fixed, because they represent different board naming.
> > Why growing the deprecated style?
>
> Okay, so I'll drop all if statements, add a regex which matches
> regulator names and fix the regulator name in the driver.
If a driver depends on the names, you can't change them.
Rob
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator
2026-04-08 12:41 ` Rob Herring
@ 2026-04-08 13:01 ` Thomas Richard
0 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-04-08 13:01 UTC (permalink / raw)
To: Rob Herring
Cc: Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Thomas Petazzoni,
linux-omap, linux-kernel, devicetree
On 4/8/26 2:41 PM, Rob Herring wrote:
> On Wed, Apr 08, 2026 at 09:58:15AM +0200, Thomas Richard wrote:
>> Hello Krzysztof,
>>
>> On 3/31/26 10:22 AM, Krzysztof Kozlowski wrote:
>>> On Mon, Mar 30, 2026 at 03:43:59PM +0200, Thomas Richard wrote:
>>>> Define pbias_sim_omap4 regulator for OMAP4. This regulators drives SIM_VDDS
>>>> supply and allows to unlock USB I/O cell.
>>>>
>>>> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
>>>> ---
>>>> Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>>>> index 3e020d87701b..908fbb46b5cf 100644
>>>> --- a/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>>>> +++ b/Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
>>>> @@ -89,6 +89,7 @@ allOf:
>>>> contains:
>>>> enum:
>>>> - pbias_mmc_omap4
>>>> + - pbias_sim_omap4
>>>
>>> Names cannot be fixed, because they represent different board naming.
>>> Why growing the deprecated style?
>>
>> Okay, so I'll drop all if statements, add a regex which matches
>> regulator names and fix the regulator name in the driver.
>
> If a driver depends on the names, you can't change them.
>
I mean the new regulator I add with this series. At this time it does
not exist yet in the driver.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 03/11] regulator: pbias: Add pbias SIM regulator for OMAP4
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
2026-03-30 13:43 ` [PATCH v2 01/11] dt-bindings: regulator: ti,pbias-regulator: Convert to DT schema Thomas Richard
2026-03-30 13:43 ` [PATCH v2 02/11] dt-bindings: regulator: ti,pbias-regulator: Add pbias_sim_omap4 regulator Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 04/11] ARM: dts: ti: omap4: Add pbias SIM regulator Thomas Richard
` (7 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
index cd5a0d7e4455..23cc106cd9fb 100644
--- a/drivers/regulator/pbias-regulator.c
+++ b/drivers/regulator/pbias-regulator.c
@@ -81,6 +81,17 @@ 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),
+ .disable_val = BIT(31),
+ .vmode = BIT(27),
+ .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 +119,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] 21+ messages in thread* [PATCH v2 04/11] ARM: dts: ti: omap4: Add pbias SIM regulator
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (2 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 03/11] regulator: pbias: Add pbias SIM regulator for OMAP4 Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 05/11] mfd: omap-usb-host: Cleanup header includes Thomas Richard
` (6 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 4881dd674393..6904a84a1700 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] 21+ messages in thread* [PATCH v2 05/11] mfd: omap-usb-host: Cleanup header includes
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (3 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 04/11] ARM: dts: ti: omap4: Add pbias SIM regulator Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 06/11] mfd: omap-usb-host: Sanitize error path in the probe() Thomas Richard
` (5 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 4d29a6e2ed87..4e066a17cef0 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] 21+ messages in thread* [PATCH v2 06/11] mfd: omap-usb-host: Sanitize error path in the probe()
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (4 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 05/11] mfd: omap-usb-host: Cleanup header includes Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 07/11] mfd: omap-usb-host: Refactor suspend and resume callbacks Thomas Richard
` (4 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 4e066a17cef0..ac974285be34 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] 21+ messages in thread* [PATCH v2 07/11] mfd: omap-usb-host: Refactor suspend and resume callbacks
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (5 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 06/11] mfd: omap-usb-host: Sanitize error path in the probe() Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 08/11] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
` (3 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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
The clock handling logic in suspend and resume callbacks is very similar.
Create a new usbhs_clocks_enable() function to avoid code duplication.
Also remove ftrace-like debug messages.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/mfd/omap-usb-host.c | 94 ++++++++++++++++++++++-----------------------
1 file changed, 46 insertions(+), 48 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index ac974285be34..17a54f0087c3 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -270,48 +270,56 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
}
}
-static int usbhs_runtime_resume(struct device *dev)
+static int usbhs_clocks_enable(struct device *dev, bool enable)
{
- struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
- struct usbhs_omap_platform_data *pdata = omap->pdata;
- int i, r;
-
- dev_dbg(dev, "usbhs_runtime_resume\n");
+ struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
+ struct usbhs_omap_platform_data *pdata = omap->pdata;
+ int r = 0, i;
- omap_tll_enable(pdata);
-
- if (!IS_ERR(omap->ehci_logic_fck))
- clk_prepare_enable(omap->ehci_logic_fck);
+ if (!enable && !IS_ERR(omap->ehci_logic_fck))
+ clk_disable_unprepare(omap->ehci_logic_fck);
for (i = 0; i < omap->nports; i++) {
switch (pdata->port_mode[i]) {
case OMAP_EHCI_PORT_MODE_HSIC:
if (!IS_ERR(omap->hsic60m_clk[i])) {
- r = clk_prepare_enable(omap->hsic60m_clk[i]);
- if (r) {
- dev_err(dev,
- "Can't enable port %d hsic60m clk:%d\n",
- i, r);
+ if (enable) {
+ r = clk_prepare_enable(omap->hsic60m_clk[i]);
+ if (r) {
+ dev_err(dev,
+ "Can't enable port %d hsic60m clk:%d\n",
+ i, r);
+ }
+ } else {
+ clk_disable_unprepare(omap->hsic60m_clk[i]);
}
}
if (!IS_ERR(omap->hsic480m_clk[i])) {
- r = clk_prepare_enable(omap->hsic480m_clk[i]);
- if (r) {
- dev_err(dev,
- "Can't enable port %d hsic480m clk:%d\n",
- i, r);
+ if (enable) {
+ r = clk_prepare_enable(omap->hsic480m_clk[i]);
+ if (r) {
+ dev_err(dev,
+ "Can't enable port %d hsic480m clk:%d\n",
+ i, r);
+ }
+ } else {
+ clk_disable_unprepare(omap->hsic480m_clk[i]);
}
}
fallthrough; /* as HSIC mode needs utmi_clk */
case OMAP_EHCI_PORT_MODE_TLL:
if (!IS_ERR(omap->utmi_clk[i])) {
- r = clk_prepare_enable(omap->utmi_clk[i]);
- if (r) {
- dev_err(dev,
- "Can't enable port %d clk : %d\n",
- i, r);
+ if (enable) {
+ r = clk_prepare_enable(omap->utmi_clk[i]);
+ if (r) {
+ dev_err(dev,
+ "Can't enable port %d clk : %d\n",
+ i, r);
+ }
+ } else {
+ clk_disable_unprepare(omap->utmi_clk[i]);
}
}
break;
@@ -320,38 +328,28 @@ static int usbhs_runtime_resume(struct device *dev)
}
}
- return 0;
+ if (enable && !IS_ERR(omap->ehci_logic_fck))
+ r = clk_prepare_enable(omap->ehci_logic_fck);
+
+ return r;
}
-static int usbhs_runtime_suspend(struct device *dev)
+static int usbhs_runtime_resume(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
struct usbhs_omap_platform_data *pdata = omap->pdata;
- int i;
- dev_dbg(dev, "usbhs_runtime_suspend\n");
-
- for (i = 0; i < omap->nports; i++) {
- switch (pdata->port_mode[i]) {
- case OMAP_EHCI_PORT_MODE_HSIC:
- if (!IS_ERR(omap->hsic60m_clk[i]))
- clk_disable_unprepare(omap->hsic60m_clk[i]);
+ omap_tll_enable(pdata);
- if (!IS_ERR(omap->hsic480m_clk[i]))
- clk_disable_unprepare(omap->hsic480m_clk[i]);
- fallthrough; /* as utmi_clks were used in HSIC mode */
+ return usbhs_clocks_enable(dev, true);
+}
- case OMAP_EHCI_PORT_MODE_TLL:
- if (!IS_ERR(omap->utmi_clk[i]))
- clk_disable_unprepare(omap->utmi_clk[i]);
- break;
- default:
- break;
- }
- }
+static int usbhs_runtime_suspend(struct device *dev)
+{
+ struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
+ struct usbhs_omap_platform_data *pdata = omap->pdata;
- if (!IS_ERR(omap->ehci_logic_fck))
- clk_disable_unprepare(omap->ehci_logic_fck);
+ usbhs_clocks_enable(dev, false);
omap_tll_disable(pdata);
--
2.53.0
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH v2 08/11] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (6 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 07/11] mfd: omap-usb-host: Refactor suspend and resume callbacks Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-04-08 12:55 ` Rob Herring
2026-03-30 13:44 ` [PATCH v2 09/11] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property Thomas Richard
` (2 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 | 161 +++++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 162 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 a0d8c30c2631..000000000000
--- 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 000000000000..3b5b041f0321
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
@@ -0,0 +1,161 @@
+# 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>
+
+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
+ - items:
+ - const: refclk_60m_int
+ - const: refclk_60m_ext_p1
+ - const: refclk_60m_ext_p2
+ - const: usb_host_hs_utmi_p1_clk
+ - const: usb_host_hs_hsic480m_p1_clk
+ - const: usb_host_hs_hsic60m_p1_clk
+ - items:
+ - const: refclk_60m_int
+ - const: refclk_60m_ext_p1
+ - const: refclk_60m_ext_p2
+ - const: usb_host_hs_utmi_p1_clk
+ - const: usb_host_hs_hsic480m_p1_clk
+ - const: usb_host_hs_hsic60m_p1_clk
+ - const: usb_host_hs_utmi_p2_clk
+ - const: usb_host_hs_hsic480m_p2_clk
+ - const: usb_host_hs_hsic60m_p2_clk
+ - items:
+ - const: refclk_60m_int
+ - const: refclk_60m_ext_p1
+ - const: refclk_60m_ext_p2
+ - const: usb_host_hs_utmi_p1_clk
+ - const: usb_host_hs_hsic480m_p1_clk
+ - const: usb_host_hs_hsic60m_p1_clk
+ - const: usb_host_hs_utmi_p2_clk
+ - const: usb_host_hs_hsic480m_p2_clk
+ - const: usb_host_hs_hsic60m_p2_clk
+ - const: usb_host_hs_utmi_p3_clk
+ - const: usb_host_hs_hsic480m_p3_clk
+ - const: usb_host_hs_hsic60m_p3_clk
+
+ "#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
+ oneOf:
+ - $ref: /schemas/usb/generic-ohci.yaml#
+ - $ref: /schemas/usb/generic-ehci.yaml#
+
+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 15052c0f5377..d1dadba8ed0a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19406,6 +19406,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: Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
F: arch/arm/configs/omap2plus_defconfig
F: arch/arm/mach-omap2/
--
2.53.0
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH v2 08/11] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema
2026-03-30 13:44 ` [PATCH v2 08/11] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
@ 2026-04-08 12:55 ` Rob Herring
0 siblings, 0 replies; 21+ messages in thread
From: Rob Herring @ 2026-04-08 12:55 UTC (permalink / raw)
To: Thomas Richard
Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Liam Girdwood, Mark Brown, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree
On Mon, Mar 30, 2026 at 03:44:05PM +0200, 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 | 161 +++++++++++++++++++++
> MAINTAINERS | 1 +
> 3 files changed, 162 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 a0d8c30c2631..000000000000
> --- 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 000000000000..3b5b041f0321
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> @@ -0,0 +1,161 @@
> +# 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>
> +
> +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
> + - items:
> + - const: refclk_60m_int
> + - const: refclk_60m_ext_p1
> + - const: refclk_60m_ext_p2
> + - const: usb_host_hs_utmi_p1_clk
> + - const: usb_host_hs_hsic480m_p1_clk
> + - const: usb_host_hs_hsic60m_p1_clk
> + - items:
> + - const: refclk_60m_int
> + - const: refclk_60m_ext_p1
> + - const: refclk_60m_ext_p2
> + - const: usb_host_hs_utmi_p1_clk
> + - const: usb_host_hs_hsic480m_p1_clk
> + - const: usb_host_hs_hsic60m_p1_clk
> + - const: usb_host_hs_utmi_p2_clk
> + - const: usb_host_hs_hsic480m_p2_clk
> + - const: usb_host_hs_hsic60m_p2_clk
> + - items:
> + - const: refclk_60m_int
> + - const: refclk_60m_ext_p1
> + - const: refclk_60m_ext_p2
> + - const: usb_host_hs_utmi_p1_clk
> + - const: usb_host_hs_hsic480m_p1_clk
> + - const: usb_host_hs_hsic60m_p1_clk
> + - const: usb_host_hs_utmi_p2_clk
> + - const: usb_host_hs_hsic480m_p2_clk
> + - const: usb_host_hs_hsic60m_p2_clk
> + - const: usb_host_hs_utmi_p3_clk
> + - const: usb_host_hs_hsic480m_p3_clk
> + - const: usb_host_hs_hsic60m_p3_clk
All but the first one can be combined to this last entry plus
'minItems: 3'.
> +
> + "#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
> + oneOf:
> + - $ref: /schemas/usb/generic-ohci.yaml#
> + - $ref: /schemas/usb/generic-ehci.yaml#
This causes the schemas to be applied twice and oneOf causes confusing
warnings. Instead just do this:
type: object
properties:
compatible:
contains:
enum:
- ti,ehci-omap
- ti,ohci-omap3
required:
- compatible
> +
> +required:
> + - compatible
> + - reg
> +
> +allOf:
> + - if:
> + patternProperties:
> + "^usb@": true
This will always be true. Unfortunately there's no way to do required
pattern properties in json-schema.
Is it valid to have no usb nodes? I wouldn't think so, so just make
these properties always required.
> + 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 15052c0f5377..d1dadba8ed0a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19406,6 +19406,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: Documentation/devicetree/bindings/regulator/ti,pbias-regulator.yaml
> F: arch/arm/configs/omap2plus_defconfig
> F: arch/arm/mach-omap2/
>
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 09/11] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (7 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 08/11] dt-bindings: mfd: ti,omap-usb-host: Convert to DT schema Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 16:40 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 10/11] mfd: omap-usb-host: Add pbias regulator support Thomas Richard
2026-03-30 13:44 ` [PATCH v2 11/11] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host Thomas Richard
10 siblings, 1 reply; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
index 3b5b041f0321..d0a61dec4961 100644
--- a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
@@ -83,6 +83,12 @@ properties:
ranges: true
+ pbias-supply:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ 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] 21+ messages in thread* Re: [PATCH v2 09/11] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property
2026-03-30 13:44 ` [PATCH v2 09/11] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property Thomas Richard
@ 2026-03-30 16:40 ` Thomas Richard
0 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 16:40 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
On 3/30/26 3:44 PM, Thomas Richard wrote:
> 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 | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> index 3b5b041f0321..d0a61dec4961 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,omap-usb-host.yaml
> @@ -83,6 +83,12 @@ properties:
>
> ranges: true
>
> + pbias-supply:
> + $ref: /schemas/types.yaml#/definitions/phandle
I'm sorry, I missed dt_binding_check error. $ref is not needed.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 10/11] mfd: omap-usb-host: Add pbias regulator support
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (8 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 09/11] dt-bindings: mfd: ti,omap-usb-host: Add 'pbias-supply' property Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
2026-03-30 13:44 ` [PATCH v2 11/11] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host Thomas Richard
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 | 55 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 17a54f0087c3..907fb614d464 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -15,6 +15,8 @@
#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 +97,8 @@ struct usbhs_hcd_omap {
struct usbhs_omap_platform_data *pdata;
u32 usbhs_rev;
+
+ struct regulator *pbias;
};
/*-------------------------------------------------------------------------*/
@@ -334,26 +338,60 @@ static int usbhs_clocks_enable(struct device *dev, bool enable)
return r;
}
+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);
struct usbhs_omap_platform_data *pdata = omap->pdata;
+ int ret;
omap_tll_enable(pdata);
- return usbhs_clocks_enable(dev, true);
+ ret = usbhs_clocks_enable(dev, true);
+ if (ret)
+ return ret;
+
+ return omap_usbhs_set_pbias(dev, true);
}
static int usbhs_runtime_suspend(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
struct usbhs_omap_platform_data *pdata = omap->pdata;
+ int ret;
usbhs_clocks_enable(dev, false);
omap_tll_disable(pdata);
+ ret = omap_usbhs_set_pbias(dev, false);
+ if (ret)
+ goto err;
+
return 0;
+
+err:
+ omap_tll_enable(pdata);
+ usbhs_clocks_enable(dev, true);
+ return ret;
}
static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
@@ -562,6 +600,15 @@ 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)) {
+ if (PTR_ERR(omap->pbias) == -ENODEV)
+ omap->pbias = NULL;
+ else
+ return dev_err_probe(dev, PTR_ERR(omap->pbias),
+ "unable to get pbias regulator\n");
+ }
+
/* Initialize the TLL subsystem */
omap_tll_init(pdata);
@@ -757,6 +804,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) {
@@ -804,6 +855,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] 21+ messages in thread* [PATCH v2 11/11] ARM: dts: ti: omap4: Add pbias regulator to the HS USB Host
2026-03-30 13:43 [PATCH v2 00/11] Add SIM pbias regulator support for USB on OMAP4 Thomas Richard
` (9 preceding siblings ...)
2026-03-30 13:44 ` [PATCH v2 10/11] mfd: omap-usb-host: Add pbias regulator support Thomas Richard
@ 2026-03-30 13:44 ` Thomas Richard
10 siblings, 0 replies; 21+ messages in thread
From: Thomas Richard @ 2026-03-30 13:44 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 6904a84a1700..c5e097f9cd17 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] 21+ messages in thread