From patchwork Sun Oct 29 09:09:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beniamino Galvani X-Patchwork-Id: 10031277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC46B602B5 for ; Sun, 29 Oct 2017 09:10:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993ED287F9 for ; Sun, 29 Oct 2017 09:10:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AD8A2885D; Sun, 29 Oct 2017 09:10:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16C2E287F9 for ; Sun, 29 Oct 2017 09:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8rznYmDH4yXnRnm5vAMfHCVrThufJfVGjY3yXr5f7f4=; b=W4n6xxBZ72isGaRPH2brp/GgjF Z3y0mOAnF43S7BXMpJuCp5u+JXuXZjrB/IOw4KspwnVm2zhOUeJ9CYnOZzSNVV3fqzpV8bW/lLx0J eBbwJv2CrK7MC6Gu7eucLdolOXHhN2+ktlXxxWlUToeCpP4a3Vk4VGBvgHnhKLyhraHeB3KXHfAGw PIxw5XDzMuoawgUZbzFFcXW9htSl8y339JXCFBKgOYwDczoAK1btKhwTXZ5gjDdlNiXpB59s683YB Zf+jJZCCvq2JA4TmZm2NCkslOX5hfTxcyyxhbFTTxi/hMnjmEiLXaiJ8KbiU49pYUACC9XnE1gJ6E U4NL8zsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8jbq-0007PV-WB; Sun, 29 Oct 2017 09:10:23 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e8jbR-00063w-OM for linux-amlogic@lists.infradead.org; Sun, 29 Oct 2017 09:09:59 +0000 Received: by mail-wm0-x244.google.com with SMTP id z3so10680721wme.5 for ; Sun, 29 Oct 2017 02:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vBUyYDHU462bHj3OFUTr4IS10COq591Pw6GPtiD6l5U=; b=IvGthlx42JToAzqLuv/rwywUE7DtZ2BqDRdUZLNDIrSLyS20EYGjS8XmGTsVp7gsoL jzq0UO+K8TcgWVRXIQdClEA0D0qr6FVBQF9M5NiAXRj8PpF6285IVDzWXevnGmGefHrF IvvviKjqc9kstwglZW6OO+89CGRNshjbhJ9hn4oxt7aI2TT4KEU9B6lN0WpMJ29Iufcm rbqdPeu+NBkNLUhnynQ+cD42yimo50lQRN+mtc+qTWyX0imjJPB6ixXoAsS+xYDsiwOO X7sfy69pJyZyeKLP/k+slVprXeU9w4EpdIIqkeON6rbqbFYZFhiyiNg0PAv6bJRdhPet 4DFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vBUyYDHU462bHj3OFUTr4IS10COq591Pw6GPtiD6l5U=; b=XzMVWjrqtQhe8hmjxEu7/5XcRjt/Q1Rm5IDz+7cP3T9LnJtDg2W2GI1q1BtfqCOq3M qziyNn6TaAsYBGP85p3q/ZlRWbTicyRpTjj56WIAXNvLBgnqEvS4+iWLiG6gy7JYsMKA nzM+lKPTcUJdEqnPcI9jPqTj4aFu5cqKMh5s9+ZwkhbUZd950L+XiWcjFRW4SlwHThRd JZpGQypEx4avAm8O2fXGBXtXRf2+aiznghsAHK0v74q7GgvlgMROO6WKx+XE/4fO1Vfg c2xKm64UllEfB+MNxtcxd3ozAf2nzQ5lud+3Kd5p2zRFwO4UF2dLB/GhDnzREdF9iP4N mjTQ== X-Gm-Message-State: AMCzsaVpnCfgstf2cucRTpdTDV34BL5a2yIhHptEq2oqNwXjw/LaBe75 zXznC4s5YqcycAl8sVo9tH8= X-Google-Smtp-Source: ABhQp+TbWhA4Bi3KrbS5pjEgyO5d3gmFcaxsBO0EANYkkR2V7G04LslNteIscIWDx71Er0yzWSBaCg== X-Received: by 10.28.139.144 with SMTP id n138mr1088336wmd.78.1509268175788; Sun, 29 Oct 2017 02:09:35 -0700 (PDT) Received: from sark.homenet.telecomitalia.it (host204-185-dynamic.45-213-r.retail.telecomitalia.it. [213.45.185.204]) by smtp.gmail.com with ESMTPSA id n14sm13424061wrg.38.2017.10.29.02.09.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Oct 2017 02:09:35 -0700 (PDT) From: Beniamino Galvani To: u-boot@lists.denx.de Subject: [PATCH 2/2] odroid-c2: enable I2C Date: Sun, 29 Oct 2017 10:09:01 +0100 Message-Id: <20171029090901.24299-3-b.galvani@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171029090901.24299-1-b.galvani@gmail.com> References: <20171029090901.24299-1-b.galvani@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171029_020957_960646_936F29E4 X-CRM114-Status: UNSURE ( 7.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Aribaud , Neil Armstrong , Martin Blumenstingl , Simon Glass , Beniamino Galvani , linux-amlogic@lists.infradead.org, Heiko Schocher , =?UTF-8?q?Andreas=20F=C3=A4rber?= MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Beniamino Galvani --- arch/arm/include/asm/arch-meson/gxbb.h | 1 + board/amlogic/odroid-c2/odroid-c2.c | 1 + configs/odroid-c2_defconfig | 3 +++ 3 files changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-meson/gxbb.h b/arch/arm/include/asm/arch-meson/gxbb.h index ce41349792..96c9535f53 100644 --- a/arch/arm/include/asm/arch-meson/gxbb.h +++ b/arch/arm/include/asm/arch-meson/gxbb.h @@ -44,6 +44,7 @@ #define GXBB_GCLK_MPEG_OTHER GXBB_HIU_ADDR(0x53) #define GXBB_GCLK_MPEG_AO GXBB_HIU_ADDR(0x54) +#define GXBB_GCLK_MPEG_0_I2C BIT(9) #define GXBB_GCLK_MPEG_1_ETH BIT(3) #endif /* __GXBB_H__ */ diff --git a/board/amlogic/odroid-c2/odroid-c2.c b/board/amlogic/odroid-c2/odroid-c2.c index eac04d8178..a5ea8dc5af 100644 --- a/board/amlogic/odroid-c2/odroid-c2.c +++ b/board/amlogic/odroid-c2/odroid-c2.c @@ -35,6 +35,7 @@ int misc_init_r(void) GXBB_ETH_REG_0_CLK_EN); /* Enable power and clock gate */ + setbits_le32(GXBB_GCLK_MPEG_0, GXBB_GCLK_MPEG_0_I2C); setbits_le32(GXBB_GCLK_MPEG_1, GXBB_GCLK_MPEG_1_ETH); clrbits_le32(GXBB_MEM_PD_REG_0, GXBB_MEM_PD_REG_0_ETH_MASK); diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig index f7f8016644..1afd2fc111 100644 --- a/configs/odroid-c2_defconfig +++ b/configs/odroid-c2_defconfig @@ -11,12 +11,15 @@ CONFIG_DEBUG_UART=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_FPGA is not set CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y # CONFIG_CMD_LOADS is not set CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y CONFIG_MMC_MESON_GX=y CONFIG_DM_ETH=y