[PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema
From: Quchaosheng <hidden>
Date: 2026-09-14 03:02:31
Also in:
linux-can
Subsystem:
can network drivers, open firmware and flattened device tree bindings, the rest · Maintainers:
Marc Kleine-Budde, Vincent Mailhol, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds
Convert the Holt HI-311X stand-alone CAN controller binding from free-form text to DT schema, and reference the common can-controller.yaml schema. The old text listed clocks as required, but the driver obtains the clock with devm_clk_get_optional() and falls back to the "clock-frequency" property when no clock is provided, so either one of the two must be present and neither is required on its own. This is expressed with an anyOf block, and clock-frequency is documented, as it was previously undocumented. The maximum supported clock frequency of 40000000 is also documented, as that is the limit the driver enforces. unevaluatedProperties is used rather than additionalProperties so that properties provided by can-controller.yaml, such as termination-gpios, remain usable. Signed-off-by: Quchaosheng <redacted> --- .../bindings/net/can/holt,hi311x.yaml | 80 +++++++++++++++++++ .../bindings/net/can/holt_hi311x.txt | 23 ------ 2 files changed, 80 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/holt,hi311x.yaml delete mode 100644 Documentation/devicetree/bindings/net/can/holt_hi311x.txt
diff --git a/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
new file mode 100644
index 000000000..8c433fcac
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml@@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/holt,hi311x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Holt HI-311X stand-alone CAN controller + +maintainers: + - Marc Kleine-Budde <mkl@pengutronix.de> + +description: + The Holt HI-3110 is a stand-alone CAN controller with an SPI interface. + +allOf: + - $ref: can-controller.yaml# + +properties: + compatible: + const: holt,hi3110 + + reg: + description: SPI chip select. + maxItems: 1 + + clocks: + description: + The clock feeding the CAN controller. If this property is not present + clock-frequency must be specified instead. + maxItems: 1 + + clock-frequency: + description: + Frequency of the clock feeding the CAN controller, in Hz. Used when + no clocks property is provided. The maximum supported frequency is + 40000000. + $ref: /schemas/types.yaml#/definitions/uint32 + + interrupts: + description: IRQ line for the CAN controller. + maxItems: 1 + + vdd-supply: + description: Regulator that powers the CAN controller. + + xceiver-supply: + description: Regulator that powers the CAN transceiver. + +required: + - compatible + - reg + - interrupts + +anyOf: + - required: + - clocks + - required: + - clock-frequency + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + spi { + #address-cells = <1>; + #size-cells = <0>; + + can@1 { + compatible = "holt,hi3110"; + reg = <1>; + clocks = <&clk32m>; + interrupt-parent = <&gpio4>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; + vdd-supply = <®5v0>; + xceiver-supply = <®5v0>; + }; + }; +...
diff --git a/Documentation/devicetree/bindings/net/can/holt_hi311x.txt b/Documentation/devicetree/bindings/net/can/holt_hi311x.txt
deleted file mode 100644
index 3a9926f99..000000000
--- a/Documentation/devicetree/bindings/net/can/holt_hi311x.txt
+++ /dev/null@@ -1,23 +0,0 @@ -* Holt HI-311X stand-alone CAN controller device tree bindings - -Required properties: - - compatible: Should be one of the following: - - "holt,hi3110" for HI-3110 - - reg: SPI chip select. - - clocks: The clock feeding the CAN controller. - - interrupts: Should contain IRQ line for the CAN controller. - -Optional properties: - - vdd-supply: Regulator that powers the CAN controller. - - xceiver-supply: Regulator that powers the CAN transceiver. - -Example: - can0: can@1 { - compatible = "holt,hi3110"; - reg = <1>; - clocks = <&clk32m>; - interrupt-parent = <&gpio4>; - interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; - vdd-supply = <®5v0>; - xceiver-supply = <®5v0>; - };
--
2.43.0