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.

How to bring up mcp2517fd device on OpenWRT?

Featured Replies

I'm trying to get mcp25xxfd device to work on OpenWRT. Currently I'm using ramips platform (Linux Kernel version is 4.14.180). I have the following configuration in one of my DTS files:       

osc: oscillator {
                compatible = "fixed-clock";
                clock-frequency  = <40000000>;
        };

        spidev1 {
            compatible = "spi-gpio";
            gpio-sck  = <&gpio0 25 GPIO_ACTIVE_HIGH>;
            gpio-mosi = <&gpio0 26 GPIO_ACTIVE_HIGH>;
            gpio-miso = <&gpio0 27 GPIO_ACTIVE_HIGH>;
            cs-gpios  = <&gpio0 28 GPIO_ACTIVE_HIGH>;
            num-chipselects = <1>;


            can0: mcp2517fd@0 {
                    compatible = "microchip,mcp2517fd";
                    status = "okay";
                    clock-names = "can0_osc";
                    clocks = <&osc>;
                    reg = <0>;
                    spi-max-frequency = <16000000>;
                    interrupt-parent = <&gpio0>;
                    interrupts = <11>;
            };
        };

However, when I try to probe it using insmod utility, I get error:

    [   30.522030] mcp25xxfd: probe of spi1.0 failed with error -2

If I comment out the following section

        compatible = "spi-gpio";
        gpio-sck  = <&gpio0 25 GPIO_ACTIVE_HIGH>;
        gpio-mosi = <&gpio0 26 GPIO_ACTIVE_HIGH>;
        gpio-miso = <&gpio0 27 GPIO_ACTIVE_HIGH>;
        cs-gpios  = <&gpio0 28 GPIO_ACTIVE_HIGH>;
        num-chipselects = <1>;


and try to create SPI device manually

    insmod spi-gpio-custom bus0=1,25,26,27,0,1000000,28


and then again try to load mcp25xxfd, nothing happens:

    root@Sensors:/# insmod mcp25xxfd
    root@Sensors:/#

I can see spidev1.0 is on /dev, but no can0.
Can anyone help with this problem?

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.