@@ -222,3 +222,23 @@
scl-gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
status = "okay";
};
+
+&gpio1 {
+ u-boot,dm-pre-reloc;
+};
+
+&gpio2 {
+ u-boot,dm-pre-reloc;
+};
+
+&gpio3 {
+ u-boot,dm-pre-reloc;
+};
+
+&gpio4 {
+ u-boot,dm-pre-reloc;
+};
+
+&gpio5 {
+ u-boot,dm-pre-reloc;
+};
@@ -124,34 +124,6 @@ static void setup_iomux_fec(void)
imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
}
-#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 i2c1_pads[] = {
- NEW_PAD_CTRL(MX53_PAD_CSI0_DAT8__I2C1_SDA, I2C_PAD_CTRL),
- NEW_PAD_CTRL(MX53_PAD_CSI0_DAT9__I2C1_SCL, I2C_PAD_CTRL),
- };
-
- imx_iomux_v3_setup_multiple_pads(i2c1_pads, ARRAY_SIZE(i2c1_pads));
-}
-
-#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL)
-
-static struct i2c_pads_info i2c_pad_info1 = {
- .scl = {
- .i2c_mode = MX53_PAD_EIM_D21__I2C1_SCL | I2C_PAD,
- .gpio_mode = MX53_PAD_EIM_D28__GPIO3_28 | I2C_PAD,
- .gp = IMX_GPIO_NR(3, 28)
- },
- .sda = {
- .i2c_mode = MX53_PAD_EIM_D28__I2C1_SDA | I2C_PAD,
- .gpio_mode = MX53_PAD_EIM_D21__GPIO3_21 | I2C_PAD,
- .gp = IMX_GPIO_NR(3, 21)
- }
-};
-
static int clock_1GHz(void)
{
int ret;
@@ -181,8 +153,10 @@ void ppd_gpio_init(void)
int i;
imx_iomux_v3_setup_multiple_pads(ppd_pads, ARRAY_SIZE(ppd_pads));
- for (i = 0; i < ARRAY_SIZE(ppd_gpios); ++i)
+ for (i = 0; i < ARRAY_SIZE(ppd_gpios); ++i) {
+ gpio_request(ppd_gpios[i].gpio, "request");
gpio_direction_output(ppd_gpios[i].gpio, ppd_gpios[i].value);
+ }
}
int board_early_init_f(void)
@@ -255,9 +229,6 @@ int board_init(void)
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
mxc_set_sata_internal_clock();
- setup_iomux_i2c();
-
- setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
return 0;
}
@@ -104,6 +104,7 @@ static void lcd_enable(void)
pwm_config(1, 5000000, 5000000);
/* Backlight Power */
+ gpio_request(BACKLIGHT_ENABLE, "BACKLIGHT_ENABLE");
gpio_direction_output(BACKLIGHT_ENABLE, 1);
pwm_enable(1);
@@ -38,6 +38,12 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_EXT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=10
CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_SYS_I2C_MXC=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
CONFIG_MII=y
@@ -57,3 +63,4 @@ CONFIG_SYSRESET=y
CONFIG_SYSRESET_WATCHDOG=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_USB=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
@@ -46,13 +46,6 @@
#define CONFIG_SYS_RTC_BUS_NUM 2
#define CONFIG_SYS_I2C_RTC_ADDR 0x30
-/* 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_MXC_I2C2 /* enable I2C bus 2 */
-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
-
/* PMIC Controller */
#define CONFIG_POWER
#define CONFIG_POWER_I2C
@@ -190,22 +183,6 @@
#define CONFIG_CMD_FUSE
#define CONFIG_FSL_IIM
-#define CONFIG_SYS_I2C_SPEED 100000
-
-/* I2C1 */
-#define CONFIG_SYS_NUM_I2C_BUSES 9
-#define CONFIG_SYS_I2C_MAX_HOPS 1
-#define CONFIG_SYS_I2C_BUSES { {0, {I2C_NULL_HOP} }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 0} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 3} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 4} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 5} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 6} } }, \
- {0, {{I2C_MUX_PCA9547, 0x70, 7} } }, \
- }
-
#define CONFIG_BCH
/* Backlight Control */