1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title:
8  Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree
9  bindings
10
11maintainers:
12  - Marc Kleine-Budde <mkl@pengutronix.de>
13
14allOf:
15  - $ref: can-controller.yaml#
16
17properties:
18  compatible:
19    oneOf:
20      - const: microchip,mcp2517fd
21        description: for MCP2517FD
22      - const: microchip,mcp2518fd
23        description: for MCP2518FD
24      - const: microchip,mcp251xfd
25        description: to autodetect chip variant
26
27  reg:
28    maxItems: 1
29
30  interrupts:
31    maxItems: 1
32
33  clocks:
34    maxItems: 1
35
36  vdd-supply:
37    description: Regulator that powers the CAN controller.
38
39  xceiver-supply:
40    description: Regulator that powers the CAN transceiver.
41
42  microchip,rx-int-gpios:
43    description:
44      GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which
45      signals a pending RX interrupt.
46    maxItems: 1
47
48  spi-max-frequency:
49    description:
50      Must be half or less of "clocks" frequency.
51    maximum: 20000000
52
53required:
54  - compatible
55  - reg
56  - interrupts
57  - clocks
58
59additionalProperties: false
60
61examples:
62  - |
63    #include <dt-bindings/gpio/gpio.h>
64    #include <dt-bindings/interrupt-controller/irq.h>
65
66    spi0 {
67        #address-cells = <1>;
68        #size-cells = <0>;
69
70        can@0 {
71            compatible = "microchip,mcp251xfd";
72            reg = <0>;
73            clocks = <&can0_osc>;
74            pinctrl-names = "default";
75            pinctrl-0 = <&can0_pins>;
76            spi-max-frequency = <20000000>;
77            interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>;
78            microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
79            vdd-supply = <&reg5v0>;
80            xceiver-supply = <&reg5v0>;
81        };
82    };
83