1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: ChromeOS Embedded Controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Benson Leung <bleung@chromium.org> 11c66ec88fSEmmanuel Vadot - Guenter Roeck <groeck@chromium.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: 14c66ec88fSEmmanuel Vadot Google's ChromeOS EC is a microcontroller which talks to the AP and 15c66ec88fSEmmanuel Vadot implements various functions such as keyboard and battery charging. 16c66ec88fSEmmanuel Vadot The EC can be connected through various interfaces (I2C, SPI, and others) 17c66ec88fSEmmanuel Vadot and the compatible string specifies which interface is being used. 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadotproperties: 20c66ec88fSEmmanuel Vadot compatible: 21c66ec88fSEmmanuel Vadot oneOf: 22c66ec88fSEmmanuel Vadot - description: 23c66ec88fSEmmanuel Vadot For implementations of the EC is connected through I2C. 24c66ec88fSEmmanuel Vadot const: google,cros-ec-i2c 25c66ec88fSEmmanuel Vadot - description: 26c66ec88fSEmmanuel Vadot For implementations of the EC is connected through SPI. 27c66ec88fSEmmanuel Vadot const: google,cros-ec-spi 28c66ec88fSEmmanuel Vadot - description: 29c66ec88fSEmmanuel Vadot For implementations of the EC is connected through RPMSG. 30c66ec88fSEmmanuel Vadot const: google,cros-ec-rpmsg 31c66ec88fSEmmanuel Vadot 326be33864SEmmanuel Vadot controller-data: 336be33864SEmmanuel Vadot description: 34c9ccf3a3SEmmanuel Vadot SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml 356be33864SEmmanuel Vadot type: object 366be33864SEmmanuel Vadot 37c66ec88fSEmmanuel Vadot google,cros-ec-spi-pre-delay: 38c66ec88fSEmmanuel Vadot description: 39c66ec88fSEmmanuel Vadot This property specifies the delay in usecs between the 40c66ec88fSEmmanuel Vadot assertion of the CS and the first clock pulse. 41c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 42c9ccf3a3SEmmanuel Vadot default: 0 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot google,cros-ec-spi-msg-delay: 45c66ec88fSEmmanuel Vadot description: 46c66ec88fSEmmanuel Vadot This property specifies the delay in usecs between messages. 47c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 48c9ccf3a3SEmmanuel Vadot default: 0 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadot google,has-vbc-nvram: 51c66ec88fSEmmanuel Vadot description: 52c66ec88fSEmmanuel Vadot Some implementations of the EC include a small nvram space used to 53c66ec88fSEmmanuel Vadot store verified boot context data. This boolean flag is used to specify 54c66ec88fSEmmanuel Vadot whether this nvram is present or not. 55c66ec88fSEmmanuel Vadot type: boolean 56c66ec88fSEmmanuel Vadot 57e67e8565SEmmanuel Vadot mediatek,rpmsg-name: 586be33864SEmmanuel Vadot description: 596be33864SEmmanuel Vadot Must be defined if the cros-ec is a rpmsg device for a Mediatek 60d5b0e70fSEmmanuel Vadot ARM Cortex M4 Co-processor. Contains the name of the rpmsg 616be33864SEmmanuel Vadot device. Used to match the subnode to the rpmsg device announced by 626be33864SEmmanuel Vadot the SCP. 636be33864SEmmanuel Vadot $ref: "/schemas/types.yaml#/definitions/string" 646be33864SEmmanuel Vadot 65c66ec88fSEmmanuel Vadot spi-max-frequency: 66c66ec88fSEmmanuel Vadot description: Maximum SPI frequency of the device in Hz. 67c66ec88fSEmmanuel Vadot 68c66ec88fSEmmanuel Vadot reg: 69c66ec88fSEmmanuel Vadot maxItems: 1 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot interrupts: 72c66ec88fSEmmanuel Vadot maxItems: 1 73c66ec88fSEmmanuel Vadot 746be33864SEmmanuel Vadot wakeup-source: 756be33864SEmmanuel Vadot description: Button can wake-up the system. 766be33864SEmmanuel Vadot 776be33864SEmmanuel Vadot '#address-cells': 786be33864SEmmanuel Vadot const: 1 796be33864SEmmanuel Vadot 806be33864SEmmanuel Vadot '#size-cells': 816be33864SEmmanuel Vadot const: 0 826be33864SEmmanuel Vadot 836be33864SEmmanuel Vadot typec: 846be33864SEmmanuel Vadot $ref: "/schemas/chrome/google,cros-ec-typec.yaml#" 856be33864SEmmanuel Vadot 866be33864SEmmanuel Vadot ec-pwm: 876be33864SEmmanuel Vadot $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#" 88c9ccf3a3SEmmanuel Vadot deprecated: true 89c9ccf3a3SEmmanuel Vadot 90c9ccf3a3SEmmanuel Vadot pwm: 91c9ccf3a3SEmmanuel Vadot $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#" 926be33864SEmmanuel Vadot 93*b97ee269SEmmanuel Vadot kbd-led-backlight: 94*b97ee269SEmmanuel Vadot $ref: "/schemas/chrome/google,cros-kbd-led-backlight.yaml#" 95*b97ee269SEmmanuel Vadot 966be33864SEmmanuel Vadot keyboard-controller: 976be33864SEmmanuel Vadot $ref: "/schemas/input/google,cros-ec-keyb.yaml#" 986be33864SEmmanuel Vadot 992eb4d8dcSEmmanuel Vadot proximity: 1002eb4d8dcSEmmanuel Vadot $ref: "/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml#" 1012eb4d8dcSEmmanuel Vadot 1026be33864SEmmanuel Vadot codecs: 1036be33864SEmmanuel Vadot type: object 1046be33864SEmmanuel Vadot additionalProperties: false 1056be33864SEmmanuel Vadot 1066be33864SEmmanuel Vadot properties: 1076be33864SEmmanuel Vadot '#address-cells': 1086be33864SEmmanuel Vadot const: 2 1096be33864SEmmanuel Vadot 1106be33864SEmmanuel Vadot '#size-cells': 1116be33864SEmmanuel Vadot const: 1 1126be33864SEmmanuel Vadot 1136be33864SEmmanuel Vadot patternProperties: 1146be33864SEmmanuel Vadot "^ec-codec@[a-f0-9]+$": 1156be33864SEmmanuel Vadot type: object 1166be33864SEmmanuel Vadot $ref: "/schemas/sound/google,cros-ec-codec.yaml#" 1176be33864SEmmanuel Vadot 1186be33864SEmmanuel Vadot required: 1196be33864SEmmanuel Vadot - "#address-cells" 1206be33864SEmmanuel Vadot - "#size-cells" 1216be33864SEmmanuel Vadot 1225956d97fSEmmanuel Vadot cbas: 1235956d97fSEmmanuel Vadot type: object 1245956d97fSEmmanuel Vadot 1255956d97fSEmmanuel Vadot description: 1265956d97fSEmmanuel Vadot This device is used to signal when a detachable base is attached 1275956d97fSEmmanuel Vadot to a Chrome OS tablet. This device cannot be detected at runtime. 1285956d97fSEmmanuel Vadot 1295956d97fSEmmanuel Vadot properties: 1305956d97fSEmmanuel Vadot compatible: 1315956d97fSEmmanuel Vadot const: google,cros-cbas 1325956d97fSEmmanuel Vadot 1335956d97fSEmmanuel Vadot required: 1345956d97fSEmmanuel Vadot - compatible 1355956d97fSEmmanuel Vadot 1365956d97fSEmmanuel Vadot additionalProperties: false 1375956d97fSEmmanuel Vadot 1386be33864SEmmanuel VadotpatternProperties: 1396be33864SEmmanuel Vadot "^i2c-tunnel[0-9]*$": 1406be33864SEmmanuel Vadot type: object 1416be33864SEmmanuel Vadot $ref: "/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#" 1426be33864SEmmanuel Vadot 1436be33864SEmmanuel Vadot "^regulator@[0-9]+$": 1446be33864SEmmanuel Vadot type: object 1456be33864SEmmanuel Vadot $ref: "/schemas/regulator/google,cros-ec-regulator.yaml#" 1466be33864SEmmanuel Vadot 1476be33864SEmmanuel Vadot "^extcon[0-9]*$": 1486be33864SEmmanuel Vadot type: object 1496be33864SEmmanuel Vadot $ref: "/schemas/extcon/extcon-usbc-cros-ec.yaml#" 1506be33864SEmmanuel Vadot 151c66ec88fSEmmanuel Vadotrequired: 152c66ec88fSEmmanuel Vadot - compatible 153c66ec88fSEmmanuel Vadot 154c9ccf3a3SEmmanuel VadotallOf: 155c9ccf3a3SEmmanuel Vadot - if: 156c66ec88fSEmmanuel Vadot properties: 157c66ec88fSEmmanuel Vadot compatible: 158c66ec88fSEmmanuel Vadot contains: 159c66ec88fSEmmanuel Vadot enum: 160c66ec88fSEmmanuel Vadot - google,cros-ec-i2c 161c66ec88fSEmmanuel Vadot - google,cros-ec-rpmsg 162c66ec88fSEmmanuel Vadot then: 163c66ec88fSEmmanuel Vadot properties: 164c66ec88fSEmmanuel Vadot google,cros-ec-spi-pre-delay: false 165c66ec88fSEmmanuel Vadot google,cros-ec-spi-msg-delay: false 166c66ec88fSEmmanuel Vadot spi-max-frequency: false 167c9ccf3a3SEmmanuel Vadot else: 168c9ccf3a3SEmmanuel Vadot $ref: /schemas/spi/spi-peripheral-props.yaml 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel VadotadditionalProperties: false 171c66ec88fSEmmanuel Vadot 172c66ec88fSEmmanuel Vadotexamples: 173c66ec88fSEmmanuel Vadot # Example for I2C 174c66ec88fSEmmanuel Vadot - | 175c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 176c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 177c66ec88fSEmmanuel Vadot 178c66ec88fSEmmanuel Vadot i2c0 { 179c66ec88fSEmmanuel Vadot #address-cells = <1>; 180c66ec88fSEmmanuel Vadot #size-cells = <0>; 181c66ec88fSEmmanuel Vadot 182c66ec88fSEmmanuel Vadot cros-ec@1e { 183c66ec88fSEmmanuel Vadot compatible = "google,cros-ec-i2c"; 184c66ec88fSEmmanuel Vadot reg = <0x1e>; 185c66ec88fSEmmanuel Vadot interrupts = <6 0>; 186c66ec88fSEmmanuel Vadot interrupt-parent = <&gpio0>; 187c66ec88fSEmmanuel Vadot }; 188c66ec88fSEmmanuel Vadot }; 189c66ec88fSEmmanuel Vadot 190c66ec88fSEmmanuel Vadot # Example for SPI 191c66ec88fSEmmanuel Vadot - | 192c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 193c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 194c66ec88fSEmmanuel Vadot 195c66ec88fSEmmanuel Vadot spi0 { 196c66ec88fSEmmanuel Vadot #address-cells = <1>; 197c66ec88fSEmmanuel Vadot #size-cells = <0>; 198c66ec88fSEmmanuel Vadot 199c66ec88fSEmmanuel Vadot cros-ec@0 { 200c66ec88fSEmmanuel Vadot compatible = "google,cros-ec-spi"; 201c66ec88fSEmmanuel Vadot reg = <0x0>; 202c66ec88fSEmmanuel Vadot google,cros-ec-spi-msg-delay = <30>; 203c66ec88fSEmmanuel Vadot google,cros-ec-spi-pre-delay = <10>; 204c66ec88fSEmmanuel Vadot interrupts = <99 0>; 205c66ec88fSEmmanuel Vadot interrupt-parent = <&gpio7>; 206c66ec88fSEmmanuel Vadot spi-max-frequency = <5000000>; 2072eb4d8dcSEmmanuel Vadot 2082eb4d8dcSEmmanuel Vadot proximity { 2092eb4d8dcSEmmanuel Vadot compatible = "google,cros-ec-mkbp-proximity"; 2102eb4d8dcSEmmanuel Vadot }; 2115956d97fSEmmanuel Vadot 2125956d97fSEmmanuel Vadot cbas { 2135956d97fSEmmanuel Vadot compatible = "google,cros-cbas"; 2145956d97fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot }; 216c66ec88fSEmmanuel Vadot }; 217c66ec88fSEmmanuel Vadot 218c66ec88fSEmmanuel Vadot # Example for RPMSG 219c66ec88fSEmmanuel Vadot - | 220c66ec88fSEmmanuel Vadot scp0 { 221c66ec88fSEmmanuel Vadot cros-ec { 222c66ec88fSEmmanuel Vadot compatible = "google,cros-ec-rpmsg"; 223c66ec88fSEmmanuel Vadot }; 224c66ec88fSEmmanuel Vadot }; 225c66ec88fSEmmanuel Vadot... 226