mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
ODROID-M1: dtb/dtbo: Add mcp2515 (can module)
Support mcp2515 12M clk and 16M clk. solved the one-bit time that came out twice as long Signed-off-by: Steve Jeong <how2soft@gmail.com> Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I47a405f11cdf290deacb9fa266d31525d80cacfc
This commit is contained in:
committed by
codewalkerster
parent
17a0dc399e
commit
da4472d8f0
@@ -5,6 +5,9 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP_ODROIDM1) += \
|
||||
dht11.dtbo \
|
||||
i2c0.dtbo \
|
||||
i2c1.dtbo \
|
||||
mcp2515.dtbo \
|
||||
mcp2515_12mhz.dtbo \
|
||||
mcp2515_16mhz.dtbo \
|
||||
onewire.dtbo \
|
||||
pwm1.dtbo \
|
||||
pwm2.dtbo \
|
||||
|
||||
14
arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts
Normal file
14
arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dts
Normal file
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include "mcp2515.dtsi"
|
||||
|
||||
/ {
|
||||
fragment@1 {
|
||||
__overlay__ {
|
||||
can0_clk: can0_clk {
|
||||
clock-frequency = <8000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
52
arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dtsi
Normal file
52
arch/arm64/boot/dts/rockchip/overlays/odroidm1/mcp2515.dtsi
Normal file
@@ -0,0 +1,52 @@
|
||||
/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 = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target-path = "/";
|
||||
|
||||
__overlay__ {
|
||||
can0_clk: can0_clk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <8000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&spi0>;
|
||||
|
||||
__overlay__ {
|
||||
/* needed to avoid dtc warning */
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mcp2515: can@0 {
|
||||
compatible = "microchip,mcp2515";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mcp2515_int_pins>;
|
||||
reg = <0>;
|
||||
clocks = <&can0_clk>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PC0 IRQ_TYPE_EDGE_FALLING>;
|
||||
spi-max-frequency = <10000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include "mcp2515.dtsi"
|
||||
|
||||
/ {
|
||||
fragment@1 {
|
||||
__overlay__ {
|
||||
can0_clk: can0_clk {
|
||||
clock-frequency = <12000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include "mcp2515.dtsi"
|
||||
|
||||
/ {
|
||||
fragment@1 {
|
||||
__overlay__ {
|
||||
can0_clk: can0_clk {
|
||||
clock-frequency = <16000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -88,6 +88,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
can_pins {
|
||||
mcp2515_int_pins: mcp2515_int_pins {
|
||||
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
/delete-node/ mxc6655xa;
|
||||
/delete-node/ touch;
|
||||
|
||||
Reference in New Issue
Block a user