| 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 |
|
| 7 |
title: Microchip MCP2517FD, MCP2518FD and MCP251863 stand-alone CAN controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Marc Kleine-Budde <[email protected]> |
| 11 |
|
| 12 |
allOf: |
| 13 |
- $ref: can-controller.yaml# |
| 14 |
|
| 15 |
properties: |
| 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 |
spi-max-frequency: |
| 48 |
description: |
| 49 |
Must be half or less of "clocks" frequency. |
| 50 |
maximum: 20000000 |
| 51 |
|
| 52 |
gpio-controller: true |
| 53 |
|
| 54 |
"#gpio-cells": |
| 55 |
const: 2 |
| 56 |
|
| 57 |
required: |
| 58 |
- compatible |
| 59 |
- reg |
| 60 |
- interrupts |
| 61 |
- clocks |
| 62 |
|
| 63 |
additionalProperties: false |
| 64 |
|
| 65 |
examples: |
| 66 |
- | |
| 67 |
#include <dt-bindings/gpio/gpio.h> |
| 68 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 69 |
|
| 70 |
spi { |
| 71 |
#address-cells = <1>; |
| 72 |
#size-cells = <0>; |
| 73 |
|
| 74 |
can@0 { |
| 75 |
compatible = "microchip,mcp251xfd"; |
| 76 |
reg = <0>; |
| 77 |
clocks = <&can0_osc>; |
| 78 |
pinctrl-names = "default"; |
| 79 |
pinctrl-0 = <&can0_pins>; |
| 80 |
spi-max-frequency = <20000000>; |
| 81 |
interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>; |
| 82 |
microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; |
| 83 |
vdd-supply = <®5v0>; |
| 84 |
xceiver-supply = <®5v0>; |
| 85 |
}; |
| 86 |
}; |