From patchwork Mon Nov 24 18:57:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 414070 X-Patchwork-Delegate: sjg@chromium.org 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 70B26140168 for ; Tue, 25 Nov 2014 05:59:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E01E4B601; Mon, 24 Nov 2014 19:58:55 +0100 (CET) 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 106tGAoKg4Mu; Mon, 24 Nov 2014 19:58:55 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6CE64B660; Mon, 24 Nov 2014 19:58:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 578C14B5FB for ; Mon, 24 Nov 2014 19:58:27 +0100 (CET) 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 wzTD1OwkmVnr for ; Mon, 24 Nov 2014 19:58:27 +0100 (CET) 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-vc0-f201.google.com (mail-vc0-f201.google.com [209.85.220.201]) by theia.denx.de (Postfix) with ESMTPS id 08D554B601 for ; Mon, 24 Nov 2014 19:58:23 +0100 (CET) Received: by mail-vc0-f201.google.com with SMTP id hq11so298356vcb.2 for ; Mon, 24 Nov 2014 10:58:21 -0800 (PST) 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=+JrSvTYxL6335gG6kI+roe8MF0HLLe7LwpmEcvrDsuU=; b=D6CTCVOH5F17U/3pKzAoZaJ3n8cKzisQsZzhQW0sBrIlkHmxHX2bQsrlGUQRCVX/Q+ sf52+bZcB1RnakuvFwO+SfveV0B5FLgW3RmaWvbINDQZAMN37xQjKUh2gLOceeIxsdXy sWA225Ps4txPdFhafD4smf5UTEVIDLeOcqXsbn9+BT01XF0YXV//Qco8ScK1b2VuJiBZ ZkmMq7h8Tew+PTFLo2OwhmSfCOa1V7C8emhcFDJJNcXn/SHI6/aof2fALVFw0ka6N1Qa FRF6o0tPK4sjzbSKPiQocKzFbWzDxkiOFh9iz2hY0W2LXzcsvtrTgxoi7gNs9XlEo1Rh TeOg== X-Gm-Message-State: ALoCoQlFSz9hmG4HkZovuQovVJsMFsEtDPfD9k9gfx3MgljdhqpM1bCrHRhNuX0xI3LDWWvPyMMR X-Received: by 10.52.183.161 with SMTP id en1mr20886077vdc.3.1416855501630; Mon, 24 Nov 2014 10:58:21 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id k66si479838yho.7.2014.11.24.10.58.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 10:58:21 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id BS6wmYG5.1; Mon, 24 Nov 2014 10:58:21 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 9C16D220E06; Mon, 24 Nov 2014 11:58:20 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 24 Nov 2014 11:57:20 -0700 Message-Id: <1416855444-32016-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1416855444-32016-1-git-send-email-sjg@chromium.org> References: <1416855444-32016-1-git-send-email-sjg@chromium.org> Cc: u-boot-review@google.com Subject: [U-Boot] [PATCH v3 06/10] dm: i2c: config: Enable I2C for sandbox using driver model X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Enable the options to bring up I2C on sandbox. Also enable all the available I2C commands for testing purposes. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/sandbox/include/asm/test.h | 15 +++++++++++++++ include/configs/sandbox.h | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 arch/sandbox/include/asm/test.h diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h new file mode 100644 index 0000000..d7f7bb5 --- /dev/null +++ b/arch/sandbox/include/asm/test.h @@ -0,0 +1,15 @@ +/* + * Test-related constants for sandbox + * + * Copyright (c) 2014 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_TEST_H +#define __ASM_TEST_H + +/* The sandbox driver always permits an I2C device with this address */ +#define SANDBOX_I2C_TEST_ADDR 0x59 + +#endif diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index ee4b244..d4ebe6a 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -110,6 +110,12 @@ #define CONFIG_SPI_FLASH_STMICRO #define CONFIG_SPI_FLASH_WINBOND +#define CONFIG_DM_I2C +#define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C_SANDBOX +#define CONFIG_I2C_EDID +#define CONFIG_I2C_EEPROM + /* Memory things - we don't really want a memory test */ #define CONFIG_SYS_LOAD_ADDR 0x00000000 #define CONFIG_SYS_MEMTEST_START 0x00100000