[PATCH v2 2/4] dt-bindings: can: Add CAST CAN Bus Controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: William Qiu <william.qiu@xxxxxxxxxxxxxxxx>

Add bindings for CAST CAN Bus Controller.

Signed-off-by: William Qiu <william.qiu@xxxxxxxxxxxxxxxx>
Signed-off-by: Hal Feng <hal.feng@xxxxxxxxxxxxxxxx>
---
 .../bindings/net/can/cast,can-ctrl.yaml       | 106 ++++++++++++++++++
 1 file changed, 106 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/cast,can-ctrl.yaml

diff --git a/Documentation/devicetree/bindings/net/can/cast,can-ctrl.yaml b/Documentation/devicetree/bindings/net/can/cast,can-ctrl.yaml
new file mode 100644
index 000000000000..2870cff80164
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/cast,can-ctrl.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/cast,can-ctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CAST CAN Bus Controller
+
+description:
+  This CAN Bus Controller, also called CAN-CTRL, implements a highly
+  featured and reliable CAN bus controller that performs serial
+  communication according to the CAN protocol.
+
+  The CAN-CTRL comes in three variants, they are CC, FD, and XL.
+  The CC variant supports only Classical CAN, the FD variant adds support
+  for CAN FD, and the XL variant supports the Classical CAN, CAN FD, and
+  CAN XL standards.
+
+maintainers:
+  - William Qiu <william.qiu@xxxxxxxxxxxxxxxx>
+  - Hal Feng <hal.feng@xxxxxxxxxxxxxxxx>
+
+properties:
+  compatible:
+    items:
+      - enum:
+        - starfive,jh7110-can
+      - const: cast,can-ctrl-fd-7x10N00S00
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 3
+
+  clock-names:
+    items:
+      - const: apb
+      - const: timer
+      - const: core
+
+  resets:
+    minItems: 3
+
+  reset-names:
+    items:
+      - const: apb
+      - const: timer
+      - const: core
+
+  starfive,syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      - items:
+          - description: phandle to System Register Controller syscon node
+          - description: offset of SYS_SYSCONSAIF__SYSCFG register for CAN controller
+          - description: shift of SYS_SYSCONSAIF__SYSCFG register for CAN controller
+          - description: mask of SYS_SYSCONSAIF__SYSCFG register for CAN controller
+    description:
+      Should be four parameters, the phandle to System Register Controller
+      syscon node and the offset/shift/mask of SYS_SYSCONSAIF__SYSCFG register
+      for CAN controller.
+
+allOf:
+  - $ref: can-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: starfive,jh7110-can
+    then:
+      required:
+        - starfive,syscon
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+examples:
+  - |
+    can@130d0000{
+        compatible = "starfive,jh7110-can", "cast,can-ctrl-fd-7x10N00S00";
+        reg = <0x130d0000 0x1000>;
+        interrupts = <112>;
+        clocks = <&syscrg 115>,
+                 <&syscrg 116>,
+                 <&syscrg 117>;
+        clock-names = "apb", "timer", "core";
+        resets = <&syscrg 111>,
+                 <&syscrg 113>,
+                 <&syscrg 112>;
+        reset-names = "apb", "timer", "core";
+        starfive,syscon = <&sys_syscon 0x10 0x3 0x8>;
+    };
+
+...
-- 
2.43.2





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux