From patchwork Fri Jan 18 17:40:13 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: 156030 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3523731jaa; Fri, 18 Jan 2019 09:43:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN5B1eFUeUulU+OXDKEl+GxAUhBCPXCYxFAXbspVd4Ma5wskhON8bNk0rfxRXn3xlSSkc2u+ X-Received: by 2002:a17:906:351a:: with SMTP id r26-v6mr15330223eja.193.1547833394256; Fri, 18 Jan 2019 09:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547833394; cv=none; d=google.com; s=arc-20160816; b=XN7blutjguB1ipQyXtDe+LhVeifyj0ZDVFXXn/DTHXw+jDjl6G10AIdacu1Q+w1Y6w atFvq5va1EEL6BqI0xgRcCbFr7ckSJ3kA7ut+G/lP5/8iMuEKHPTe8BnpQENE6g34AAW wWQqO1v7CavluqD5TEjlKOGa/PdzYn75T8IxdQQm/QKgfwHmJMdHz3bV98yKwA0/4Qej Min3wbpxvu4qnYONHCyVDbhPDilsMwG6mAAUQWzO6v7PxLFjBOf5EOEGjuH156P4lLsX rsDxZO2dOpylhew8TCaATiZmwLXFwRO1L214Agnzt7GxaKLfv4YNvI/1JS6SDyA7gnRm 3hNg== 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=EFkAOiAY9GVYTbICIinxgH0jSOT9zC4i2tgxDC4aP7eF2v8tCrt5ZK9V2fbPb3zYqk Tcr/NjwtikKZJpBCO+HUJK1h3SdThSLnBelosHtnQR8ftnWCttkfkVsM88yVwEQOXJVK qpjc/IMKHs2y78/0S+zUXPLMr7IiPr5speZArxuQJUseagmOWHN54n8vdUBwJcMl4rGG 7Hjz9ypyKYXlLTyIPqYklSaeQ+vR9DeLBY+A4X/NAPWRtGXIbGk6OROAjGchUtlu9t+Q BzEcA5aDsx0yaRlH8CXnWXJa4FbWsCaqZomUnPQ3N3qTxwi+x1B/vrd6f/O7EuLNbLTE T4Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=K2opSLcx; 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 g13si892011edk.370.2019.01.18.09.43.13; Fri, 18 Jan 2019 09:43:14 -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=K2opSLcx; 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 87AF0C21C6A; Fri, 18 Jan 2019 17:41:43 +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 E6AC7C2214C; Fri, 18 Jan 2019 17:40:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AD318C22072; Fri, 18 Jan 2019 17:40:30 +0000 (UTC) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by lists.denx.de (Postfix) with ESMTPS id C4D54C21E44 for ; Fri, 18 Jan 2019 17:40:26 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id o10so11729046edt.13 for ; Fri, 18 Jan 2019 09:40:26 -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=K2opSLcxaVa+5xG5d+BvRxt7/y5txRfnVx6Gomro/BJqFszmcySoNGc759Z+UQWGDx f1Vf7DlXkESpovzADBCc7GVeqtEH78xIWnqQvH+CLT0OrbHY5DBe1wHjdFGwnXcN0wDz 3uFIg6FjXweha6EkxYfGAybwipONi1QtDVr9A= 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=agKW1pR9M41QNCnVA5Ebn6vuYT6+F5hWY47jcr8zyp2gvb5ZnMtm27EnkTUKW7/Yg8 fJ42jQo3NJuAHAdfEhiu6sjiZqCEVbRsYQrsGqc0RZiHfdhCyuv0mixQsX49laaDAEnE 2R3earhVGMhDOm4+UXPkkvYRGEyr56t76Q29WYQiClIoylDsNfbTDcqeGYPIq1j73CeL 1eU0MvqY9LtZeR1fohmisB6R721y8JN2TQtPPEfnZYP3Djy6oIMWo98Nafa3UNm6DNIh gkrWKcBAqgW90WwTNQ230tRQz8hWb5scgJFksZGmwujzUec+2Q1nJfnjPNeXmzP7omFz H+tg== X-Gm-Message-State: AJcUukdm5qurQHuzQYjneidPgVFj3eqDmFWxlw6QJjWvbQ7D/cqpXNqL fpoDeXTEoyVR6FMlHmFevdDJxRrL1hQ= X-Received: by 2002:a50:cdd3:: with SMTP id h19mr5357814edj.45.1547833225983; Fri, 18 Jan 2019 09:40:25 -0800 (PST) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id l20-v6sm4026339eja.18.2019.01.18.09.40.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 09:40:25 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Fri, 18 Jan 2019 17:40:13 +0000 Message-Id: <20190118174014.17860-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118174014.17860-1-bryan.odonoghue@linaro.org> References: <20190118174014.17860-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Cc: fabio.estevam@nxp.com Subject: [U-Boot] [RESEND] [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 */