Skip to contentSkip to conversation

spi: dt-bindings: ti,qspi: convert to dtschema

PATCH In review Kousik Sanagavarapu 3 participants 3 messages May 1, 2024 – May 6, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 spi: dt-bindings: ti,qspi: convert to dtschema

Convert txt binding of TI's qspi controller (found on their omap SoCs) to dtschema to allow for validation.

The changes, w.r.t. the original txt binding, are:

- Introduce "clocks" and "clock-names" which was never mentioned.
- Reflect that "ti,hwmods" is deprecated and is not a "required" property anymore.
- Introduce "num-cs" which allows for setting the number of chip selects.
- Drop "qspi_ctrlmod".

---
Changes since v1:
- Removed a redundant paragraph in the commit message.
- Mention that we are dropping "qspi_ctrlmod", which I forgot to do in the last iteration.

Changes since v2:
- Don't make "num-cs" an array.
- The max number of syscon-chipselects is now 1.
- Make the unit-address in the example right.
- Fix a typo in "syscon-chipselects"'s description.

 .../devicetree/bindings/spi/ti,qspi.yaml      | 96 +++++++++++++++++++
 .../devicetree/bindings/spi/ti_qspi.txt       | 53 ----------
 2 files changed, 96 insertions(+), 53 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/ti,qspi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/ti_qspi.txt
Documentation/devicetree/bindings/spi/ti,qspi.yaml new file +96 -0
new file mode 100644
index 000000000000..626a915b3d77
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/ti,qspi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI QSPI controller
+
+maintainers:
+  - Kousik Sanagavarapu <[email protected]>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ti,am4372-qspi
+      - ti,dra7xxx-qspi
+
+  reg:
+    items:
+      - description: base registers
+      - description: mapped memory
+
+  reg-names:
+    items:
+      - const: qspi_base
+      - const: qspi_mmap
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: fck
+
+  interrupts:
+    maxItems: 1
+
+  num-cs:
+    minimum: 1
+    maximum: 4
+    default: 1
+
+  ti,hwmods:
+    description:
+      Name of the hwmod associated to the QSPI.  This is for legacy
+      platforms only.
+    $ref: /schemas/types.yaml#/definitions/string
+    deprecated: true
+
+  syscon-chipselects:
+    description:
+      Handle to system control region containing QSPI chipselect register
+      and offset of that register.
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      - items:
+          - description: phandle to system control register
+          - description: register offset
+
+  spi-max-frequency:
+    description: Maximum SPI clocking speed of the controller in Hz.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/dra7.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    spi@4b300000 {
+        compatible = "ti,dra7xxx-qspi";
+        reg = <0x4b300000 0x100>,
+              <0x5c000000 0x4000000>;
+        reg-names = "qspi_base", "qspi_mmap";
+        syscon-chipselects = <&scm_conf 0x558>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        clocks = <&l4per2_clkctrl DRA7_L4PER2_QSPI_CLKCTRL 25>;
+        clock-names = "fck";
+        num-cs = <4>;
+        spi-max-frequency = <48000000>;
+        interrupts = <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>;
+    };
+...
Documentation/devicetree/bindings/spi/ti_qspi.txt deleted +0 -53

53 lines not on this page · raw message

Signature · 1 line
2.45.0.rc1.8.ge326e52010
Reviewed-by on v3 1/1
#1 lore raw
Quoted 5 lines · Kousik Sanagavarapu

Convert txt binding of TI's qspi controller (found on their omap SoCs) to dtschema to allow for validation.

The changes, w.r.t. the original txt binding, are:

Quoted 8 lines

- Introduce "clocks" and "clock-names" which was never mentioned.
- Reflect that "ti,hwmods" is deprecated and is not a "required" property anymore.
- Introduce "num-cs" which allows for setting the number of chip selects.
- Drop "qspi_ctrlmod".

Best regards,
Krzysztof

maintainer
#2 lore raw
In reply to Kousik Sanagavarapu
Quoted 5 lines · Kousik Sanagavarapu

Convert txt binding of TI's qspi controller (found on their omap SoCs) to dtschema to allow for validation.

The changes, w.r.t. the original txt binding, are:

Quoted 8 lines

- Introduce "clocks" and "clock-names" which was never mentioned.
- Reflect that "ti,hwmods" is deprecated and is not a "required" property anymore.
- Introduce "num-cs" which allows for setting the number of chip selects.
- Drop "qspi_ctrlmod".

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: dt-bindings: ti,qspi: convert to dtschema

      commit: c24d340598ed535d3bb6f5e64c544cad4ab2b67b

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark