linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: at91: add of_device_id entry for at91rm9200
@ 2012-12-05 21:42 Joachim Eastwood
  2012-12-18  6:02 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 8+ messages in thread
From: Joachim Eastwood @ 2012-12-05 21:42 UTC (permalink / raw)
  To: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w,
	plagnioj-sclMFOaUSTBWk0Htik3J/w,
	nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Joachim Eastwood

Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Hi,

AT91RM9200 is gaining DT support now so let's add an id to the i2c driver.

Tested on custom RM9200 board. Since the driver doesn't support pinctrl
muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
to work.

regards
Joachim Eastwood

 drivers/i2c/busses/i2c-at91.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index b4575ee..c504aa8 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -584,6 +584,9 @@ static const struct platform_device_id at91_twi_devtypes[] = {
 #if defined(CONFIG_OF)
 static const struct of_device_id atmel_twi_dt_ids[] = {
 	{
+		.compatible = "atmel,at91rm9200-i2c",
+		.data = &at91rm9200_config,
+	} , {
 		.compatible = "atmel,at91sam9260-i2c",
 		.data = &at91sam9260_config,
 	} , {
-- 
1.8.0

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
  2012-12-05 21:42 [PATCH] i2c: at91: add of_device_id entry for at91rm9200 Joachim Eastwood
@ 2012-12-18  6:02 ` Jean-Christophe PLAGNIOL-VILLARD
       [not found]   ` <20121218060232.GL23971-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-12-18  6:02 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: ludovic.desroches, nicolas.ferre, linux-i2c, linux-arm-kernel

On 22:42 Wed 05 Dec     , Joachim Eastwood wrote:
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---
> Hi,
> 
> AT91RM9200 is gaining DT support now so let's add an id to the i2c driver.
> 
> Tested on custom RM9200 board. Since the driver doesn't support pinctrl
> muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
> to work.

IIRC the i2c IP have quite a lots of issue on rm9200 and until sam9g45

it not recommended to use it instead use i2c-gpio

Best Regards,
J.
> 
> regards
> Joachim Eastwood
> 
>  drivers/i2c/busses/i2c-at91.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> index b4575ee..c504aa8 100644
> --- a/drivers/i2c/busses/i2c-at91.c
> +++ b/drivers/i2c/busses/i2c-at91.c
> @@ -584,6 +584,9 @@ static const struct platform_device_id at91_twi_devtypes[] = {
>  #if defined(CONFIG_OF)
>  static const struct of_device_id atmel_twi_dt_ids[] = {
>  	{
> +		.compatible = "atmel,at91rm9200-i2c",
> +		.data = &at91rm9200_config,
> +	} , {
>  		.compatible = "atmel,at91sam9260-i2c",
>  		.data = &at91sam9260_config,
>  	} , {
> -- 
> 1.8.0
> 

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
       [not found]   ` <20121218060232.GL23971-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
@ 2013-01-24  7:27     ` Wolfram Sang
  2013-01-24  7:58       ` ludovic.desroches
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2013-01-24  7:27 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Joachim Eastwood, ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w,
	nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Tue, Dec 18, 2012 at 07:02:32AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 22:42 Wed 05 Dec     , Joachim Eastwood wrote:
> > Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > Hi,
> > 
> > AT91RM9200 is gaining DT support now so let's add an id to the i2c driver.
> > 
> > Tested on custom RM9200 board. Since the driver doesn't support pinctrl
> > muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
> > to work.
> 
> IIRC the i2c IP have quite a lots of issue on rm9200 and until sam9g45
> 
> it not recommended to use it instead use i2c-gpio

Ludovic, you know the driver best. Does it make sense to add this?

> 
> Best Regards,
> J.
> > 
> > regards
> > Joachim Eastwood
> > 
> >  drivers/i2c/busses/i2c-at91.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> > index b4575ee..c504aa8 100644
> > --- a/drivers/i2c/busses/i2c-at91.c
> > +++ b/drivers/i2c/busses/i2c-at91.c
> > @@ -584,6 +584,9 @@ static const struct platform_device_id at91_twi_devtypes[] = {
> >  #if defined(CONFIG_OF)
> >  static const struct of_device_id atmel_twi_dt_ids[] = {
> >  	{
> > +		.compatible = "atmel,at91rm9200-i2c",
> > +		.data = &at91rm9200_config,
> > +	} , {
> >  		.compatible = "atmel,at91sam9260-i2c",
> >  		.data = &at91sam9260_config,
> >  	} , {
> > -- 
> > 1.8.0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
  2013-01-24  7:27     ` Wolfram Sang
@ 2013-01-24  7:58       ` ludovic.desroches
       [not found]         ` <5100E9A4.9020804-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: ludovic.desroches @ 2013-01-24  7:58 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Joachim Eastwood, nicolas.ferre, ludovic.desroches, linux-i2c,
	Jean-Christophe PLAGNIOL-VILLARD, linux-arm-kernel

Hi,

On 01/24/2013 08:27 AM, Wolfram Sang wrote:
> On Tue, Dec 18, 2012 at 07:02:32AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 22:42 Wed 05 Dec     , Joachim Eastwood wrote:
>>> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>>> ---
>>> Hi,
>>>
>>> AT91RM9200 is gaining DT support now so let's add an id to the i2c driver.
>>>
>>> Tested on custom RM9200 board. Since the driver doesn't support pinctrl
>>> muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
>>> to work.
>>
>> IIRC the i2c IP have quite a lots of issue on rm9200 and until sam9g45
>>
>> it not recommended to use it instead use i2c-gpio
>
> Ludovic, you know the driver best. Does it make sense to add this?

I didn't add this when I did the rework because there was no DT tree 
support for RM9200. The configuration for RM9200 IP is already in the 
driver and used for non DT platform so I think it makes sense to add this.

But as Jean-Christophe said, it's recommended to use the i2c-gpio driver 
since we know the first versions of the IP have several issues. However 
if it fits user usage, it is not forbidden to use it.

Regards

Ludovic

>
>>
>> Best Regards,
>> J.
>>>
>>> regards
>>> Joachim Eastwood
>>>
>>>   drivers/i2c/busses/i2c-at91.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
>>> index b4575ee..c504aa8 100644
>>> --- a/drivers/i2c/busses/i2c-at91.c
>>> +++ b/drivers/i2c/busses/i2c-at91.c
>>> @@ -584,6 +584,9 @@ static const struct platform_device_id at91_twi_devtypes[] = {
>>>   #if defined(CONFIG_OF)
>>>   static const struct of_device_id atmel_twi_dt_ids[] = {
>>>   	{
>>> +		.compatible = "atmel,at91rm9200-i2c",
>>> +		.data = &at91rm9200_config,
>>> +	} , {
>>>   		.compatible = "atmel,at91sam9260-i2c",
>>>   		.data = &at91sam9260_config,
>>>   	} , {
>>> --
>>> 1.8.0
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
       [not found]         ` <5100E9A4.9020804-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
@ 2013-01-24  8:43           ` Joachim Eastwood
  2013-01-24  9:09             ` ludovic.desroches
  2013-01-24 10:13           ` Wolfram Sang
  1 sibling, 1 reply; 8+ messages in thread
From: Joachim Eastwood @ 2013-01-24  8:43 UTC (permalink / raw)
  To: ludovic.desroches
  Cc: Wolfram Sang, Jean-Christophe PLAGNIOL-VILLARD,
	nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

On 24 January 2013 08:58, ludovic.desroches <ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
>
> On 01/24/2013 08:27 AM, Wolfram Sang wrote:
>>
>> On Tue, Dec 18, 2012 at 07:02:32AM +0100, Jean-Christophe PLAGNIOL-VILLARD
>> wrote:
>>>
>>> On 22:42 Wed 05 Dec     , Joachim Eastwood wrote:
>>>>
>>>> Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> ---
>>>> Hi,
>>>>
>>>> AT91RM9200 is gaining DT support now so let's add an id to the i2c
>>>> driver.
>>>>
>>>> Tested on custom RM9200 board. Since the driver doesn't support pinctrl
>>>> muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
>>>> to work.
>>>
>>>
>>> IIRC the i2c IP have quite a lots of issue on rm9200 and until sam9g45
>>>
>>> it not recommended to use it instead use i2c-gpio
>>
>>
>> Ludovic, you know the driver best. Does it make sense to add this?
>
>
> I didn't add this when I did the rework because there was no DT tree support
> for RM9200. The configuration for RM9200 IP is already in the driver and
> used for non DT platform so I think it makes sense to add this.
>
> But as Jean-Christophe said, it's recommended to use the i2c-gpio driver
> since we know the first versions of the IP have several issues. However if
> it fits user usage, it is not forbidden to use it.

I assumed the new driver handles the HW quirks better than the old atmel-twi
driver(?). So the RM9200 i2c HW is at least usable with this driver.

I didn't encounter any problems during my short testing using a couple of
different i2c devices. As far as I can remember the old driver didn't even
handle the devices I tested with the new driver.

regards
Joachim Eastwood

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
  2013-01-24  8:43           ` Joachim Eastwood
@ 2013-01-24  9:09             ` ludovic.desroches
  0 siblings, 0 replies; 8+ messages in thread
From: ludovic.desroches @ 2013-01-24  9:09 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: nicolas.ferre, Wolfram Sang, ludovic.desroches, linux-i2c,
	Jean-Christophe PLAGNIOL-VILLARD, linux-arm-kernel

On 01/24/2013 09:43 AM, Joachim Eastwood wrote:
> On 24 January 2013 08:58, ludovic.desroches <ludovic.desroches@atmel.com> wrote:
>> Hi,
>>
>>
>> On 01/24/2013 08:27 AM, Wolfram Sang wrote:
>>>
>>> On Tue, Dec 18, 2012 at 07:02:32AM +0100, Jean-Christophe PLAGNIOL-VILLARD
>>> wrote:
>>>>
>>>> On 22:42 Wed 05 Dec     , Joachim Eastwood wrote:
>>>>>
>>>>> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>>>>> ---
>>>>> Hi,
>>>>>
>>>>> AT91RM9200 is gaining DT support now so let's add an id to the i2c
>>>>> driver.
>>>>>
>>>>> Tested on custom RM9200 board. Since the driver doesn't support pinctrl
>>>>> muxing yet I had to add pinctrl hogs for the i2c pins in my dts for it
>>>>> to work.
>>>>
>>>>
>>>> IIRC the i2c IP have quite a lots of issue on rm9200 and until sam9g45
>>>>
>>>> it not recommended to use it instead use i2c-gpio
>>>
>>>
>>> Ludovic, you know the driver best. Does it make sense to add this?
>>
>>
>> I didn't add this when I did the rework because there was no DT tree support
>> for RM9200. The configuration for RM9200 IP is already in the driver and
>> used for non DT platform so I think it makes sense to add this.
>>
>> But as Jean-Christophe said, it's recommended to use the i2c-gpio driver
>> since we know the first versions of the IP have several issues. However if
>> it fits user usage, it is not forbidden to use it.
>
> I assumed the new driver handles the HW quirks better than the old atmel-twi
> driver(?). So the RM9200 i2c HW is at least usable with this driver.
>

No it doesn't handle HW quirks (clock stretching, stop command, etc.) 
better for old IP versions than the old atmel-twi. Since we have no 
workarounds for these quirks, it was recommended to use i2c-gpio.

> I didn't encounter any problems during my short testing using a couple of
> different i2c devices. As far as I can remember the old driver didn't even
> handle the devices I tested with the new driver.

I also did some tests on RM9200 with basic i2c devices and everything go 
well so yes it is usable that's why I think this patch can be applied.

Regards

Ludovic

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
       [not found]         ` <5100E9A4.9020804-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
  2013-01-24  8:43           ` Joachim Eastwood
@ 2013-01-24 10:13           ` Wolfram Sang
  2013-01-24 10:44             ` ludovic.desroches
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2013-01-24 10:13 UTC (permalink / raw)
  To: ludovic.desroches
  Cc: Jean-Christophe PLAGNIOL-VILLARD, Joachim Eastwood,
	nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Hi,

> I didn't add this when I did the rework because there was no DT tree
> support for RM9200. The configuration for RM9200 IP is already in
> the driver and used for non DT platform so I think it makes sense to
> add this.

I agree. If it is usable for non-dt, it should be usable for dt. If it
makes sense is left to the user.

Interpreted Ludovic's comment as ack and applied to -next, thanks!

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] i2c: at91: add of_device_id entry for at91rm9200
  2013-01-24 10:13           ` Wolfram Sang
@ 2013-01-24 10:44             ` ludovic.desroches
  0 siblings, 0 replies; 8+ messages in thread
From: ludovic.desroches @ 2013-01-24 10:44 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Joachim Eastwood, nicolas.ferre, ludovic.desroches, linux-i2c,
	Jean-Christophe PLAGNIOL-VILLARD, linux-arm-kernel

On 01/24/2013 11:13 AM, Wolfram Sang wrote:
> Hi,
>
>> I didn't add this when I did the rework because there was no DT tree
>> support for RM9200. The configuration for RM9200 IP is already in
>> the driver and used for non DT platform so I think it makes sense to
>> add this.
>
> I agree. If it is usable for non-dt, it should be usable for dt. If it
> makes sense is left to the user.
>
> Interpreted Ludovic's comment as ack and applied to -next, thanks!
>

Yes it is, thanks.

Regards

Ludovic

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

end of thread, other threads:[~2013-01-24 10:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05 21:42 [PATCH] i2c: at91: add of_device_id entry for at91rm9200 Joachim Eastwood
2012-12-18  6:02 ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]   ` <20121218060232.GL23971-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
2013-01-24  7:27     ` Wolfram Sang
2013-01-24  7:58       ` ludovic.desroches
     [not found]         ` <5100E9A4.9020804-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-01-24  8:43           ` Joachim Eastwood
2013-01-24  9:09             ` ludovic.desroches
2013-01-24 10:13           ` Wolfram Sang
2013-01-24 10:44             ` ludovic.desroches

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