dt-bindings: usb: convert PXA USB bindings to YAML
Subsystems (2)
PATCH 1/1 dt-bindings: usb: convert PXA USB bindings to YAML
Convert the legacy pxa-usb.txt binding documentation to YAML schemas.
The original text binding documented two distinct devices: the PXA OHCI USB host controller and the PXA270 USB device controller. Split the documentation into separate schemas, marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml, and remove the obsolete text binding.
The schemas preserve the existing compatible strings and properties used by current in-tree users while adding machine-readable validation and examples.
--- .../bindings/usb/marvell,pxa-ohci.yaml | 91 +++++++++++++++++++ .../bindings/usb/marvell,pxa270-udc.yaml | 50 ++++++++++ .../devicetree/bindings/usb/pxa-usb.txt | 53 ----------- 3 files changed, 141 insertions(+), 53 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml delete mode 100644 Documentation/devicetree/bindings/usb/pxa-usb.txt
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +91 -0
@@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/marvell,pxa-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA OHCI USB Host Controller + +maintainers: + - Greg Kroah-Hartman <[email protected]> + - Alan Stern <[email protected]> + +allOf: + - $ref: usb-hcd.yaml# + +properties: + compatible: + const: marvell,pxa-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + marvell,enable-port1: + type: boolean + description: Enable USB port 1 if present. + + marvell,enable-port2: + type: boolean + description: Enable USB port 2 if present. + + marvell,enable-port3: + type: boolean + description: Enable USB port 3 if present. + + marvell,port-sense-low: + type: boolean + description: Port sense pin in low-active. + + marvell,power-control-low: + type: boolean + description: Power control pin is low-active. + + marvell,no-oc-protection: + type: boolean + description: Disable over-current protection. + + marvell,oc-mode-perport: + type: boolean + description: Enable per-port over-current protection. + + marvell,power-on-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Power On to Power Good time in milliseconds. + + marvell,port-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + Selects the mode of the ports. + 1 = PMM_NPS_MODE + 2 = PMM_GLOBAL_MODE + 3 = PMM_PERPORT_MODE + + marvell,power-budget: + $ref: /schemas/types.yaml#/definitions/uint32 + description: USB power budget. + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + usb@4c000000 { + compatible = "marvell,pxa-ohci"; + reg = <0x4c000000 0x100000>; + interrupts = <3>; + clocks = <&clks 11>; + marvell,enable-port1; + marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ + };
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +50 -0
50 lines not on this page · raw message
Documentation/devicetree/bindings/usb/pxa-usb.txt deleted +0 -53
53 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The `marvell,pxa-ohci.yaml` schema omits the `vbus1-supply`, `vbus2-supply`, and `vbus3-supply`…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The marvell,pxa-ohci.yaml schema omits the vbus1-supply, vbus2-supply, and vbus3-supply properties but enforces unevaluatedProperties: false, which will cause valid device trees to fail schema validation. --
commit 78f580ae03eab5d588221a2a8289471c77c1c517
Author: Jeremiah Bishop <[email protected]>
dt-bindings: usb: convert PXA USB bindings to YAML
This commit converts the legacy pxa-usb.txt binding documentation to YAML schemas. It splits the documentation into marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml to provide machine-readable validation for both the host and device controllers.
Quoted 5 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 80
Quoted 7 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +7
-0+required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false
[Severity: Medium]
Will this strict validation reject valid device trees that provide vbus regulators?
The PXA OHCI driver in drivers/usb/host/ohci-pxa27x.c explicitly calls devm_regulator_get() for "vbus1", "vbus2", and "vbus3" for enabled ports. These requests resolve to the vbus1-supply, vbus2-supply, and vbus3-supply properties in the device tree.
Because these properties are not defined in this schema or inherited from usb-hcd.yaml, and unevaluatedProperties is set to false, it appears that any device tree describing the vbus supplies will falsely fail the dt_binding_check validation.
Could these supply properties be added to the schema to prevent validation errors for existing users?
Quoted 3 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +3
-0+ +examples: + - |
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Thank you, and good catch.
ohci-pxa27x.c does indeed explicitly request vbus1, vbus2, and vbus3 regulators via devm_regulator_get(). I've added the corresponding supply properties to the schema and will include the change in v2.
Quoted 53 lines · On Fri, May 29, 2026 at 12:01 PM <[email protected]> wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Themarvell,pxa-ohci.yamlschema omits thevbus1-supply,vbus2-supply, andvbus3-supplyproperties but enforcesunevaluatedProperties: false, which will cause valid device trees to fail schema validation. --commit
78f580ae03eab5d588221a2a8289471c77c1c517
Author: Jeremiah Bishop <[email protected]>dt-bindings: usb: convert PXA USB bindings to YAML
This commit converts the legacy pxa-usb.txt binding documentation to YAML schemas. It splits the documentation into marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml to provide machine-readable validation for both the host and device controllers.
Quoted 5 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +0
-0[ ... ]
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 80
Quoted 7 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +7
-0+required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false[Severity: Medium]
Will this strict validation reject valid device trees that provide vbus regulators?The PXA OHCI driver in
drivers/usb/host/ohci-pxa27x.cexplicitly callsdevm_regulator_get()for "vbus1", "vbus2", and "vbus3" for enabled ports. These requests resolve to the vbus1-supply, vbus2-supply, and vbus3-supply properties in the device tree.Because these properties are not defined in this schema or inherited from
usb-hcd.yaml, and unevaluatedProperties is set to false, it appears that any device tree describing the vbus supplies will falsely fail thedt_binding_checkvalidation.Could these supply properties be added to the schema to prevent validation errors for existing users?
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 83
Quoted 3 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +3
-0+ +examples: + - |[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Signature · 2 lines
Regards, Jeremiah E. Bishop
PATCH v2 1/1 dt-bindings: usb: convert PXA USB bindings to YAML
In reply to Jeremiah BishopConvert the legacy pxa-usb.txt binding documentation to YAML schemas.
The original text binding documented two distinct devices: the PXA OHCI USB host controller and the PXA270 USB device controller. Split the documentation into separate schemas, marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml, and remove the obsolete text binding.
The schemas preserve the existing compatible strings and properties used by current in-tree users while adding machine-readable validation and examples.
---
Changes in v2:
- Add vbus1-supply, vbus2-supply, and vbus3-supply properties to the PXA OHCI schema.
.../bindings/usb/marvell,pxa-ohci.yaml | 100 ++++++++++++++++++ .../bindings/usb/marvell,pxa270-udc.yaml | 50 +++++++++ .../devicetree/bindings/usb/pxa-usb.txt | 53 ---------- 3 files changed, 150 insertions(+), 53 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml delete mode 100644 Documentation/devicetree/bindings/usb/pxa-usb.txt
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +100 -0
@@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/marvell,pxa-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA OHCI USB Host Controller + +maintainers: + - Greg Kroah-Hartman <[email protected]> + - Alan Stern <[email protected]> + +allOf: + - $ref: usb-hcd.yaml# + +properties: + compatible: + const: marvell,pxa-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + marvell,enable-port1: + type: boolean + description: Enable USB port 1 if present. + + marvell,enable-port2: + type: boolean + description: Enable USB port 2 if present. + + marvell,enable-port3: + type: boolean + description: Enable USB port 3 if present. + + marvell,port-sense-low: + type: boolean + description: Port sense pin in low-active. + + marvell,power-control-low: + type: boolean + description: Power control pin is low-active. + + marvell,no-oc-protection: + type: boolean + description: Disable over-current protection. + + marvell,oc-mode-perport: + type: boolean + description: Enable per-port over-current protection. + + marvell,power-on-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Power On to Power Good time in milliseconds. + + marvell,port-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + Selects the mode of the ports. + 1 = PMM_NPS_MODE + 2 = PMM_GLOBAL_MODE + 3 = PMM_PERPORT_MODE + + marvell,power-budget: + $ref: /schemas/types.yaml#/definitions/uint32 + description: USB power budget. + + vbus1-supply: + description: Regulator supplying VBUS for port 1. + + vbus2-supply: + description: Regulator supplying VBUS for port 2. + + vbus3-supply: + description: Regulator supplying VBUS for port 3. + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + usb@4c000000 { + compatible = "marvell,pxa-ohci"; + reg = <0x4c000000 0x100000>; + interrupts = <3>; + clocks = <&clks 11>; + marvell,enable-port1; + marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ + };
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +50 -0
50 lines not on this page · raw message
Documentation/devicetree/bindings/usb/pxa-usb.txt deleted +0 -53
53 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] YAML conversion incorrectly renames properties `marvell,power-sense-low` to…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] YAML conversion incorrectly renames properties marvell,power-sense-low to marvell,port-sense-low and marvell,power_on_delay to marvell,power-on-delay, breaking validation and backward compatibility.
- [Medium] The clocks property is newly enforced as strictly required for marvell,pxa-ohci, which breaks schema validation for existing device trees.
--
commit 64a29827cc603985850c4a4a36ae40793189e8ff
Author: Jeremiah Bishop <[email protected]>
dt-bindings: usb: convert PXA USB bindings to YAML
Convert the legacy pxa-usb.txt binding documentation to YAML schemas. The original text binding documented two distinct devices, which are now split into marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml.
Quoted 4 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 43
Quoted 7 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +7
-0+ marvell,enable-port3: + type: boolean + description: Enable USB port 3 if present. + + marvell,port-sense-low: + type: boolean + description: Port sense pin in low-active.
[Severity: Medium]
The original text binding defined this property as "marvell,power-sense-low". Will renaming "power" to "port" here cause validation failures for existing device trees that use the legacy property name?
Quoted 6 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +6
-0+ + marvell,power-control-low: + type: boolean + description: Power control pin is low-active. + + marvell,no-oc-protection:
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 59
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +10
-0+ type: boolean + description: Disable over-current protection. + + marvell,oc-mode-perport: + type: boolean + description: Enable per-port over-current protection. + + marvell,power-on-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Power On to Power Good time in milliseconds.
[Severity: Medium]
The legacy binding documented this as "marvell,power_on_delay" with an underscore. Could changing the underscore to a hyphen break ABI compatibility with older device trees and drivers expecting the original format?
[ ... ]
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 87
Quoted 5 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +5
-0+required: + - compatible + - reg + - interrupts + - clocks
[Severity: Medium]
Is it intentional to enforce "clocks" as a strictly required property here?
The original pxa-usb.txt binding didn't list "clocks" as required for the OHCI controller, and the original example omitted it. Since the schema uses
unevaluatedProperties: false, will enforcing this new requirement cause existing valid device trees to fail schema validation?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 1 line · Jeremiah Bishop
Convert the legacy pxa-usb.txt binding documentation to YAML schemas.
DT schema. Not YAML. There is no such thing as YAML schemas. See also submitting patches. Same for subject.
Quoted 9 lines
The original text binding documented two distinct devices: the PXA OHCI USB host controller and the PXA270 USB device controller. Split the documentation into separate schemas, marvell,pxa-ohci.yaml and marvell,pxa270-udc.yaml, and remove the obsolete text binding.
The schemas preserve the existing compatible strings and properties used by current in-tree users while adding machine-readable validation and examples.
Drop, redundant. Say if you changed the binding.
Quoted 6 lines
Signed-off-by Jeremiah Bishop <[email protected]>---
Changes in v2:
- Add vbus1-supply, vbus2-supply, and vbus3-supply properties to the PXA OHCI schema.
Do not attach (thread) your patchsets to some other threads (unrelated or older versions). This buries them deep in the mailbox and might interfere with applying entire sets. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830
Quoted 16 lines
.../bindings/usb/marvell,pxa-ohci.yaml | 100 ++++++++++++++++++ .../bindings/usb/marvell,pxa270-udc.yaml | 50 +++++++++ .../devicetree/bindings/usb/pxa-usb.txt | 53 ---------- 3 files changed, 150 insertions(+), 53 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml create mode 100644 Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml delete mode 100644 Documentation/devicetree/bindings/usb/pxa-usb.txtDocumentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +1
-0@@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 11
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +10
-0+%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/marvell,pxa-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA OHCI USB Host Controller + +maintainers: + - Greg Kroah-Hartman <[email protected]> + - Alan Stern <[email protected]>
No, subsystem maintainers are not maintainers of this binding. This could be platform maintainer.
Quoted 35 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +35
-0+ +allOf: + - $ref: usb-hcd.yaml# + +properties: + compatible: + const: marvell,pxa-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + marvell,enable-port1: + type: boolean + description: Enable USB port 1 if present. + + marvell,enable-port2: + type: boolean + description: Enable USB port 2 if present. + + marvell,enable-port3: + type: boolean + description: Enable USB port 3 if present.> + + marvell,port-sense-low: + type: boolean + description: Port sense pin in low-active. + + marvell,power-control-low: + type: boolean + description: Power control pin is low-active.
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 57
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +10
-0+ + marvell,no-oc-protection: + type: boolean + description: Disable over-current protection. + + marvell,oc-mode-perport: + type: boolean + description: Enable per-port over-current protection. + + marvell,power-on-delay:
power_on_delay? Your commit msg must clearly list the changes done to the binding during conversion with explanation why.
Quoted 5 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +5
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + description: Power On to Power Good time in milliseconds. + + marvell,port-mode: + $ref: /schemas/types.yaml#/definitions/uint32
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +10
-0+ enum: [1, 2, 3] + description: | + Selects the mode of the ports. + 1 = PMM_NPS_MODE + 2 = PMM_GLOBAL_MODE + 3 = PMM_PERPORT_MODE + + marvell,power-budget: + $ref: /schemas/types.yaml#/definitions/uint32 + description: USB power budget.
There was no such property.
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 81
Quoted 9 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +9
-0+ + vbus1-supply: + description: Regulator supplying VBUS for port 1. + + vbus2-supply: + description: Regulator supplying VBUS for port 2. + + vbus3-supply: + description: Regulator supplying VBUS for port 3.
Neither these.
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml line 87
Quoted 6 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +6
-0+ +required: + - compatible + - reg + - interrupts + - clocks
There were no interrupts or clocks.
Quoted 19 lines
Documentation/devicetree/bindings/usb/marvell,pxa-ohci.yaml new file +13
-0+ +unevaluatedProperties: false + +examples: + - | + usb@4c000000 { + compatible = "marvell,pxa-ohci"; + reg = <0x4c000000 0x100000>; + interrupts = <3>; + clocks = <&clks 11>; + marvell,enable-port1; + marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ + };Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +0
-0
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml line 10
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +10
-0@@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/marvell,pxa270-udc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA27x USB Device Controller (UDC) + +maintainers: + - Greg Kroah-Hartman <[email protected]>
Same problem
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +10
-0+ +properties: + compatible: + const: marvell,pxa270-udc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml line 30
Quoted 10 lines
Documentation/devicetree/bindings/usb/marvell,pxa270-udc.yaml new file +10
-0+ + clocks: + maxItems: 1 + + gpios: + maxItems: 1 + description: GPIO to control the USB D+ pullup. + + phys: + maxItems: 1
There was no such property.
Best regards,
Krzysztof