diff mbox series

[1/2] ARM: davinci: mityomapl138: Enable I2C1 master

Message ID 809cd1811e67c5b93362ecb135ef9e2c7dd4a70a.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
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(+)

Comments

Sekhar Nori Sept. 24, 2020, 1:41 p.m. UTC | #1
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
Esben Haabendal Sept. 28, 2020, 6:51 a.m. UTC | #2
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
Sekhar Nori Sept. 28, 2020, 5:48 p.m. UTC | #3
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
diff mbox series

Patch

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