linux-loongson/Documentation/devicetree/bindings/usb/fsl,usb2.yaml
Frank Li 89b5a5a607 dt-bindings: usb: Convert fsl-usb to yaml
Convert fsl-usb binding doc to yaml format.

Additional change:
- Remove port0 and port1 from required list.
- Use common usb-drd.yaml for dr_mode property
- Keep two difference examples.
- Add interrupts to required property list.
- Remove #address-cells and #size-cells in example.
- Use predefined irq type macro.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240627144815.4014179-1-Frank.Li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 16:05:27 +02:00

96 lines
2.2 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/fsl,usb2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale SOC USB controllers
maintainers:
- Frank Li <Frank.Li@nxp.com>
description: |
The device node for a USB controller that is part of a Freescale
SOC is as described in the document "Open Firmware Recommended
Practice: Universal Serial Bus" with the following modifications
and additions.
properties:
compatible:
oneOf:
- enum:
- fsl-usb2-mph
- fsl-usb2-dr
- items:
- enum:
- fsl-usb2-dr-v2.2
- fsl-usb2-dr-v2.5
- const: fsl-usb2-dr
reg:
maxItems: 1
interrupts:
maxItems: 1
phy_type:
$ref: /schemas/types.yaml#/definitions/string
enum: [ulpi, serial, utmi, utmi_wide]
port0:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates port0 is connected for fsl-usb2-mph compatible controllers.
port1:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates port1 is connected for "fsl-usb2-mph" compatible controllers.
fsl,invert-drvvbus:
$ref: /schemas/types.yaml#/definitions/flag
description:
for MPC5121 USB0 only. Indicates the
port power polarity of internal PHY signal DRVVBUS is inverted.
fsl,invert-pwr-fault:
$ref: /schemas/types.yaml#/definitions/flag
description:
for MPC5121 USB0 only. Indicates
the PWR_FAULT signal polarity is inverted.
required:
- compatible
- reg
- interrupts
- phy_type
allOf:
- $ref: usb-drd.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
usb@22000 {
compatible = "fsl-usb2-mph";
reg = <22000 1000>;
interrupts = <27 IRQ_TYPE_EDGE_RISING>;
phy_type = "ulpi";
port0;
port1;
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
usb@23000 {
compatible = "fsl-usb2-dr";
reg = <23000 1000>;
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
dr_mode = "otg";
phy_type = "ulpi";
};