new file mode 100644
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/usb-charger.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic USB charger driver bindings
+
+maintainers:
+ - Paul Cercueil <paul@crapouillou.net>
+
+description: |
+ Devicetree bindings for a generic USB charger.
+
+ The node should be either a child of a USB node, or connect to the USB
+ node through the graph. The USB node must have the usb-role-switch property
+ set. The USB charger will report as online when the USB role is set to device,
+ and offline otherwise.
+
+properties:
+ compatible:
+ const: usb-charger
+
+ port: true
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |+
+ usb_charger: usb-charger {
+ compatible = "usb-charger";
+
+ port {
+ usb_charger_ep: endpoint {
+ remote-endpoint = <&usb_otg>;
+ };
+ };
+ };
Add documentation about the devicetree bindings for the generic USB charger. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- Notes: v2: Convert to YAML .../bindings/power/supply/usb-charger.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/usb-charger.yaml