xref: /linux/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml (revision fc2d791a43d3880496d1c729b8bd74d2c19cb4e7)
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 INT1 pin of the MCP251XFD, which
44      signals a pending RX interrupt.
45    maxItems: 1
46
47  microchip,xstbyen:
48    type: boolean
49    description:
50      If present, configure the INT0/GPIO0/XSTBY pin as transceiver standby
51      control. The pin is driven low when the controller is active and high
52      when it enters Sleep mode, allowing automatic standby control of an
53      external CAN transceiver connected to this pin.
54
55  spi-max-frequency:
56    description:
57      Must be half or less of "clocks" frequency.
58    maximum: 20000000
59
60  gpio-controller: true
61
62  "#gpio-cells":
63    const: 2
64
65required:
66  - compatible
67  - reg
68  - interrupts
69  - clocks
70
71additionalProperties: false
72
73examples:
74  - |
75    #include <dt-bindings/gpio/gpio.h>
76    #include <dt-bindings/interrupt-controller/irq.h>
77
78    spi {
79        #address-cells = <1>;
80        #size-cells = <0>;
81
82        can@0 {
83            compatible = "microchip,mcp251xfd";
84            reg = <0>;
85            clocks = <&can0_osc>;
86            pinctrl-names = "default";
87            pinctrl-0 = <&can0_pins>;
88            spi-max-frequency = <20000000>;
89            interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>;
90            microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
91            vdd-supply = <&reg5v0>;
92            xceiver-supply = <&reg5v0>;
93        };
94    };
95