Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orange pi Zero + MCP2515

Featured Replies

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.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.