summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml
blob: aa2cad14d6d77b361978a189bf30fc6f3a04f066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/can/microchip,mcp25xxfd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title:
  Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree
  bindings

maintainers:
  - Marc Kleine-Budde <mkl@pengutronix.de>

properties:
  compatible:
    oneOf:
      - const: microchip,mcp2517fd
        description: for MCP2517FD
      - const: microchip,mcp2518fd
        description: for MCP2518FD
      - const: microchip,mcp25xxfd
        description: to autodetect chip variant

  reg:
    maxItems: 1

  interrupts-extended:
    maxItems: 1

  clocks:
    maxItems: 1

  vdd-supply:
    description: Regulator that powers the CAN controller.
    maxItems: 1

  xceiver-supply:
    description: Regulator that powers the CAN transceiver.
    maxItems: 1

  microchip,rx-int-gpios:
    description:
      GPIO phandle of GPIO connected to to INT1 pin of the MCP25XXFD, which
      signals a pending RX interrupt.
    maxItems: 1

  spi-max-frequency:
    description:
      Must be half or less of "clocks" frequency.
    maximum: 20000000

required:
  - compatible
  - reg
  - interrupts-extended
  - clocks

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        can@0 {
            compatible = "microchip,mcp25xxfd";
            reg = <0>;
            clocks = <&can0_osc>;
            pinctrl-names = "default";
            pinctrl-0 = <&can0_pins>;
            spi-max-frequency = <20000000>;
            interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>;
            microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
            vdd-supply = <&reg5v0>;
            xceiver-supply = <&reg5v0>;
        };
    };