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