All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-22  2:04 Kalyan Kinthada
  2017-09-22  7:30   ` Gregory CLEMENT
  0 siblings, 1 reply; 18+ messages in thread
From: Kalyan Kinthada @ 2017-09-22  2:04 UTC (permalink / raw)
  To: devicetree
  Cc: wsa, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	linux-i2c, linux-kernel, Chris Packham, Kalyan Kinthada

All armada-38x variants(380, 385, 388) SoCs have an issue
in i2c controller which violates the i2c repeated start timing.

This errata is fixed in the i2c-mv64xxx driver but enabled
only for devices with compatible string "marvell,mv78230-i2c".

This patch introduces a new compatible string
"marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
so that the workaound is enabled.

Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
---
 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
index 5c30026921..fc100b6bdb 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -14,6 +14,7 @@ Required properties :
                          very rare, initial version of the SoC which
                          had broken offload support.  Linux
                          auto-detects this and sets it appropriately.
+                     - "marvell,armada-38x-i2c"
  - interrupts      : The interrupt number
 
 Optional properties :
-- 
2.14.1

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-22  7:30   ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-22  7:30 UTC (permalink / raw)
  To: Kalyan Kinthada
  Cc: devicetree, wsa, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, linux-kernel, Chris Packham

Hi Kalyan,
 
 On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:

> All armada-38x variants(380, 385, 388) SoCs have an issue
> in i2c controller which violates the i2c repeated start timing.


Did you had an issue with one of the SoC ?
If yes what was your setting ?
On my side I never managed to have this sort of issue on Armada 38x.

>
> This errata is fixed in the i2c-mv64xxx driver but enabled
> only for devices with compatible string "marvell,mv78230-i2c".

In this case why not just adding the "marvell,mv78230-i2c" as compatible
string in the appropriate device tree files ?

Gregory

>
> This patch introduces a new compatible string
> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
> so that the workaound is enabled.


>
> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> index 5c30026921..fc100b6bdb 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> @@ -14,6 +14,7 @@ Required properties :
>                           very rare, initial version of the SoC which
>                           had broken offload support.  Linux
>                           auto-detects this and sets it appropriately.
> +                     - "marvell,armada-38x-i2c"
>   - interrupts      : The interrupt number
>  
>  Optional properties :
> -- 
> 2.14.1
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-22  7:30   ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-22  7:30 UTC (permalink / raw)
  To: Kalyan Kinthada
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, wsa-z923LK4zBo2bacvFa/9K2g,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chris Packham

Hi Kalyan,
 
 On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:

> All armada-38x variants(380, 385, 388) SoCs have an issue
> in i2c controller which violates the i2c repeated start timing.


Did you had an issue with one of the SoC ?
If yes what was your setting ?
On my side I never managed to have this sort of issue on Armada 38x.

>
> This errata is fixed in the i2c-mv64xxx driver but enabled
> only for devices with compatible string "marvell,mv78230-i2c".

In this case why not just adding the "marvell,mv78230-i2c" as compatible
string in the appropriate device tree files ?

Gregory

>
> This patch introduces a new compatible string
> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
> so that the workaound is enabled.


>
> Signed-off-by: Kalyan Kinthada <kalyan.kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> index 5c30026921..fc100b6bdb 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> @@ -14,6 +14,7 @@ Required properties :
>                           very rare, initial version of the SoC which
>                           had broken offload support.  Linux
>                           auto-detects this and sets it appropriately.
> +                     - "marvell,armada-38x-i2c"
>   - interrupts      : The interrupt number
>  
>  Optional properties :
> -- 
> 2.14.1
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 18+ messages in thread

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-09-22  7:30   ` Gregory CLEMENT
  (?)
@ 2017-09-24 21:44   ` Kalyan Kinthada
  2017-09-26 11:55       ` Gregory CLEMENT
  -1 siblings, 1 reply; 18+ messages in thread
From: Kalyan Kinthada @ 2017-09-24 21:44 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: devicetree, wsa, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, linux-kernel, Chris Packham

Hi Gregory,

I got this information from Armada-38x functional errata document.

I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files 
but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
based on the compatible string "marvell,mv78230-i2c".

I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
That is the reason I felt for the need of a new compatible string specifically for Armada-38x SoCs.

Thanks,
Kalyan
________________________________________
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
Sent: Friday, 22 September 2017 7:30 p.m.
To: Kalyan Kinthada
Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org; pawel.moll@arm.com; mark.rutland@arm.com; ijc+devicetree@hellion.org.uk; galak@codeaurora.org; linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding

Hi Kalyan,

 On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:

> All armada-38x variants(380, 385, 388) SoCs have an issue
> in i2c controller which violates the i2c repeated start timing.


Did you had an issue with one of the SoC ?
If yes what was your setting ?
On my side I never managed to have this sort of issue on Armada 38x.

>
> This errata is fixed in the i2c-mv64xxx driver but enabled
> only for devices with compatible string "marvell,mv78230-i2c".

In this case why not just adding the "marvell,mv78230-i2c" as compatible
string in the appropriate device tree files ?

Gregory

>
> This patch introduces a new compatible string
> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
> so that the workaound is enabled.


>
> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> index 5c30026921..fc100b6bdb 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> @@ -14,6 +14,7 @@ Required properties :
>                           very rare, initial version of the SoC which
>                           had broken offload support.  Linux
>                           auto-detects this and sets it appropriately.
> +                     - "marvell,armada-38x-i2c"
>   - interrupts      : The interrupt number
>
>  Optional properties :
> --
> 2.14.1
>

--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-26 11:55       ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-26 11:55 UTC (permalink / raw)
  To: Kalyan Kinthada
  Cc: devicetree, wsa, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, linux-kernel, Chris Packham

Hi Kalyan,

Please try avoid top-posting.

 On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:

> Hi Gregory,
>
> I got this information from Armada-38x functional errata document.

OK but in any case just adding a new compatible was not enough you have
to update the driver in the same time, however for this case we won't
need it, see below.

>
> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files 
> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
> based on the compatible string "marvell,mv78230-i2c".
>
> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
> That is the reason I felt for the need of a new compatible string
> specifically for Armada-38x SoCs.

Indeed the Armada-38x SoCs does not support hardware offloading (at
least according the datasheet). But it happens that in the earlier
version of the Armada XP the hardware offloading was buggy, so we
introduced a compatible for this case: marvell,mv78230-a0-i2c. This
compatible enable the errata fix but not the offloading feature. That
means that it is exactly the compatible you need for Armada 38x (and
Armada 39x and 375 I think).

Gregory

>
> Thanks,
> Kalyan
> ________________________________________
> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Sent: Friday, 22 September 2017 7:30 p.m.
> To: Kalyan Kinthada
> Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org;
> pawel.moll@arm.com; mark.rutland@arm.com;
> ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
> linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>
> Hi Kalyan,
>
>  On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:
>
>> All armada-38x variants(380, 385, 388) SoCs have an issue
>> in i2c controller which violates the i2c repeated start timing.
>
>
> Did you had an issue with one of the SoC ?
> If yes what was your setting ?
> On my side I never managed to have this sort of issue on Armada 38x.
>
>>
>> This errata is fixed in the i2c-mv64xxx driver but enabled
>> only for devices with compatible string "marvell,mv78230-i2c".
>
> In this case why not just adding the "marvell,mv78230-i2c" as compatible
> string in the appropriate device tree files ?
>
> Gregory
>
>>
>> This patch introduces a new compatible string
>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>> so that the workaound is enabled.
>
>
>>
>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
>> ---
>>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> index 5c30026921..fc100b6bdb 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> @@ -14,6 +14,7 @@ Required properties :
>>                           very rare, initial version of the SoC which
>>                           had broken offload support.  Linux
>>                           auto-detects this and sets it appropriately.
>> +                     - "marvell,armada-38x-i2c"
>>   - interrupts      : The interrupt number
>>
>>  Optional properties :
>> --
>> 2.14.1
>>
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-26 11:55       ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-26 11:55 UTC (permalink / raw)
  To: Kalyan Kinthada
  Cc: devicetree@vger.kernel.org, wsa@the-dreams.de,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chris Packham

Hi Kalyan,

Please try avoid top-posting.

 On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:

> Hi Gregory,
>
> I got this information from Armada-38x functional errata document.

OK but in any case just adding a new compatible was not enough you have
to update the driver in the same time, however for this case we won't
need it, see below.

>
> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files 
> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
> based on the compatible string "marvell,mv78230-i2c".
>
> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
> That is the reason I felt for the need of a new compatible string
> specifically for Armada-38x SoCs.

Indeed the Armada-38x SoCs does not support hardware offloading (at
least according the datasheet). But it happens that in the earlier
version of the Armada XP the hardware offloading was buggy, so we
introduced a compatible for this case: marvell,mv78230-a0-i2c. This
compatible enable the errata fix but not the offloading feature. That
means that it is exactly the compatible you need for Armada 38x (and
Armada 39x and 375 I think).

Gregory

>
> Thanks,
> Kalyan
> ________________________________________
> From: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Sent: Friday, 22 September 2017 7:30 p.m.
> To: Kalyan Kinthada
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org; robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org;
> pawel.moll-5wv7dgnIgG8@public.gmane.org; mark.rutland-5wv7dgnIgG8@public.gmane.org;
> ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org; galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org;
> linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Chris Packham
> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>
> Hi Kalyan,
>
>  On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:
>
>> All armada-38x variants(380, 385, 388) SoCs have an issue
>> in i2c controller which violates the i2c repeated start timing.
>
>
> Did you had an issue with one of the SoC ?
> If yes what was your setting ?
> On my side I never managed to have this sort of issue on Armada 38x.
>
>>
>> This errata is fixed in the i2c-mv64xxx driver but enabled
>> only for devices with compatible string "marvell,mv78230-i2c".
>
> In this case why not just adding the "marvell,mv78230-i2c" as compatible
> string in the appropriate device tree files ?
>
> Gregory
>
>>
>> This patch introduces a new compatible string
>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>> so that the workaound is enabled.
>
>
>>
>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
>> ---
>>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> index 5c30026921..fc100b6bdb 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> @@ -14,6 +14,7 @@ Required properties :
>>                           very rare, initial version of the SoC which
>>                           had broken offload support.  Linux
>>                           auto-detects this and sets it appropriately.
>> +                     - "marvell,armada-38x-i2c"
>>   - interrupts      : The interrupt number
>>
>>  Optional properties :
>> --
>> 2.14.1
>>
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 18+ messages in thread

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-09-26 11:55       ` Gregory CLEMENT
  (?)
@ 2017-09-26 23:10       ` Kalyan Kinthada
  -1 siblings, 0 replies; 18+ messages in thread
From: Kalyan Kinthada @ 2017-09-26 23:10 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: devicetree, wsa, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, linux-kernel, Chris Packham

On 27/09/17 00:55, Gregory CLEMENT wrote:
> Hi Kalyan,
>
> Please try avoid top-posting.
I am sorry. Fixed it now.
>
>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>
>> Hi Gregory,
>>
>> I got this information from Armada-38x functional errata document.
> OK but in any case just adding a new compatible was not enough you have
> to update the driver in the same time, however for this case we won't
> need it, see below.
>
>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>> based on the compatible string "marvell,mv78230-i2c".
>>
>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>> That is the reason I felt for the need of a new compatible string
>> specifically for Armada-38x SoCs.
> Indeed the Armada-38x SoCs does not support hardware offloading (at
> least according the datasheet). But it happens that in the earlier
> version of the Armada XP the hardware offloading was buggy, so we
> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
> compatible enable the errata fix but not the offloading feature. That
> means that it is exactly the compatible you need for Armada 38x (and
> Armada 39x and 375 I think).

   Ok. I will add "marvell,mv78230-a0-i2c" to the Armada-38x
   device tree file. I will send a new patch with these changes.

Thanks for your time.

Regards,
Kalyan
>
> Gregory
>
>> Thanks,
>> Kalyan
>> ________________________________________
>> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> Sent: Friday, 22 September 2017 7:30 p.m.
>> To: Kalyan Kinthada
>> Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org;
>> pawel.moll@arm.com; mark.rutland@arm.com;
>> ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>> linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
>> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>>
>> Hi Kalyan,
>>
>>   On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:
>>
>>> All armada-38x variants(380, 385, 388) SoCs have an issue
>>> in i2c controller which violates the i2c repeated start timing.
>>
>> Did you had an issue with one of the SoC ?
>> If yes what was your setting ?
>> On my side I never managed to have this sort of issue on Armada 38x.
>>
>>> This errata is fixed in the i2c-mv64xxx driver but enabled
>>> only for devices with compatible string "marvell,mv78230-i2c".
>> In this case why not just adding the "marvell,mv78230-i2c" as compatible
>> string in the appropriate device tree files ?
>>
>> Gregory
>>
>>> This patch introduces a new compatible string
>>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>>> so that the workaound is enabled.
>>
>>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
>>> ---
>>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> index 5c30026921..fc100b6bdb 100644
>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> @@ -14,6 +14,7 @@ Required properties :
>>>                            very rare, initial version of the SoC which
>>>                            had broken offload support.  Linux
>>>                            auto-detects this and sets it appropriately.
>>> +                     - "marvell,armada-38x-i2c"
>>>    - interrupts      : The interrupt number
>>>
>>>   Optional properties :
>>> --
>>> 2.14.1
>>>
>> --
>> Gregory Clement, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
>> http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-09-26 11:55       ` Gregory CLEMENT
  (?)
  (?)
@ 2017-09-27  1:15       ` Chris Packham
  2017-09-27  7:33           ` Gregory CLEMENT
  -1 siblings, 1 reply; 18+ messages in thread
From: Chris Packham @ 2017-09-27  1:15 UTC (permalink / raw)
  To: Gregory CLEMENT, Kalyan Kinthada
  Cc: devicetree, wsa, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Gregory,

On 27/09/17 00:56, Gregory CLEMENT wrote:
> Hi Kalyan,
> 
> Please try avoid top-posting.
> 
>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
> 
>> Hi Gregory,
>>
>> I got this information from Armada-38x functional errata document.
> 
> OK but in any case just adding a new compatible was not enough you have
> to update the driver in the same time, however for this case we won't
> need it, see below.
> 
>>
>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>> based on the compatible string "marvell,mv78230-i2c".
>>
>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>> That is the reason I felt for the need of a new compatible string
>> specifically for Armada-38x SoCs.
> 
> Indeed the Armada-38x SoCs does not support hardware offloading (at
> least according the datasheet). But it happens that in the earlier
> version of the Armada XP the hardware offloading was buggy, so we
> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
> compatible enable the errata fix but not the offloading feature. That
> means that it is exactly the compatible you need for Armada 38x (and
> Armada 39x and 375 I think).

The "mv78230-a0-i2c" dt-binding has the following note

   Note: Only use "marvell,mv78230-a0-i2c" for a
   very rare, initial version of the SoC which
   had broken offload support.  Linux
   auto-detects this and sets it appropriately.

If we are going to re-use this binding for armada-38x we should probably 
remove this note. Personally my preference would be an armada-38x 
compatible string (or 370 if that's the common base of these SoCs). But 
of course we'll go with whatever your preference is as maintainer.

> 
> Gregory
> 
>>
>> Thanks,
>> Kalyan
>> ________________________________________
>> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> Sent: Friday, 22 September 2017 7:30 p.m.
>> To: Kalyan Kinthada
>> Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org;
>> pawel.moll@arm.com; mark.rutland@arm.com;
>> ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>> linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
>> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>>
>> Hi Kalyan,
>>
>>   On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:
>>
>>> All armada-38x variants(380, 385, 388) SoCs have an issue
>>> in i2c controller which violates the i2c repeated start timing.
>>
>>
>> Did you had an issue with one of the SoC ?
>> If yes what was your setting ?
>> On my side I never managed to have this sort of issue on Armada 38x.
>>
>>>
>>> This errata is fixed in the i2c-mv64xxx driver but enabled
>>> only for devices with compatible string "marvell,mv78230-i2c".
>>
>> In this case why not just adding the "marvell,mv78230-i2c" as compatible
>> string in the appropriate device tree files ?
>>
>> Gregory
>>
>>>
>>> This patch introduces a new compatible string
>>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>>> so that the workaound is enabled.
>>
>>
>>>
>>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
>>> ---
>>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> index 5c30026921..fc100b6bdb 100644
>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> @@ -14,6 +14,7 @@ Required properties :
>>>                            very rare, initial version of the SoC which
>>>                            had broken offload support.  Linux
>>>                            auto-detects this and sets it appropriately.
>>> +                     - "marvell,armada-38x-i2c"
>>>    - interrupts      : The interrupt number
>>>
>>>   Optional properties :
>>> --
>>> 2.14.1
>>>
>>
>> --
>> Gregory Clement, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
>> http://free-electrons.com
> 

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-09-27  1:15       ` Chris Packham
@ 2017-09-27  7:33           ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-27  7:33 UTC (permalink / raw)
  To: Chris Packham
  Cc: Kalyan Kinthada, devicetree, wsa, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Chris,
 
 On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> Hi Gregory,
>
> On 27/09/17 00:56, Gregory CLEMENT wrote:
>> Hi Kalyan,
>> 
>> Please try avoid top-posting.
>> 
>>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>> 
>>> Hi Gregory,
>>>
>>> I got this information from Armada-38x functional errata document.
>> 
>> OK but in any case just adding a new compatible was not enough you have
>> to update the driver in the same time, however for this case we won't
>> need it, see below.
>> 
>>>
>>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>>> based on the compatible string "marvell,mv78230-i2c".
>>>
>>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>>> That is the reason I felt for the need of a new compatible string
>>> specifically for Armada-38x SoCs.
>> 
>> Indeed the Armada-38x SoCs does not support hardware offloading (at
>> least according the datasheet). But it happens that in the earlier
>> version of the Armada XP the hardware offloading was buggy, so we
>> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>> compatible enable the errata fix but not the offloading feature. That
>> means that it is exactly the compatible you need for Armada 38x (and
>> Armada 39x and 375 I think).
>
> The "mv78230-a0-i2c" dt-binding has the following note
>
>    Note: Only use "marvell,mv78230-a0-i2c" for a
>    very rare, initial version of the SoC which
>    had broken offload support.  Linux
>    auto-detects this and sets it appropriately.
>
> If we are going to re-use this binding for armada-38x we should probably 
> remove this note. Personally my preference would be an armada-38x

Updating the documentation is the right thing to do yes.


> compatible string (or 370 if that's the common base of these SoCs). But 
> of course we'll go with whatever your preference is as maintainer.

If the IP is compatible then there is no reason to add a new one, else
we will end with a compatible for each SoC and the compatible property
will just loose its meaning.

But an other reason to reuse "marvell,mv78230-a0-i2c" is that thanks to
this you will benefit to this even with the old kernel by just updating
the device tree, else you will have to update both the kernel and the
dtb.


Gregory

>
>> 
>> Gregory
>> 
>>>
>>> Thanks,
>>> Kalyan
>>> ________________________________________
>>> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> Sent: Friday, 22 September 2017 7:30 p.m.
>>> To: Kalyan Kinthada
>>> Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org;
>>> pawel.moll@arm.com; mark.rutland@arm.com;
>>> ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>>> linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
>>> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>>>
>>> Hi Kalyan,
>>>
>>>   On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:
>>>
>>>> All armada-38x variants(380, 385, 388) SoCs have an issue
>>>> in i2c controller which violates the i2c repeated start timing.
>>>
>>>
>>> Did you had an issue with one of the SoC ?
>>> If yes what was your setting ?
>>> On my side I never managed to have this sort of issue on Armada 38x.
>>>
>>>>
>>>> This errata is fixed in the i2c-mv64xxx driver but enabled
>>>> only for devices with compatible string "marvell,mv78230-i2c".
>>>
>>> In this case why not just adding the "marvell,mv78230-i2c" as compatible
>>> string in the appropriate device tree files ?
>>>
>>> Gregory
>>>
>>>>
>>>> This patch introduces a new compatible string
>>>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>>>> so that the workaound is enabled.
>>>
>>>
>>>>
>>>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
>>>> ---
>>>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> index 5c30026921..fc100b6bdb 100644
>>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> @@ -14,6 +14,7 @@ Required properties :
>>>>                            very rare, initial version of the SoC which
>>>>                            had broken offload support.  Linux
>>>>                            auto-detects this and sets it appropriately.
>>>> +                     - "marvell,armada-38x-i2c"
>>>>    - interrupts      : The interrupt number
>>>>
>>>>   Optional properties :
>>>> --
>>>> 2.14.1
>>>>
>>>
>>> --
>>> Gregory Clement, Free Electrons
>>> Kernel, drivers, real-time and embedded Linux
>>> development, consulting, training and support.
>>> http://free-electrons.com
>> 
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-09-27  7:33           ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-09-27  7:33 UTC (permalink / raw)
  To: Chris Packham
  Cc: Kalyan Kinthada, devicetree, wsa, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Chris,
 
 On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> Hi Gregory,
>
> On 27/09/17 00:56, Gregory CLEMENT wrote:
>> Hi Kalyan,
>> 
>> Please try avoid top-posting.
>> 
>>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>> 
>>> Hi Gregory,
>>>
>>> I got this information from Armada-38x functional errata document.
>> 
>> OK but in any case just adding a new compatible was not enough you have
>> to update the driver in the same time, however for this case we won't
>> need it, see below.
>> 
>>>
>>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>>> based on the compatible string "marvell,mv78230-i2c".
>>>
>>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>>> That is the reason I felt for the need of a new compatible string
>>> specifically for Armada-38x SoCs.
>> 
>> Indeed the Armada-38x SoCs does not support hardware offloading (at
>> least according the datasheet). But it happens that in the earlier
>> version of the Armada XP the hardware offloading was buggy, so we
>> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>> compatible enable the errata fix but not the offloading feature. That
>> means that it is exactly the compatible you need for Armada 38x (and
>> Armada 39x and 375 I think).
>
> The "mv78230-a0-i2c" dt-binding has the following note
>
>    Note: Only use "marvell,mv78230-a0-i2c" for a
>    very rare, initial version of the SoC which
>    had broken offload support.  Linux
>    auto-detects this and sets it appropriately.
>
> If we are going to re-use this binding for armada-38x we should probably 
> remove this note. Personally my preference would be an armada-38x

Updating the documentation is the right thing to do yes.


> compatible string (or 370 if that's the common base of these SoCs). But 
> of course we'll go with whatever your preference is as maintainer.

If the IP is compatible then there is no reason to add a new one, else
we will end with a compatible for each SoC and the compatible property
will just loose its meaning.

But an other reason to reuse "marvell,mv78230-a0-i2c" is that thanks to
this you will benefit to this even with the old kernel by just updating
the device tree, else you will have to update both the kernel and the
dtb.


Gregory

>
>> 
>> Gregory
>> 
>>>
>>> Thanks,
>>> Kalyan
>>> ________________________________________
>>> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> Sent: Friday, 22 September 2017 7:30 p.m.
>>> To: Kalyan Kinthada
>>> Cc: devicetree@vger.kernel.org; wsa@the-dreams.de; robh+dt@kernel.org;
>>> pawel.moll@arm.com; mark.rutland@arm.com;
>>> ijc+devicetree@hellion.org.uk; galak@codeaurora.org;
>>> linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Packham
>>> Subject: Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
>>>
>>> Hi Kalyan,
>>>
>>>   On ven., sept. 22 2017, Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz> wrote:
>>>
>>>> All armada-38x variants(380, 385, 388) SoCs have an issue
>>>> in i2c controller which violates the i2c repeated start timing.
>>>
>>>
>>> Did you had an issue with one of the SoC ?
>>> If yes what was your setting ?
>>> On my side I never managed to have this sort of issue on Armada 38x.
>>>
>>>>
>>>> This errata is fixed in the i2c-mv64xxx driver but enabled
>>>> only for devices with compatible string "marvell,mv78230-i2c".
>>>
>>> In this case why not just adding the "marvell,mv78230-i2c" as compatible
>>> string in the appropriate device tree files ?
>>>
>>> Gregory
>>>
>>>>
>>>> This patch introduces a new compatible string
>>>> "marvell,armada-38x-i2c" for the i2c controller on armada-38x SoCs
>>>> so that the workaound is enabled.
>>>
>>>
>>>>
>>>> Signed-off-by: Kalyan Kinthada <kalyan.kinthada@alliedtelesis.co.nz>
>>>> ---
>>>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> index 5c30026921..fc100b6bdb 100644
>>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>>> @@ -14,6 +14,7 @@ Required properties :
>>>>                            very rare, initial version of the SoC which
>>>>                            had broken offload support.  Linux
>>>>                            auto-detects this and sets it appropriately.
>>>> +                     - "marvell,armada-38x-i2c"
>>>>    - interrupts      : The interrupt number
>>>>
>>>>   Optional properties :
>>>> --
>>>> 2.14.1
>>>>
>>>
>>> --
>>> Gregory Clement, Free Electrons
>>> Kernel, drivers, real-time and embedded Linux
>>> development, consulting, training and support.
>>> http://free-electrons.com
>> 
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-10-03 21:49             ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2017-10-03 21:49 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
> Hi Chris,
>  
>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> 
> > Hi Gregory,
> >
> > On 27/09/17 00:56, Gregory CLEMENT wrote:
> >> Hi Kalyan,
> >> 
> >> Please try avoid top-posting.
> >> 
> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
> >> 
> >>> Hi Gregory,
> >>>
> >>> I got this information from Armada-38x functional errata document.
> >> 
> >> OK but in any case just adding a new compatible was not enough you have
> >> to update the driver in the same time, however for this case we won't
> >> need it, see below.
> >> 
> >>>
> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
> >>> based on the compatible string "marvell,mv78230-i2c".
> >>>
> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
> >>> That is the reason I felt for the need of a new compatible string
> >>> specifically for Armada-38x SoCs.
> >> 
> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
> >> least according the datasheet). But it happens that in the earlier
> >> version of the Armada XP the hardware offloading was buggy, so we
> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
> >> compatible enable the errata fix but not the offloading feature. That
> >> means that it is exactly the compatible you need for Armada 38x (and
> >> Armada 39x and 375 I think).
> >
> > The "mv78230-a0-i2c" dt-binding has the following note
> >
> >    Note: Only use "marvell,mv78230-a0-i2c" for a
> >    very rare, initial version of the SoC which
> >    had broken offload support.  Linux
> >    auto-detects this and sets it appropriately.
> >
> > If we are going to re-use this binding for armada-38x we should probably 
> > remove this note. Personally my preference would be an armada-38x
> 
> Updating the documentation is the right thing to do yes.
> 
> 
> > compatible string (or 370 if that's the common base of these SoCs). But 
> > of course we'll go with whatever your preference is as maintainer.
> 
> If the IP is compatible then there is no reason to add a new one, else
> we will end with a compatible for each SoC and the compatible property
> will just loose its meaning.

If you all had added compatibles for each SoC in the first place, then 
we wouldn't be having this dicussion.

Rob

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-10-03 21:49             ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2017-10-03 21:49 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Chris Packham, Kalyan Kinthada,
	devicetree-u79uwXL29TY76Z2rM5mHXA, wsa-z923LK4zBo2bacvFa/9K2g,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
> Hi Chris,
>  
>  On mer., sept. 27 2017, Chris Packham <Chris.Packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:
> 
> > Hi Gregory,
> >
> > On 27/09/17 00:56, Gregory CLEMENT wrote:
> >> Hi Kalyan,
> >> 
> >> Please try avoid top-posting.
> >> 
> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org> wrote:
> >> 
> >>> Hi Gregory,
> >>>
> >>> I got this information from Armada-38x functional errata document.
> >> 
> >> OK but in any case just adding a new compatible was not enough you have
> >> to update the driver in the same time, however for this case we won't
> >> need it, see below.
> >> 
> >>>
> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
> >>> based on the compatible string "marvell,mv78230-i2c".
> >>>
> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
> >>> That is the reason I felt for the need of a new compatible string
> >>> specifically for Armada-38x SoCs.
> >> 
> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
> >> least according the datasheet). But it happens that in the earlier
> >> version of the Armada XP the hardware offloading was buggy, so we
> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
> >> compatible enable the errata fix but not the offloading feature. That
> >> means that it is exactly the compatible you need for Armada 38x (and
> >> Armada 39x and 375 I think).
> >
> > The "mv78230-a0-i2c" dt-binding has the following note
> >
> >    Note: Only use "marvell,mv78230-a0-i2c" for a
> >    very rare, initial version of the SoC which
> >    had broken offload support.  Linux
> >    auto-detects this and sets it appropriately.
> >
> > If we are going to re-use this binding for armada-38x we should probably 
> > remove this note. Personally my preference would be an armada-38x
> 
> Updating the documentation is the right thing to do yes.
> 
> 
> > compatible string (or 370 if that's the common base of these SoCs). But 
> > of course we'll go with whatever your preference is as maintainer.
> 
> If the IP is compatible then there is no reason to add a new one, else
> we will end with a compatible for each SoC and the compatible property
> will just loose its meaning.

If you all had added compatibles for each SoC in the first place, then 
we wouldn't be having this dicussion.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 18+ messages in thread

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-10-03 21:49             ` Rob Herring
@ 2017-10-04  8:33               ` Gregory CLEMENT
  -1 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-10-04  8:33 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Rob,
 
 On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>> Hi Chris,
>>  
>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
>> 
>> > Hi Gregory,
>> >
>> > On 27/09/17 00:56, Gregory CLEMENT wrote:
>> >> Hi Kalyan,
>> >> 
>> >> Please try avoid top-posting.
>> >> 
>> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>> >> 
>> >>> Hi Gregory,
>> >>>
>> >>> I got this information from Armada-38x functional errata document.
>> >> 
>> >> OK but in any case just adding a new compatible was not enough you have
>> >> to update the driver in the same time, however for this case we won't
>> >> need it, see below.
>> >> 
>> >>>
>> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>> >>> based on the compatible string "marvell,mv78230-i2c".
>> >>>
>> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>> >>> That is the reason I felt for the need of a new compatible string
>> >>> specifically for Armada-38x SoCs.
>> >> 
>> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
>> >> least according the datasheet). But it happens that in the earlier
>> >> version of the Armada XP the hardware offloading was buggy, so we
>> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>> >> compatible enable the errata fix but not the offloading feature. That
>> >> means that it is exactly the compatible you need for Armada 38x (and
>> >> Armada 39x and 375 I think).
>> >
>> > The "mv78230-a0-i2c" dt-binding has the following note
>> >
>> >    Note: Only use "marvell,mv78230-a0-i2c" for a
>> >    very rare, initial version of the SoC which
>> >    had broken offload support.  Linux
>> >    auto-detects this and sets it appropriately.
>> >
>> > If we are going to re-use this binding for armada-38x we should probably 
>> > remove this note. Personally my preference would be an armada-38x
>> 
>> Updating the documentation is the right thing to do yes.
>> 
>> 
>> > compatible string (or 370 if that's the common base of these SoCs). But 
>> > of course we'll go with whatever your preference is as maintainer.
>> 
>> If the IP is compatible then there is no reason to add a new one, else
>> we will end with a compatible for each SoC and the compatible property
>> will just loose its meaning.
>
> If you all had added compatibles for each SoC in the first place, then 
> we wouldn't be having this dicussion.

Really??

For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
each family we have several flavors.

But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
their own flavor.

So you are just suggesting to blot the i2c driver with more than 50
compatible string!

That also mean updating the i2c driver each time a new SoC flavor
appear, so more or less for each release.

Really this just don't scale.

Gregory



>
> Rob

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-10-04  8:33               ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-10-04  8:33 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Rob,
 
 On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>> Hi Chris,
>>  
>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
>> 
>> > Hi Gregory,
>> >
>> > On 27/09/17 00:56, Gregory CLEMENT wrote:
>> >> Hi Kalyan,
>> >> 
>> >> Please try avoid top-posting.
>> >> 
>> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>> >> 
>> >>> Hi Gregory,
>> >>>
>> >>> I got this information from Armada-38x functional errata document.
>> >> 
>> >> OK but in any case just adding a new compatible was not enough you have
>> >> to update the driver in the same time, however for this case we won't
>> >> need it, see below.
>> >> 
>> >>>
>> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>> >>> based on the compatible string "marvell,mv78230-i2c".
>> >>>
>> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>> >>> That is the reason I felt for the need of a new compatible string
>> >>> specifically for Armada-38x SoCs.
>> >> 
>> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
>> >> least according the datasheet). But it happens that in the earlier
>> >> version of the Armada XP the hardware offloading was buggy, so we
>> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>> >> compatible enable the errata fix but not the offloading feature. That
>> >> means that it is exactly the compatible you need for Armada 38x (and
>> >> Armada 39x and 375 I think).
>> >
>> > The "mv78230-a0-i2c" dt-binding has the following note
>> >
>> >    Note: Only use "marvell,mv78230-a0-i2c" for a
>> >    very rare, initial version of the SoC which
>> >    had broken offload support.  Linux
>> >    auto-detects this and sets it appropriately.
>> >
>> > If we are going to re-use this binding for armada-38x we should probably 
>> > remove this note. Personally my preference would be an armada-38x
>> 
>> Updating the documentation is the right thing to do yes.
>> 
>> 
>> > compatible string (or 370 if that's the common base of these SoCs). But 
>> > of course we'll go with whatever your preference is as maintainer.
>> 
>> If the IP is compatible then there is no reason to add a new one, else
>> we will end with a compatible for each SoC and the compatible property
>> will just loose its meaning.
>
> If you all had added compatibles for each SoC in the first place, then 
> we wouldn't be having this dicussion.

Really??

For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
each family we have several flavors.

But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
their own flavor.

So you are just suggesting to blot the i2c driver with more than 50
compatible string!

That also mean updating the i2c driver each time a new SoC flavor
appear, so more or less for each release.

Really this just don't scale.

Gregory



>
> Rob

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-10-04  8:33               ` Gregory CLEMENT
  (?)
@ 2017-10-04 12:46               ` Rob Herring
  2017-10-04 12:52                   ` Gregory CLEMENT
  -1 siblings, 1 reply; 18+ messages in thread
From: Rob Herring @ 2017-10-04 12:46 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

On Wed, Oct 4, 2017 at 3:33 AM, Gregory CLEMENT
<gregory.clement@free-electrons.com> wrote:
> Hi Rob,
>
>  On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:
>
>> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>>> Hi Chris,
>>>
>>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
>>>
>>> > Hi Gregory,
>>> >
>>> > On 27/09/17 00:56, Gregory CLEMENT wrote:
>>> >> Hi Kalyan,
>>> >>
>>> >> Please try avoid top-posting.
>>> >>
>>> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>>> >>
>>> >>> Hi Gregory,
>>> >>>
>>> >>> I got this information from Armada-38x functional errata document.
>>> >>
>>> >> OK but in any case just adding a new compatible was not enough you have
>>> >> to update the driver in the same time, however for this case we won't
>>> >> need it, see below.
>>> >>
>>> >>>
>>> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>>> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>>> >>> based on the compatible string "marvell,mv78230-i2c".
>>> >>>
>>> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>>> >>> That is the reason I felt for the need of a new compatible string
>>> >>> specifically for Armada-38x SoCs.
>>> >>
>>> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
>>> >> least according the datasheet). But it happens that in the earlier
>>> >> version of the Armada XP the hardware offloading was buggy, so we
>>> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>>> >> compatible enable the errata fix but not the offloading feature. That
>>> >> means that it is exactly the compatible you need for Armada 38x (and
>>> >> Armada 39x and 375 I think).
>>> >
>>> > The "mv78230-a0-i2c" dt-binding has the following note
>>> >
>>> >    Note: Only use "marvell,mv78230-a0-i2c" for a
>>> >    very rare, initial version of the SoC which
>>> >    had broken offload support.  Linux
>>> >    auto-detects this and sets it appropriately.
>>> >
>>> > If we are going to re-use this binding for armada-38x we should probably
>>> > remove this note. Personally my preference would be an armada-38x
>>>
>>> Updating the documentation is the right thing to do yes.
>>>
>>>
>>> > compatible string (or 370 if that's the common base of these SoCs). But
>>> > of course we'll go with whatever your preference is as maintainer.
>>>
>>> If the IP is compatible then there is no reason to add a new one, else
>>> we will end with a compatible for each SoC and the compatible property
>>> will just loose its meaning.
>>
>> If you all had added compatibles for each SoC in the first place, then
>> we wouldn't be having this dicussion.
>
> Really??
>
> For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
> we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
> Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
> each family we have several flavors.
>
> But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
> sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
> their own flavor.
>
> So you are just suggesting to blot the i2c driver with more than 50
> compatible string!

No.

> That also mean updating the i2c driver each time a new SoC flavor
> appear, so more or less for each release.

No. You can have one or several fallbacks. Use the fallback as long as
you think they are the same and then add the more specific one to the
driver when you find differences.

Rob

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-10-04 12:46               ` Rob Herring
@ 2017-10-04 12:52                   ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-10-04 12:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Rob,
 
 On mer., oct. 04 2017, Rob Herring <robh@kernel.org> wrote:

> On Wed, Oct 4, 2017 at 3:33 AM, Gregory CLEMENT
> <gregory.clement@free-electrons.com> wrote:
>> Hi Rob,
>>
>>  On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:
>>
>>> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>>>> Hi Chris,
>>>>
>>>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
>>>>
>>>> > Hi Gregory,
>>>> >
>>>> > On 27/09/17 00:56, Gregory CLEMENT wrote:
>>>> >> Hi Kalyan,
>>>> >>
>>>> >> Please try avoid top-posting.
>>>> >>
>>>> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>>>> >>
>>>> >>> Hi Gregory,
>>>> >>>
>>>> >>> I got this information from Armada-38x functional errata document.
>>>> >>
>>>> >> OK but in any case just adding a new compatible was not enough you have
>>>> >> to update the driver in the same time, however for this case we won't
>>>> >> need it, see below.
>>>> >>
>>>> >>>
>>>> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>>>> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>>>> >>> based on the compatible string "marvell,mv78230-i2c".
>>>> >>>
>>>> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>>>> >>> That is the reason I felt for the need of a new compatible string
>>>> >>> specifically for Armada-38x SoCs.
>>>> >>
>>>> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
>>>> >> least according the datasheet). But it happens that in the earlier
>>>> >> version of the Armada XP the hardware offloading was buggy, so we
>>>> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>>>> >> compatible enable the errata fix but not the offloading feature. That
>>>> >> means that it is exactly the compatible you need for Armada 38x (and
>>>> >> Armada 39x and 375 I think).
>>>> >
>>>> > The "mv78230-a0-i2c" dt-binding has the following note
>>>> >
>>>> >    Note: Only use "marvell,mv78230-a0-i2c" for a
>>>> >    very rare, initial version of the SoC which
>>>> >    had broken offload support.  Linux
>>>> >    auto-detects this and sets it appropriately.
>>>> >
>>>> > If we are going to re-use this binding for armada-38x we should probably
>>>> > remove this note. Personally my preference would be an armada-38x
>>>>
>>>> Updating the documentation is the right thing to do yes.
>>>>
>>>>
>>>> > compatible string (or 370 if that's the common base of these SoCs). But
>>>> > of course we'll go with whatever your preference is as maintainer.
>>>>
>>>> If the IP is compatible then there is no reason to add a new one, else
>>>> we will end with a compatible for each SoC and the compatible property
>>>> will just loose its meaning.
>>>
>>> If you all had added compatibles for each SoC in the first place, then
>>> we wouldn't be having this dicussion.
>>
>> Really??
>>
>> For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
>> we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
>> Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
>> each family we have several flavors.
>>
>> But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
>> sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
>> their own flavor.
>>
>> So you are just suggesting to blot the i2c driver with more than 50
>> compatible string!
>
> No.
>
>> That also mean updating the i2c driver each time a new SoC flavor
>> appear, so more or less for each release.
>
> No. You can have one or several fallbacks. Use the fallback as long as
> you think they are the same and then add the more specific one to the
> driver when you find differences.

So you mean adding all the possible variant of the SoC in the binding
documentation, but only implement them in the driver when needed?

Gregory

>
> Rob

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
@ 2017-10-04 12:52                   ` Gregory CLEMENT
  0 siblings, 0 replies; 18+ messages in thread
From: Gregory CLEMENT @ 2017-10-04 12:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

Hi Rob,
 
 On mer., oct. 04 2017, Rob Herring <robh@kernel.org> wrote:

> On Wed, Oct 4, 2017 at 3:33 AM, Gregory CLEMENT
> <gregory.clement@free-electrons.com> wrote:
>> Hi Rob,
>>
>>  On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:
>>
>>> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>>>> Hi Chris,
>>>>
>>>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
>>>>
>>>> > Hi Gregory,
>>>> >
>>>> > On 27/09/17 00:56, Gregory CLEMENT wrote:
>>>> >> Hi Kalyan,
>>>> >>
>>>> >> Please try avoid top-posting.
>>>> >>
>>>> >>   On dim., sept. 24 2017, Kalyan Kinthada <Kalyan.Kinthada@alliedtelesis.co.nz> wrote:
>>>> >>
>>>> >>> Hi Gregory,
>>>> >>>
>>>> >>> I got this information from Armada-38x functional errata document.
>>>> >>
>>>> >> OK but in any case just adding a new compatible was not enough you have
>>>> >> to update the driver in the same time, however for this case we won't
>>>> >> need it, see below.
>>>> >>
>>>> >>>
>>>> >>> I can add the "marvell,mv78230-i2c" compatible string to the appropriate  device tree files
>>>> >>> but the i2c-mv64xxx driver enables an additional  feature (offload i2c transactions)
>>>> >>> based on the compatible string "marvell,mv78230-i2c".
>>>> >>>
>>>> >>> I am not sure if this feature (offload i2c transactions) should be enabled for Armada-38x devices.
>>>> >>> That is the reason I felt for the need of a new compatible string
>>>> >>> specifically for Armada-38x SoCs.
>>>> >>
>>>> >> Indeed the Armada-38x SoCs does not support hardware offloading (at
>>>> >> least according the datasheet). But it happens that in the earlier
>>>> >> version of the Armada XP the hardware offloading was buggy, so we
>>>> >> introduced a compatible for this case: marvell,mv78230-a0-i2c. This
>>>> >> compatible enable the errata fix but not the offloading feature. That
>>>> >> means that it is exactly the compatible you need for Armada 38x (and
>>>> >> Armada 39x and 375 I think).
>>>> >
>>>> > The "mv78230-a0-i2c" dt-binding has the following note
>>>> >
>>>> >    Note: Only use "marvell,mv78230-a0-i2c" for a
>>>> >    very rare, initial version of the SoC which
>>>> >    had broken offload support.  Linux
>>>> >    auto-detects this and sets it appropriately.
>>>> >
>>>> > If we are going to re-use this binding for armada-38x we should probably
>>>> > remove this note. Personally my preference would be an armada-38x
>>>>
>>>> Updating the documentation is the right thing to do yes.
>>>>
>>>>
>>>> > compatible string (or 370 if that's the common base of these SoCs). But
>>>> > of course we'll go with whatever your preference is as maintainer.
>>>>
>>>> If the IP is compatible then there is no reason to add a new one, else
>>>> we will end with a compatible for each SoC and the compatible property
>>>> will just loose its meaning.
>>>
>>> If you all had added compatibles for each SoC in the first place, then
>>> we wouldn't be having this dicussion.
>>
>> Really??
>>
>> For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
>> we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
>> Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
>> each family we have several flavors.
>>
>> But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
>> sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
>> their own flavor.
>>
>> So you are just suggesting to blot the i2c driver with more than 50
>> compatible string!
>
> No.
>
>> That also mean updating the i2c driver each time a new SoC flavor
>> appear, so more or less for each release.
>
> No. You can have one or several fallbacks. Use the fallback as long as
> you think they are the same and then add the more specific one to the
> driver when you find differences.

So you mean adding all the possible variant of the SoC in the binding
documentation, but only implement them in the driver when needed?

Gregory

>
> Rob

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] dt-bindings: i2c: Add armada-38x i2c binding
  2017-10-04 12:52                   ` Gregory CLEMENT
  (?)
@ 2017-10-04 13:33                   ` Rob Herring
  -1 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2017-10-04 13:33 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Chris Packham, Kalyan Kinthada, devicetree, wsa, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux-i2c, linux-kernel

On Wed, Oct 4, 2017 at 7:52 AM, Gregory CLEMENT
<gregory.clement@free-electrons.com> wrote:
> Hi Rob,
>
>  On mer., oct. 04 2017, Rob Herring <robh@kernel.org> wrote:
>
>> On Wed, Oct 4, 2017 at 3:33 AM, Gregory CLEMENT
>> <gregory.clement@free-electrons.com> wrote:
>>> Hi Rob,
>>>
>>>  On mar., oct. 03 2017, Rob Herring <robh@kernel.org> wrote:
>>>
>>>> On Wed, Sep 27, 2017 at 09:33:00AM +0200, Gregory CLEMENT wrote:
>>>>> Hi Chris,
>>>>>
>>>>>  On mer., sept. 27 2017, Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

[...]

>>>>> If the IP is compatible then there is no reason to add a new one, else
>>>>> we will end with a compatible for each SoC and the compatible property
>>>>> will just loose its meaning.
>>>>
>>>> If you all had added compatibles for each SoC in the first place, then
>>>> we wouldn't be having this dicussion.
>>>
>>> Really??
>>>
>>> For Armada 38x we have already 6 flavor 381, 382, 383, 385, 388.  Then
>>> we have 9 SoC families on mvebu: orion5x, kirkwood, dove, Armada 370,
>>> Armada XP, Armada 375, Armada 39x, Armada 7K, Armada 8K. Of course in
>>> each family we have several flavors.
>>>
>>> But then Allwiner also use this driver in 8 SoC families: sun4i, sun5i,
>>> sun6i, sun7i, sun8i, sun9i, sunxi, sun50i. Here again each family have
>>> their own flavor.
>>>
>>> So you are just suggesting to blot the i2c driver with more than 50
>>> compatible string!
>>
>> No.
>>
>>> That also mean updating the i2c driver each time a new SoC flavor
>>> appear, so more or less for each release.
>>
>> No. You can have one or several fallbacks. Use the fallback as long as
>> you think they are the same and then add the more specific one to the
>> driver when you find differences.
>
> So you mean adding all the possible variant of the SoC in the binding
> documentation, but only implement them in the driver when needed?

Yes, and in the dts files. If some are the same die, but just
different packaging or fusing then I would not distinguish those. But
I realize you probably don't have that information being outside of
Marvell.

For the older parts, I'd guess they've been around long enough you've
either found the differences by now or few people care anymore, so I'm
not saying go back and add possible string now.

Rob

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

end of thread, other threads:[~2017-10-04 13:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22  2:04 [PATCH] dt-bindings: i2c: Add armada-38x i2c binding Kalyan Kinthada
2017-09-22  7:30 ` Gregory CLEMENT
2017-09-22  7:30   ` Gregory CLEMENT
2017-09-24 21:44   ` Kalyan Kinthada
2017-09-26 11:55     ` Gregory CLEMENT
2017-09-26 11:55       ` Gregory CLEMENT
2017-09-26 23:10       ` Kalyan Kinthada
2017-09-27  1:15       ` Chris Packham
2017-09-27  7:33         ` Gregory CLEMENT
2017-09-27  7:33           ` Gregory CLEMENT
2017-10-03 21:49           ` Rob Herring
2017-10-03 21:49             ` Rob Herring
2017-10-04  8:33             ` Gregory CLEMENT
2017-10-04  8:33               ` Gregory CLEMENT
2017-10-04 12:46               ` Rob Herring
2017-10-04 12:52                 ` Gregory CLEMENT
2017-10-04 12:52                   ` Gregory CLEMENT
2017-10-04 13:33                   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.