Hi All,
I'm having some trouble getting this to work on the orangepilite2.
uname -a
Linux orangepilite2 5.3.0-rc6-sunxi64 #5.95.190904 SMP Wed Sep 4 00:52:50 CEST 2019 aarch64 GNU/Linux
This is my DTS file (copied from the most recent DTS file from this thread). I've modified the clock frequency to: 16000000 because i have an 16Mhz crystal. I've also changed the interrupt pin to PD21 and in the interrupt line i've modified: interrupts = <0 117 2>;
After this i've ran the command: armbian-add-overlay which succeeds and i've double checked the armbianEnv which contains the compiled overlay. After reboot i attempted to modprobe the driver: modprobe mcp251x which doesn't give me any error and only returns:
dmesg
[ 91.647006] CAN device driver interface
No can0 device is created. I've also tried to enable the spi overlays without any success.
Could someone please point me in the right direction?
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun50i-h6";
fragment@0 {
target-path = "/clocks";
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
can0_osc_fixed: can0_osc_fixed {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <16000000>;
};
};
};
fragment@1 {
target = <&pio>;
__overlay__ {
can0_pin_irq: can0_pin_irq {
pins = "PD21";
function = "irq";
bias-pull-up;
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
mcp2515 {
reg = <0>;
compatible = "microchip,mcp2515";
pinctrl-names = "default";
pinctrl-0 = <&can0_pin_irq>;
spi-max-frequency = <10000000>;
interrupt-parent = <&pio>;
interrupts = <0 117 2>; /* PA7 IRQ_TYPE_EDGE_FALLING */
clocks = <&can0_osc_fixed>;
status = "okay";
};
};
};
};