[PATCH v3 05/16] watchdog: lantiq: add device tree binding documentation

Hauke Mehrtens hauke at hauke-m.de
Wed May 31 13:11:04 PDT 2017


On 05/31/2017 10:00 PM, Rob Herring wrote:
> On Sun, May 28, 2017 at 08:39:55PM +0200, Hauke Mehrtens wrote:
>> The binding was not documented before, add the documentation now.
>>
>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> ---
>>  .../devicetree/bindings/watchdog/lantiq-wdt.txt    | 28 ++++++++++++++++++++++
>>  1 file changed, 28 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..675c30e23b65
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/lantiq-wdt.txt
>> @@ -0,0 +1,28 @@
>> +Lantiq WTD watchdog binding
>> +============================
>> +
>> +This describes the binding of the Lantiq watchdog driver.
>> +
>> +-------------------------------------------------------------------------------
>> +Required properties:
>> +- compatible		: Should be one of
>> +				"lantiq,wdt"
>> +				"lantiq,wdt-xrx100"
>> +				"lantiq,wdt-falcon"
>> +
>> +Optional properties:
>> +- regmap		: A phandle to the RCU syscon
>> +- offset-status		: Offset of the reset cause register
>> +- mask-status		: Mask of the reset cause register value
> 
> These 2 should be implied by the compatible. But if already used in 
> upstream dts files, then it's okay.

This is new.
Should I hard code the offsets of the register and the actual bits
depending on the compatible string in the driver instead of configuring
it in the device tree?

>> +
>> +
>> +-------------------------------------------------------------------------------
>> +Example for the watchdog on the xRX200 SoCs:
>> +		watchdog at 803F0 {
> 
> Lowercase hex please.
> 
>> +			compatible = "lantiq,wdt-xrx200", "lantiq,wdt-xrx100";
> 
> Doesn't match the documentation.
> 
>> +			reg = <0x803F0 0x10>;
> 
> Lowercase hex please.
> 
>> +
>> +			regmap = <&rcu0>;
>> +			offset-status = <0x14>;
>> +			mask-status = <0x80000000>;
>> +		};
>> -- 
>> 2.11.0
>>




More information about the linux-mtd mailing list