Jump to content

Orange pi Zero + MCP2515


goodwinsis

Recommended Posts

HI, guys. i need help, with my orange pi zero + mpc2515.

My connect, is the same as this image.

Int connect to PA7.

orange-pi-zero-pinout.jpg

 

 

 

 

mcp-2515.dtbo:

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";

    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  = <8000000>;
            };
        };
    };

    fragment@1 {
        target = <&pio>;
        __overlay__ {
            can0_pin_irq: can0_pin_irq {
                pins = "PA7";
                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 7 2>; /* PA7 IRQ_TYPE_EDGE_FALLING */
                clocks = <&can0_osc_fixed>;
                status = "okay";
            };
        };
    };
};

 

 

 

 

 

dmesg | grep spi
[    3.311923] sun6i-spi 1c68000.spi: chipselect 0 already in use
[    3.311943] spi_master spi0: spi_device register error /soc/spi@1c68000/flash@0
[    3.311964] spi_master spi0: Failed to create SPI device for /soc/spi@1c68000/flash@0
[   12.137229] mcp251x spi0.0: MCP251x didn't enter in conf mode after reset
[   12.139207] mcp251x spi0.0: Probe failed, err=16
[   12.139292] mcp251x: probe of spi0.0 failed with error -16

 

 

I try change  

Quote

target = <&spi0>;  ----> target = <&spi1>;

this is solution not work.

 

Thank you in advance for your help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines