mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
i2c: imx_lpi2c: add ipg clk
The controller needs two clk, per clk and ipg clk, so let's add ipg clk. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
b4eca2d787
commit
d02be21d30
2 changed files with 12 additions and 0 deletions
|
@ -471,6 +471,17 @@ static int imx_lpi2c_probe(struct udevice *bus)
|
|||
dev_err(bus, "Failed to enable per clk\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_get_by_name(bus, "ipg", &i2c_bus->ipg_clk);
|
||||
if (ret) {
|
||||
dev_err(bus, "Failed to get ipg clk\n");
|
||||
return ret;
|
||||
}
|
||||
ret = clk_enable(&i2c_bus->ipg_clk);
|
||||
if (ret) {
|
||||
dev_err(bus, "Failed to enable ipg clk\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
/* To i.MX7ULP, only i2c4-7 can be handled by A7 core */
|
||||
ret = enable_i2c_clk(1, bus->seq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue