diff mbox

[4/5] pwm: tegra: Add DT node compatible for Tegra186

Message ID 1466596043-27262-5-git-send-email-ldewangan@nvidia.com
State Accepted
Headers show

Commit Message

Laxman Dewangan June 22, 2016, 11:47 a.m. UTC
Tegra186 has 8 different PWM controller and each controller has only
one output. Earlier generation SoCs have the 4 PWM output per controller.

Add DT node compatible for Tegra186.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Thierry Reding June 22, 2016, 12:46 p.m. UTC | #1
On Wed, Jun 22, 2016 at 05:17:22PM +0530, Laxman Dewangan wrote:
> Tegra186 has 8 different PWM controller and each controller has only
> one output. Earlier generation SoCs have the 4 PWM output per controller.
> 
> Add DT node compatible for Tegra186.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
>  Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> index c52f03b..2851b2d 100644
> --- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> +++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> @@ -1,10 +1,12 @@
>  Tegra SoC PWFM controller
>  
>  Required properties:
> -- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".  For Tegra30,
> -  must contain "nvidia,tegra30-pwm".  Otherwise, must contain
> -  "nvidia,<chip>-pwm", plus one of the above, where <chip> is tegra114,
> -  tegra124, tegra132, or tegra210.
> +- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".
> +	      For Tegra30, must contain "nvidia,tegra30-pwm".
> +	      For Tegra114, Tegra124, Tegra132, Tegra210 must contain
> +	      "nvidia,<chip>-pwm", plus one of the above, where <chip> is
> +	      tegra114, tegra124, tegra132, or tegra210.
> +	      For Tegra186, must contain "nvidia,tegra186-pwm".

Rob, I recall discussing this with you a couple of weeks ago, but fail
to remember the outcome and can't find a link to the discussion either.
Wasn't there a new standard way of documenting this kind of compatible
string list?

Or did you say it didn't matter much until we moved to a YAML-based
description?

Thierry
Rob Herring (Arm) June 24, 2016, 4:10 p.m. UTC | #2
On Wed, Jun 22, 2016 at 02:46:14PM +0200, Thierry Reding wrote:
> On Wed, Jun 22, 2016 at 05:17:22PM +0530, Laxman Dewangan wrote:
> > Tegra186 has 8 different PWM controller and each controller has only
> > one output. Earlier generation SoCs have the 4 PWM output per controller.
> > 
> > Add DT node compatible for Tegra186.
> > 
> > Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> > index c52f03b..2851b2d 100644
> > --- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> > +++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
> > @@ -1,10 +1,12 @@
> >  Tegra SoC PWFM controller
> >  
> >  Required properties:
> > -- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".  For Tegra30,
> > -  must contain "nvidia,tegra30-pwm".  Otherwise, must contain
> > -  "nvidia,<chip>-pwm", plus one of the above, where <chip> is tegra114,
> > -  tegra124, tegra132, or tegra210.
> > +- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".
> > +	      For Tegra30, must contain "nvidia,tegra30-pwm".
> > +	      For Tegra114, Tegra124, Tegra132, Tegra210 must contain
> > +	      "nvidia,<chip>-pwm", plus one of the above, where <chip> is
> > +	      tegra114, tegra124, tegra132, or tegra210.
> > +	      For Tegra186, must contain "nvidia,tegra186-pwm".
> 
> Rob, I recall discussing this with you a couple of weeks ago, but fail
> to remember the outcome and can't find a link to the discussion either.
> Wasn't there a new standard way of documenting this kind of compatible
> string list?

We did? This is fine for me. However, "plus one of the above" is not 
clear. That means either is valid? If all are "the same" I would expect 
that only nvidia,tegra20-pwm is the fallback. I'm guessing this is 
docuemnting what happened in practice though. Probably should update the 
doc and dts files to reflect desired practice rather than what may be in 
the wild.

> Or did you say it didn't matter much until we moved to a YAML-based
> description?

Yes, that sounds like something I would have said.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren June 24, 2016, 9:30 p.m. UTC | #3
On 06/24/2016 10:10 AM, Rob Herring wrote:
> On Wed, Jun 22, 2016 at 02:46:14PM +0200, Thierry Reding wrote:
>> On Wed, Jun 22, 2016 at 05:17:22PM +0530, Laxman Dewangan wrote:
>>> Tegra186 has 8 different PWM controller and each controller has only
>>> one output. Earlier generation SoCs have the 4 PWM output per controller.
>>>
>>> Add DT node compatible for Tegra186.
>>>
>>> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
>>> ---
>>>   Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 10 ++++++----
>>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
>>> index c52f03b..2851b2d 100644
>>> --- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
>>> @@ -1,10 +1,12 @@
>>>   Tegra SoC PWFM controller
>>>
>>>   Required properties:
>>> -- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".  For Tegra30,
>>> -  must contain "nvidia,tegra30-pwm".  Otherwise, must contain
>>> -  "nvidia,<chip>-pwm", plus one of the above, where <chip> is tegra114,
>>> -  tegra124, tegra132, or tegra210.
>>> +- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".
>>> +	      For Tegra30, must contain "nvidia,tegra30-pwm".
>>> +	      For Tegra114, Tegra124, Tegra132, Tegra210 must contain
>>> +	      "nvidia,<chip>-pwm", plus one of the above, where <chip> is
>>> +	      tegra114, tegra124, tegra132, or tegra210.
>>> +	      For Tegra186, must contain "nvidia,tegra186-pwm".
>>
>> Rob, I recall discussing this with you a couple of weeks ago, but fail
>> to remember the outcome and can't find a link to the discussion either.
>> Wasn't there a new standard way of documenting this kind of compatible
>> string list?
>
> We did? This is fine for me. However, "plus one of the above" is not
> clear. That means either is valid? If all are "the same" I would expect
> that only nvidia,tegra20-pwm is the fallback. I'm guessing this is
> docuemnting what happened in practice though. Probably should update the
> doc and dts files to reflect desired practice rather than what may be in
> the wild.

FWIW, I've started listing the legal values as explicit separate bullet 
items rather than prose. See the example below - all those entries are 
just one string simply due to the HW design it represents, but each 
entry could be a list (i.e. is a complete compatible value):

- compatible
     Array of strings.
     One of:
     - "nvidia,tegra186-gpio".
     - "nvidia,tegra186-gpio-aon".

could be expanded as e.g.

     - "nvidia,tegra999-gpio", "nvidia,tegra186-gpio"
     ...

--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
index c52f03b..2851b2d 100644
--- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
+++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
@@ -1,10 +1,12 @@ 
 Tegra SoC PWFM controller
 
 Required properties:
-- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".  For Tegra30,
-  must contain "nvidia,tegra30-pwm".  Otherwise, must contain
-  "nvidia,<chip>-pwm", plus one of the above, where <chip> is tegra114,
-  tegra124, tegra132, or tegra210.
+- compatible: For Tegra20, must contain "nvidia,tegra20-pwm".
+	      For Tegra30, must contain "nvidia,tegra30-pwm".
+	      For Tegra114, Tegra124, Tegra132, Tegra210 must contain
+	      "nvidia,<chip>-pwm", plus one of the above, where <chip> is
+	      tegra114, tegra124, tegra132, or tegra210.
+	      For Tegra186, must contain "nvidia,tegra186-pwm".
 - reg: physical base address and length of the controller's registers
 - #pwm-cells: should be 2. See pwm.txt in this directory for a description of
   the cells format.