From patchwork Wed Jan 9 16:47:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 155089 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp920119jaa; Wed, 9 Jan 2019 08:53:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7XnQ0Y1YwyovR6t5h6AQAXY/vGazCVfZLkOd3H2Q6XOPvlgzpiekxT0pcAFs+OU8vuEEEl X-Received: by 2002:a17:906:1102:: with SMTP id h2-v6mr5865828eja.18.1547052829353; Wed, 09 Jan 2019 08:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547052829; cv=none; d=google.com; s=arc-20160816; b=SqYg5u8q7f90KPE9v/9x6jWMtwRhQTqDug+FAa9l0zox3TaFoWGM235USMizxjWF8I xwHlvlBWaUWDcDiK/OUa351nghecaDN1Vl8ktAYr8JqVez/VDJeZS5GWzRu+gT/6IFHr UmtG95C9IYXaPQd511k+8xd5kkAHnrbwAcs8/3lYCkg5JWzWqP3+nxdpfpMZL5FAr7uX Qrc9MJe7DFwbaNWM+qyPA9aJM9D6gpeulSmO/BIWE8kcYef7jQ9x3T904Hfs1pzvMDEd 5chw60wja4FfJkDHwcdak44W4gmkjOufzt7eYfQeunCbie8YcFoXmB8NJqhoinkk5yz0 s2og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature; bh=5wRWjWV5+ARPMws/eqqA4vjXSnuOTWAlb+NG7mro7pY=; b=WwZ1/frbN+QSP0sZBANY43RqwrB+gAIVRiKviwOhDnUF1uISGffCvgWmeMwsGMfGGm JqcmuooPhLMKaXpRpAW396ARcykss58E9mWL8bUYcjvnLpQ9UjdxCLTRPbnCly3O3Q7f Ky9sABVWP2hGb0Fc0fuatxkjE7yqwOxeuJY9sQk1FJei+MYe2zZy4y1FtXuvbfSDvTx2 rxdWD44quB6sqQeNc46kOPdq5APamXYavTeKftis6hvec3QJnYgcXoby6g8AIgrrheWj 3pYZcMO3y/zn125H931BF9Fbv5swIwDoeH7bhqVsnlR0zaRIKQRZEgfqbqtXqgABkPey A8Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Xu0kPWjj; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id f14-v6si385078ejr.83.2019.01.09.08.53.49; Wed, 09 Jan 2019 08:53:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Xu0kPWjj; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id DF72CC2202E; Wed, 9 Jan 2019 16:49:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4EBB6C2201D; Wed, 9 Jan 2019 16:48:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6EAC7C22018; Wed, 9 Jan 2019 16:47:55 +0000 (UTC) Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by lists.denx.de (Postfix) with ESMTPS id BABC4C22003 for ; Wed, 9 Jan 2019 16:47:51 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id a20so7851591edc.8 for ; Wed, 09 Jan 2019 08:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pFUoFSMMP0zynGJg+HQl6+cRsZDkQqPSHcp+Nd0D7aU=; b=Xu0kPWjjQhIE5zDAetL8jX7s39F5uzVfXFkBz0D4eGglZC/WS2gdUvKfoKzvgJ6lwl 9tP8UOCT15j85VRFT/iQxLfov7rDb9EkjIInEz1dopC8L/cNFVLJdS43O4qFZMisOgKX YRBZLbDoU77DTKG0ZxTh9zS+39fL61wB/jhMQ= 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:mime-version:content-transfer-encoding; bh=pFUoFSMMP0zynGJg+HQl6+cRsZDkQqPSHcp+Nd0D7aU=; b=QhbavO0XnlZQGsJIxumnGMs7zI0K6vi/sqHGZR/XIL4TT9yEjqh3snwHrH7QX3j5Eh 2iUcJhHbb8jenbMxM94bqaYlzjaryHkBJqMt/BuHcPHT3bynNOjPMU9eJodm6NkoPRyg 2tb14cgWZgCdRFSXzmGQZdlTZy5XGKWaeC33XzCaqINT5s0UA62v9x9568cVaGYxTQ67 Lt2oDlO9URP8pglvuklBJnmrkm6G86hSBfWl1Rzqdy5W/Dm4n1lYxxpMtVi3tbh7QXNs taPHBwt1ETP4pbjQX6drhJ69wFFDPg9oAagiwNiZKaPbBhSD/pVe7v73+Ydo+9TQvgxz nIhw== X-Gm-Message-State: AJcUukfA9Eedd42meoAuqjZ08jIh5b9IAAuYbyi0iyvw+0P12JyaGqIf yXKs0wAmc71dXkNbxmnV20QoEfvsOBA= X-Received: by 2002:a17:906:48c2:: with SMTP id d2-v6mr5953472ejt.244.1547052471121; Wed, 09 Jan 2019 08:47:51 -0800 (PST) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id b14sm1081499edt.6.2019.01.09.08.47.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 08:47:50 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Wed, 9 Jan 2019 16:47:33 +0000 Message-Id: <20190109164734.22598-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190109164734.22598-1-bryan.odonoghue@linaro.org> References: <20190109164734.22598-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Cc: fabio.estevam@nxp.com Subject: [U-Boot] [PATCH v3 7/8] warp7: defconfig: Switch to DM for I2C X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit switches to DM I2C for warp7 and warp7_bl33 defconfigs. Signed-off-by: Bryan O'Donoghue Reviewed-by: Peng Fan Cc: Peng Fan Cc: Fabio Estevam Cc: Stefano Babic --- board/warp7/warp7.c | 24 ------------------------ configs/warp7_bl33_defconfig | 1 + configs/warp7_defconfig | 1 + include/configs/warp7.h | 2 -- 4 files changed, 2 insertions(+), 26 deletions(-) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 146d722b15..19f0df4d09 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -31,26 +31,6 @@ DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU100KOHM | \ PAD_CTL_HYS) -#define I2C_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ - PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM) - -#ifdef CONFIG_SYS_I2C_MXC -#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) -/* I2C1 for PMIC */ -static struct i2c_pads_info i2c_pad_info1 = { - .scl = { - .i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC, - .gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC, - .gp = IMX_GPIO_NR(4, 8), - }, - .sda = { - .i2c_mode = MX7D_PAD_I2C1_SDA__I2C1_SDA | PC, - .gpio_mode = MX7D_PAD_I2C1_SDA__GPIO4_IO9 | PC, - .gp = IMX_GPIO_NR(4, 9), - }, -}; -#endif - int dram_init(void) { gd->ram_size = PHYS_SDRAM_SIZE; @@ -130,10 +110,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; - #ifdef CONFIG_SYS_I2C_MXC - setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); - #endif - return 0; } diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig index 7f21bb4f53..2e80011cbc 100644 --- a/configs/warp7_bl33_defconfig +++ b/configs/warp7_bl33_defconfig @@ -44,3 +44,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp" CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y CONFIG_DM_GPIO=y +CONFIG_DM_I2C=y diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 2d3171e42a..9f7dc73a11 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -57,3 +57,4 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7s-warp" CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y CONFIG_DM_GPIO=y +CONFIG_DM_I2C=y diff --git a/include/configs/warp7.h b/include/configs/warp7.h index a391dfb5c1..41eb8d7e1d 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -126,9 +126,7 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* I2C configs */ -#define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC -#define CONFIG_SYS_I2C_MXC_I2C1 #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */