From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 17 Feb 2015 15:29:41 -0700 Subject: [U-Boot] [PATCH 07/20] dm: tegra: cros_ec: Enable Chrome OS EC on Nyan-big In-Reply-To: <1424212195-7501-1-git-send-email-sjg@chromium.org> References: <1424212195-7501-1-git-send-email-sjg@chromium.org> Message-ID: <1424212195-7501-8-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arm/dts/tegra124-nyan-big.dts | 6 ++++-- configs/nyan-big_defconfig | 5 +++++ include/configs/nyan-big.h | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/tegra124-nyan-big.dts b/arch/arm/dts/tegra124-nyan-big.dts index 8ac770b..f063afd 100644 --- a/arch/arm/dts/tegra124-nyan-big.dts +++ b/arch/arm/dts/tegra124-nyan-big.dts @@ -163,12 +163,14 @@ spi at 7000d400 { status = "okay"; + spi-deactivate-delay = <200>; + spi-max-frequency = <3000000>; cros_ec: cros-ec at 0 { - compatible = "google,cros-ec-spi"; - spi-max-frequency = <3000000>; + compatible = "google,cros-ec"; interrupt-parent = <&gpio>; interrupts = ; + ec-interrupt = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; reg = <0>; google,cros-ec-spi-msg-delay = <2000>; diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 41de8e6..dae82cb 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -5,3 +5,8 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-nyan-big" 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 diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h index f46f8dc..0b7d4d6 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -81,6 +81,8 @@ #define CONFIG_FIT #define CONFIG_OF_LIBFDT +#define CONFIG_KEYBOARD + #include "tegra-common-usb-gadget.h" #include "tegra-common-post.h" -- 2.2.0.rc0.207.ga3a616c