0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: "http://devicetree.org/schemas/usb/mediatek,mt6360-tcpc.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006
0007 title: Mediatek MT6360 Type-C Port Switch and Power Delivery controller DT bindings
0008
0009 maintainers:
0010 - ChiYuan Huang <cy_huang@richtek.com>
0011
0012 description: |
0013 Mediatek MT6360 is a multi-functional device. It integrates charger, ADC, flash, RGB indicators,
0014 regulators (BUCKs/LDOs), and TypeC Port Switch with Power Delivery controller.
0015 This document only describes MT6360 Type-C Port Switch and Power Delivery controller.
0016
0017 properties:
0018 compatible:
0019 enum:
0020 - mediatek,mt6360-tcpc
0021
0022 interrupts:
0023 maxItems: 1
0024
0025 interrupt-names:
0026 items:
0027 - const: PD_IRQB
0028
0029 connector:
0030 type: object
0031 $ref: ../connector/usb-connector.yaml#
0032 description:
0033 Properties for usb c connector.
0034
0035 additionalProperties: false
0036
0037 required:
0038 - compatible
0039 - interrupts
0040 - interrupt-names
0041
0042 examples:
0043 - |
0044 #include <dt-bindings/interrupt-controller/irq.h>
0045 #include <dt-bindings/usb/pd.h>
0046 i2c0 {
0047 #address-cells = <1>;
0048 #size-cells = <0>;
0049
0050 mt6360@34 {
0051 compatible = "mediatek,mt6360";
0052 reg = <0x34>;
0053 interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
0054 interrupt-names = "IRQB";
0055 interrupt-controller;
0056 #interrupt-cells = <1>;
0057
0058 tcpc {
0059 compatible = "mediatek,mt6360-tcpc";
0060 interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
0061 interrupt-names = "PD_IRQB";
0062
0063 connector {
0064 compatible = "usb-c-connector";
0065 label = "USB-C";
0066 data-role = "dual";
0067 power-role = "dual";
0068 try-power-role = "sink";
0069 source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
0070 sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
0071 op-sink-microwatt = <10000000>;
0072
0073 ports {
0074 #address-cells = <1>;
0075 #size-cells = <0>;
0076
0077 port@0 {
0078 reg = <0>;
0079 endpoint {
0080 remote-endpoint = <&usb_hs>;
0081 };
0082 };
0083 port@1 {
0084 reg = <1>;
0085 endpoint {
0086 remote-endpoint = <&usb_ss>;
0087 };
0088 };
0089 port@2 {
0090 reg = <2>;
0091 endpoint {
0092 remote-endpoint = <&dp_aux>;
0093 };
0094 };
0095 };
0096 };
0097 };
0098 };
0099 };
0100 ...