diff mbox series

[v4,06/17] dt-bindings: fsi: Document the FSI controller common properties

Message ID 20240429210131.373487-7-eajames@linux.ibm.com
State New
Headers show
Series ARM: dts: aspeed: Add IBM P11 BMC Boards | expand

Commit Message

Eddie James April 29, 2024, 9:01 p.m. UTC
Since there are multiple FSI controllers documented, the common
properties should be documented separately and then referenced
from the specific controller documentation.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
Changes since v3:
 - Add chip-id description
 - Use a real compatible
 - Re-order example properties

 .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Comments

Krzysztof Kozlowski April 30, 2024, 7:01 a.m. UTC | #1
On 29/04/2024 23:01, Eddie James wrote:
> +
> +patternProperties:
> +  "cfam@[0-9a-f],[0-9a-f]":
> +    type: object
> +    properties:
> +      chip-id:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description:
> +          Processor index

fsi.txt tells a bit more about it, so extend the description.


> +
> +      reg:
> +        maxItems: 1
> +
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 1
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: true
> +
> +additionalProperties: true
> +
> +examples:
> +  - |
> +    fsi {
> +        #address-cells = <2>;
> +        #size-cells = <0>;
> +
> +        cfam@0,0 {
> +            reg = <0 0>;
> +            #address-cells = <1>;
> +            #size-cells = <1>;
> +            chip-id = <0>;
> +        };
> +    };

Drop the example, it's not being validated/used.

Best regards,
Krzysztof
Eddie James May 1, 2024, 4:06 p.m. UTC | #2
On 4/30/24 02:01, Krzysztof Kozlowski wrote:
> On 29/04/2024 23:01, Eddie James wrote:
>> +
>> +patternProperties:
>> +  "cfam@[0-9a-f],[0-9a-f]":
>> +    type: object
>> +    properties:
>> +      chip-id:
>> +        $ref: /schemas/types.yaml#/definitions/uint32
>> +        description:
>> +          Processor index
> fsi.txt tells a bit more about it, so extend the description.


Ack.


Thanks,

Eddie


>
>
>> +
>> +      reg:
>> +        maxItems: 1
>> +
>> +      "#address-cells":
>> +        const: 1
>> +
>> +      "#size-cells":
>> +        const: 1
>> +
>> +    required:
>> +      - reg
>> +
>> +    additionalProperties: true
>> +
>> +additionalProperties: true
>> +
>> +examples:
>> +  - |
>> +    fsi {
>> +        #address-cells = <2>;
>> +        #size-cells = <0>;
>> +
>> +        cfam@0,0 {
>> +            reg = <0 0>;
>> +            #address-cells = <1>;
>> +            #size-cells = <1>;
>> +            chip-id = <0>;
>> +        };
>> +    };
> Drop the example, it's not being validated/used.


Ack.


>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/fsi/fsi-controller.yaml b/Documentation/devicetree/bindings/fsi/fsi-controller.yaml
new file mode 100644
index 000000000000..fd624181c030
--- /dev/null
+++ b/Documentation/devicetree/bindings/fsi/fsi-controller.yaml
@@ -0,0 +1,66 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/fsi-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FSI Controller Common Properties
+
+maintainers:
+  - Eddie James <eajames@linux.ibm.com>
+
+description:
+  FSI (FRU (Field Replaceable Unit) Service Interface) is a two wire bus. The
+  FSI bus is connected to a CFAM (Common FRU Access Macro) which contains
+  various engines such as I2C controllers, SPI controllers, etc.
+
+properties:
+  "#address-cells":
+    const: 2
+
+  "#size-cells":
+    const: 0
+
+  no-scan-on-init:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      The FSI controller cannot scan the bus during initialization.
+
+patternProperties:
+  "cfam@[0-9a-f],[0-9a-f]":
+    type: object
+    properties:
+      chip-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Processor index
+
+      reg:
+        maxItems: 1
+
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 1
+
+    required:
+      - reg
+
+    additionalProperties: true
+
+additionalProperties: true
+
+examples:
+  - |
+    fsi {
+        #address-cells = <2>;
+        #size-cells = <0>;
+
+        cfam@0,0 {
+            reg = <0 0>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            chip-id = <0>;
+        };
+    };