]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: cros_ec: Convert to Kconfig
authorSimon Glass <sjg@chromium.org>
Fri, 13 Feb 2015 19:20:47 +0000 (12:20 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:53:52 +0000 (13:53 +0200)
Since both I2C and SPI are converted to Kconfig, we can convert cros_ec
to Kconfig for these buses.

LPC will need to wait until driver mode PCI is available.

Signed-off-by: Simon Glass <sjg@chromium.org>
configs/peach-pi_defconfig
configs/peach-pit_defconfig
configs/sandbox_defconfig
configs/snow_defconfig
drivers/input/Kconfig
drivers/misc/Kconfig
include/configs/exynos5-dt-common.h
include/configs/peach-pi.h
include/configs/peach-pit.h
include/configs/sandbox.h
include/configs/snow.h

index 8ada0dbe40c4941b733313350029516056132460..333e335a26bd6490219d820af47f3ddfcde8b659 100644 (file)
@@ -3,3 +3,7 @@ CONFIG_SPL=y
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_PEACH_PI=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5800-peach-pi"
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_PEACH_PI=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5800-peach-pi"
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_SPI=y
+CONFIG_CROS_EC_KEYB=y
+CONFIG_CMD_CROS_EC=y
index b944b3bb502701066c412639ec163c47d8f677f1..cf84444950ab1bb6b3f716cc74ae9141bf4024fe 100644 (file)
@@ -3,3 +3,7 @@ CONFIG_SPL=y
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_PEACH_PIT=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5420-peach-pit"
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_PEACH_PIT=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5420-peach-pit"
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_SPI=y
+CONFIG_CROS_EC_KEYB=y
+CONFIG_CMD_CROS_EC=y
index 0bf5ea34d0c8fa125cfaa15d18932271457cadff..70f5b86b858f54ee54da215cfe3f0ab037524035 100644 (file)
@@ -7,3 +7,8 @@ CONFIG_DM=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_SYS_MALLOC_F=y
 CONFIG_SYS_MALLOC_F_LEN=0x400
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_SYS_MALLOC_F=y
 CONFIG_SYS_MALLOC_F_LEN=0x400
+CONFIG_CROS_EC=y
+CONFIG_DM_CROS_EC=y
+CONFIG_CROS_EC_SANDBOX=y
+CONFIG_CROS_EC_KEYB=y
+CONFIG_CMD_CROS_EC=y
index 14ed793f6d75f36e55fb882b10f4ea1b2d8782cc..353ddb03a082d5a9223db2af4aed182379ed5d90 100644 (file)
@@ -3,3 +3,8 @@ CONFIG_SPL=y
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_SNOW=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow"
 +S:CONFIG_ARCH_EXYNOS=y
 +S:CONFIG_TARGET_SNOW=y
 CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow"
+CONFIG_CROS_EC=y
+CONFIG_DM_CROS_EC=y
+CONFIG_CROS_EC_I2C=y
+CONFIG_CROS_EC_KEYB=y
+CONFIG_CMD_CROS_EC=y
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb00de7c576ed4ca7b15968c16047c26e299b30a 100644 (file)
@@ -0,0 +1,6 @@
+config CROS_EC_KEYB
+       bool "Enable Chrome OS EC keyboard support"
+       help
+         Most ARM Chromebooks use an EC to provide access to the keyboard.
+         Messages are used to request key scans from the EC and these are
+         then decoded into keys by this driver.
index 2b348dc8b90ea77af0b59fa727a46e99c83a4028..f8188ae3f6f94fe52bed6104f242d787ebde2b96 100644 (file)
@@ -1,3 +1,49 @@
+config CMD_CROS_EC
+       bool "Enable crosec command"
+       depends on CROS_EC
+       help
+         Enable command-line access to the Chrome OS EC (Embedded
+         Controller). This provides the 'crosec' command which has
+         a number of sub-commands for performing EC tasks such as
+         updating its flash, accessing a small saved context area
+         and talking to the I2C bus behind the EC (if there is one).
+
+config CROS_EC
+       bool "Enable Chrome OS EC"
+       help
+         Enable access to the Chrome OS EC. 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
+       help
+         Enable I2C access to the Chrome OS EC. This is used on older
+         ARM Chromebooks such as snow and spring before the standard bus
+         changed to SPI. The EC will accept commands across the I2C using
+         a special message protocol, and provide responses.
+
+config CROS_EC_LPC
+       bool "Enable Chrome OS EC LPC driver"
+       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_SPI
+       bool "Enable Chrome OS EC SPI driver"
+       depends on CROS_EC
+       help
+         Enable SPI access to the Chrome OS EC. This is used on newer
+         ARM Chromebooks such as pit, pi and nyan-big. The SPI interface
+         provides a faster and more robust interface than I2C but the bugs
+         are less interesting.
+
 config DM_CROS_EC
        bool "Enable Driver Model for Chrome OS EC"
        depends on DM
 config DM_CROS_EC
        bool "Enable Driver Model for Chrome OS EC"
        depends on DM
@@ -5,7 +51,7 @@ config DM_CROS_EC
          Enable driver model for the Chrome OS EC interface. This
          allows the cros_ec SPI driver to operate with CONFIG_DM_SPI
          but otherwise makes few changes. Since cros_ec also supports
          Enable driver model for the Chrome OS EC interface. This
          allows the cros_ec SPI driver to operate with CONFIG_DM_SPI
          but otherwise makes few changes. Since cros_ec also supports
-         I2C and LPC (which don't support driver model yet), a full
+         LPC (which doesn't support driver model yet), a full
          conversion is not yet possible.
 
 config MXC_OCOTP
          conversion is not yet possible.
 
 config MXC_OCOTP
index 9cef0b0a38f799527ef14693e371417b07bb0a74..b1b8e1ace70996af03a3365673a2db025e904805 100644 (file)
@@ -24,9 +24,6 @@
 #define CONFIG_POWER_TPS65090
 
 /* Enable keyboard */
 #define CONFIG_POWER_TPS65090
 
 /* Enable keyboard */
-#define CONFIG_CROS_EC         /* CROS_EC protocol */
-#define CONFIG_CROS_EC_KEYB    /* CROS_EC keyboard input */
-#define CONFIG_CMD_CROS_EC
 #define CONFIG_KEYBOARD
 
 #endif
 #define CONFIG_KEYBOARD
 
 #endif
index f724164d89850ff7b2e4170792a76b6926abaf6b..f04f0613aac23d57a41b93a0fcfeecec8b7fd5f0 100644 (file)
@@ -43,7 +43,6 @@
 #endif
 
 #define CONFIG_POWER_TPS65090_EC
 #endif
 
 #define CONFIG_POWER_TPS65090_EC
-#define CONFIG_CROS_EC_SPI             /* Support CROS_EC over SPI */
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
index de12a9e1b18ffc6cd0d726554699fef58621806b..b5efbdcaa66a85de4c1864e465ea0adf289e0cf0 100644 (file)
@@ -43,7 +43,6 @@
 #endif
 
 #define CONFIG_POWER_TPS65090_EC
 #endif
 
 #define CONFIG_POWER_TPS65090_EC
-#define CONFIG_CROS_EC_SPI             /* Support CROS_EC over SPI */
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
index 5c116508d0de2463eaa368062086d159562b7b1f..febbfb69f6b56d6a3a9bb3dd224a3be4683017a6 100644 (file)
 
 #define CONFIG_BOOTARGS ""
 
 
 #define CONFIG_BOOTARGS ""
 
-#define CONFIG_CROS_EC
-#define CONFIG_CMD_CROS_EC
-#define CONFIG_CROS_EC_SANDBOX
 #define CONFIG_ARCH_EARLY_INIT_R
 #define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_ARCH_EARLY_INIT_R
 #define CONFIG_BOARD_LATE_INIT
 
 #define LCD_BPP                        LCD_COLOR16
 #define CONFIG_LCD_BMP_RLE8
 
 #define LCD_BPP                        LCD_COLOR16
 #define CONFIG_LCD_BMP_RLE8
 
-#define CONFIG_CROS_EC_KEYB
 #define CONFIG_KEYBOARD
 
 #define CONFIG_EXTRA_ENV_SETTINGS      "stdin=serial,cros-ec-keyb\0" \
 #define CONFIG_KEYBOARD
 
 #define CONFIG_EXTRA_ENV_SETTINGS      "stdin=serial,cros-ec-keyb\0" \
index ce6676eae7f71c95a32a98d0681584ba6ca15902..fe802f253c91b2e1095af7d954c68c21e0fa3b7b 100644 (file)
@@ -20,9 +20,7 @@
 #include <configs/exynos5-dt-common.h>
 
 
 #include <configs/exynos5-dt-common.h>
 
 
-#define CONFIG_CROS_EC_I2C             /* Support CROS_EC over I2C */
 #define CONFIG_POWER_TPS65090_I2C
 #define CONFIG_POWER_TPS65090_I2C
-#define CONFIG_DM_CROS_EC
 
 #define CONFIG_BOARD_COMMON
 #define CONFIG_ARCH_EARLY_INIT_R
 
 #define CONFIG_BOARD_COMMON
 #define CONFIG_ARCH_EARLY_INIT_R