ipq807x: i2c: Fix drive-strength of i2c gpios

This change adds drive-strength property for I2C GPIOs and
modify config_i2c_gpio function to get the drvstr value from dts.

Change-Id: Ieece9e2f9d6abc115a50d87bc512004d3efcad0f
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
This commit is contained in:
Pavithra Palanisamy 2018-11-14 15:37:47 +05:30
parent d1673a3783
commit fd133e8d8e
2 changed files with 8 additions and 4 deletions

View file

@ -259,6 +259,7 @@
gpio = <42>;
func = <2>;
pull = <GPIO_NO_PULL>;
drvstr = <GPIO_8MA>;
oe = <GPIO_OE_ENABLE>;
};
@ -266,6 +267,7 @@
gpio = <43>;
func = <2>;
pull = <GPIO_NO_PULL>;
drvstr = <GPIO_8MA>;
oe = <GPIO_OE_ENABLE>;
};

View file

@ -111,11 +111,13 @@ void config_i2c_mode(void)
*/
void config_i2c_gpio(void)
{
int gpio_node;
int i2c_node, gpio_node;
gpio_node = fdt_path_offset(gd->fdt_blob, "/i2c0/i2c_gpio");
if (gpio_node >= 0) {
qca_gpio_init(gpio_node);
i2c_node = fdt_path_offset(gd->fdt_blob, "i2c0");
if (i2c_node >= 0) {
gpio_node = fdt_subnode_offset(gd->fdt_blob, i2c_node, "i2c_gpio");
if (gpio_node >= 0)
qca_gpio_init(gpio_node);
}
}