diff mbox

arm: dts: omap4-sdp: Add I2c pinctrl data

Message ID 1359371865-27907-1-git-send-email-sourav.poddar@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Poddar, Sourav Jan. 28, 2013, 11:17 a.m. UTC
Booting 3.8-rc4 om omap 4430sdp results in the following error

omap_i2c 48070000.i2c: did not get pins for i2c error: -19
[    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
[    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
[    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
[    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
[    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
[    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
[    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz

This happens because omap4 dts file is not adapted to use i2c through pinctrl
framework. Populating i2c pinctrl data to get rid of the error.

Tested on omap4430 sdp with 3.8-rc4 kernel.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/boot/dts/omap4-sdp.dts |   40 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

Comments

Luciano Coelho Jan. 30, 2013, 6:25 a.m. UTC | #1
Hi Sourav,

On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> Booting 3.8-rc4 om omap 4430sdp results in the following error
> 
> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> 
> This happens because omap4 dts file is not adapted to use i2c through pinctrl
> framework. Populating i2c pinctrl data to get rid of the error.
> 
> Tested on omap4430 sdp with 3.8-rc4 kernel.
> 
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---

Could you do the same thing for panda? I'm getting the same kind of
errors with it:

[    0.000000] Machine: Generic OMAP4 (Flattened Device Tree), model: TI OMAP4 PandaBoard               
[...]
[    2.884826] omap_i2c 48072000.i2c: did not get pins for i2c error: -19                               
[    2.890686] omap_i2c 48072000.i2c: bus 1 rev0.11 at 400 kHz                                          
[    2.892028] omap_i2c 48060000.i2c: did not get pins for i2c error: -19                               
[    2.899047] omap_i2c 48060000.i2c: bus 2 rev0.11 at 100 kHz                                          
[    2.906677] omap_i2c 48350000.i2c: did not get pins for i2c error: -19                               
[    2.912872] omap_i2c 48350000.i2c: bus 3 rev0.11 at 400 kHz                                          

--
Cheers,
Luca.
Poddar, Sourav Jan. 30, 2013, 6:40 a.m. UTC | #2
Hi Luciano,
On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> Hi Sourav,
>
> On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
>> Booting 3.8-rc4 om omap 4430sdp results in the following error
>>
>> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
>> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
>> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
>> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
>> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
>> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
>> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
>> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
>>
>> This happens because omap4 dts file is not adapted to use i2c through pinctrl
>> framework. Populating i2c pinctrl data to get rid of the error.
>>
>> Tested on omap4430 sdp with 3.8-rc4 kernel.
>>
>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
>> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
> Could you do the same thing for panda? I'm getting the same kind of
> errors with it:
Sure, I will do that.
> [    0.000000] Machine: Generic OMAP4 (Flattened Device Tree), model: TI OMAP4 PandaBoard
> [...]
> [    2.884826] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> [    2.890686] omap_i2c 48072000.i2c: bus 1 rev0.11 at 400 kHz
> [    2.892028] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
> [    2.899047] omap_i2c 48060000.i2c: bus 2 rev0.11 at 100 kHz
> [    2.906677] omap_i2c 48350000.i2c: did not get pins for i2c error: -19
> [    2.912872] omap_i2c 48350000.i2c: bus 3 rev0.11 at 400 kHz
>
> --
> Cheers,
> Luca.
>
Thanks,
Sourav
Kumar, Anil Jan. 30, 2013, 8:43 a.m. UTC | #3
Hi Sourav,

On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
> Hi Luciano,
> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> > Hi Sourav,
> >
> > On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> >> Booting 3.8-rc4 om omap 4430sdp results in the following error
> >>
> >> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
> >> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
> >> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> >> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> >> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
> >> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
> >> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
> >> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> >>
> >> This happens because omap4 dts file is not adapted to use i2c through pinctrl
> >> framework. Populating i2c pinctrl data to get rid of the error.
> >>
> >> Tested on omap4430 sdp with 3.8-rc4 kernel.
> >>
> >> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> >> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >> ---
> > Could you do the same thing for panda? I'm getting the same kind of
> > errors with it:

omap4 uses pinctrl-single driver for pinmux with DT. Currently
pinctrl-single driver is getting up after I2C driver. So I2c cannot
use pinctrl. The below patch solve this issue     

http://www.gossamer-threads.com/lists/linux/kernel/1669067

Can you try with this ? it may solve it.

Thanks,
Anil
[...]
Santosh Shilimkar Jan. 30, 2013, 8:48 a.m. UTC | #4
On Wednesday 30 January 2013 02:13 PM, Kumar, Anil wrote:
> Hi Sourav,
>
> On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
>> Hi Luciano,
>> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
>>> Hi Sourav,
>>>
>>> On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
>>>> Booting 3.8-rc4 om omap 4430sdp results in the following error
>>>>
>>>> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
>>>> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
>>>> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
>>>> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
>>>> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
>>>> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
>>>> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
>>>> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
>>>>
>>>> This happens because omap4 dts file is not adapted to use i2c through pinctrl
>>>> framework. Populating i2c pinctrl data to get rid of the error.
>>>>
>>>> Tested on omap4430 sdp with 3.8-rc4 kernel.
>>>>
>>>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
>>>> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>> Could you do the same thing for panda? I'm getting the same kind of
>>> errors with it:
>
> omap4 uses pinctrl-single driver for pinmux with DT. Currently
> pinctrl-single driver is getting up after I2C driver. So I2c cannot
> use pinctrl. The below patch solve this issue
>
> http://www.gossamer-threads.com/lists/linux/kernel/1669067
>
> Can you try with this ? it may solve it.
>
OMAP i2c driver already takes care of -EPROBE_DEFER. The issue
as you see from the log is not probe failure but missing the
pin information in DT blob. And thats what patch does.

Regards
santosh
Luciano Coelho Jan. 30, 2013, 9:06 a.m. UTC | #5
On Wed, 2013-01-30 at 14:18 +0530, Santosh Shilimkar wrote:
> On Wednesday 30 January 2013 02:13 PM, Kumar, Anil wrote:
> > Hi Sourav,
> >
> > On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
> >> Hi Luciano,
> >> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> >>> Hi Sourav,
> >>>
> >>> On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> >>>> Booting 3.8-rc4 om omap 4430sdp results in the following error
> >>>>
> >>>> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
> >>>> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
> >>>> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> >>>> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> >>>> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
> >>>> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
> >>>> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
> >>>> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> >>>>
> >>>> This happens because omap4 dts file is not adapted to use i2c through pinctrl
> >>>> framework. Populating i2c pinctrl data to get rid of the error.
> >>>>
> >>>> Tested on omap4430 sdp with 3.8-rc4 kernel.
> >>>>
> >>>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> >>>> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >>>> ---
> >>> Could you do the same thing for panda? I'm getting the same kind of
> >>> errors with it:
> >
> > omap4 uses pinctrl-single driver for pinmux with DT. Currently
> > pinctrl-single driver is getting up after I2C driver. So I2c cannot
> > use pinctrl. The below patch solve this issue
> >
> > http://www.gossamer-threads.com/lists/linux/kernel/1669067
> >
> > Can you try with this ? it may solve it.
> >
> OMAP i2c driver already takes care of -EPROBE_DEFER. The issue
> as you see from the log is not probe failure but missing the
> pin information in DT blob. And thats what patch does.

Yes, Santosh is right.  I tried this patch, but it didn't fix the
warnings.

--
Luca.
Kumar, Anil Jan. 31, 2013, 2:32 a.m. UTC | #6
On Wed, Jan 30, 2013 at 14:36:10, Coelho, Luciano wrote:
> On Wed, 2013-01-30 at 14:18 +0530, Santosh Shilimkar wrote:
> > On Wednesday 30 January 2013 02:13 PM, Kumar, Anil wrote:
> > > Hi Sourav,
> > >
> > > On Wed, Jan 30, 2013 at 12:10:18, Poddar, Sourav wrote:
> > >> Hi Luciano,
> > >> On Wednesday 30 January 2013 11:55 AM, Luciano Coelho wrote:
> > >>> Hi Sourav,
> > >>>
> > >>> On Mon, 2013-01-28 at 16:47 +0530, Sourav Poddar wrote:
> > >>>> Booting 3.8-rc4 om omap 4430sdp results in the following error
> > >>>>
> > >>>> omap_i2c 48070000.i2c: did not get pins for i2c error: -19
> > >>>> [    1.024261] omap_i2c 48070000.i2c: bus 0 rev0.12 at 100 kHz
> > >>>> [    1.030181] omap_i2c 48072000.i2c: did not get pins for i2c error: -19
> > >>>> [    1.037384] omap_i2c 48072000.i2c: bus 1 rev0.12 at 400 kHz
> > >>>> [    1.043762] omap_i2c 48060000.i2c: did not get pins for i2c error: -19
> > >>>> [    1.050964] omap_i2c 48060000.i2c: bus 2 rev0.12 at 100 kHz
> > >>>> [    1.056823] omap_i2c 4807a000.i2c: did not get pins for i2c error: -19
> > >>>> [    1.064025] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
> > >>>>
> > >>>> This happens because omap4 dts file is not adapted to use i2c through pinctrl
> > >>>> framework. Populating i2c pinctrl data to get rid of the error.
> > >>>>
> > >>>> Tested on omap4430 sdp with 3.8-rc4 kernel.
> > >>>>
> > >>>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> > >>>> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > >>>> ---
> > >>> Could you do the same thing for panda? I'm getting the same kind of
> > >>> errors with it:
> > >
> > > omap4 uses pinctrl-single driver for pinmux with DT. Currently
> > > pinctrl-single driver is getting up after I2C driver. So I2c cannot
> > > use pinctrl. The below patch solve this issue
> > >
> > > http://www.gossamer-threads.com/lists/linux/kernel/1669067
> > >
> > > Can you try with this ? it may solve it.
> > >
> > OMAP i2c driver already takes care of -EPROBE_DEFER. The issue
> > as you see from the log is not probe failure but missing the
> > pin information in DT blob. And thats what patch does.
> 
> Yes, Santosh is right.  I tried this patch, but it didn't fix the
> warnings.

Sorry, I misunderstood this issue.

Anil
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 43e5258..40a04c9 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -212,9 +212,40 @@ 
 			0x58 0x10b	/* hdmi_hpd.gpio_63 INPUT PULLDOWN | MODE3 */
 		>;
 	};
+
+	i2c1_pins: pinmux_i2c1_pins {
+		pinctrl-single,pins = <
+			0xe2 0x118        /* i2c1_scl PULLUP | INPUTENABLE | MODE0 */
+			0xe4 0x118       /* i2c1_sda PULLUP | INPUTENABLE | MODE0 */
+		>;
+	};
+
+	i2c2_pins: pinmux_i2c2_pins {
+		pinctrl-single,pins = <
+                        0xe6 0x118        /* i2c2_scl PULLUP | INPUTENABLE | MODE0 */
+                        0xe8 0x118        /* i2c2_sda PULLUP | INPUTENABLE | MODE0 */
+		>;
+	};
+
+	i2c3_pins: pinmux_i2c3_pins {
+		pinctrl-single,pins = <
+			0xea 0x118        /* i2c3_scl PULLUP | INPUTENABLE | MODE0 */
+			0xec 0x118     /* i2c3_sda PULLUP | INPUTENABLE | MODE0 */
+		>;
+	};
+
+	i2c4_pins: pinmux_i2c4_pins {
+		pinctrl-single,pins = <
+			0xee 0x118        /* i2c4_scl PULLUP | INPUTENABLE | MODE0 */
+			0xf0 0x118     /* i2c4_sda PULLUP | INPUTENABLE | MODE0 */
+		>;
+	};
 };
 
 &i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+
 	clock-frequency = <400000>;
 
 	twl: twl@48 {
@@ -253,10 +284,16 @@ 
 /include/ "twl6030.dtsi"
 
 &i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins>;
+
 	clock-frequency = <400000>;
 };
 
 &i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c3_pins>;
+
 	clock-frequency = <400000>;
 
 	/*
@@ -279,6 +316,9 @@ 
 };
 
 &i2c4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_pins>;
+
 	clock-frequency = <400000>;
 
 	/*