diff mbox series

[3/4] dt-bindings: misc: tmr-inject: Add device-tree binding for TMR Inject

Message ID 20220628054338.1631516-4-appana.durga.rao@xilinx.com (mailing list archive)
State New, archived
Headers show
Series drivers: misc: Add support for TMR Manager and Inject IPs | expand

Commit Message

Appana Durga Kedareswara rao June 28, 2022, 5:43 a.m. UTC
This commit adds documentation for Triple Modular Redundancy (TMR)
Inject IP.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
---
 .../bindings/misc/xlnx,tmr-inject.yaml        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml

Comments

Krzysztof Kozlowski June 29, 2022, 10:08 a.m. UTC | #1
On 28/06/2022 07:43, Appana Durga Kedareswara rao wrote:
> This commit adds documentation for Triple Modular Redundancy (TMR)

No "This commit"

https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

> Inject IP.
> 
> Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
> ---
>  .../bindings/misc/xlnx,tmr-inject.yaml        | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
> 
> diff --git a/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
> new file mode 100644
> index 000000000000..4daf9539000b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/xlnx,tmr-inject.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx TMR Inject Device Tree Bindings

Same comments.

> +
> +maintainers:
> +  - Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
> +
> +description: |
> +  The Triple Modular Redundancy(TMR) Inject core provides functional fault
> +  injection by changing selected MicroBlaze instructions, which provides the
> +  possibility to verify that the TMR subsystem error detection and fault
> +  recovery logic is working properly.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - xlnx,tmr-inject-1.0
> +
> +  reg:
> +    maxItems: 1
> +
> +  xlnx,magic:
> +    minimum: 0
> +    maximum: 255
> +    description: |
> +      Magic number used when injecting faults. The fault inject write data least
> +      significant byte (bits 7:0) must match this number to have any effect.

And why exactly register value is a property of DT?

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> +  - compatible
> +  - reg
> +  - xlnx,magic
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    tmr-inject@44a30000 {

fault-inject?

> +            compatible = "xlnx,tmr-inject-1.0";
> +            reg = <0x44a10000 0x10000>;
> +            xlnx,magic = <0x46>;
> +    };


Best regards,
Krzysztof
Krzysztof Kozlowski June 29, 2022, 10:09 a.m. UTC | #2
On 28/06/2022 07:43, Appana Durga Kedareswara rao wrote:

(...)

> +  - compatible
> +  - reg
> +  - xlnx,magic
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    tmr-inject@44a30000 {
> +            compatible = "xlnx,tmr-inject-1.0";

Ah, and one more - wrong indentation. Use 4 spaces for DTS example.


Best regards,
Krzysztof
Michal Simek June 29, 2022, 11:29 a.m. UTC | #3
On 6/29/22 12:08, Krzysztof Kozlowski wrote:
> On 28/06/2022 07:43, Appana Durga Kedareswara rao wrote:
>> This commit adds documentation for Triple Modular Redundancy (TMR)
> 
> No "This commit"
> 
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> 
>> Inject IP.
>>
>> Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
>> ---
>>   .../bindings/misc/xlnx,tmr-inject.yaml        | 47 +++++++++++++++++++
>>   1 file changed, 47 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
>> new file mode 100644
>> index 000000000000..4daf9539000b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
>> @@ -0,0 +1,47 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/misc/xlnx,tmr-inject.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Xilinx TMR Inject Device Tree Bindings
> 
> Same comments.
> 
>> +
>> +maintainers:
>> +  - Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
>> +
>> +description: |
>> +  The Triple Modular Redundancy(TMR) Inject core provides functional fault
>> +  injection by changing selected MicroBlaze instructions, which provides the
>> +  possibility to verify that the TMR subsystem error detection and fault
>> +  recovery logic is working properly.
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - xlnx,tmr-inject-1.0
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  xlnx,magic:
>> +    minimum: 0
>> +    maximum: 255
>> +    description: |
>> +      Magic number used when injecting faults. The fault inject write data least
>> +      significant byte (bits 7:0) must match this number to have any effect.
> 
> And why exactly register value is a property of DT?
> 
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - xlnx,magic
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    tmr-inject@44a30000 {
> 
> fault-inject?

no problem with it but I think it would be good to extend 2.2.2 chapter in 
devicetree specification with these generic names.

Thanks,
Michal
Appana Durga Kedareswara rao June 29, 2022, 12:32 p.m. UTC | #4
Hi,

On 29/06/22 3:39 pm, Krzysztof Kozlowski wrote:
> On 28/06/2022 07:43, Appana Durga Kedareswara rao wrote:
> 
> (...)
> 
>> +  - compatible
>> +  - reg
>> +  - xlnx,magic
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    tmr-inject@44a30000 {
>> +            compatible = "xlnx,tmr-inject-1.0";
> 
> Ah, and one more - wrong indentation. Use 4 spaces for DTS example.

Sure will fix in v2.

Regards,
Kedar.

> 
> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
new file mode 100644
index 000000000000..4daf9539000b
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,tmr-inject.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx TMR Inject Device Tree Bindings
+
+maintainers:
+  - Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
+
+description: |
+  The Triple Modular Redundancy(TMR) Inject core provides functional fault
+  injection by changing selected MicroBlaze instructions, which provides the
+  possibility to verify that the TMR subsystem error detection and fault
+  recovery logic is working properly.
+
+properties:
+  compatible:
+    enum:
+      - xlnx,tmr-inject-1.0
+
+  reg:
+    maxItems: 1
+
+  xlnx,magic:
+    minimum: 0
+    maximum: 255
+    description: |
+      Magic number used when injecting faults. The fault inject write data least
+      significant byte (bits 7:0) must match this number to have any effect.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - compatible
+  - reg
+  - xlnx,magic
+
+additionalProperties: false
+
+examples:
+  - |
+    tmr-inject@44a30000 {
+            compatible = "xlnx,tmr-inject-1.0";
+            reg = <0x44a10000 0x10000>;
+            xlnx,magic = <0x46>;
+    };