From: Thomas Kopp Date: Wed, 30 Sep 2020 09:14:23 +0000 (+0200) Subject: dt-binding: can: mcp251xfd: narrow down wildcards in device tree bindings to "microch... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0e051294c03e84e1dcb9c84d105d762aedb27364;p=linux.git dt-binding: can: mcp251xfd: narrow down wildcards in device tree bindings to "microchip,mcp251xfd" The wildcard should be narrowed down to prevent existing and future devices that are not compatible from matching. It is very unlikely that incompatible devices will be released that do not match the wildcard. This is the documentation part of the commit. Discussion Reference: https://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Reported-by: Geert Uytterhoeven Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200930091423.755-2-thomas.kopp@microchip.com [mkl: rename file, too] Signed-off-by: Marc Kleine-Budde --- diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml new file mode 100644 index 0000000000000..2a884c1fe0e01 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: + Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree + bindings + +maintainers: + - Marc Kleine-Budde + +properties: + compatible: + oneOf: + - const: microchip,mcp2517fd + description: for MCP2517FD + - const: microchip,mcp2518fd + description: for MCP2518FD + - const: microchip,mcp251xfd + description: to autodetect chip variant + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + vdd-supply: + description: Regulator that powers the CAN controller. + + xceiver-supply: + description: Regulator that powers the CAN transceiver. + + microchip,rx-int-gpios: + description: + GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which + signals a pending RX interrupt. + maxItems: 1 + + spi-max-frequency: + description: + Must be half or less of "clocks" frequency. + maximum: 20000000 + +required: + - compatible + - reg + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + #include + + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + can@0 { + compatible = "microchip,mcp251xfd"; + reg = <0>; + clocks = <&can0_osc>; + pinctrl-names = "default"; + pinctrl-0 = <&can0_pins>; + spi-max-frequency = <20000000>; + interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>; + microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + vdd-supply = <®5v0>; + xceiver-supply = <®5v0>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml deleted file mode 100644 index 5beb00a614bfb..0000000000000 --- a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/net/can/microchip,mcp25xxfd.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: - Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree - bindings - -maintainers: - - Marc Kleine-Budde - -properties: - compatible: - oneOf: - - const: microchip,mcp2517fd - description: for MCP2517FD - - const: microchip,mcp2518fd - description: for MCP2518FD - - const: microchip,mcp25xxfd - description: to autodetect chip variant - - reg: - maxItems: 1 - - interrupts: - maxItems: 1 - - clocks: - maxItems: 1 - - vdd-supply: - description: Regulator that powers the CAN controller. - - xceiver-supply: - description: Regulator that powers the CAN transceiver. - - microchip,rx-int-gpios: - description: - GPIO phandle of GPIO connected to to INT1 pin of the MCP25XXFD, which - signals a pending RX interrupt. - maxItems: 1 - - spi-max-frequency: - description: - Must be half or less of "clocks" frequency. - maximum: 20000000 - -required: - - compatible - - reg - - interrupts - - clocks - -additionalProperties: false - -examples: - - | - #include - #include - - spi0 { - #address-cells = <1>; - #size-cells = <0>; - - can@0 { - compatible = "microchip,mcp25xxfd"; - reg = <0>; - clocks = <&can0_osc>; - pinctrl-names = "default"; - pinctrl-0 = <&can0_pins>; - spi-max-frequency = <20000000>; - interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>; - microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - vdd-supply = <®5v0>; - xceiver-supply = <®5v0>; - }; - };