mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-22 18:09:03 +09:00
Merge git://git.denx.de/u-boot-i2c
This commit is contained in:
commit
23b4cf32b7
@ -27,10 +27,10 @@
|
|||||||
serial2 = &lpuart6;
|
serial2 = &lpuart6;
|
||||||
serial3 = &lpuart7;
|
serial3 = &lpuart7;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
i2c0 = &lpi2c4;
|
i2c4 = &lpi2c4;
|
||||||
i2c1 = &lpi2c5;
|
i2c5 = &lpi2c5;
|
||||||
i2c2 = &lpi2c6;
|
i2c6 = &lpi2c6;
|
||||||
i2c3 = &lpi2c7;
|
i2c7 = &lpi2c7;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -258,7 +258,7 @@ static int bus_i2c_set_bus_speed(struct udevice *bus, int speed)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
||||||
clock_rate = imx_get_i2cclk(bus->seq + 4);
|
clock_rate = imx_get_i2cclk(bus->seq);
|
||||||
if (!clock_rate)
|
if (!clock_rate)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
@ -419,14 +419,14 @@ static int imx_lpi2c_probe(struct udevice *bus)
|
|||||||
i2c_bus->bus = bus;
|
i2c_bus->bus = bus;
|
||||||
|
|
||||||
/* power up i2c resource */
|
/* power up i2c resource */
|
||||||
ret = init_i2c_power(bus->seq + 4);
|
ret = init_i2c_power(bus->seq);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
debug("init_i2c_power err = %d\n", ret);
|
debug("init_i2c_power err = %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable clk, only i2c4-7 can be handled by A7 core */
|
/* To i.MX7ULP, only i2c4-7 can be handled by A7 core */
|
||||||
ret = enable_i2c_clk(1, bus->seq + 4);
|
ret = enable_i2c_clk(1, bus->seq);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -784,9 +784,9 @@ static int mxc_i2c_probe(struct udevice *bus)
|
|||||||
ret2 = gpio_request_by_name_nodev(offset_to_ofnode(node),
|
ret2 = gpio_request_by_name_nodev(offset_to_ofnode(node),
|
||||||
"sda-gpios", 0, &i2c_bus->sda_gpio,
|
"sda-gpios", 0, &i2c_bus->sda_gpio,
|
||||||
GPIOD_IS_OUT);
|
GPIOD_IS_OUT);
|
||||||
if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) |
|
if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) ||
|
||||||
!dm_gpio_is_valid(&i2c_bus->scl_gpio) |
|
!dm_gpio_is_valid(&i2c_bus->scl_gpio) ||
|
||||||
ret | ret2) {
|
ret || ret2) {
|
||||||
dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base);
|
dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user