10e051294SThomas Kopp# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
20e051294SThomas Kopp%YAML 1.2
30e051294SThomas Kopp---
40e051294SThomas Kopp$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml#
50e051294SThomas Kopp$schema: http://devicetree.org/meta-schemas/core.yaml#
60e051294SThomas Kopp
70e051294SThomas Kopptitle:
80e051294SThomas Kopp  Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree
90e051294SThomas Kopp  bindings
100e051294SThomas Kopp
110e051294SThomas Koppmaintainers:
120e051294SThomas Kopp  - Marc Kleine-Budde <mkl@pengutronix.de>
130e051294SThomas Kopp
14*66224f66SMarc Kleine-BuddeallOf:
15*66224f66SMarc Kleine-Budde  - $ref: can-controller.yaml#
16*66224f66SMarc Kleine-Budde
170e051294SThomas Koppproperties:
180e051294SThomas Kopp  compatible:
190e051294SThomas Kopp    oneOf:
200e051294SThomas Kopp      - const: microchip,mcp2517fd
210e051294SThomas Kopp        description: for MCP2517FD
220e051294SThomas Kopp      - const: microchip,mcp2518fd
230e051294SThomas Kopp        description: for MCP2518FD
240e051294SThomas Kopp      - const: microchip,mcp251xfd
250e051294SThomas Kopp        description: to autodetect chip variant
260e051294SThomas Kopp
270e051294SThomas Kopp  reg:
280e051294SThomas Kopp    maxItems: 1
290e051294SThomas Kopp
300e051294SThomas Kopp  interrupts:
310e051294SThomas Kopp    maxItems: 1
320e051294SThomas Kopp
330e051294SThomas Kopp  clocks:
340e051294SThomas Kopp    maxItems: 1
350e051294SThomas Kopp
360e051294SThomas Kopp  vdd-supply:
370e051294SThomas Kopp    description: Regulator that powers the CAN controller.
380e051294SThomas Kopp
390e051294SThomas Kopp  xceiver-supply:
400e051294SThomas Kopp    description: Regulator that powers the CAN transceiver.
410e051294SThomas Kopp
420e051294SThomas Kopp  microchip,rx-int-gpios:
430e051294SThomas Kopp    description:
440e051294SThomas Kopp      GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which
450e051294SThomas Kopp      signals a pending RX interrupt.
460e051294SThomas Kopp    maxItems: 1
470e051294SThomas Kopp
480e051294SThomas Kopp  spi-max-frequency:
490e051294SThomas Kopp    description:
500e051294SThomas Kopp      Must be half or less of "clocks" frequency.
510e051294SThomas Kopp    maximum: 20000000
520e051294SThomas Kopp
530e051294SThomas Kopprequired:
540e051294SThomas Kopp  - compatible
550e051294SThomas Kopp  - reg
560e051294SThomas Kopp  - interrupts
570e051294SThomas Kopp  - clocks
580e051294SThomas Kopp
590e051294SThomas KoppadditionalProperties: false
600e051294SThomas Kopp
610e051294SThomas Koppexamples:
620e051294SThomas Kopp  - |
630e051294SThomas Kopp    #include <dt-bindings/gpio/gpio.h>
640e051294SThomas Kopp    #include <dt-bindings/interrupt-controller/irq.h>
650e051294SThomas Kopp
660e051294SThomas Kopp    spi0 {
670e051294SThomas Kopp        #address-cells = <1>;
680e051294SThomas Kopp        #size-cells = <0>;
690e051294SThomas Kopp
700e051294SThomas Kopp        can@0 {
710e051294SThomas Kopp            compatible = "microchip,mcp251xfd";
720e051294SThomas Kopp            reg = <0>;
730e051294SThomas Kopp            clocks = <&can0_osc>;
740e051294SThomas Kopp            pinctrl-names = "default";
750e051294SThomas Kopp            pinctrl-0 = <&can0_pins>;
760e051294SThomas Kopp            spi-max-frequency = <20000000>;
770e051294SThomas Kopp            interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>;
780e051294SThomas Kopp            microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
790e051294SThomas Kopp            vdd-supply = <&reg5v0>;
800e051294SThomas Kopp            xceiver-supply = <&reg5v0>;
810e051294SThomas Kopp        };
820e051294SThomas Kopp    };
83