xref: /freebsd/sys/contrib/device-tree/Bindings/net/can/microchip,mcp251xfd.yaml (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle:
8*d5b0e70fSEmmanuel Vadot  Microchip MCP2517FD, MCP2518FD and MCP251863 stand-alone CAN
9*d5b0e70fSEmmanuel Vadot  controller device tree bindings
106be33864SEmmanuel Vadot
116be33864SEmmanuel Vadotmaintainers:
126be33864SEmmanuel Vadot  - Marc Kleine-Budde <mkl@pengutronix.de>
136be33864SEmmanuel Vadot
14c9ccf3a3SEmmanuel VadotallOf:
15c9ccf3a3SEmmanuel Vadot  - $ref: can-controller.yaml#
16c9ccf3a3SEmmanuel Vadot
176be33864SEmmanuel Vadotproperties:
186be33864SEmmanuel Vadot  compatible:
196be33864SEmmanuel Vadot    oneOf:
20*d5b0e70fSEmmanuel Vadot      - enum:
21*d5b0e70fSEmmanuel Vadot          - microchip,mcp2517fd
22*d5b0e70fSEmmanuel Vadot          - microchip,mcp2518fd
23*d5b0e70fSEmmanuel Vadot          - microchip,mcp251xfd
24*d5b0e70fSEmmanuel Vadot      - items:
25*d5b0e70fSEmmanuel Vadot          - enum:
26*d5b0e70fSEmmanuel Vadot              - microchip,mcp251863
276be33864SEmmanuel Vadot          - const: microchip,mcp2518fd
286be33864SEmmanuel Vadot  reg:
296be33864SEmmanuel Vadot    maxItems: 1
306be33864SEmmanuel Vadot
316be33864SEmmanuel Vadot  interrupts:
326be33864SEmmanuel Vadot    maxItems: 1
336be33864SEmmanuel Vadot
346be33864SEmmanuel Vadot  clocks:
356be33864SEmmanuel Vadot    maxItems: 1
366be33864SEmmanuel Vadot
376be33864SEmmanuel Vadot  vdd-supply:
386be33864SEmmanuel Vadot    description: Regulator that powers the CAN controller.
396be33864SEmmanuel Vadot
406be33864SEmmanuel Vadot  xceiver-supply:
416be33864SEmmanuel Vadot    description: Regulator that powers the CAN transceiver.
426be33864SEmmanuel Vadot
436be33864SEmmanuel Vadot  microchip,rx-int-gpios:
446be33864SEmmanuel Vadot    description:
456be33864SEmmanuel Vadot      GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which
466be33864SEmmanuel Vadot      signals a pending RX interrupt.
476be33864SEmmanuel Vadot    maxItems: 1
486be33864SEmmanuel Vadot
496be33864SEmmanuel Vadot  spi-max-frequency:
506be33864SEmmanuel Vadot    description:
516be33864SEmmanuel Vadot      Must be half or less of "clocks" frequency.
526be33864SEmmanuel Vadot    maximum: 20000000
536be33864SEmmanuel Vadot
546be33864SEmmanuel Vadotrequired:
556be33864SEmmanuel Vadot  - compatible
566be33864SEmmanuel Vadot  - reg
576be33864SEmmanuel Vadot  - interrupts
586be33864SEmmanuel Vadot  - clocks
596be33864SEmmanuel Vadot
606be33864SEmmanuel VadotadditionalProperties: false
616be33864SEmmanuel Vadot
626be33864SEmmanuel Vadotexamples:
636be33864SEmmanuel Vadot  - |
646be33864SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
656be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
666be33864SEmmanuel Vadot
676be33864SEmmanuel Vadot    spi0 {
686be33864SEmmanuel Vadot        #address-cells = <1>;
696be33864SEmmanuel Vadot        #size-cells = <0>;
706be33864SEmmanuel Vadot
716be33864SEmmanuel Vadot        can@0 {
726be33864SEmmanuel Vadot            compatible = "microchip,mcp251xfd";
736be33864SEmmanuel Vadot            reg = <0>;
746be33864SEmmanuel Vadot            clocks = <&can0_osc>;
756be33864SEmmanuel Vadot            pinctrl-names = "default";
766be33864SEmmanuel Vadot            pinctrl-0 = <&can0_pins>;
776be33864SEmmanuel Vadot            spi-max-frequency = <20000000>;
786be33864SEmmanuel Vadot            interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>;
796be33864SEmmanuel Vadot            microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
806be33864SEmmanuel Vadot            vdd-supply = <&reg5v0>;
816be33864SEmmanuel Vadot            xceiver-supply = <&reg5v0>;
826be33864SEmmanuel Vadot        };
836be33864SEmmanuel Vadot    };
84