Skip to contentSkip to conversation

dt-bindings: spi: brcm,bcm2835-spi: convert to dtschema

PATCH Superseded Kanak Shilledar 2 participants 3 messages May 11, 2024 – May 13, 2024

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: spi: brcm,bcm2835-spi: convert to dtschema

Convert the Broadcom BCM2835 SPI0 controller to newer DT schema. Created DT schema based on the .txt file which had comaptible, reg, interrupts, clocks as required properties.
Added GPL-2.0 OR BSD-2-Clause License

---
Changes in v2:
- Updated the maintainers

---
 .../bindings/spi/brcm,bcm2835-spi.txt         | 23 ---------
 .../bindings/spi/brcm,bcm2835-spi.yaml        | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt
 create mode 100644 Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml
Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt deleted +0 -23
deleted file mode 100644
index 3d55dd64b1be..000000000000
@@ -1,23 +0,0 @@
-Broadcom BCM2835 SPI0 controller
-
-The BCM2835 contains two forms of SPI master controller, one known simply as
-SPI0, and the other known as the "Universal SPI Master"; part of the
-auxiliary block. This binding applies to the SPI0 controller.
-
-Required properties:
-- compatible: Should be one of "brcm,bcm2835-spi" for BCM2835/2836/2837 or
-  "brcm,bcm2711-spi" for BCM2711 or "brcm,bcm7211-spi" for BCM7211.
-- reg: Should contain register location and length.
-- interrupts: Should contain interrupt.
-- clocks: The clock feeding the SPI controller.
-
-Example:
-
-spi@20204000 {
-	compatible = "brcm,bcm2835-spi";
-	reg = <0x7e204000 0x1000>;
-	interrupts = <2 22>;
-	clocks = <&clk_spi>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-};
Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 18 lines · Kanak Shilledar
Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml new file +10 -0
new file mode 100644
index 000000000000..94da68792194
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/brcm,bcm2835-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 SPI0 controller
+
+maintainers:
+  - Florian Fainelli <[email protected]>
Quoted 2 lines

+ - Kanak Shilledar <[email protected]>

Why didn't you use protonmail for both?

Otherwise, this looks fine.

Thanks,
Conor.

Quoted 42 lines
Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml new file +39 -0
+  - Stefan Wahren <[email protected]>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-spi
+      - brcm,bcm2711-spi
+      - brcm,bcm7211-spi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi@20204000 {
+        compatible = "brcm,bcm2835-spi";
+        reg = <0x7e204000 0x1000>;
+        interrupts = <2 22>;
+        clocks = <&clk_spi>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+    };
Signature · 1 line
2.34.1
#2 lore raw
Quoted 19 lines · Conor Dooley
Quoted 16 lines · Kanak Shilledar
Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.yaml new file +10 -0
new file mode 100644
index 000000000000..94da68792194
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/brcm,bcm2835-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 SPI0 controller
+
+maintainers:
+  - Florian Fainelli <[email protected]>
Quoted 6 lines
Quoted 2 lines

+ - Kanak Shilledar <[email protected]>

Why didn't you use protonmail for both?

Otherwise, this looks fine.

Ordinarily, I'd not care, but given it's proton I have an ulterior motive :)