Commit 7443a1ddb19c047e5331962545ef5cbc34b5f60a

Authored by Stefan Agner
Committed by Stefano Babic
1 parent e60f74907d

colibri_imx7: remove legancy I2C support

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

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

Showing 2 changed files with 0 additions and 42 deletions Side-by-side Diff

board/toradex/colibri_imx7/colibri_imx7.c
... ... @@ -12,13 +12,11 @@
12 12 #include <asm/gpio.h>
13 13 #include <asm/imx-common/boot_mode.h>
14 14 #include <asm/imx-common/iomux-v3.h>
15   -#include <asm/imx-common/mxc_i2c.h>
16 15 #include <asm/io.h>
17 16 #include <common.h>
18 17 #include <dm.h>
19 18 #include <dm/platform_data/serial_mxc.h>
20 19 #include <fsl_esdhc.h>
21   -#include <i2c.h>
22 20 #include <linux/sizes.h>
23 21 #include <mmc.h>
24 22 #include <miiphy.h>
... ... @@ -38,9 +36,6 @@
38 36  
39 37 #define ENET_RX_PAD_CTRL (PAD_CTL_PUS_PU100KOHM | PAD_CTL_DSE_3P3V_49OHM)
40 38  
41   -#define I2C_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \
42   - PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM)
43   -
44 39 #define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_PU100KOHM | \
45 40 PAD_CTL_DSE_3P3V_49OHM)
46 41  
... ... @@ -48,36 +43,6 @@
48 43  
49 44 #define NAND_PAD_READY0_CTRL (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU5KOHM)
50 45  
51   -#ifdef CONFIG_SYS_I2C_MXC
52   -#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
53   -/* I2C1 for PMIC */
54   -static struct i2c_pads_info i2c_pad_info1 = {
55   - .scl = {
56   - .i2c_mode = MX7D_PAD_GPIO1_IO04__I2C1_SCL | PC,
57   - .gpio_mode = MX7D_PAD_GPIO1_IO04__GPIO1_IO4 | PC,
58   - .gp = IMX_GPIO_NR(1, 4),
59   - },
60   - .sda = {
61   - .i2c_mode = MX7D_PAD_GPIO1_IO05__I2C1_SDA | PC,
62   - .gpio_mode = MX7D_PAD_GPIO1_IO05__GPIO1_IO5 | PC,
63   - .gp = IMX_GPIO_NR(1, 5),
64   - },
65   -};
66   -/* I2C4 for Colibri I2C */
67   -static struct i2c_pads_info i2c_pad_info4 = {
68   - .scl = {
69   - .i2c_mode = MX7D_PAD_ENET1_RGMII_TD2__I2C4_SCL | PC,
70   - .gpio_mode = MX7D_PAD_ENET1_RGMII_TD2__GPIO7_IO8 | PC,
71   - .gp = IMX_GPIO_NR(7, 8),
72   - },
73   - .sda = {
74   - .i2c_mode = MX7D_PAD_ENET1_RGMII_TD3__I2C4_SDA | PC,
75   - .gpio_mode = MX7D_PAD_ENET1_RGMII_TD3__GPIO7_IO9 | PC,
76   - .gp = IMX_GPIO_NR(7, 9),
77   - },
78   -};
79   -#endif
80   -
81 46 int dram_init(void)
82 47 {
83 48 gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
... ... @@ -330,11 +295,6 @@
330 295 int board_early_init_f(void)
331 296 {
332 297 setup_iomux_uart();
333   -
334   -#ifdef CONFIG_SYS_I2C_MXC
335   - setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
336   - setup_i2c(3, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info4);
337   -#endif
338 298  
339 299 return 0;
340 300 }
include/configs/colibri_imx7.h
... ... @@ -59,9 +59,7 @@
59 59 #undef CONFIG_BOOTM_RTEMS
60 60  
61 61 /* I2C configs */
62   -#define CONFIG_SYS_I2C
63 62 #define CONFIG_SYS_I2C_MXC
64   -#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
65 63 #define CONFIG_SYS_I2C_SPEED 100000
66 64  
67 65 #define CONFIG_IPADDR 192.168.10.2