Documentation / devicetree / bindings / platform / huawei,gaokun-ec.yaml


Based on kernel version 6.15. Page generated on 2025-05-29 09:09 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/platform/huawei,gaokun-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Huawei Matebook E Go Embedded Controller

maintainers:
  - Pengyu Luo <mitltlatltl@gmail.com>

description:
  Different from other Qualcomm Snapdragon sc8180x and sc8280xp-based
  machines, the Huawei Matebook E Go tablets use embedded controllers
  while others use a system called PMIC GLink which handles battery,
  UCSI, USB Type-C DP Alt Mode. In addition, Huawei's implementation
  also handles additional features, such as charging thresholds, FN
  lock, smart charging, tablet lid status, thermal sensors, and more.

properties:
  compatible:
    enum:
      - huawei,gaokun3-ec

  reg:
    const: 0x38
 
  '#address-cells':
    const: 1
 
  '#size-cells':
    const: 0

  interrupts:
    maxItems: 1

patternProperties:
  '^connector@[01]$':
    $ref: /schemas/connector/usb-connector.yaml#

    properties:
      reg:
        maxItems: 1

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        embedded-controller@38 {
            compatible = "huawei,gaokun3-ec";
            reg = <0x38>;
 
            interrupts-extended = <&tlmm 107 IRQ_TYPE_LEVEL_LOW>;
 
            #address-cells = <1>;
            #size-cells = <0>;
 
            connector@0 {
                compatible = "usb-c-connector";
                reg = <0>;
                power-role = "dual";
                data-role = "dual";
 
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
 
                    port@0 {
                        reg = <0>;
 
                        ucsi0_ss_in: endpoint {
                            remote-endpoint = <&usb_0_qmpphy_out>;
                        };
                    };
 
                    port@1 {
                        reg = <1>;
 
                        ucsi0_sbu: endpoint {
                            remote-endpoint = <&usb0_sbu_mux>;
                        };
                    };
                };
            };
 
            connector@1 {
                compatible = "usb-c-connector";
                reg = <1>;
                power-role = "dual";
                data-role = "dual";
 
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
 
                    port@0 {
                        reg = <0>;
 
                        ucsi1_ss_in: endpoint {
                            remote-endpoint = <&usb_1_qmpphy_out>;
                        };
                    };
 
                    port@1 {
                        reg = <1>;
 
                        ucsi1_sbu: endpoint {
                            remote-endpoint = <&usb1_sbu_mux>;
                        };
                    };
                };
            };
        };
    };