static int detect_lvds(struct display_info_t const *dev)
{
+ struct udevice *idev, *ibus;
u8 touchid[23];
u8 *touchptr = &touchid[0];
int ret;
- ret = i2c_set_bus_num(0);
+ ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &ibus);
+ if (ret)
+ return 0;
+
+ ret = dm_i2c_probe(ibus, 0x38, 0, &idev);
if (ret)
return 0;
/* Touchscreen is at address 0x38, ID register is 0xbb. */
- ret = i2c_read(0x38, 0xbb, 1, touchid, sizeof(touchid));
+ ret = dm_i2c_read(idev, 0xbb, touchid, sizeof(touchid));
if (ret)
return 0;
return 0;
}
-#define I2C_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \
- PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
-
-static void setup_iomux_i2c(void)
-{
- static const iomux_v3_cfg_t i2c_pads[] = {
- /* I2C1 */
- NEW_PAD_CTRL(MX53_PAD_EIM_D28__I2C1_SDA, I2C_PAD_CTRL),
- NEW_PAD_CTRL(MX53_PAD_EIM_D21__I2C1_SCL, I2C_PAD_CTRL),
- /* I2C2 */
- NEW_PAD_CTRL(MX53_PAD_EIM_D16__I2C2_SDA, I2C_PAD_CTRL),
- NEW_PAD_CTRL(MX53_PAD_EIM_EB2__I2C2_SCL, I2C_PAD_CTRL),
- };
-
- imx_iomux_v3_setup_multiple_pads(i2c_pads, ARRAY_SIZE(i2c_pads));
-}
-
static void setup_iomux_video(void)
{
static const iomux_v3_cfg_t lcd_pads[] = {
{
setup_iomux_uart();
setup_iomux_fec();
- setup_iomux_i2c();
setup_iomux_nand();
setup_iomux_video();
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_OFFSET=0x100000
CONFIG_TARGET_M53MENLO=y
-CONFIG_SYS_I2C_MXC_I2C1=y
-CONFIG_SYS_I2C_MXC_I2C2=y
-CONFIG_SYS_I2C_MXC_I2C3=y
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx53-m53menlo"
CONFIG_SPL_TEXT_BASE=0x70008000
CONFIG_CMD_PING=y
CONFIG_CMD_BMP=y
CONFIG_CMD_BOOTCOUNT=y
-CONFIG_CMD_DATE=y
CONFIG_CMD_BTRFS=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_DM=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
-CONFIG_SYS_I2C_LEGACY=y
-CONFIG_SPL_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_ESDHC_IMX=y
CONFIG_MTD=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_RTC=y
CONFIG_RTC_M41T62=y
CONFIG_MXC_UART=y
CONFIG_SYSRESET=y