Commit 0e77f8e1 authored by Linus Walleij's avatar Linus Walleij Committed by Chanwoo Choi
Browse files

extcon: fsa9480: Rewrite bindings in YAML and extend



This rewrites the FSA9480 DT bindings using YAML and
extends them with the compatible TI TSU6111.

I chose to name the file fcs,fsa880 since this is the
first switch, later versions are improvements.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent f6f79dd2
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
FAIRCHILD SEMICONDUCTOR FSA9480 MICROUSB SWITCH

The FSA9480 is a USB port accessory detector and switch. The FSA9480 is fully
controlled using I2C and enables USB data, stereo and mono audio, video,
microphone, and UART data to use a common connector port.

Required properties:
 - compatible : Must be one of
   "fcs,fsa9480"
   "fcs,fsa880"
 - reg : Specifies i2c slave address. Must be 0x25.
 - interrupts : Should contain one entry specifying interrupt signal of
   interrupt parent to which interrupt pin of the chip is connected.

 Example:
	musb@25 {
		compatible = "fcs,fsa9480";
		reg = <0x25>;
		interrupt-parent = <&gph2>;
		interrupts = <7 0>;
	};
+52 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/extcon/fcs,fsa880.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Fairchild Semiconductor FSA880, FSA9480 and compatibles

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

description:
  The FSA880 and FSA9480 are USB port accessory detectors and switches.
  The switch is fully controlled using I2C and enables USB data, stereo
  and mono audio, video, microphone, and UART data to use a common
  connector port. Compatible switches exist from other manufacturers.

properties:
  compatible:
    enum:
      - fcs,fsa880
      - fcs,fsa9480
      - ti,tsu6111

  reg:
    maxItems: 1
    description: The I2C address for an FSA880 compatible device is
      usually 0x25.

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        usb-switch@25 {
            compatible = "fcs,fsa880";
            reg = <0x25>;
            interrupt-parent = <&gpio>;
            interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
        };
    };