dt-bindings: extcon: ptn5150: Convert binding to DT schema
Convert the ptn-5150 extcon driver bindings to DT schema format using json-schema. The differences with original bindings document: - Use "gpios" suffix for the "int" and "vbus" gpio, - Skip generic "pinctrl" property as it is not really required. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
856deb866d
commit
c7eb1131bd
|
@ -1,27 +0,0 @@
|
||||||
* PTN5150 CC (Configuration Channel) Logic device
|
|
||||||
|
|
||||||
PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
|
|
||||||
connector application with CC control logic detection and indication functions.
|
|
||||||
It is interfaced to the host controller using an I2C interface.
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: should be "nxp,ptn5150"
|
|
||||||
- reg: specifies the I2C slave address of the device
|
|
||||||
- int-gpio: should contain a phandle and GPIO specifier for the GPIO pin
|
|
||||||
connected to the PTN5150's INTB pin.
|
|
||||||
- vbus-gpio: should contain a phandle and GPIO specifier for the GPIO pin which
|
|
||||||
is used to control VBUS.
|
|
||||||
- pinctrl-names : a pinctrl state named "default" must be defined.
|
|
||||||
- pinctrl-0 : phandle referencing pin configuration of interrupt and vbus
|
|
||||||
control.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
ptn5150@1d {
|
|
||||||
compatible = "nxp,ptn5150";
|
|
||||||
reg = <0x1d>;
|
|
||||||
int-gpio = <&msmgpio 78 GPIO_ACTIVE_HIGH>;
|
|
||||||
vbus-gpio = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&ptn5150_default>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: PTN5150 CC (Configuration Channel) Logic device
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
|
||||||
|
connector application with CC control logic detection and indication
|
||||||
|
functions. It is interfaced to the host controller using an I2C interface.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: nxp,ptn5150
|
||||||
|
|
||||||
|
int-gpios:
|
||||||
|
description:
|
||||||
|
GPIO pin (input) connected to the PTN5150's INTB pin.
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
vbus-gpios:
|
||||||
|
description:
|
||||||
|
GPIO pin (output) used to control VBUS.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- int-gpios
|
||||||
|
- reg
|
||||||
|
- vbus-gpios
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
i2c {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
ptn5150@1d {
|
||||||
|
compatible = "nxp,ptn5150";
|
||||||
|
reg = <0x1d>;
|
||||||
|
int-gpios = <&msmgpio 78 GPIO_ACTIVE_HIGH>;
|
||||||
|
vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in New Issue