Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: usb: typec-tcpci: convert to DT schema format

Convert the binding to DT schema format, and rename it to
nxp,ptn5110.yaml

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230330091736.1873121-1-peng.fan@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peng Fan and committed by
Greg Kroah-Hartman
be15c65a d56de8c9

+72 -49
+72
Documentation/devicetree/bindings/usb/nxp,ptn5110.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP PTN5110 Typec Port Cotroller 8 + 9 + maintainers: 10 + - Li Jun <jun.li@nxp.com> 11 + 12 + properties: 13 + compatible: 14 + const: nxp,ptn5110 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + maxItems: 1 21 + 22 + connector: 23 + type: object 24 + $ref: /schemas/connector/usb-connector.yaml# 25 + unevaluatedProperties: false 26 + 27 + required: 28 + - compatible 29 + - reg 30 + - interrupts 31 + - connector 32 + 33 + additionalProperties: false 34 + 35 + examples: 36 + - | 37 + #include <dt-bindings/interrupt-controller/arm-gic.h> 38 + #include <dt-bindings/usb/pd.h> 39 + i2c { 40 + #address-cells = <1>; 41 + #size-cells = <0>; 42 + 43 + tcpci@50 { 44 + compatible = "nxp,ptn5110"; 45 + reg = <0x50>; 46 + interrupt-parent = <&gpio3>; 47 + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 48 + 49 + usb_con: connector { 50 + compatible = "usb-c-connector"; 51 + label = "USB-C"; 52 + data-role = "dual"; 53 + power-role = "dual"; 54 + try-power-role = "sink"; 55 + source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>; 56 + sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM) PDO_VAR(5000, 12000, 2000)>; 57 + op-sink-microwatt = <10000000>; 58 + 59 + ports { 60 + #address-cells = <1>; 61 + #size-cells = <0>; 62 + 63 + port@0 { 64 + reg = <0>; 65 + typec1_dr_sw: endpoint { 66 + remote-endpoint = <&usb1_drd_sw>; 67 + }; 68 + }; 69 + }; 70 + }; 71 + }; 72 + };
-49
Documentation/devicetree/bindings/usb/typec-tcpci.txt
··· 1 - TCPCI(Typec port cotroller interface) binding 2 - --------------------------------------------- 3 - 4 - Required properties: 5 - - compatible: should be set one of following: 6 - - "nxp,ptn5110" for NXP USB PD TCPC PHY IC ptn5110. 7 - 8 - - reg: the i2c slave address of typec port controller device. 9 - - interrupt-parent: the phandle to the interrupt controller which provides 10 - the interrupt. 11 - - interrupts: interrupt specification for tcpci alert. 12 - 13 - Required sub-node: 14 - - connector: The "usb-c-connector" attached to the tcpci chip, the bindings 15 - of connector node are specified in 16 - Documentation/devicetree/bindings/connector/usb-connector.yaml 17 - 18 - Example: 19 - 20 - ptn5110@50 { 21 - compatible = "nxp,ptn5110"; 22 - reg = <0x50>; 23 - interrupt-parent = <&gpio3>; 24 - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 25 - 26 - usb_con: connector { 27 - compatible = "usb-c-connector"; 28 - label = "USB-C"; 29 - data-role = "dual"; 30 - power-role = "dual"; 31 - try-power-role = "sink"; 32 - source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>; 33 - sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM) 34 - PDO_VAR(5000, 12000, 2000)>; 35 - op-sink-microwatt = <10000000>; 36 - 37 - ports { 38 - #address-cells = <1>; 39 - #size-cells = <0>; 40 - 41 - port@1 { 42 - reg = <1>; 43 - usb_con_ss: endpoint { 44 - remote-endpoint = <&usb3_data_ss>; 45 - }; 46 - }; 47 - }; 48 - }; 49 - };