1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: ChromeOS Embedded Controller 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Benson Leung <bleung@chromium.org> 11*4882a593Smuzhiyun - Enric Balletbo i Serra <enric.balletbo@collabora.com> 12*4882a593Smuzhiyun - Guenter Roeck <groeck@chromium.org> 13*4882a593Smuzhiyun 14*4882a593Smuzhiyundescription: 15*4882a593Smuzhiyun Google's ChromeOS EC is a microcontroller which talks to the AP and 16*4882a593Smuzhiyun implements various functions such as keyboard and battery charging. 17*4882a593Smuzhiyun The EC can be connected through various interfaces (I2C, SPI, and others) 18*4882a593Smuzhiyun and the compatible string specifies which interface is being used. 19*4882a593Smuzhiyun 20*4882a593Smuzhiyunproperties: 21*4882a593Smuzhiyun compatible: 22*4882a593Smuzhiyun oneOf: 23*4882a593Smuzhiyun - description: 24*4882a593Smuzhiyun For implementations of the EC is connected through I2C. 25*4882a593Smuzhiyun const: google,cros-ec-i2c 26*4882a593Smuzhiyun - description: 27*4882a593Smuzhiyun For implementations of the EC is connected through SPI. 28*4882a593Smuzhiyun const: google,cros-ec-spi 29*4882a593Smuzhiyun - description: 30*4882a593Smuzhiyun For implementations of the EC is connected through RPMSG. 31*4882a593Smuzhiyun const: google,cros-ec-rpmsg 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun controller-data: 34*4882a593Smuzhiyun description: 35*4882a593Smuzhiyun SPI controller data, see bindings/spi/spi-samsung.txt 36*4882a593Smuzhiyun type: object 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun google,cros-ec-spi-pre-delay: 39*4882a593Smuzhiyun description: 40*4882a593Smuzhiyun This property specifies the delay in usecs between the 41*4882a593Smuzhiyun assertion of the CS and the first clock pulse. 42*4882a593Smuzhiyun allOf: 43*4882a593Smuzhiyun - $ref: /schemas/types.yaml#/definitions/uint32 44*4882a593Smuzhiyun - default: 0 45*4882a593Smuzhiyun - minimum: 0 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun google,cros-ec-spi-msg-delay: 48*4882a593Smuzhiyun description: 49*4882a593Smuzhiyun This property specifies the delay in usecs between messages. 50*4882a593Smuzhiyun allOf: 51*4882a593Smuzhiyun - $ref: /schemas/types.yaml#/definitions/uint32 52*4882a593Smuzhiyun - default: 0 53*4882a593Smuzhiyun - minimum: 0 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun google,has-vbc-nvram: 56*4882a593Smuzhiyun description: 57*4882a593Smuzhiyun Some implementations of the EC include a small nvram space used to 58*4882a593Smuzhiyun store verified boot context data. This boolean flag is used to specify 59*4882a593Smuzhiyun whether this nvram is present or not. 60*4882a593Smuzhiyun type: boolean 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun mtk,rpmsg-name: 63*4882a593Smuzhiyun description: 64*4882a593Smuzhiyun Must be defined if the cros-ec is a rpmsg device for a Mediatek 65*4882a593Smuzhiyun ARM Cortex M4 Co-processor. Contains the name pf the rpmsg 66*4882a593Smuzhiyun device. Used to match the subnode to the rpmsg device announced by 67*4882a593Smuzhiyun the SCP. 68*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/string" 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun spi-max-frequency: 71*4882a593Smuzhiyun description: Maximum SPI frequency of the device in Hz. 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun reg: 74*4882a593Smuzhiyun maxItems: 1 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun interrupts: 77*4882a593Smuzhiyun maxItems: 1 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun wakeup-source: 80*4882a593Smuzhiyun description: Button can wake-up the system. 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun '#address-cells': 83*4882a593Smuzhiyun const: 1 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun '#size-cells': 86*4882a593Smuzhiyun const: 0 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun typec: 89*4882a593Smuzhiyun $ref: "/schemas/chrome/google,cros-ec-typec.yaml#" 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun ec-pwm: 92*4882a593Smuzhiyun $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#" 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun keyboard-controller: 95*4882a593Smuzhiyun $ref: "/schemas/input/google,cros-ec-keyb.yaml#" 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun codecs: 98*4882a593Smuzhiyun type: object 99*4882a593Smuzhiyun additionalProperties: false 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun properties: 102*4882a593Smuzhiyun '#address-cells': 103*4882a593Smuzhiyun const: 2 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun '#size-cells': 106*4882a593Smuzhiyun const: 1 107*4882a593Smuzhiyun 108*4882a593Smuzhiyun patternProperties: 109*4882a593Smuzhiyun "^ec-codec@[a-f0-9]+$": 110*4882a593Smuzhiyun type: object 111*4882a593Smuzhiyun $ref: "/schemas/sound/google,cros-ec-codec.yaml#" 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun required: 114*4882a593Smuzhiyun - "#address-cells" 115*4882a593Smuzhiyun - "#size-cells" 116*4882a593Smuzhiyun 117*4882a593SmuzhiyunpatternProperties: 118*4882a593Smuzhiyun "^i2c-tunnel[0-9]*$": 119*4882a593Smuzhiyun type: object 120*4882a593Smuzhiyun $ref: "/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#" 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun "^regulator@[0-9]+$": 123*4882a593Smuzhiyun type: object 124*4882a593Smuzhiyun $ref: "/schemas/regulator/google,cros-ec-regulator.yaml#" 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun "^extcon[0-9]*$": 127*4882a593Smuzhiyun type: object 128*4882a593Smuzhiyun $ref: "/schemas/extcon/extcon-usbc-cros-ec.yaml#" 129*4882a593Smuzhiyun 130*4882a593Smuzhiyunrequired: 131*4882a593Smuzhiyun - compatible 132*4882a593Smuzhiyun 133*4882a593Smuzhiyunif: 134*4882a593Smuzhiyun properties: 135*4882a593Smuzhiyun compatible: 136*4882a593Smuzhiyun contains: 137*4882a593Smuzhiyun enum: 138*4882a593Smuzhiyun - google,cros-ec-i2c 139*4882a593Smuzhiyun - google,cros-ec-rpmsg 140*4882a593Smuzhiyunthen: 141*4882a593Smuzhiyun properties: 142*4882a593Smuzhiyun google,cros-ec-spi-pre-delay: false 143*4882a593Smuzhiyun google,cros-ec-spi-msg-delay: false 144*4882a593Smuzhiyun spi-max-frequency: false 145*4882a593Smuzhiyun 146*4882a593SmuzhiyunadditionalProperties: false 147*4882a593Smuzhiyun 148*4882a593Smuzhiyunexamples: 149*4882a593Smuzhiyun # Example for I2C 150*4882a593Smuzhiyun - | 151*4882a593Smuzhiyun #include <dt-bindings/gpio/gpio.h> 152*4882a593Smuzhiyun #include <dt-bindings/interrupt-controller/irq.h> 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun i2c0 { 155*4882a593Smuzhiyun #address-cells = <1>; 156*4882a593Smuzhiyun #size-cells = <0>; 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun cros-ec@1e { 159*4882a593Smuzhiyun compatible = "google,cros-ec-i2c"; 160*4882a593Smuzhiyun reg = <0x1e>; 161*4882a593Smuzhiyun interrupts = <6 0>; 162*4882a593Smuzhiyun interrupt-parent = <&gpio0>; 163*4882a593Smuzhiyun }; 164*4882a593Smuzhiyun }; 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun # Example for SPI 167*4882a593Smuzhiyun - | 168*4882a593Smuzhiyun #include <dt-bindings/gpio/gpio.h> 169*4882a593Smuzhiyun #include <dt-bindings/interrupt-controller/irq.h> 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun spi0 { 172*4882a593Smuzhiyun #address-cells = <1>; 173*4882a593Smuzhiyun #size-cells = <0>; 174*4882a593Smuzhiyun 175*4882a593Smuzhiyun cros-ec@0 { 176*4882a593Smuzhiyun compatible = "google,cros-ec-spi"; 177*4882a593Smuzhiyun reg = <0x0>; 178*4882a593Smuzhiyun google,cros-ec-spi-msg-delay = <30>; 179*4882a593Smuzhiyun google,cros-ec-spi-pre-delay = <10>; 180*4882a593Smuzhiyun interrupts = <99 0>; 181*4882a593Smuzhiyun interrupt-parent = <&gpio7>; 182*4882a593Smuzhiyun spi-max-frequency = <5000000>; 183*4882a593Smuzhiyun }; 184*4882a593Smuzhiyun }; 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun # Example for RPMSG 187*4882a593Smuzhiyun - | 188*4882a593Smuzhiyun scp0 { 189*4882a593Smuzhiyun cros-ec { 190*4882a593Smuzhiyun compatible = "google,cros-ec-rpmsg"; 191*4882a593Smuzhiyun }; 192*4882a593Smuzhiyun }; 193*4882a593Smuzhiyun... 194