All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 05/10] colibri_imx7: remove legancy I2C support
Date: Mon, 25 Jul 2016 23:22:28 -0700	[thread overview]
Message-ID: <20160726062233.7656-6-stefan@agner.ch> (raw)
In-Reply-To: <20160726062233.7656-1-stefan@agner.ch>

From: Stefan Agner <stefan.agner@toradex.com>

Remove legancy I2C config and code in favor of upcomming DM/DT
enable I2C support.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---

 board/toradex/colibri_imx7/colibri_imx7.c | 40 -------------------------------
 include/configs/colibri_imx7.h            |  2 --
 2 files changed, 42 deletions(-)

diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 8eedd65..ddb3085 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -12,13 +12,11 @@
 #include <asm/gpio.h>
 #include <asm/imx-common/boot_mode.h>
 #include <asm/imx-common/iomux-v3.h>
-#include <asm/imx-common/mxc_i2c.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <fsl_esdhc.h>
-#include <i2c.h>
 #include <linux/sizes.h>
 #include <mmc.h>
 #include <miiphy.h>
@@ -38,9 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define ENET_RX_PAD_CTRL  (PAD_CTL_PUS_PU100KOHM | PAD_CTL_DSE_3P3V_49OHM)
 
-#define I2C_PAD_CTRL    (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
-	PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
-
 #define LCD_PAD_CTRL    (PAD_CTL_HYS | PAD_CTL_PUS_PU100KOHM | \
 	PAD_CTL_DSE_3P3V_49OHM)
 
@@ -48,36 +43,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define NAND_PAD_READY0_CTRL (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU5KOHM)
 
-#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_GPIO1_IO04__I2C1_SCL | PC,
-		.gpio_mode = MX7D_PAD_GPIO1_IO04__GPIO1_IO4 | PC,
-		.gp = IMX_GPIO_NR(1, 4),
-	},
-	.sda = {
-		.i2c_mode = MX7D_PAD_GPIO1_IO05__I2C1_SDA | PC,
-		.gpio_mode = MX7D_PAD_GPIO1_IO05__GPIO1_IO5 | PC,
-		.gp = IMX_GPIO_NR(1, 5),
-	},
-};
-/* I2C4 for Colibri I2C */
-static struct i2c_pads_info i2c_pad_info4 = {
-	.scl = {
-		.i2c_mode = MX7D_PAD_ENET1_RGMII_TD2__I2C4_SCL | PC,
-		.gpio_mode = MX7D_PAD_ENET1_RGMII_TD2__GPIO7_IO8 | PC,
-		.gp = IMX_GPIO_NR(7, 8),
-	},
-	.sda = {
-		.i2c_mode = MX7D_PAD_ENET1_RGMII_TD3__I2C4_SDA | PC,
-		.gpio_mode = MX7D_PAD_ENET1_RGMII_TD3__GPIO7_IO9 | PC,
-		.gp = IMX_GPIO_NR(7, 9),
-	},
-};
-#endif
-
 int dram_init(void)
 {
 	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -331,11 +296,6 @@ int board_early_init_f(void)
 {
 	setup_iomux_uart();
 
-#ifdef CONFIG_SYS_I2C_MXC
-	setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
-	setup_i2c(3, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info4);
-#endif
-
 	return 0;
 }
 
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 9da219c..32b6101 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -59,9 +59,7 @@
 #undef CONFIG_BOOTM_RTEMS
 
 /* I2C configs */
-#define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_SPEED		100000
 
 #define CONFIG_IPADDR			192.168.10.2
-- 
2.9.0

  parent reply	other threads:[~2016-07-26  6:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  6:22 [U-Boot] [PATCH 00/10] mx7: add dt support for Colibri iMX7S/iMX7D Stefan Agner
2016-07-26  6:22 ` [U-Boot] [PATCH 01/10] dm: imx: serial: support device tree Stefan Agner
2016-08-01  1:01   ` Simon Glass
2016-08-02  5:33     ` Stefan Agner
2016-08-26 14:10   ` Stefano Babic
2016-08-29  0:00     ` Stefan Agner
2016-10-04 13:02       ` Stefano Babic
2016-10-05 21:58         ` Stefan Agner
2016-10-06  7:25           ` Stefano Babic
2016-07-26  6:22 ` [U-Boot] [PATCH 02/10] pinctrl: imx: do not announce driver initialization Stefan Agner
2016-08-01  1:01   ` Simon Glass
2016-07-26  6:22 ` [U-Boot] [PATCH 03/10] arm: dts: imx7: add pinctrl defines Stefan Agner
2016-07-26  6:35   ` Wolfgang Denk
2016-07-26  6:22 ` [U-Boot] [PATCH 04/10] arm: dts: imx7: add basic i.MX 7/Colibri iMX7 device tree Stefan Agner
2016-08-01  1:01   ` Simon Glass
2016-07-26  6:22 ` Stefan Agner [this message]
2016-07-26  6:22 ` [U-Boot] [PATCH 06/10] colibri_imx7: remove legancy UART platform data Stefan Agner
2016-07-26  6:22 ` [U-Boot] [PATCH 07/10] power: pmic: add Ricoh RN5T567 PMIC support Stefan Agner
2016-08-01  1:01   ` Simon Glass
2016-07-26  6:22 ` [U-Boot] [PATCH 08/10] arm: dts: imx7: add Ricoh RN5T567 PMIC node Stefan Agner
2016-07-26  6:22 ` [U-Boot] [PATCH 09/10] colibri_imx7: use Ricoh RN5T567 to reboot the board Stefan Agner
2016-07-26  6:22 ` [U-Boot] [PATCH 10/10] configs: enable device tree for Colibri iMX7 Stefan Agner
2016-08-26 13:25 ` [U-Boot] [PATCH 00/10] mx7: add dt support for Colibri iMX7S/iMX7D Stefano Babic
2016-10-03 19:59   ` Stefan Agner
2016-10-04  8:07     ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160726062233.7656-6-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.