diff mbox series

[2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins

Message ID 4f406035e7d67b5abae29fb2c257c95ddca18010.1598866516.git.esben@geanix.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ARM: davinci: mityomapl138: Enable I2C1 master | expand

Commit Message

Esben Haabendal Aug. 31, 2020, 12:03 p.m. UTC
Let Linux manage pinmux setup of I2C pins instead of relying on
bootloader to do this.

This is especially convenient for boards where bootloader update is not
feasible.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 arch/arm/mach-davinci/board-mityomapl138.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 10e40f1abcbc..09cb0443197e 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -580,10 +580,18 @@  static void __init mityomapl138_init(void)
 	nvmem_add_cell_table(&mityomapl138_nvmem_cell_table);
 	nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1);
 
+	ret = davinci_cfg_reg_list(da850_i2c0_pins);
+	if (ret)
+		pr_warn("i2c0 pinmux setup failed: %d\n", ret);
+
 	ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
 	if (ret)
 		pr_warn("i2c0 registration failed: %d\n", ret);
 
+	ret = davinci_cfg_reg_list(da850_i2c1_pins);
+	if (ret)
+		pr_warn("i2c1 pinmux setup failed: %d\n", ret);
+
 	ret = da8xx_register_i2c(1, &mityomap_i2c_1_pdata);
 	if (ret)
 		pr_warn("i2c1 registration failed: %d\n", ret);