dt-bindings: usb: convert fcs,fusb302.txt to yaml

Convert fcs,fusb302.txt to yaml.

Changed:
  Add vbus-supply property

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/0336a3c4-4a43-c983-11d7-e2ae16187fc8@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Johan Jonker 2022-12-22 15:28:53 +01:00 committed by Rob Herring
parent ec340077a8
commit f9b8556d57
2 changed files with 67 additions and 34 deletions

View File

@ -1,34 +0,0 @@
Fairchild FUSB302 Type-C Port controllers
Required properties :
- compatible : "fcs,fusb302"
- reg : I2C slave address
- interrupts : Interrupt specifier
Required sub-node:
- connector : The "usb-c-connector" attached to the FUSB302 IC. The bindings
of the connector node are specified in:
Documentation/devicetree/bindings/connector/usb-connector.yaml
Example:
fusb302: typec-portc@54 {
compatible = "fcs,fusb302";
reg = <0x54>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
PDO_VAR(3000, 12000, 3000)
PDO_PPS_APDO(3000, 11000, 3000)>;
op-sink-microwatt = <10000000>;
};
};

View File

@ -0,0 +1,67 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/fcs,fusb302.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Fairchild FUSB302 Type-C Port controller
maintainers:
- Rob Herring <robh@kernel.org>
properties:
compatible:
const: fcs,fusb302
reg:
maxItems: 1
interrupts:
maxItems: 1
vbus-supply:
description: VBUS power supply
connector:
type: object
$ref: /schemas/connector/usb-connector.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
- vbus-supply
- connector
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/usb/pd.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
typec-portc@54 {
compatible = "fcs,fusb302";
reg = <0x54>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
vbus-supply = <&vbus_typec>;
connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
PDO_VAR(3000, 12000, 3000)
PDO_PPS_APDO(3000, 11000, 3000)>;
op-sink-microwatt = <10000000>;
};
};
};