cros-ec.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ChromeOS Embedded Controller
  2. Google's ChromeOS EC is a Cortex-M device which talks to the AP and
  3. implements various function such as keyboard and battery charging.
  4. The EC can be connect through various means (I2C, SPI, LPC) and the
  5. compatible string used depends on the interface. Each connection method has
  6. its own driver which connects to the top level interface-agnostic EC driver.
  7. Other Linux driver (such as cros-ec-keyb for the matrix keyboard) connect to
  8. the top-level driver.
  9. Required properties (I2C):
  10. - compatible: "google,cros-ec-i2c"
  11. - reg: I2C slave address
  12. Required properties (SPI):
  13. - compatible: "google,cros-ec-spi"
  14. - reg: SPI chip select
  15. Optional properties (SPI):
  16. - google,cros-ec-spi-msg-delay: Some implementations of the EC require some
  17. additional processing time in order to accept new transactions. If the delay
  18. between transactions is not long enough the EC may not be able to respond
  19. properly to subsequent transactions and cause them to hang. This property
  20. specifies the delay, in usecs, introduced between transactions to account
  21. for the time required by the EC to get back into a state in which new data
  22. can be accepted.
  23. Required properties (LPC):
  24. - compatible: "google,cros-ec-lpc"
  25. - reg: List of (IO address, size) pairs defining the interface uses
  26. Example for I2C:
  27. i2c@12CA0000 {
  28. cros-ec@1e {
  29. reg = <0x1e>;
  30. compatible = "google,cros-ec-i2c";
  31. interrupts = <14 0>;
  32. interrupt-parent = <&wakeup_eint>;
  33. wakeup-source;
  34. };
  35. Example for SPI:
  36. spi@131b0000 {
  37. ec@0 {
  38. compatible = "google,cros-ec-spi";
  39. reg = <0x0>;
  40. interrupts = <14 0>;
  41. interrupt-parent = <&wakeup_eint>;
  42. wakeup-source;
  43. spi-max-frequency = <5000000>;
  44. controller-data {
  45. cs-gpio = <&gpf0 3 4 3 0>;
  46. samsung,spi-cs;
  47. samsung,spi-feedback-delay = <2>;
  48. };
  49. };
  50. };
  51. Example for LPC is not supplied as it is not yet implemented.