Skip to contentSkip to conversation

dt-bindings: fsi: Convert to json-schema and add missing engines

PATCH In review Eddie James 3 participants 26 messages May 14, 2024 – May 22, 2024

Subsystems (4)
lore
Share & tools
lore

Eddie James

author maintainer
#0 lore raw

v5 cover dt-bindings: fsi: Convert to json-schema and add missing engines

This series was previously included in
https://lore.kernel.org/all/[email protected]/

Changes since v4:
- Move the addition of AST2700 FSI into a separate patch
- Add interrupt controller properties for the common FSI controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description
- Drop pattern properties for occ and hwmon nodes

Eddie James (9):
dt-bindings: fsi: fsi2spi: Document SPI controller child nodes
dt-bindings: fsi: Document the IBM SCOM engine
dt-bindings: fsi: p9-occ: Convert to json-schema
dt-bindings: fsi: Document the IBM SBEFIFO engine
dt-bindings: fsi: Document the FSI controller common properties
dt-bindings: fsi: ibm,i2cr-fsi-master: Reference common FSI controller
dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema
dt-bindings: fsi: Document the AST2700 FSI master
dt-bindings: fsi: Document the FSI Hub Controller

 .../fsi/aspeed,ast2600-fsi-master.yaml        | 81 +++++++++++++++++++
 .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++
 .../bindings/fsi/fsi-master-aspeed.txt        | 36 ---------
 .../devicetree/bindings/fsi/ibm,fsi2spi.yaml  | 36 ++++++++-
 .../bindings/fsi/ibm,i2cr-fsi-master.yaml     |  5 +-
 .../bindings/fsi/ibm,p9-fsi-controller.yaml   | 45 +++++++++++
 .../devicetree/bindings/fsi/ibm,p9-occ.txt    | 16 ----
 .../devicetree/bindings/fsi/ibm,p9-occ.yaml   | 40 +++++++++
 .../bindings/fsi/ibm,p9-sbefifo.yaml          | 46 +++++++++++
 .../devicetree/bindings/fsi/ibm,p9-scom.yaml  | 37 +++++++++
 10 files changed, 351 insertions(+), 57 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml
 create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/fsi/fsi-master-aspeed.txt
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-fsi-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-occ.txt
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-occ.yaml
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-sbefifo.yaml
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-scom.yaml
Signature · 1 line
2.39.3
author maintainer
#6 lore raw

PATCH v5 2/9 dt-bindings: fsi: Document the IBM SCOM engine

The SCOM engine provides an interface to the POWER processor PIB (Pervasive Interconnect Bus).

---
 .../devicetree/bindings/fsi/ibm,p9-scom.yaml  | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-scom.yaml
Documentation/devicetree/bindings/fsi/ibm,p9-scom.yaml new file +37 -0
new file mode 100644
index 0000000000000..8cd14a70bedf9
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/ibm,p9-scom.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM FSI-attached SCOM engine
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description:
+  The SCOM engine is an interface to the POWER processor PIB (Pervasive
+  Interconnect Bus). This node will always be a child of an FSI CFAM node.
+
+properties:
+  compatible:
+    enum:
+      - ibm,p9-scom
+      - ibm,i2cr-scom
+
+  reg:
+    items:
+      - description: FSI slave address
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    scom@1000 {
+        compatible = "ibm,p9-scom";
+        reg = <0x1000 0x400>;
+    };
Signature · 1 line
2.39.3
author maintainer
#9 lore raw

PATCH v5 4/9 dt-bindings: fsi: Document the IBM SBEFIFO engine

In reply to Eddie James

The SBEFIFO engine provides an interface to the POWER processor Self Boot Engine (SBE).

---
Changes since v4:
- Drop pattern properties for occ node

 .../bindings/fsi/ibm,p9-sbefifo.yaml          | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-sbefifo.yaml
Documentation/devicetree/bindings/fsi/ibm,p9-sbefifo.yaml new file +46 -0
new file mode 100644
index 0000000000000..3cd966fb3c0df
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/ibm,p9-sbefifo.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM FSI-attached SBEFIFO engine
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description:
+  The SBEFIFO is an FSI CFAM engine that provides an interface to the
+  POWER processor Self Boot Engine (SBE). This node will always be a child
+  of an FSI CFAM node.
+
+properties:
+  compatible:
+    enum:
+      - ibm,p9-sbefifo
+      - ibm,odyssey-sbefifo
+
+  reg:
+    items:
+      - description: FSI slave address
+
+  occ:
+    type: object
+    $ref: ibm,p9-occ.yaml#
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    fsi-slave-engine@2400 {
+        compatible = "ibm,p9-sbefifo";
+        reg = <0x2400 0x400>;
+
+        occ {
+            compatible = "ibm,p9-occ";
+        };
+    };
Signature · 1 line
2.39.3
author maintainer
#1 lore raw

PATCH v5 1/9 dt-bindings: fsi: fsi2spi: Document SPI controller child nodes

In reply to Eddie James

The FSI2SPI bridge has several SPI controllers behind it, which should be documented. Also, therefore the node needs to specify address and size cells.

---
Depends on https://lore.kernel.org/all/[email protected]/

 .../devicetree/bindings/fsi/ibm,fsi2spi.yaml  | 36 ++++++++++++++++---
 1 file changed, 32 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +32 -4
index e2ca0b0004714..ad5c83f484255 100644
@@ -9,11 +9,10 @@ title: IBM FSI-attached SPI controllers
 maintainers:
   - Eddie James <[email protected]>
 
-description: |
+description:
   This binding describes an FSI CFAM engine called the FSI2SPI. Therefore this
-  node will always be a child of an FSI CFAM node; see fsi.txt for details on
-  FSI slave and CFAM nodes. This FSI2SPI engine provides access to a number of
-  SPI controllers.
+  node will always be a child of an FSI CFAM node. This FSI2SPI engine provides
+  access to a number of SPI controllers.
 
 properties:
   compatible:
@@ -24,6 +23,17 @@ properties:
     items:
       - description: FSI slave address
 
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^spi@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/spi/ibm,spi-fsi.yaml
+
 required:
   - compatible
   - reg
@@ -35,4 +45,22 @@ examples:
     fsi2spi@1c00 {
         compatible = "ibm,fsi2spi";
         reg = <0x1c00 0x400>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        spi@0 {
+            compatible = "ibm,spi-fsi";
+            reg = <0>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            eeprom@0 {
+                compatible = "atmel,at25";
+                reg = <0>;
+                address-width = <24>;
+                pagesize = <256>;
+                size = <0x80000>;
+                spi-max-frequency = <1000000>;
+            };
+        };
     };
Signature · 1 line
2.39.3
author maintainer
#7 lore raw

PATCH v5 3/9 dt-bindings: fsi: p9-occ: Convert to json-schema

In reply to Eddie James

Conver to json-schema for the OCC documentation. Also document the fact that the OCC "bridge" device will often have the hwmon node as a child.

---
Changes since v4:
- Drop pattern properties for hwmon node

 .../devicetree/bindings/fsi/ibm,p9-occ.txt    | 16 --------
 .../devicetree/bindings/fsi/ibm,p9-occ.yaml   | 40 +++++++++++++++++++
 2 files changed, 40 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-occ.txt
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-occ.yaml
Documentation/devicetree/bindings/fsi/ibm,p9-occ.txt deleted +0 -16
deleted file mode 100644
index e73358075a903..0000000000000
@@ -1,16 +0,0 @@
-Device-tree bindings for FSI-attached POWER9/POWER10 On-Chip Controller (OCC)
------------------------------------------------------------------------------
-
-This is the binding for the P9 or P10 On-Chip Controller accessed over FSI from
-a service processor. See fsi.txt for details on bindings for FSI slave and CFAM
-nodes. The OCC is not an FSI slave device itself, rather it is accessed
-through the SBE FIFO.
-
-Required properties:
- - compatible = "ibm,p9-occ" or "ibm,p10-occ"
-
-Examples:
-
-    occ {
-        compatible = "ibm,p9-occ";
-    };
Documentation/devicetree/bindings/fsi/ibm,p9-occ.yaml new file +40 -0
new file mode 100644
index 0000000000000..537eac70447c0
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/ibm,p9-occ.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM FSI-attached On-Chip Controller (OCC)
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description:
+  The POWER processor On-Chip Controller (OCC) helps manage power and
+  thermals for the system, accessed through the FSI-attached SBEFIFO
+  from a service processor.
+
+properties:
+  compatible:
+    enum:
+      - ibm,p9-occ
+      - ibm,p10-occ
+
+  hwmon:
+    type: object
+    $ref: /schemas/hwmon/ibm,occ-hwmon.yaml
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    occ {
+        compatible = "ibm,p9-occ";
+
+        hwmon {
+            compatible = "ibm,p9-occ-hwmon";
+        };
+    };
Signature · 1 line
2.39.3
author maintainer
#17 lore raw

PATCH v5 6/9 dt-bindings: fsi: ibm,i2cr-fsi-master: Reference common FSI controller

In reply to Eddie James

Remove the common properties from the I2CR documentation and instead point to the common FSI controller documentation.

---
 .../devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml         | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml +4 -1
index 442cecdc57cb1..e49ace3ca339f 100644
@@ -26,7 +26,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: fsi-controller.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 1 line
2.39.3
author maintainer
#23 lore raw

PATCH v5 8/9 dt-bindings: fsi: Document the AST2700 FSI master

In reply to Eddie James

Add the appropriate compatible string.

---
 .../devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml       | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml +1 -0
index 2f531c47994bc..fcf7c4b93b78e 100644
@@ -17,6 +17,7 @@ properties:
   compatible:
     enum:
       - aspeed,ast2600-fsi-master
+      - aspeed,ast2700-fsi-master
 
   reg:
     maxItems: 1
Signature · 1 line
2.39.3
author maintainer
#18 lore raw

PATCH v5 7/9 dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema

In reply to Eddie James

Convert to json-schema for the AST2600 FSI master documentation.

---
Changes since v4:
- Remove the addition of the AST2700 compatible

 .../fsi/aspeed,ast2600-fsi-master.yaml        | 80 +++++++++++++++++++
 .../bindings/fsi/fsi-master-aspeed.txt        | 36 ---------
 2 files changed, 80 insertions(+), 36 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml
 delete mode 100644 Documentation/devicetree/bindings/fsi/fsi-master-aspeed.txt
Documentation/devicetree/bindings/fsi/aspeed,ast2600-fsi-master.yaml new file +80 -0
new file mode 100644
index 0000000000000..2f531c47994bc
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Aspeed FSI master
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description:
+  The AST2600 and later contain two identical FSI masters. They share a
+  clock and have a separate interrupt line and output pins.
+
+properties:
+  compatible:
+    enum:
+      - aspeed,ast2600-fsi-master
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  cfam-reset-gpios:
+    maxItems: 1
+    description:
+      Output GPIO pin for CFAM reset
+
+  fsi-routing-gpios:
+    maxItems: 1
+    description:
+      Output GPIO pin for setting the FSI mux (internal or cabled)
+
+  fsi-mux-gpios:
+    maxItems: 1
+    description:
+      Input GPIO pin for detecting the desired FSI mux state
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+allOf:
+  - $ref: fsi-controller.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/ast2600-clock.h>
+    #include <dt-bindings/gpio/aspeed-gpio.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    fsi-master@1e79b000 {
+        compatible = "aspeed,ast2600-fsi-master";
+        reg = <0x1e79b000 0x94>;
+        #address-cells = <2>;
+        #size-cells = <0>;
+        interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_fsi1_default>;
+        clocks = <&syscon ASPEED_CLK_GATE_FSICLK>;
+        fsi-routing-gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_HIGH>;
+        fsi-mux-gpios = <&gpio0 ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>;
+        cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
+
+        cfam@0,0 {
+            reg = <0 0>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            chip-id = <0>;
+        };
+    };
Documentation/devicetree/bindings/fsi/fsi-master-aspeed.txt deleted +0 -36
deleted file mode 100644
index 9853fefff5d83..0000000000000
@@ -1,36 +0,0 @@
-Device-tree bindings for AST2600 FSI master
--------------------------------------------
-
-The AST2600 contains two identical FSI masters. They share a clock and have a
-separate interrupt line and output pins.
-
-Required properties:
- - compatible: "aspeed,ast2600-fsi-master"
- - reg: base address and length
- - clocks: phandle and clock number
- - interrupts: platform dependent interrupt description
- - pinctrl-0: phandle to pinctrl node
- - pinctrl-names: pinctrl state
-
-Optional properties:
- - cfam-reset-gpios: GPIO for CFAM reset
-
- - fsi-routing-gpios: GPIO for setting the FSI mux (internal or cabled)
- - fsi-mux-gpios: GPIO for detecting the desired FSI mux state
-
-
-Examples:
-
-    fsi-master {
-        compatible = "aspeed,ast2600-fsi-master", "fsi-master";
-        reg = <0x1e79b000 0x94>;
-	interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fsi1_default>;
-	clocks = <&syscon ASPEED_CLK_GATE_FSICLK>;
-
-	fsi-routing-gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_HIGH>;
-	fsi-mux-gpios = <&gpio0 ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>;
-
-	cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
-    };
Signature · 1 line
2.39.3
author maintainer
#10 lore raw

PATCH v5 5/9 dt-bindings: fsi: Document the FSI controller common properties

In reply to Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

 .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +66 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000
+
+  interrupt-controller: true
+
+  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, a global unique chip ID which is used to identify
+          the physical location of the chip in a system specific way.
+
+      clock-frequency:
+        minimum: 1
+        maximum: 100000000
+
+      reg:
+        maxItems: 1
+
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 1
+
+    required:
+      - reg
+
+    additionalProperties: true
+
+additionalProperties: true
Signature · 1 line
2.39.3
author maintainer
#25 lore raw

PATCH v5 9/9 dt-bindings: fsi: Document the FSI Hub Controller

In reply to Eddie James

Document the FSI Hub Controller CFAM engine.

---
 .../bindings/fsi/ibm,p9-fsi-controller.yaml   | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-fsi-controller.yaml
Documentation/devicetree/bindings/fsi/ibm,p9-fsi-controller.yaml new file +45 -0
new file mode 100644
index 0000000000000..29ea80ff915ef
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/ibm,p9-fsi-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM FSI-attached FSI Hub Controller
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description:
+  The FSI Hub Controller is an FSI controller, providing a number of FSI links,
+  located on a CFAM. Therefore this node will always be a child of an FSI CFAM
+  node.
+
+properties:
+  compatible:
+    enum:
+      - ibm,p9-fsi-controller
+
+  reg:
+    items:
+      - description: FSI slave address
+
+allOf:
+  - $ref: fsi-controller.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    fsi@3400 {
+        compatible = "ibm,p9-fsi-controller";
+        reg = <0x3400 0x400>;
+        #address-cells = <2>;
+        #size-cells = <0>;
+
+        cfam@0,0 {
+            reg = <0 0>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            chip-id = <0>;
+        };
+    };
Signature · 1 line
2.39.3
#2 lore raw

Re: [PATCH v5 1/9] dt-bindings: fsi: fsi2spi: Document SPI controller child nodes

In reply to Eddie James
Quoted 4 lines · Eddie James

The FSI2SPI bridge has several SPI controllers behind it, which should be documented. Also, therefore the node needs to specify address and size cells.

Quoted 8 lines

---
Depends on https://lore.kernel.org/all/[email protected]/

 .../devicetree/bindings/fsi/ibm,fsi2spi.yaml  | 36 ++++++++++++++++---
 1 file changed, 32 insertions(+), 4 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml:
Error in referenced schema matching $id: http://devicetree.org/schemas/spi/ibm,spi-fsi.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.example.dtb: fsi2spi@1c00: spi@0: False schema does not allow {'compatible': ['ibm,spi-fsi'], 'reg': [[0]], '#address-cells': [[1]], '#size-cells': [[0]], 'eeprom@0': {'compatible': ['atmel,at25'], 'reg': [[0]], 'address-width': [[24]], 'pagesize': [[256]], 'size': [[524288]], 'spi-max-frequency': [[1000000]]}}
from schema $id: http://devicetree.org/schemas/fsi/ibm,fsi2spi.yaml#
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.example.dtb: /example-0/fsi2spi@1c00/spi@0: failed to match any schema with compatible: ['ibm,spi-fsi']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

#3 lore raw

Re: [PATCH v5 1/9] dt-bindings: fsi: fsi2spi: Document SPI controller child nodes

In reply to Eddie James
Quoted 6 lines · Eddie James

properties:
compatible:

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +0 -0
@@ -24,6 +23,17 @@ properties:
     items:
       - description: FSI slave address
 

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml properties: · line 35

Quoted 10 lines
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +10 -0
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^spi@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/spi/ibm,spi-fsi.yaml

Are you sure you do not have dependencies? Nothing was explained about this in the cover letter or changelog.

Best regards,
Krzysztof

Reviewed-by on v5 3/9
#8 lore raw

Re: [PATCH v5 3/9] dt-bindings: fsi: p9-occ: Convert to json-schema

In reply to Eddie James
Quoted 9 lines · Eddie James

Conver to json-schema for the OCC documentation. Also document the fact that the OCC "bridge" device will often have the hwmon node as a child.

---
Changes since v4:
- Drop pattern properties for hwmon node

Best regards,
Krzysztof

author maintainer
#4 lore raw

Re: [PATCH v5 1/9] dt-bindings: fsi: fsi2spi: Document SPI controller child nodes

In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski
Quoted 6 lines · Eddie James

properties:
compatible:

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +0 -0
@@ -24,6 +23,17 @@ properties:
      items:
        - description: FSI slave address
 
Quoted 12 lines

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml properties: · line 35

Quoted 10 lines
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +10 -0
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^spi@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/spi/ibm,spi-fsi.yaml

Are you sure you do not have dependencies? Nothing was explained about this in the cover letter or changelog.

I did mention that it depends on the SPI binding change below the commit message in this patch. I guess I should have kept these two together...

Thanks,

Eddie

Quoted 4 lines

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v5 1/9] dt-bindings: fsi: fsi2spi: Document SPI controller child nodes

Quoted 24 lines · Eddie James
Quoted 8 lines · Krzysztof Kozlowski
Quoted 6 lines · Eddie James

properties:
compatible:

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +0 -0
@@ -24,6 +23,17 @@ properties:
      items:
        - description: FSI slave address
 
Quoted 12 lines

Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml properties: · line 35

Quoted 10 lines
Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml +10 -0
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^spi@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/spi/ibm,spi-fsi.yaml

Are you sure you do not have dependencies? Nothing was explained about this in the cover letter or changelog.

Quoted 2 lines

I did mention that it depends on the SPI binding change below the commit message in this patch. I guess I should have kept these two together...

Ah, I missed that. Yeah, you must keep them together or wait one more cycle... Just test bisectability of your patchset.

Best regards,
Krzysztof

#11 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

In reply to Eddie James
Quoted 40 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

 .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +19 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +10 -0
+
+  "#size-cells":
+    const: 0
+
+  '#interrupt-cells':
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

Quoted 11 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +11 -0
+
+  interrupt-controller: true
+
+  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

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 50

Quoted 10 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +10 -0
+    properties:
+      chip-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Processor index, a global unique chip ID which is used to identify
+          the physical location of the chip in a system specific way.
+
+      clock-frequency:
+        minimum: 1
+        maximum: 100000000

Same question.

Best regards,
Krzysztof

#19 lore raw

Re: [PATCH v5 7/9] dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema

In reply to Eddie James
Quoted 1 line · Eddie James

Convert to json-schema for the AST2600 FSI master documentation.

Nothing explains dropping fsi-master compatible. Every deviation from conversion should be explained in the commit msg. Otherwise it is not conversion but a change...

Quoted 5 lines

---
Changes since v4:
- Remove the addition of the AST2700 compatible

Best regards,
Krzysztof

author maintainer
#20 lore raw

Re: [PATCH v5 7/9] dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema

In reply to Krzysztof Kozlowski
Quoted 5 lines · Krzysztof Kozlowski
Quoted 1 line · Eddie James

Convert to json-schema for the AST2600 FSI master documentation.

Nothing explains dropping fsi-master compatible. Every deviation from conversion should be explained in the commit msg. Otherwise it is not conversion but a change...

The fsi-master compatible was not in the previous documentation. It was in the example, not in the description of what compatible strings are allowed, so this is a pure conversion.

Thanks,

Eddie

Quoted 9 lines
Quoted 6 lines

---
Changes since v4:
- Remove the addition of the AST2700 compatible

Best regards,
Krzysztof

author maintainer
#12 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

In reply to Krzysztof Kozlowski
Quoted 46 lines · Krzysztof Kozlowski
Quoted 45 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

  .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
  1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +24 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
Quoted 8 lines

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 5 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +5 -0
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

OK, is there some document that describes what properties are deprecated? Because it's used all over the place in the bindings. Anyway I need this property, I can rename it if you like. I can also update the commit message to indicate that I'm adding it.

Thanks,

Eddie

Quoted 28 lines
Quoted 12 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +11 -0
+
+  interrupt-controller: true
+
+  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

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 50

Quoted 10 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +10 -0
+    properties:
+      chip-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Processor index, a global unique chip ID which is used to identify
+          the physical location of the chip in a system specific way.
+
+      clock-frequency:
+        minimum: 1
+        maximum: 100000000

Same question.

Best regards,
Krzysztof

#21 lore raw

Re: [PATCH v5 7/9] dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema

In reply to Eddie James
Quoted 4 lines · Eddie James
Quoted 2 lines · Krzysztof Kozlowski
Quoted 1 line · Eddie James

Convert to json-schema for the AST2600 FSI master documentation.

Quoted 9 lines
Quoted 3 lines

Nothing explains dropping fsi-master compatible. Every deviation from conversion should be explained in the commit msg. Otherwise it is not conversion but a change...

The fsi-master compatible was not in the previous documentation. It was in the example, not in the description of what compatible strings are allowed, so this is a pure conversion.

Hm, indeed. Still could be mentioned, but it's also fine.

Best regards,
Krzysztof

#13 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

In reply to Eddie James
Quoted 58 lines · Eddie James
Quoted 46 lines · Krzysztof Kozlowski
Quoted 45 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

  .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
  1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +24 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
Quoted 8 lines

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 5 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +5 -0
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

Quoted 2 lines

OK, is there some document that describes what properties are deprecated? Because it's used all over the place in the bindings. Anyway

dtschema: dtschema/schemas/clock/clock.yaml

buses anyway should use bus-frequency but it is also legacy one.

Quoted 1 line

I need this property, I can rename it if you like. I can also update the

Why do you need it? Why clocks cannot be chosen by drivers and initial state selected by assigned-clock-rates?

Quoted 1 line

commit message to indicate that I'm adding it.

Best regards,
Krzysztof

author maintainer
#14 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

Quoted 59 lines · Krzysztof Kozlowski
Quoted 56 lines · Eddie James
Quoted 46 lines · Krzysztof Kozlowski
Quoted 45 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

   .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
   1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +24 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
Quoted 8 lines

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 5 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +5 -0
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

Quoted 2 lines

OK, is there some document that describes what properties are deprecated? Because it's used all over the place in the bindings. Anyway

Quoted 7 lines

dtschema: dtschema/schemas/clock/clock.yaml

buses anyway should use bus-frequency but it is also legacy one.

Quoted 1 line

I need this property, I can rename it if you like. I can also update the

Why do you need it? Why clocks cannot be chosen by drivers and initial state selected by assigned-clock-rates?

Well, I could use assigned-clock-rates, though it seems like I'd then have to implement the clock provider framework for both the FSI controller driver and the CFAM driver, which is a lot of extra work. FSI controller isn't really a clock provider, it's a bus like i2c (which uses clock-frequency), so it doesn't quite fit in my opinion...

Thanks for your detailed review Krzysztof,

Eddie

Quoted 8 lines
Quoted 3 lines

commit message to indicate that I'm adding it.

Best regards,
Krzysztof

#15 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

Quoted 70 lines · Eddie James
Quoted 59 lines · Krzysztof Kozlowski
Quoted 56 lines · Eddie James
Quoted 46 lines · Krzysztof Kozlowski
Quoted 45 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

   .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
   1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +24 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
Quoted 8 lines

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 5 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +5 -0
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

Quoted 2 lines

OK, is there some document that describes what properties are deprecated? Because it's used all over the place in the bindings. Anyway

Quoted 7 lines

dtschema: dtschema/schemas/clock/clock.yaml

buses anyway should use bus-frequency but it is also legacy one.

Quoted 1 line

I need this property, I can rename it if you like. I can also update the

Why do you need it? Why clocks cannot be chosen by drivers and initial state selected by assigned-clock-rates?

Quoted 5 lines

Well, I could use assigned-clock-rates, though it seems like I'd then have to implement the clock provider framework for both the FSI controller driver and the CFAM driver, which is a lot of extra work. FSI controller isn't really a clock provider, it's a bus like i2c (which uses clock-frequency), so it doesn't quite fit in my opinion...

OK, it's fine in such case.

Best regards,
Krzysztof

maintainer
#16 lore raw

Re: [PATCH v5 5/9] dt-bindings: fsi: Document the FSI controller common properties

In reply to Eddie James
Quoted 70 lines · Eddie James
Quoted 59 lines · Krzysztof Kozlowski
Quoted 56 lines · Eddie James
Quoted 46 lines · Krzysztof Kozlowski
Quoted 45 lines · Eddie James

Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation.

---
Changes since v4:
- Add interrupt controller properties
- Add clock-frequency property to FSI controller and CFAM
- Add detail to chip-id property description

   .../bindings/fsi/fsi-controller.yaml          | 66 +++++++++++++++++++
   1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/fsi/fsi-controller.yaml

Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +24 -0
new file mode 100644
index 0000000000000..8620e4da6de77
@@ -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 <[email protected]>
+
+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
+
+  '#interrupt-cells':
Quoted 8 lines

Documentation/devicetree/bindings/fsi/fsi-controller.yaml line 29

Quoted 5 lines
Documentation/devicetree/bindings/fsi/fsi-controller.yaml new file +5 -0
+    const: 1
+
+  clock-frequency:
+    minimum: 1
+    maximum: 200000000

This is a deprecated property in general. Why did it appear? It does not exist in current bindings and nothing in commit msg suggests changes in the bindings themselves.

Quoted 2 lines

OK, is there some document that describes what properties are deprecated? Because it's used all over the place in the bindings. Anyway

Quoted 7 lines

dtschema: dtschema/schemas/clock/clock.yaml

buses anyway should use bus-frequency but it is also legacy one.

Quoted 1 line

I need this property, I can rename it if you like. I can also update the

Why do you need it? Why clocks cannot be chosen by drivers and initial state selected by assigned-clock-rates?

Quoted 5 lines

Well, I could use assigned-clock-rates, though it seems like I'd then have to implement the clock provider framework for both the FSI controller driver and the CFAM driver, which is a lot of extra work. FSI controller isn't really a clock provider, it's a bus like i2c (which uses clock-frequency), so it doesn't quite fit in my opinion...

'clock-frequency' was used for I2C, but it really should have been 'bus-frequency' as it is frequency of the bus rather than input frequency to the controller. So if this is bus frequency, use 'bus-frequency'.

Rob