10e051294SThomas Kopp# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 20e051294SThomas Kopp%YAML 1.2 30e051294SThomas Kopp--- 40e051294SThomas Kopp$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml# 50e051294SThomas Kopp$schema: http://devicetree.org/meta-schemas/core.yaml# 60e051294SThomas Kopp 70e051294SThomas Kopptitle: 80e051294SThomas Kopp Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree 90e051294SThomas Kopp bindings 100e051294SThomas Kopp 110e051294SThomas Koppmaintainers: 120e051294SThomas Kopp - Marc Kleine-Budde <mkl@pengutronix.de> 130e051294SThomas Kopp 140e051294SThomas Koppproperties: 150e051294SThomas Kopp compatible: 160e051294SThomas Kopp oneOf: 170e051294SThomas Kopp - const: microchip,mcp2517fd 180e051294SThomas Kopp description: for MCP2517FD 190e051294SThomas Kopp - const: microchip,mcp2518fd 200e051294SThomas Kopp description: for MCP2518FD 210e051294SThomas Kopp - const: microchip,mcp251xfd 220e051294SThomas Kopp description: to autodetect chip variant 230e051294SThomas Kopp 240e051294SThomas Kopp reg: 250e051294SThomas Kopp maxItems: 1 260e051294SThomas Kopp 270e051294SThomas Kopp interrupts: 280e051294SThomas Kopp maxItems: 1 290e051294SThomas Kopp 300e051294SThomas Kopp clocks: 310e051294SThomas Kopp maxItems: 1 320e051294SThomas Kopp 330e051294SThomas Kopp vdd-supply: 340e051294SThomas Kopp description: Regulator that powers the CAN controller. 350e051294SThomas Kopp 360e051294SThomas Kopp xceiver-supply: 370e051294SThomas Kopp description: Regulator that powers the CAN transceiver. 380e051294SThomas Kopp 390e051294SThomas Kopp microchip,rx-int-gpios: 400e051294SThomas Kopp description: 410e051294SThomas Kopp GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which 420e051294SThomas Kopp signals a pending RX interrupt. 430e051294SThomas Kopp maxItems: 1 440e051294SThomas Kopp 450e051294SThomas Kopp spi-max-frequency: 460e051294SThomas Kopp description: 470e051294SThomas Kopp Must be half or less of "clocks" frequency. 480e051294SThomas Kopp maximum: 20000000 490e051294SThomas Kopp 500e051294SThomas Kopprequired: 510e051294SThomas Kopp - compatible 520e051294SThomas Kopp - reg 530e051294SThomas Kopp - interrupts 540e051294SThomas Kopp - clocks 550e051294SThomas Kopp 560e051294SThomas KoppadditionalProperties: false 570e051294SThomas Kopp 580e051294SThomas Koppexamples: 590e051294SThomas Kopp - | 600e051294SThomas Kopp #include <dt-bindings/gpio/gpio.h> 610e051294SThomas Kopp #include <dt-bindings/interrupt-controller/irq.h> 620e051294SThomas Kopp 630e051294SThomas Kopp spi0 { 640e051294SThomas Kopp #address-cells = <1>; 650e051294SThomas Kopp #size-cells = <0>; 660e051294SThomas Kopp 670e051294SThomas Kopp can@0 { 680e051294SThomas Kopp compatible = "microchip,mcp251xfd"; 690e051294SThomas Kopp reg = <0>; 700e051294SThomas Kopp clocks = <&can0_osc>; 710e051294SThomas Kopp pinctrl-names = "default"; 720e051294SThomas Kopp pinctrl-0 = <&can0_pins>; 730e051294SThomas Kopp spi-max-frequency = <20000000>; 740e051294SThomas Kopp interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>; 750e051294SThomas Kopp microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; 760e051294SThomas Kopp vdd-supply = <®5v0>; 770e051294SThomas Kopp xceiver-supply = <®5v0>; 780e051294SThomas Kopp }; 790e051294SThomas Kopp }; 80