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