[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240129031239.17037-3-william.qiu@starfivetech.com>
Date: Mon, 29 Jan 2024 11:12:37 +0800
From: William Qiu <william.qiu@...rfivetech.com>
To: devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-can@...r.kernel.org
Cc: Emil Renner Berthing <kernel@...il.dk>,
Rob Herring <robh+dt@...nel.org>,
Wolfgang Grandegger <wg@...ndegger.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Marc Kleine-Budde <mkl@...gutronix.de>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
William Qiu <william.qiu@...rfivetech.com>
Subject: [PATCH v1 2/4] dt-bindings: can: Add bindings for CAST CAN Controller
Add bindings for CAST CAN Controller
Signed-off-by: William Qiu <william.qiu@...rfivetech.com>
---
.../devicetree/bindings/net/can/cast,can.yaml | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/can/cast,can.yaml
diff --git a/Documentation/devicetree/bindings/net/can/cast,can.yaml b/Documentation/devicetree/bindings/net/can/cast,can.yaml
new file mode 100644
index 000000000000..ea52132d9b1c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/cast,can.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/cast,can.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CAST CAN controller
+
+maintainers:
+ - William Qiu <william.qiu@...rfivetech.com>
+
+allOf:
+ - $ref: can-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,can
+ then:
+ required:
+ - starfive,syscon
+
+properties:
+ compatible:
+ enum:
+ - cast,can
+ - cast,canfd
+ - starfive,can
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 3
+
+ clock-names:
+ items:
+ - const: apb_clk
+ - const: timer_clk
+ - const: can_clk
+
+ resets:
+ minItems: 3
+
+ reset-names:
+ items:
+ - const: rst_apb
+ - const: rst_core
+ - const: rst_timer
+
+ starfive,syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to System Register Controller syscon node
+ - description: offset of SYS_SYSCON_NE__SAIF__SYSCFG register for CAN controller
+ - description: shift of SYS_SYSCON_NE__SAIF__SYSCFG register for CAN controller
+ - description: mask of SYS_SYSCON_NE__SAIF__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_SYSCON_NE__SAIF__SYSCFG register
+ for CAN controller.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+
+additionalProperties: false
+
+examples:
+ - |
+ can@...d0000{
+ compatible = "starfive,can";
+ reg = <0x130d0000 0x1000>;
+ interrupts = <112>;
+ clocks = <&syscrg 115>,
+ <&syscrg 116>,
+ <&syscrg 117>;
+ clock-names = "apb_clk", "timer_clk", "can_clk";
+ resets = <&syscrg 111>,
+ <&syscrg 112>,
+ <&syscrg 113>;
+ reset-names = "rst_apb", "rst_core", "rst_timer";
+ starfive,syscon = <&sys_syscon 0x10 0x3 0x8>;
+ };
+
+...
--
2.34.1
Powered by blists - more mailing lists