From: Quchaosheng Convert the Holt HI-311X binding from free-form text to DT schema. Reference can-controller.yaml and spi/spi-peripheral-props.yaml. The HI-3110 sits on an SPI bus, so its node carries the standard SPI properties, spi-max-frequency among them. With unevaluatedProperties: false and no reference to spi-peripheral-props.yaml, dtbs_check rejects those properties: can@1 (holt,hi3110): Unevaluated properties are not allowed ('spi-max-frequency' was unexpected) Keep the properties and the example as the original text describes them, including clocks as a required property. Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260922084542.104788-1-quchaosheng000406@163.com?part=2 Reviewed-by: Rob Herring (Arm) Signed-off-by: Quchaosheng Link: https://patch.msgid.link/20260922102258.138753-3-quchaosheng000406@163.com Signed-off-by: Marc Kleine-Budde --- .../bindings/net/can/holt,hi311x.yaml | 67 +++++++++++++++++++ .../bindings/net/can/holt_hi311x.txt | 23 ------- 2 files changed, 67 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 000000000000..9ec6abb1279a --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml @@ -0,0 +1,67 @@ +# 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 + +description: + The Holt HI-3110 is a stand-alone CAN controller with an SPI interface. + +allOf: + - $ref: can-controller.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: holt,hi3110 + + reg: + description: SPI chip select. + maxItems: 1 + + clocks: + description: The clock feeding the CAN controller. + maxItems: 1 + + 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 + - clocks + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + + 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 3a9926f99937..000000000000 --- 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.53.0