]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: vining_2000: convert to DM_I2C
authorAnatolij Gustschin <agust@denx.de>
Wed, 7 Aug 2024 22:34:38 +0000 (00:34 +0200)
committerHeiko Schocher <hs@denx.de>
Fri, 9 Aug 2024 04:27:27 +0000 (06:27 +0200)
Conversion to DM_I2C is mandatory, enable DM_I2C
to disable board removal warning.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
board/softing/vining_2000/vining_2000.c
configs/vining_2000_defconfig

index a0dbf97524bd20c7bf1a77fe199d41956e23c310..bd430cfaa7fc3b89f89c258fb77b1ced4790e303 100644 (file)
@@ -18,7 +18,6 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
-#include <asm/mach-imx/mxc_i2c.h>
 #include <asm/sections.h>
 #include <env.h>
 #include <linux/bitops.h>
@@ -27,7 +26,6 @@
 #include <config.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
-#include <i2c.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <power/pmic.h>
@@ -53,10 +51,6 @@ DECLARE_GLOBAL_DATA_PTR;
        PAD_CTL_PUS_100K_DOWN | PAD_CTL_SPEED_HIGH |            \
        PAD_CTL_SRE_FAST)
 
-#define I2C_PAD_CTRL  (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP |     \
-       PAD_CTL_PKE | PAD_CTL_ODE | PAD_CTL_SPEED_MED |         \
-       PAD_CTL_DSE_40ohm)
-
 #define USDHC_CLK_PAD_CTRL  (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
        PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST)
 
@@ -120,21 +114,6 @@ eth_fail:
        return ret;
 }
 
-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
-/* I2C1 for PMIC */
-static struct i2c_pads_info i2c_pad_info1 = {
-       .scl = {
-               .i2c_mode = MX6_PAD_GPIO1_IO00__I2C1_SCL | PC,
-               .gpio_mode = MX6_PAD_GPIO1_IO00__GPIO1_IO_0 | PC,
-               .gp = IMX_GPIO_NR(1, 0),
-       },
-       .sda = {
-               .i2c_mode = MX6_PAD_GPIO1_IO01__I2C1_SDA | PC,
-               .gpio_mode = MX6_PAD_GPIO1_IO01__GPIO1_IO_1 | PC,
-               .gp = IMX_GPIO_NR(1, 1),
-       },
-};
-
 static struct pmic *pfuze_init(unsigned char i2cbus)
 {
        struct pmic *p;
@@ -400,10 +379,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 board_net_init();
 }
 
index c39597cdf529f6d2e6c3cd5103e737a43dbf7ad3..e5c9c2861e14f18e9e29d3fae4dd49f758df795f 100644 (file)
@@ -70,7 +70,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FEC"
 CONFIG_BOUNCE_BUFFER=y
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_SUPPORT_EMMC_RPMB=y