From patchwork Wed May 13 13:45:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 471907 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A3F6E140664 for ; Wed, 13 May 2015 23:53:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 731474B7EE; Wed, 13 May 2015 15:53:14 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lvgWPJGuIr5h; Wed, 13 May 2015 15:53:14 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B68434B7F2; Wed, 13 May 2015 15:52:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B30534B7B6 for ; Wed, 13 May 2015 15:52:49 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VrnNbg2AJ_OI for ; Wed, 13 May 2015 15:52:49 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ie0-f201.google.com (mail-ie0-f201.google.com [209.85.223.201]) by theia.denx.de (Postfix) with ESMTPS id 07D5F4B7C6 for ; Wed, 13 May 2015 15:52:45 +0200 (CEST) Received: by ierx19 with SMTP id x19so2200788ier.0 for ; Wed, 13 May 2015 06:52:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8B6/pcsgI/weU36pPHzyJnkbyhqSo/UFoAiokLGKVnY=; b=UPhU7ceoMxEyUy9fL40QchwP2P5Vjol2WHZt41uyRECX326Hqzz+ODdAN1YJgDYj7b 9B+ibGfy36v7cv9X6R4znq1ZaHwETb38Zinm0ff366HRc/nVMrNYISZs9AKid6KKkbWc J3pk22sscaBsbNC3fVHakfvqQ2zyMhdizjQC9VGEkheFNg6EatBXs7KBUyVS7OVEm7ad yrw0dvmc3p/hwB/9WcEPYuf/Wo0Um5k8yi+zXBW/LxwqPmX2FGTtw2HvwR8DIDiA/coH rWFOsg9j9or4P55/1zNdmkTlivczm54xs8wFMnGFq4Qiebe3jJd9376EK14FQXBFlNlz 6+yQ== X-Gm-Message-State: ALoCoQlhihzSA9xXFFlfY4tfHNvZU62by6yitwXTMHrYH5B1iybfHW6X14O1iqe2gOe798t9FbhP X-Received: by 10.182.142.37 with SMTP id rt5mr34193987obb.47.1431525163993; Wed, 13 May 2015 06:52:43 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id v17si1086938yhc.0.2015.05.13.06.52.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 06:52:43 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id qDTsSZPw.1; Wed, 13 May 2015 06:52:43 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 233062207E9; Wed, 13 May 2015 07:52:43 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 13 May 2015 07:45:47 -0600 Message-Id: <1431524760-27290-4-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1431524760-27290-1-git-send-email-sjg@chromium.org> References: <1431524760-27290-1-git-send-email-sjg@chromium.org> Cc: Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH v2 03/16] dm: tegra: cros_ec: Enable Chrome OS EC on Nyan-big X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- Changes in v2: - Use spi-max-frequency in both the bus and slave nodes arch/arm/dts/tegra124-nyan-big.dts | 3 +++ configs/nyan-big_defconfig | 5 +++++ include/configs/nyan-big.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/arch/arm/dts/tegra124-nyan-big.dts b/arch/arm/dts/tegra124-nyan-big.dts index 5a39e93..8be6adb 100644 --- a/arch/arm/dts/tegra124-nyan-big.dts +++ b/arch/arm/dts/tegra124-nyan-big.dts @@ -163,12 +163,15 @@ 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 = ; + 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 d447ddc..4a94d7b 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -5,3 +5,8 @@ CONFIG_TARGET_NYAN_BIG=y 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 caca98b..aae54f8 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -80,6 +80,8 @@ #define CONFIG_FIT #define CONFIG_OF_LIBFDT +#define CONFIG_KEYBOARD + #include "tegra-common-usb-gadget.h" #include "tegra-common-post.h"