dm: tegra: cros_ec: Enable Chrome OS EC on Nyan-big
authorSimon Glass <sjg@chromium.org>
Fri, 5 Jun 2015 20:39:34 +0000 (14:39 -0600)
committerTom Warren <twarren@nvidia.com>
Tue, 9 Jun 2015 16:56:13 +0000 (09:56 -0700)
Enable the EC and keyboard, using the SPI bus.

The EC driver requires a particular format and a deactivation delay. Also
U-Boot does not support interrupts.

For now, adjust the device tree to comply. At some point we should tidy
this up to support interrupts and make tegra and exynos use the same setup.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/dts/tegra124-nyan-big.dts
configs/nyan-big_defconfig
include/configs/nyan-big.h

index 5a39e93c68c01fe59e0e31be13fc455305e14962..8be6adbf07cb2804d971d1812e54bafa2fe9248a 100644 (file)
 
        spi@7000d400 {
                status = "okay";
+               spi-deactivate-delay = <200>;
+               spi-max-frequency = <3000000>;
 
                cros_ec: cros-ec@0 {
                        compatible = "google,cros-ec-spi";
                        spi-max-frequency = <3000000>;
                        interrupt-parent = <&gpio>;
                        interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>;
+                       ec-interrupt = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
                        reg = <0>;
 
                        google,cros-ec-spi-msg-delay = <2000>;
index 92acab293bb7f2b742ad123896b04fbbf7149c46..81949e8950830d781caabbbc0ae4b3b1f42d40ac 100644 (file)
@@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-nyan-big"
 CONFIG_CMD_NET=y
 CONFIG_DISPLAY_PORT=y
 CONFIG_VIDEO_TEGRA124=y
+CONFIG_DM_CROS_EC=y
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_SPI=y
+CONFIG_CROS_EC_KEYB=y
+CONFIG_CMD_CROS_EC=y
index a92112f8704c8daf6dd2eda9cf651412cf1d5dd3..515704f2ed8b3649066133e5dbc0bf4303389a72 100644 (file)
@@ -79,6 +79,8 @@
 #define CONFIG_FIT
 #define CONFIG_OF_LIBFDT
 
+#define CONFIG_KEYBOARD
+
 #include "tegra-common-usb-gadget.h"
 #include "tegra-common-post.h"