linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master
@ 2020-08-31 12:03 Esben Haabendal
  2020-08-31 12:03 ` [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins Esben Haabendal
  2020-09-24 13:41 ` [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Sekhar Nori
  0 siblings, 2 replies; 5+ messages in thread
From: Esben Haabendal @ 2020-08-31 12:03 UTC (permalink / raw)
  To: linux-arm-kernel, Sekhar Nori, Bartosz Golaszewski; +Cc: Russell King

The I2C1 master is available at the SOM connector, and as such should be
available for applications where SOM module is connected to a board with
I2C chips connected to it.

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

diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 3382b93d9a2a..10e40f1abcbc 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -202,6 +202,11 @@ static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = {
 	.bus_delay	= 0,	/* usec */
 };
 
+static struct davinci_i2c_platform_data mityomap_i2c_1_pdata = {
+	.bus_freq	= 100,	/* kHz */
+	.bus_delay	= 0,	/* usec */
+};
+
 /* TPS65023 voltage regulator support */
 /* 1.2V Core */
 static struct regulator_consumer_supply tps65023_dcdc1_consumers[] = {
@@ -579,6 +584,10 @@ static void __init mityomapl138_init(void)
 	if (ret)
 		pr_warn("i2c0 registration failed: %d\n", ret);
 
+	ret = da8xx_register_i2c(1, &mityomap_i2c_1_pdata);
+	if (ret)
+		pr_warn("i2c1 registration failed: %d\n", ret);
+
 	ret = pmic_tps65023_init();
 	if (ret)
 		pr_warn("TPS65023 PMIC init failed: %d\n", ret);
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins
  2020-08-31 12:03 [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Esben Haabendal
@ 2020-08-31 12:03 ` Esben Haabendal
  2020-09-24 13:41 ` [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Sekhar Nori
  1 sibling, 0 replies; 5+ messages in thread
From: Esben Haabendal @ 2020-08-31 12:03 UTC (permalink / raw)
  To: linux-arm-kernel, Sekhar Nori, Bartosz Golaszewski; +Cc: Russell King

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 --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);
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master
  2020-08-31 12:03 [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Esben Haabendal
  2020-08-31 12:03 ` [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins Esben Haabendal
@ 2020-09-24 13:41 ` Sekhar Nori
  2020-09-28  6:51   ` Esben Haabendal
  1 sibling, 1 reply; 5+ messages in thread
From: Sekhar Nori @ 2020-09-24 13:41 UTC (permalink / raw)
  To: Esben Haabendal, linux-arm-kernel, Bartosz Golaszewski; +Cc: Russell King

Hi Esben,

On 31/08/20 5:33 PM, Esben Haabendal wrote:
> The I2C1 master is available at the SOM connector, and as such should be
> available for applications where SOM module is connected to a board with
> I2C chips connected to it.
> 
> Signed-off-by: Esben Haabendal <esben@geanix.com>

If you are actively using this hardware, can you instead convert this
over to device-tree? I would prefer that than keep the board file upto date.

Thanks,
Sekhar

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master
  2020-09-24 13:41 ` [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Sekhar Nori
@ 2020-09-28  6:51   ` Esben Haabendal
  2020-09-28 17:48     ` Sekhar Nori
  0 siblings, 1 reply; 5+ messages in thread
From: Esben Haabendal @ 2020-09-28  6:51 UTC (permalink / raw)
  To: Sekhar Nori; +Cc: Bartosz Golaszewski, Russell King, linux-arm-kernel

Sekhar Nori <nsekhar@ti.com> writes:

> Hi Esben,
>
> On 31/08/20 5:33 PM, Esben Haabendal wrote:
>> The I2C1 master is available at the SOM connector, and as such should be
>> available for applications where SOM module is connected to a board with
>> I2C chips connected to it.
>> 
>> Signed-off-by: Esben Haabendal <esben@geanix.com>
>
> If you are actively using this hardware, can you instead convert this
> over to device-tree? I would prefer that than keep the board file upto date.

Hi

Yes, I could instead convert this entire board to device-tree.  But on
the short-term, I am afraid I won't have time to do that.  I hope we can
find a way to merge this rather small change for now.  It should not
cause any problems for the future work to move to device-tree.

Thanks,
Esben

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master
  2020-09-28  6:51   ` Esben Haabendal
@ 2020-09-28 17:48     ` Sekhar Nori
  0 siblings, 0 replies; 5+ messages in thread
From: Sekhar Nori @ 2020-09-28 17:48 UTC (permalink / raw)
  To: Esben Haabendal; +Cc: Bartosz Golaszewski, Russell King, linux-arm-kernel

Hi Esben,

On 28/09/20 12:21 PM, Esben Haabendal wrote:
> Sekhar Nori <nsekhar@ti.com> writes:
> 
>> Hi Esben,
>>
>> On 31/08/20 5:33 PM, Esben Haabendal wrote:
>>> The I2C1 master is available at the SOM connector, and as such should be
>>> available for applications where SOM module is connected to a board with
>>> I2C chips connected to it.
>>>
>>> Signed-off-by: Esben Haabendal <esben@geanix.com>
>>
>> If you are actively using this hardware, can you instead convert this
>> over to device-tree? I would prefer that than keep the board file upto date.
> 
> Hi
> 
> Yes, I could instead convert this entire board to device-tree.  But on
> the short-term, I am afraid I won't have time to do that.  I hope we can
> find a way to merge this rather small change for now.  It should not
> cause any problems for the future work to move to device-tree.

This change itself may be small, but we cannot add new features for
board files anymore. Sorry, but an embargo on new features is the only
way to incentivize DT conversion,

Thanks,
Sekhar

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-28 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 12:03 [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Esben Haabendal
2020-08-31 12:03 ` [PATCH 2/2] ARM: davinci: mityomapl138: Ensure pinmux setup of I2C pins Esben Haabendal
2020-09-24 13:41 ` [PATCH 1/2] ARM: davinci: mityomapl138: Enable I2C1 master Sekhar Nori
2020-09-28  6:51   ` Esben Haabendal
2020-09-28 17:48     ` Sekhar Nori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).