diff mbox

[v7,05/16] watchdog: lantiq: add device tree binding documentation

Message ID 20170702224051.15109-6-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show

Commit Message

Hauke Mehrtens July 2, 2017, 10:40 p.m. UTC
The binding was not documented before, add the documentation now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 .../devicetree/bindings/watchdog/lantiq-wdt.txt    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt

Comments

Rob Herring July 7, 2017, 2:08 p.m. UTC | #1
On Mon, Jul 03, 2017 at 12:40:40AM +0200, Hauke Mehrtens wrote:
> The binding was not documented before, add the documentation now.
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  .../devicetree/bindings/watchdog/lantiq-wdt.txt    | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
> new file mode 100644
> index 000000000000..c3967feebb6c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
> @@ -0,0 +1,24 @@
> +Lantiq WTD watchdog binding
> +============================
> +
> +This describes the binding of the Lantiq watchdog driver.
> +
> +-------------------------------------------------------------------------------
> +Required properties:
> +- compatible		: Should be one of
> +				"lantiq,wdt"
> +				"lantiq,xrx100-wdt"
> +				"lantiq,xrx200-wdt"
> +				"lantiq,falcon-wdt"
> +- lantiq,rcu		: A phandle to the RCU syscon (required for
> +			  "lantiq,falcon-wdt", "lantiq,xrx200-wdt" and
> +			  "lantiq,xrx100-wdt")
> +
> +-------------------------------------------------------------------------------
> +Example for the watchdog on the xRX200 SoCs:
> +		watchdog@803f0 {
> +			compatible = "lantiq,xrx200-wdt", "lantiq,xrx100-wdt";

This is still mismatched. If the example is correct, then the compatible 
list should be:

"lantiq,wdt"
"lantiq,xrx100-wdt"
"lantiq,xrx200-wdt", "lantiq,xrx100-wdt"
"lantiq,falcon-wdt"

You can also remove "lantiq,xrx200-wdt" from the driver if you want as 
"lantiq,xrx100-wdt" is good enough to match on.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hauke Mehrtens July 7, 2017, 7:01 p.m. UTC | #2
On 07/07/2017 04:08 PM, Rob Herring wrote:
> On Mon, Jul 03, 2017 at 12:40:40AM +0200, Hauke Mehrtens wrote:
>> The binding was not documented before, add the documentation now.
>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>>  .../devicetree/bindings/watchdog/lantiq-wdt.txt    | 24 ++++++++++++++++++++++
>>  1 file changed, 24 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>>
>> diff --git a/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>> new file mode 100644
>> index 000000000000..c3967feebb6c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>> @@ -0,0 +1,24 @@
>> +Lantiq WTD watchdog binding
>> +============================
>> +
>> +This describes the binding of the Lantiq watchdog driver.
>> +
>> +-------------------------------------------------------------------------------
>> +Required properties:
>> +- compatible		: Should be one of
>> +				"lantiq,wdt"
>> +				"lantiq,xrx100-wdt"
>> +				"lantiq,xrx200-wdt"
>> +				"lantiq,falcon-wdt"
>> +- lantiq,rcu		: A phandle to the RCU syscon (required for
>> +			  "lantiq,falcon-wdt", "lantiq,xrx200-wdt" and
>> +			  "lantiq,xrx100-wdt")
>> +
>> +-------------------------------------------------------------------------------
>> +Example for the watchdog on the xRX200 SoCs:
>> +		watchdog@803f0 {
>> +			compatible = "lantiq,xrx200-wdt", "lantiq,xrx100-wdt";
> 
> This is still mismatched. If the example is correct, then the compatible 
> list should be:
> 
> "lantiq,wdt"
> "lantiq,xrx100-wdt"
> "lantiq,xrx200-wdt", "lantiq,xrx100-wdt"
> "lantiq,falcon-wdt"
> 
> You can also remove "lantiq,xrx200-wdt" from the driver if you want as 
> "lantiq,xrx100-wdt" is good enough to match on.
> 
> Rob
> 
Ok thank you.

All the features that are supported by the wtd drivers use the same
register offsets on the xrx100 and xrx200 SoCs. I added the xrx200 only
if in the future we find some mismatch and I want to be able to use some
other code for this SoC.
In this case I would then list complete compatible line which should be
used for this SoC in the description of the compatible line, is that
correct?

I will update the patch, this makes sense to me.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring July 7, 2017, 8:18 p.m. UTC | #3
On Fri, Jul 7, 2017 at 2:01 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
>
> On 07/07/2017 04:08 PM, Rob Herring wrote:
>> On Mon, Jul 03, 2017 at 12:40:40AM +0200, Hauke Mehrtens wrote:
>>> The binding was not documented before, add the documentation now.
>>>
>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>> ---
>>>  .../devicetree/bindings/watchdog/lantiq-wdt.txt    | 24 ++++++++++++++++++++++
>>>  1 file changed, 24 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>>> new file mode 100644
>>> index 000000000000..c3967feebb6c
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>>> @@ -0,0 +1,24 @@
>>> +Lantiq WTD watchdog binding
>>> +============================
>>> +
>>> +This describes the binding of the Lantiq watchdog driver.
>>> +
>>> +-------------------------------------------------------------------------------
>>> +Required properties:
>>> +- compatible                : Should be one of
>>> +                            "lantiq,wdt"
>>> +                            "lantiq,xrx100-wdt"
>>> +                            "lantiq,xrx200-wdt"
>>> +                            "lantiq,falcon-wdt"
>>> +- lantiq,rcu                : A phandle to the RCU syscon (required for
>>> +                      "lantiq,falcon-wdt", "lantiq,xrx200-wdt" and
>>> +                      "lantiq,xrx100-wdt")
>>> +
>>> +-------------------------------------------------------------------------------
>>> +Example for the watchdog on the xRX200 SoCs:
>>> +            watchdog@803f0 {
>>> +                    compatible = "lantiq,xrx200-wdt", "lantiq,xrx100-wdt";
>>
>> This is still mismatched. If the example is correct, then the compatible
>> list should be:
>>
>> "lantiq,wdt"
>> "lantiq,xrx100-wdt"
>> "lantiq,xrx200-wdt", "lantiq,xrx100-wdt"
>> "lantiq,falcon-wdt"
>>
>> You can also remove "lantiq,xrx200-wdt" from the driver if you want as
>> "lantiq,xrx100-wdt" is good enough to match on.
>>
>> Rob
>>
> Ok thank you.
>
> All the features that are supported by the wtd drivers use the same
> register offsets on the xrx100 and xrx200 SoCs. I added the xrx200 only
> if in the future we find some mismatch and I want to be able to use some
> other code for this SoC.

Yes, the dts should have the xrx200 compatible. The driver can use the
xrx100 one until you need it.

> In this case I would then list complete compatible line which should be
> used for this SoC in the description of the compatible line, is that
> correct?

Yes.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" 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/watchdog/lantiq-wdt.txt b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
new file mode 100644
index 000000000000..c3967feebb6c
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
@@ -0,0 +1,24 @@ 
+Lantiq WTD watchdog binding
+============================
+
+This describes the binding of the Lantiq watchdog driver.
+
+-------------------------------------------------------------------------------
+Required properties:
+- compatible		: Should be one of
+				"lantiq,wdt"
+				"lantiq,xrx100-wdt"
+				"lantiq,xrx200-wdt"
+				"lantiq,falcon-wdt"
+- lantiq,rcu		: A phandle to the RCU syscon (required for
+			  "lantiq,falcon-wdt", "lantiq,xrx200-wdt" and
+			  "lantiq,xrx100-wdt")
+
+-------------------------------------------------------------------------------
+Example for the watchdog on the xRX200 SoCs:
+		watchdog@803f0 {
+			compatible = "lantiq,xrx200-wdt", "lantiq,xrx100-wdt";
+			reg = <0x803f0 0x10>;
+
+			lantiq,rcu = <&rcu0>;
+		};