In some cases it is necessary to read the keyboard in early phases of
U-Boot. The cros_ec keyboard is kept in the misc directory. Update the
config to allow this.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 drivers/misc/Kconfig  | 72 +++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/Makefile |  9 +++---
 2 files changed, 77 insertions(+), 4 deletions(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index b0fb73f6926..08ac16e0389 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -13,6 +13,24 @@ config MISC
          set of generic read, write and ioctl methods may be used to
          access the device.
 
+config SPL_MISC
+       bool "Enable Driver Model for Misc drivers in SPL"
+       depends on SPL_DM
+       help
+         Enable driver model for miscellaneous devices. This class is
+         used only for those do not fit other more general classes. A
+         set of generic read, write and ioctl methods may be used to
+         access the device.
+
+config TPL_MISC
+       bool "Enable Driver Model for Misc drivers in TPL"
+       depends on TPL_DM
+       help
+         Enable driver model for miscellaneous devices. This class is
+         used only for those do not fit other more general classes. A
+         set of generic read, write and ioctl methods may be used to
+         access the device.
+
 config ALTERA_SYSID
        bool "Altera Sysid support"
        depends on MISC
@@ -60,6 +78,24 @@ config CROS_EC
          control access to the battery and main PMIC depending on the
          device. You can use the 'crosec' command to access it.
 
+config SPL_CROS_EC
+       bool "Enable Chrome OS EC in SPL"
+       help
+         Enable access to the Chrome OS EC in SPL. This is a separate
+         microcontroller typically available on a SPI bus on Chromebooks. It
+         provides access to the keyboard, some internal storage and may
+         control access to the battery and main PMIC depending on the
+         device. You can use the 'crosec' command to access it.
+
+config TPL_CROS_EC
+       bool "Enable Chrome OS EC in TPL"
+       help
+         Enable access to the Chrome OS EC in TPL. This is a separate
+         microcontroller typically available on a SPI bus on Chromebooks. It
+         provides access to the keyboard, some internal storage and may
+         control access to the battery and main PMIC depending on the
+         device. You can use the 'crosec' command to access it.
+
 config CROS_EC_I2C
        bool "Enable Chrome OS EC I2C driver"
        depends on CROS_EC
@@ -78,6 +114,24 @@ config CROS_EC_LPC
          through a legacy port interface, so on x86 machines the main
          function of the EC is power and thermal management.
 
+config SPL_CROS_EC_LPC
+       bool "Enable Chrome OS EC LPC driver in SPL"
+       depends on CROS_EC
+       help
+         Enable I2C access to the Chrome OS EC. This is used on x86
+         Chromebooks such as link and falco. The keyboard is provided
+         through a legacy port interface, so on x86 machines the main
+         function of the EC is power and thermal management.
+
+config TPL_CROS_EC_LPC
+       bool "Enable Chrome OS EC LPC driver in TPL"
+       depends on CROS_EC
+       help
+         Enable I2C access to the Chrome OS EC. This is used on x86
+         Chromebooks such as link and falco. The keyboard is provided
+         through a legacy port interface, so on x86 machines the main
+         function of the EC is power and thermal management.
+
 config CROS_EC_SANDBOX
        bool "Enable Chrome OS EC sandbox driver"
        depends on CROS_EC && SANDBOX
@@ -87,6 +141,24 @@ config CROS_EC_SANDBOX
          EC flash read/write/erase support and a few other things. It is
          enough to perform a Chrome OS verified boot on sandbox.
 
+config SPL_CROS_EC_SANDBOX
+       bool "Enable Chrome OS EC sandbox driver in SPL"
+       depends on SPL_CROS_EC && SANDBOX
+       help
+         Enable a sandbox emulation of the Chrome OS EC in SPL. This supports
+         keyboard (use the -l flag to enable the LCD), verified boot context,
+         EC flash read/write/erase support and a few other things. It is
+         enough to perform a Chrome OS verified boot on sandbox.
+
+config TPL_CROS_EC_SANDBOX
+       bool "Enable Chrome OS EC sandbox driver in TPL"
+       depends on TPL_CROS_EC && SANDBOX
+       help
+         Enable a sandbox emulation of the Chrome OS EC in TPL. This supports
+         keyboard (use the -l flag to enable the LCD), verified boot context,
+         EC flash read/write/erase support and a few other things. It is
+         enough to perform a Chrome OS verified boot on sandbox.
+
 config CROS_EC_SPI
        bool "Enable Chrome OS EC SPI driver"
        depends on CROS_EC
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index acf24c44fa9..9b92e61bfa8 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -3,17 +3,18 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 
-obj-$(CONFIG_MISC) += misc-uclass.o
+obj-$(CONFIG_$(SPL_TPL_)CROS_EC) += cros_ec.o
+obj-$(CONFIG_$(SPL_TPL_)CROS_EC_SANDBOX) += cros_ec_sandbox.o
+obj-$(CONFIG_$(SPL_TPL_)CROS_EC_LPC) += cros_ec_lpc.o
+
+obj-$(CONFIG_$(SPL_TPL_)MISC) += misc-uclass.o
 obj-$(CONFIG_ALI152X) += ali512x.o
 obj-$(CONFIG_ALTERA_SYSID) += altera_sysid.o
 obj-$(CONFIG_ATSHA204A) += atsha204a-i2c.o
 obj-$(CONFIG_DS4510)  += ds4510.o
 obj-$(CONFIG_CBMEM_CONSOLE) += cbmem_console.o
 ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_CROS_EC) += cros_ec.o
-obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o
 obj-$(CONFIG_CROS_EC_I2C) += cros_ec_i2c.o
-obj-$(CONFIG_CROS_EC_SANDBOX) += cros_ec_sandbox.o
 obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o
 endif
 obj-$(CONFIG_FSL_IIM) += fsl_iim.o
-- 
2.19.0.605.g01d371f741-goog

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to