146b57806SIkjoon Jang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 246b57806SIkjoon Jang%YAML 1.2 346b57806SIkjoon Jang--- 446b57806SIkjoon Jang$id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# 546b57806SIkjoon Jang$schema: http://devicetree.org/meta-schemas/core.yaml# 646b57806SIkjoon Jang 746b57806SIkjoon Jangtitle: ChromeOS Embedded Controller 846b57806SIkjoon Jang 946b57806SIkjoon Jangmaintainers: 1046b57806SIkjoon Jang - Benson Leung <bleung@chromium.org> 1146b57806SIkjoon Jang - Guenter Roeck <groeck@chromium.org> 1246b57806SIkjoon Jang 1346b57806SIkjoon Jangdescription: 1446b57806SIkjoon Jang Google's ChromeOS EC is a microcontroller which talks to the AP and 1546b57806SIkjoon Jang implements various functions such as keyboard and battery charging. 1646b57806SIkjoon Jang The EC can be connected through various interfaces (I2C, SPI, and others) 1746b57806SIkjoon Jang and the compatible string specifies which interface is being used. 1846b57806SIkjoon Jang 1946b57806SIkjoon Jangproperties: 2046b57806SIkjoon Jang compatible: 2146b57806SIkjoon Jang oneOf: 2246b57806SIkjoon Jang - description: 2346b57806SIkjoon Jang For implementations of the EC is connected through I2C. 2446b57806SIkjoon Jang const: google,cros-ec-i2c 2546b57806SIkjoon Jang - description: 2646b57806SIkjoon Jang For implementations of the EC is connected through SPI. 2746b57806SIkjoon Jang const: google,cros-ec-spi 2846b57806SIkjoon Jang - description: 2946b57806SIkjoon Jang For implementations of the EC is connected through RPMSG. 3046b57806SIkjoon Jang const: google,cros-ec-rpmsg 3146b57806SIkjoon Jang 325d7fb8b8SKrzysztof Kozlowski controller-data: 335d7fb8b8SKrzysztof Kozlowski description: 34f412fe11SKrzysztof Kozlowski SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml 355d7fb8b8SKrzysztof Kozlowski type: object 365d7fb8b8SKrzysztof Kozlowski 3746b57806SIkjoon Jang google,cros-ec-spi-pre-delay: 3846b57806SIkjoon Jang description: 3946b57806SIkjoon Jang This property specifies the delay in usecs between the 4046b57806SIkjoon Jang assertion of the CS and the first clock pulse. 41dca66935SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 42dca66935SRob Herring default: 0 4346b57806SIkjoon Jang 4446b57806SIkjoon Jang google,cros-ec-spi-msg-delay: 4546b57806SIkjoon Jang description: 4646b57806SIkjoon Jang This property specifies the delay in usecs between messages. 47dca66935SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 48dca66935SRob Herring default: 0 4946b57806SIkjoon Jang 5046b57806SIkjoon Jang google,has-vbc-nvram: 5146b57806SIkjoon Jang description: 5246b57806SIkjoon Jang Some implementations of the EC include a small nvram space used to 5346b57806SIkjoon Jang store verified boot context data. This boolean flag is used to specify 5446b57806SIkjoon Jang whether this nvram is present or not. 5546b57806SIkjoon Jang type: boolean 5646b57806SIkjoon Jang 57e565615cSMatthias Brugger mediatek,rpmsg-name: 585c024e68SRicardo Cañuelo description: 595c024e68SRicardo Cañuelo Must be defined if the cros-ec is a rpmsg device for a Mediatek 60f93afd8eSStephen Boyd ARM Cortex M4 Co-processor. Contains the name of the rpmsg 615c024e68SRicardo Cañuelo device. Used to match the subnode to the rpmsg device announced by 625c024e68SRicardo Cañuelo the SCP. 635c024e68SRicardo Cañuelo $ref: "/schemas/types.yaml#/definitions/string" 645c024e68SRicardo Cañuelo 6546b57806SIkjoon Jang spi-max-frequency: 6646b57806SIkjoon Jang description: Maximum SPI frequency of the device in Hz. 6746b57806SIkjoon Jang 6846b57806SIkjoon Jang reg: 6946b57806SIkjoon Jang maxItems: 1 7046b57806SIkjoon Jang 7146b57806SIkjoon Jang interrupts: 7246b57806SIkjoon Jang maxItems: 1 7346b57806SIkjoon Jang 745d7fb8b8SKrzysztof Kozlowski wakeup-source: 755d7fb8b8SKrzysztof Kozlowski description: Button can wake-up the system. 765d7fb8b8SKrzysztof Kozlowski 775c024e68SRicardo Cañuelo '#address-cells': 785c024e68SRicardo Cañuelo const: 1 795c024e68SRicardo Cañuelo 805c024e68SRicardo Cañuelo '#size-cells': 815c024e68SRicardo Cañuelo const: 0 825c024e68SRicardo Cañuelo 835c024e68SRicardo Cañuelo typec: 845c024e68SRicardo Cañuelo $ref: "/schemas/chrome/google,cros-ec-typec.yaml#" 855c024e68SRicardo Cañuelo 865c024e68SRicardo Cañuelo ec-pwm: 875c024e68SRicardo Cañuelo $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#" 886b94ee66SKrzysztof Kozlowski deprecated: true 896b94ee66SKrzysztof Kozlowski 906b94ee66SKrzysztof Kozlowski pwm: 916b94ee66SKrzysztof Kozlowski $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#" 925c024e68SRicardo Cañuelo 93*20f370efSTzung-Bi Shih kbd-led-backlight: 94*20f370efSTzung-Bi Shih $ref: "/schemas/chrome/google,cros-kbd-led-backlight.yaml#" 95*20f370efSTzung-Bi Shih 9650d68feeSRicardo Cañuelo keyboard-controller: 9750d68feeSRicardo Cañuelo $ref: "/schemas/input/google,cros-ec-keyb.yaml#" 9850d68feeSRicardo Cañuelo 9919ad93bcSStephen Boyd proximity: 10019ad93bcSStephen Boyd $ref: "/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml#" 10119ad93bcSStephen Boyd 1025c024e68SRicardo Cañuelo codecs: 1035c024e68SRicardo Cañuelo type: object 1045c024e68SRicardo Cañuelo additionalProperties: false 1055c024e68SRicardo Cañuelo 1065c024e68SRicardo Cañuelo properties: 1075c024e68SRicardo Cañuelo '#address-cells': 1085c024e68SRicardo Cañuelo const: 2 1095c024e68SRicardo Cañuelo 1105c024e68SRicardo Cañuelo '#size-cells': 1115c024e68SRicardo Cañuelo const: 1 1125c024e68SRicardo Cañuelo 1135c024e68SRicardo Cañuelo patternProperties: 1145c024e68SRicardo Cañuelo "^ec-codec@[a-f0-9]+$": 1155c024e68SRicardo Cañuelo type: object 1165c024e68SRicardo Cañuelo $ref: "/schemas/sound/google,cros-ec-codec.yaml#" 1175c024e68SRicardo Cañuelo 1185c024e68SRicardo Cañuelo required: 1195c024e68SRicardo Cañuelo - "#address-cells" 1205c024e68SRicardo Cañuelo - "#size-cells" 1215c024e68SRicardo Cañuelo 12280cf16deSIkjoon Jang cbas: 12380cf16deSIkjoon Jang type: object 12480cf16deSIkjoon Jang 12580cf16deSIkjoon Jang description: 12680cf16deSIkjoon Jang This device is used to signal when a detachable base is attached 12780cf16deSIkjoon Jang to a Chrome OS tablet. This device cannot be detected at runtime. 12880cf16deSIkjoon Jang 12980cf16deSIkjoon Jang properties: 13080cf16deSIkjoon Jang compatible: 13180cf16deSIkjoon Jang const: google,cros-cbas 13280cf16deSIkjoon Jang 13380cf16deSIkjoon Jang required: 13480cf16deSIkjoon Jang - compatible 13580cf16deSIkjoon Jang 13680cf16deSIkjoon Jang additionalProperties: false 13780cf16deSIkjoon Jang 1381acd4577SRicardo CañuelopatternProperties: 1391acd4577SRicardo Cañuelo "^i2c-tunnel[0-9]*$": 1401acd4577SRicardo Cañuelo type: object 1411acd4577SRicardo Cañuelo $ref: "/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#" 1421acd4577SRicardo Cañuelo 1435c024e68SRicardo Cañuelo "^regulator@[0-9]+$": 1445c024e68SRicardo Cañuelo type: object 1455c024e68SRicardo Cañuelo $ref: "/schemas/regulator/google,cros-ec-regulator.yaml#" 1465c024e68SRicardo Cañuelo 1475c024e68SRicardo Cañuelo "^extcon[0-9]*$": 1485c024e68SRicardo Cañuelo type: object 1495c024e68SRicardo Cañuelo $ref: "/schemas/extcon/extcon-usbc-cros-ec.yaml#" 1505c024e68SRicardo Cañuelo 15146b57806SIkjoon Jangrequired: 15246b57806SIkjoon Jang - compatible 15346b57806SIkjoon Jang 154f412fe11SKrzysztof KozlowskiallOf: 155f412fe11SKrzysztof Kozlowski - if: 15646b57806SIkjoon Jang properties: 15746b57806SIkjoon Jang compatible: 15846b57806SIkjoon Jang contains: 15946b57806SIkjoon Jang enum: 16046b57806SIkjoon Jang - google,cros-ec-i2c 16146b57806SIkjoon Jang - google,cros-ec-rpmsg 16246b57806SIkjoon Jang then: 16346b57806SIkjoon Jang properties: 16446b57806SIkjoon Jang google,cros-ec-spi-pre-delay: false 16546b57806SIkjoon Jang google,cros-ec-spi-msg-delay: false 16646b57806SIkjoon Jang spi-max-frequency: false 167f412fe11SKrzysztof Kozlowski else: 168f412fe11SKrzysztof Kozlowski $ref: /schemas/spi/spi-peripheral-props.yaml 16946b57806SIkjoon Jang 17046b57806SIkjoon JangadditionalProperties: false 17146b57806SIkjoon Jang 17246b57806SIkjoon Jangexamples: 17346b57806SIkjoon Jang # Example for I2C 17446b57806SIkjoon Jang - | 17546b57806SIkjoon Jang #include <dt-bindings/gpio/gpio.h> 17646b57806SIkjoon Jang #include <dt-bindings/interrupt-controller/irq.h> 17746b57806SIkjoon Jang 17846b57806SIkjoon Jang i2c0 { 17946b57806SIkjoon Jang #address-cells = <1>; 18046b57806SIkjoon Jang #size-cells = <0>; 18146b57806SIkjoon Jang 18246b57806SIkjoon Jang cros-ec@1e { 18346b57806SIkjoon Jang compatible = "google,cros-ec-i2c"; 18446b57806SIkjoon Jang reg = <0x1e>; 18546b57806SIkjoon Jang interrupts = <6 0>; 18646b57806SIkjoon Jang interrupt-parent = <&gpio0>; 18746b57806SIkjoon Jang }; 18846b57806SIkjoon Jang }; 18946b57806SIkjoon Jang 19046b57806SIkjoon Jang # Example for SPI 19146b57806SIkjoon Jang - | 19246b57806SIkjoon Jang #include <dt-bindings/gpio/gpio.h> 19346b57806SIkjoon Jang #include <dt-bindings/interrupt-controller/irq.h> 19446b57806SIkjoon Jang 19546b57806SIkjoon Jang spi0 { 19646b57806SIkjoon Jang #address-cells = <1>; 19746b57806SIkjoon Jang #size-cells = <0>; 19846b57806SIkjoon Jang 19946b57806SIkjoon Jang cros-ec@0 { 20046b57806SIkjoon Jang compatible = "google,cros-ec-spi"; 20146b57806SIkjoon Jang reg = <0x0>; 20246b57806SIkjoon Jang google,cros-ec-spi-msg-delay = <30>; 20346b57806SIkjoon Jang google,cros-ec-spi-pre-delay = <10>; 20446b57806SIkjoon Jang interrupts = <99 0>; 20546b57806SIkjoon Jang interrupt-parent = <&gpio7>; 20646b57806SIkjoon Jang spi-max-frequency = <5000000>; 20719ad93bcSStephen Boyd 20819ad93bcSStephen Boyd proximity { 20919ad93bcSStephen Boyd compatible = "google,cros-ec-mkbp-proximity"; 21019ad93bcSStephen Boyd }; 21180cf16deSIkjoon Jang 21280cf16deSIkjoon Jang cbas { 21380cf16deSIkjoon Jang compatible = "google,cros-cbas"; 21480cf16deSIkjoon Jang }; 21546b57806SIkjoon Jang }; 21646b57806SIkjoon Jang }; 21746b57806SIkjoon Jang 21846b57806SIkjoon Jang # Example for RPMSG 21946b57806SIkjoon Jang - | 22046b57806SIkjoon Jang scp0 { 22146b57806SIkjoon Jang cros-ec { 22246b57806SIkjoon Jang compatible = "google,cros-ec-rpmsg"; 22346b57806SIkjoon Jang }; 22446b57806SIkjoon Jang }; 22546b57806SIkjoon Jang... 226