ODROID-M2: can: Add overlays for mcp2517fd

mcp2517 (CAN-FD Add-on board)
- MISO: 21
- MOSI: 19
- SCLK: 23
- CS0 : 24
- INT : 11

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
Change-Id: I09d92b0b26e3858ea1bffa697edb67b8c0fed055
This commit is contained in:
2024-08-26 19:12:33 +09:00
committed by xiane
parent 79e2661550
commit 0d3c71cd37
2 changed files with 52 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ dtbo-y += \
mcp2515.dtbo \
mcp2515_12mhz.dtbo \
mcp2515_16mhz.dtbo \
mcp2517fd.dtbo \
onewire.dtbo \
pwm15.dtbo \
pwm3.dtbo \

View File

@@ -0,0 +1,51 @@
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
fragment@0 {
target = <&spi0>;
__overlay__ {
num_chipselect = <1>;
cs-gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
};
};
fragment@1 {
target-path = "/";
__overlay__ {
can0_clk: can0_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <20000000>;
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
mcp2517fd: canfd@0 {
compatible = "microchip,mcp2517fd";
pinctrl-names = "default";
pinctrl-0 = <&mcp251x_int_pins>;
reg = <0>;
clocks = <&can0_clk>;
interrupt-parent = <&gpio3>;
interrupts = <RK_PD4 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <10000000>;
status = "okay";
};
};
};
};