We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Can't execute insmod spi-gpio-custom



  • Hello,

    I did a fresh build of the whole onion kernel using docker.

    I need to have 3 SPI devices using bit bang. So i installed kmod-spi-gpio-custom module like this

    root@Omega-EE80:/tmp# opkg install kmod-spi-gpio-custom
    Package kmod-spi-gpio-custom (4.14.81-1) installed in root is up to date.
    

    But then when i type insmod i get this error

    root@Omega-EE80:/tmp# insmod spi-gpio-custom bus0=1,22,44,23,0,1000000,41,0,1000000,42,0,1000000,43
    failed to insert /lib/modules/4.14.81/spi-gpio-custom.ko
    

    in the menuconfig I have the following kernel modules selected:
    < > kmod-mmc-spi..................................... MMC/SD over SPI Support
    * kmod-spi-bitbang.......... Serial Peripheral Interface bitbanging library
    * kmod-spi-dev................................. User mode SPI device driver
    * kmod-spi-gpio........................... GPIO-based bitbanging SPI Master
    <*> kmod-spi-gpio-custom........................ Custom GPIO-based SPI device

    Does anyone know whats wrong? Here is my version

     root@Omega-EE80:/tmp# cat /proc/version
     Linux version 4.14.81 (root@c8faf31143bd) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7499-3fad87a74c)) #0 Sat Nov 19 19:47:52 2022
    

    Thanks



  • This post is deleted!


  • @nsmith IME this error is typically caused by the kmod trying to grab resources already in use, are you sure the module has not already been automatically loaded? What does lsmod report?

    Try loading earlier in the boot process, look in /etc/modules.d to see how to automatically load modules with the required parameters and the numeric order they are loaded.



  • @crispyoz Here are the results of some other commands, can you please help, i dont know why insmod doesnt work.

    root@Omega-EB02:/tmp# ls /dev
    autofs              memory_bandwidth    mtd6ro              pts                 tty16               tty29    
    tty41               tty54               ttyS0
    bus                 mtd0                mtdblock0           random              tty17               tty3                
    tty42               tty55               ttyS1
    console             mtd0ro              mtdblock1           shm                 tty18               tty30               
    tty43               tty56               ttyS2
    cpu_dma_latency     mtd1                mtdblock2           snd                 tty19               tty31               
    tty44               tty57               uinput
    full                mtd1ro              mtdblock3           spidev0.1           tty2                tty32               
    tty45               tty58               urandom
    gpiochip0           mtd2                mtdblock4           tty                 tty20               tty33     
    tty46               tty59               vcs
    gpiochip1           mtd2ro              mtdblock5           tty0                tty21               tty34               
    tty47               tty6                vcs1
    gpiochip2           mtd3                mtdblock6           tty1                tty22               tty35               
    tty48               tty60               vcsa
    i2c-0               mtd3ro              network_latency     tty10               tty23               tty36               
    tty49               tty61               vcsa1
    kmem                mtd4                network_throughput  tty11               tty24               tty37               
    tty5                tty62               watchdog
    kmsg                mtd4ro              null                tty12               tty25               tty38  
    tty50               tty63               watchdog0
    ledchain2           mtd5                port                tty13               tty26               tty39 
    tty51               tty7                zero
    log                 mtd5ro              ppp                 tty14               tty27               tty4    
    tty52               tty8
    mem                 mtd6                ptmx                tty15               tty28               tty40
    tty53               tty9
    
    root@Omega-EB02:/tmp# 
    root@Omega-EB02:/tmp# lsmod | grep -in spi
    98:regmap_spi              1274  0 
    123:spi_bitbang             2661  1 spi_gpio
    124:spi_gpio                5424  0 
    125:spidev                  6336  0 
    root@Omega-EB02:/tmp# insmod spi-gpio-custom bus2=2,22,44,23,0,1000000,41,0,1000000,42,0,1000000,43
    failed to insert /lib/modules/4.14.81/spi-gpio-custom.ko
    root@Omega-EB02:/tmp#


  • @nsmith I can't test as I don't have the hardware but did you try my suggestion of configuring the module by using an entry in /etc/modules.d ? Here is what I mean.

    cd /etc/modules.d
    mv spi-gio 36-spi-gpio
    Now create a new file 37-spi-gpio-custom
    put your load command in the file: spi-gpio-custom bus2=2,22,44,23,0,1000000,41,0,1000000,42,0,1000000,43

    You should see any errors in the console, or use logread | grep -i spi-gpio



  • @crispyoz Ok, Thanks for the help, i just tried what you suggested, I moved the file to 36-spi-gpio, created a new file 37-spi-gpio-custom, and inserted the command in there, then rebooted. Here is the result below (executed after i rebooted). It still didnt work.

    I noticed that there is already a spidev0.1 in the /dev directory, maybe thats why it cant add another one? I tried removing that module using rmmod spi-dev, and then adding the new one but i get the same error.

    (sorry for the long post)

    root@Omega-EB02:/tmp# lsmod | grep -in gpio
    29:gpio_button_hotplug     6384  0 
    48:leds_gpio               2832  0 
    49:ledtrig_gpio            1872  0 
    123:spi_bitbang             2661  1 spi_gpio
    124:spi_gpio                5424  0 
    153:w1_gpio                 2320  0 
    155:wire                   17811  2 w1_therm,w1_gpio
    
    
    root@Omega-EB02:/tmp# cd /dev
    root@Omega-EB02:/dev# ls
    pu_dma_latency     mtd4ro              snd                 tty25               tty44 
    full                mtd5                spidev0.1           tty26               tty45 
    
    root@Omega-EB02:/etc/modules.d# 
    root@Omega-EB02:/etc/modules.d# ls *spi*
    36-spi-gpio         37-spi-gpio-custom  spi-dev
    root@Omega-EB02:/etc/modules.d# 
    root@Omega-EB02:/etc/modules.d# 
    root@Omega-EB02:/etc/modules.d# cat 37-spi-gpio-custom 
    spi-gpio-custom bus2=2,22,44,23,0,1000000,41,0,1000000,42,0,1000000,43
    root@Omega-EB02:/etc/modules.d# 
    root@Omega-EB02:/etc/modules.d# logread | grep -i spi-gpio
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.128903] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.150581] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.171533] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.235753] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.255707] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.275737] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   15.323875] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   18.140303] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 kern.err kernel: [   18.160113] spi-gpio-custom: unable to get master for bus 2
    Sat Nov 19 19:58:50 2022 user.err kernel: [   18.172976] kmodloader: - spi-gpio-custom - 0
    root@Omega-EB02:/etc/modules.d#
    

    I checked the dmesg command as well and here is what was printed

    root@Omega-EB02:/etc/modules.d# cd /tmp
    root@Omega-EB02:/tmp# dmesg
    [ 0.000000] Linux version 4.14.81 (root@2dc21687a5cb) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7499-3fad87a74c)) #0 Sat Nov 19 19:47:52 2022
    [ 0.000000] Board has DDR2
    [ 0.000000] Analog PMU set to hw control
    [ 0.000000] Digital PMU set to hw control
    [ 0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
    [ 0.000000] bootconsole [early0] enabled
    [ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
    [ 0.000000] MIPS: machine is Onion Omega2
    [ 0.000000] Determined physical RAM map:
    [ 0.000000] memory: 04000000 @ 00000000 (usable)
    [ 0.000000] Initrd not found or empty - disabling initrd
    [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
    [ 0.000000] Zone ranges:
    [ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
    [ 0.000000] Movable zone start for each node
    [ 0.000000] Early memory node ranges
    [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
    [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
    [ 0.000000] On node 0 totalpages: 16384
    [ 0.000000] free_area_init_node: node 0, pgdat 804b4110, node_mem_map 81000040
    [ 0.000000] Normal zone: 128 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 16384 pages, LIFO batch:3
    [ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
    [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768
    [ 0.000000] pcpu-alloc: [0] 0
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
    [ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
    [ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
    [ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Writing ErrCtl register=0000760e
    [ 0.000000] Readback ErrCtl register=0000760e
    [ 0.000000] Memory: 59608K/65536K available (3708K kernel code, 207K rwdata, 920K rodata, 212K init, 205K bss, 5928K reserved, 0K cma-reserved)
    [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] NR_IRQS: 256
    [ 0.000000] intc: using register map from devicetree
    [ 0.000000] CPU Clock: 580MHz
    [ 0.000000] timer_probe: no matching timers found
    [ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
    [ 0.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
    [ 0.007671] Console: colour dummy device 80x25
    [ 0.011927] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
    [ 0.073504] pid_max: default: 32768 minimum: 301
    [ 0.078189] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.084532] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.098486] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.107978] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.113926] pinctrl core: initialized pinctrl subsystem
    [ 0.119494] NET: Registered protocol family 16
    [ 0.155382] mt7621_gpio 10000600.gpio: registering 32 gpios
    [ 0.161067] mt7621_gpio 10000600.gpio: registering 32 gpios
    [ 0.166588] mt7621_gpio 10000600.gpio: registering 32 gpios
    [ 0.173195] i2c-mt7621 10000900.i2c: clock 100 kHz
    [ 0.182709] clocksource: Switched to clocksource MIPS
    [ 0.194771] NET: Registered protocol family 2
    [ 0.199886] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.206638] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.212741] TCP: Hash tables configured (established 1024 bind 1024)
    [ 0.219001] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.224633] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.230929] NET: Registered protocol family 1
    [ 0.235140] PCI: CLS 0 bytes, default 32
    [ 0.249363] Crashlog allocated RAM at address 0x3f00000
    [ 0.255965] workingset: timestamp_bits=30 max_order=14 bucket_order=0
    [ 0.268275] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.273892] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [ 0.293857] io scheduler noop registered
    [ 0.297588] io scheduler deadline registered (default)
    [ 0.303640] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
    [ 0.310958] console [ttyS0] disabled
    [ 0.314455] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
    [ 0.323176] console [ttyS0] enabled
    [ 0.330172] bootconsole [early0] disabled
    [ 0.338985] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
    [ 0.348623] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A
    [ 0.358147] cacheinfo: Failed to find cpu0 device node
    [ 0.363397] cacheinfo: Unable to detect cache hierarchy for CPU 0
    [ 0.370352] spi-mt7621 10000b00.spi: sys_freq: 193333333
    [ 0.390545] m25p80 spi0.0: w25q128 (16384 Kbytes)
    [ 0.395414] 4 fixed-partitions partitions found on MTD device spi0.0
    [ 0.401856] Creating 4 MTD partitions on "spi0.0":
    [ 0.406736] 0x000000000000-0x000000030000 : "u-boot"
    [ 0.412764] 0x000000030000-0x000000040000 : "u-boot-env"
    [ 0.419006] 0x000000040000-0x000000050000 : "factory"
    [ 0.425046] 0x000000050000-0x000001000000 : "firmware"
    [ 0.466675] 2 uimage-fw partitions found on MTD device firmware
    [ 0.472723] 0x000000050000-0x0000001dae29 : "kernel"
    [ 0.478663] 0x0000001dae29-0x000001000000 : "rootfs"
    [ 0.484558] mtd: device 5 (rootfs) set to be root filesystem
    [ 0.491741] 1 squashfs-split partitions found on MTD device rootfs
    [ 0.498090] 0x000000a50000-0x000001000000 : "rootfs_data"
    [ 0.505521] libphy: Fixed MDIO Bus: probed
    [ 0.518167] rt3050-esw 10110000.esw: link changed 0x00
    [ 0.527683] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
    [ 0.536358] i2c /dev entries driver
    [ 0.541750] NET: Registered protocol family 10
    [ 0.550468] Segment Routing with IPv6
    [ 0.554381] NET: Registered protocol family 17
    [ 0.558940] 8021q: 802.1Q VLAN Support v1.8
    [ 0.569860] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
    [ 0.578228] Freeing unused kernel memory: 212K
    [ 0.582765] This architecture does not have kernel memory protection.
    [ 1.520983] init: Console is alive
    [ 1.524762] init: - watchdog -
    [ 2.242719] random: fast init done
    [ 5.120848] kmodloader: loading kernel modules from /etc/modules-boot.d/

    [ 5.417474] usbcore: registered new interface driver usbfs
    [ 5.423208] usbcore: registered new interface driver hub
    [ 5.428697] usbcore: registered new device driver usb
    [ 5.440155] exFAT: Version 1.2.9
    [ 5.478367] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 5.494700] SCSI subsystem initialized
    [ 5.504219] ehci-platform: EHCI generic platform driver
    [ 5.519885] phy phy-10120000.usbphy.0: remote usb device wakeup disabled
    [ 5.526697] phy phy-10120000.usbphy.0: UTMI 16bit 30MHz
    [ 5.532011] ehci-platform 101c0000.ehci: EHCI Host Controller
    [ 5.537895] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
    [ 5.546086] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
    [ 5.572772] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
    [ 5.580229] hub 1-0:1.0: USB hub found
    [ 5.584541] hub 1-0:1.0: 1 port detected
    [ 5.594550] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 5.602480] ohci-platform: OHCI generic platform driver
    [ 5.608158] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
    [ 5.615129] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
    [ 5.623260] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
    [ 5.697779] hub 2-0:1.0: USB hub found
    [ 5.702046] hub 2-0:1.0: 1 port detected
    [ 5.720856] MTK MSDC device init.
    [ 5.782938] mtk-sd: MediaTek MT6575 MSDC Driver
    [ 5.794377] sdhci: Secure Digital Host Controller Interface driver
    [ 5.800668] sdhci: Copyright(c) Pierre Ossman
    [ 5.805362] mtk-sd 10130000.sdhci: no support for card's volts
    [ 5.811285] mmc0: error -22 whilst initialising SDIO card
    [ 5.818225] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 5.824740] mtk-sd 10130000.sdhci: no support for card's volts
    [ 5.830689] mmc0: error -22 whilst initialising MMC card
    [ 5.840280] usbcore: registered new interface driver usb-storage
    [ 5.851043] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
    [ 5.868923] init: - preinit -
    [ 5.907933] mtk-sd 10130000.sdhci: no support for card's volts
    [ 5.913897] mmc0: error -22 whilst initialising SDIO card
    [ 5.933646] mtk-sd 10130000.sdhci: no support for card's volts
    [ 5.939565] mmc0: error -22 whilst initialising MMC card
    [ 6.144005] mtk-sd 10130000.sdhci: no support for card's volts
    [ 6.149931] mmc0: error -22 whilst initialising SDIO card
    [ 6.169317] mtk-sd 10130000.sdhci: no support for card's volts
    [ 6.175264] mmc0: error -22 whilst initialising MMC card
    [ 7.376554] rt3050-esw 10110000.esw: link changed 0x00
    [ 7.596616] random: procd: uninitialized urandom read (4 bytes read)
    [ 10.824521] mount_root: loading kmods from internal overlay
    [ 10.904948] kmodloader: loading kernel modules from //etc/modules-boot.d/*
    [ 10.918178] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
    [ 11.932639] jffs2: notice: (515) jffs2_build_xattr_subsystem: complete building xattr subsystem, 4 of xdatum (0 unchecked, 2 orphan) and 6 of xref (2 dead, 0 orphan) found.
    [ 11.948958] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
    [ 11.960636] block: extroot: not configured
    [ 12.028211] jffs2: notice: (513) jffs2_build_xattr_subsystem: complete building xattr subsystem, 4 of xdatum (0 unchecked, 2 orphan) and 6 of xref (2 dead, 0 orphan) found.
    [ 12.045379] mount_root: loading kmods from internal overlay
    [ 12.118761] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
    [ 12.129468] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
    [ 12.667430] mtk-sd 10130000.sdhci: no support for card's volts
    [ 12.673385] mmc0: error -22 whilst initialising SDIO card
    [ 12.684389] mtk-sd 10130000.sdhci: no support for card's volts
    [ 12.690320] mmc0: error -22 whilst initialising MMC card
    [ 12.753342] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
    [ 12.764978] mtk-sd 10130000.sdhci: no support for card's volts
    [ 12.770908] mmc0: error -22 whilst initialising SDIO card
    [ 12.778276] block: extroot: not configured
    [ 12.782578] ttyS ttyS0: 1 input overrun(s)
    [ 12.788216] mount_root: switching to jffs2 overlay
    [ 12.796312] mtk-sd 10130000.sdhci: no support for card's volts
    [ 12.802424] mmc0: error -22 whilst initialising MMC card
    [ 12.873130] overlayfs: upper fs does not support tmpfile.
    [ 12.885241] urandom-seed: Seeding with /etc/urandom.seed
    [ 12.893691] mtk-sd 10130000.sdhci: no support for card's volts
    [ 12.899622] mmc0: error -22 whilst initialising SDIO card
    [ 12.994638] mtk-sd 10130000.sdhci: no support for card's volts
    [ 13.000571] mmc0: error -22 whilst initialising MMC card
    [ 13.044010] procd: - early -
    [ 13.047045] procd: - watchdog -
    [ 13.870679] procd: - watchdog -
    [ 13.874253] procd: - ubus -
    [ 13.975671] random: ubusd: uninitialized urandom read (4 bytes read)
    [ 13.987128] mtk-sd 10130000.sdhci: no support for card's volts
    [ 13.993121] mmc0: error -22 whilst initialising SDIO card
    [ 14.186555] mtk-sd 10130000.sdhci: no support for card's volts
    [ 14.192486] mmc0: error -22 whilst initialising MMC card
    [ 14.199509] random: ubusd: uninitialized urandom read (4 bytes read)
    [ 14.206542] random: ubusd: uninitialized urandom read (4 bytes read)
    [ 14.214064] procd: - init -
    [ 14.293310] mtk-sd 10130000.sdhci: no support for card's volts
    [ 14.299243] mmc0: error -22 whilst initialising SDIO card
    [ 14.316483] mtk-sd 10130000.sdhci: no support for card's volts
    [ 14.322416] mmc0: error -22 whilst initialising MMC card
    [ 14.468638] mtk-sd 10130000.sdhci: no support for card's volts
    [ 14.474629] mmc0: error -22 whilst initialising SDIO card
    [ 14.502802] mtk-sd 10130000.sdhci: no support for card's volts
    [ 14.508736] mmc0: error -22 whilst initialising MMC card
    [ 14.848304] kmodloader: loading kernel modules from /etc/modules.d/*
    [ 15.019733] RPC: Registered named UNIX socket transport module.
    [ 15.025815] RPC: Registered udp transport module.
    [ 15.030582] RPC: Registered tcp transport module.
    [ 15.035358] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 15.053940] ntfs: driver 2.1.32 [Flags: R/O MODULE].
    [ 15.117527] Custom GPIO-based SPI driver version 0.1
    [ 15.122884] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.128903] spi-gpio-custom: unable to get master for bus 2
    [ 15.139215] Custom GPIO-based SPI driver version 0.1
    [ 15.144566] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.150581] spi-gpio-custom: unable to get master for bus 2
    [ 15.160174] Custom GPIO-based SPI driver version 0.1
    [ 15.165519] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.171533] spi-gpio-custom: unable to get master for bus 2
    [ 15.181093] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.187076] mmc0: error -22 whilst initialising SDIO card
    [ 15.194148] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.200077] mmc0: error -22 whilst initialising MMC card
    [ 15.224404] Custom GPIO-based SPI driver version 0.1
    [ 15.229672] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.235753] spi-gpio-custom: unable to get master for bus 2
    [ 15.244372] Custom GPIO-based SPI driver version 0.1
    [ 15.249628] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.255707] spi-gpio-custom: unable to get master for bus 2
    [ 15.264383] Custom GPIO-based SPI driver version 0.1
    [ 15.269642] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.275737] spi-gpio-custom: unable to get master for bus 2
    [ 15.291073] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.297058] mmc0: error -22 whilst initialising SDIO card
    [ 15.304122] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [ 15.312454] Custom GPIO-based SPI driver version 0.1
    [ 15.317816] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.323875] spi-gpio-custom: unable to get master for bus 2
    [ 15.332450] Custom GPIO-based SPI driver version 0.1
    [ 15.337786] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.343843] spi-gpio-custom: unable to get master for bus 2
    [ 15.351257] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.357251] mmc0: error -22 whilst initialising MMC card
    [ 15.365163] Custom GPIO-based SPI driver version 0.1
    [ 15.370420] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.376502] spi-gpio-custom: unable to get master for bus 2
    [ 15.386008] Custom GPIO-based SPI driver version 0.1
    [ 15.391277] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.397358] spi-gpio-custom: unable to get master for bus 2
    [ 15.408822] Custom GPIO-based SPI driver version 0.1
    [ 15.414181] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.420196] spi-gpio-custom: unable to get master for bus 2
    [ 15.428803] Custom GPIO-based SPI driver version 0.1
    [ 15.434148] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.440162] spi-gpio-custom: unable to get master for bus 2
    [ 15.450247] Custom GPIO-based SPI driver version 0.1
    [ 15.455606] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.461620] spi-gpio-custom: unable to get master for bus 2
    [ 15.474602] Custom GPIO-based SPI driver version 0.1
    [ 15.479864] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.485937] spi-gpio-custom: unable to get master for bus 2
    [ 15.493511] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.499439] mmc0: error -22 whilst initialising SDIO card
    [ 15.506043] Custom GPIO-based SPI driver version 0.1
    [ 15.511307] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.517394] spi-gpio-custom: unable to get master for bus 2
    [ 15.525480] mtk-sd 10130000.sdhci: no support for card's volts
    [ 15.531411] mmc0: error -22 whilst initialising MMC card
    [ 15.538978] Custom GPIO-based SPI driver version 0.1
    [ 15.544328] spi_gpio: probe of spi_gpio.2 failed with error -16

    [ 16.353078]

               === pAd = c06b2000, size = 1178064 ===
    

    [ 16.364394] mt7628_init(FW(8a00), HW(8a01), CHIPID(7628))
    [ 16.374544] Custom GPIO-based SPI driver version 0.1
    [ 16.379801] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 16.385882] spi-gpio-custom: unable to get master for bus 2

    [ 17.090605] Custom GPIO-based SPI driver version 0.1
    [ 17.217482] ledchain: pwm_base=0xB0005000
    [ 17.221696] ledchain: v6 - Device: /dev/ledchain2
    [ 17.226543] ledchain: - PWM channel : 2
    [ 17.230693] ledchain: - PWM buffer size: 12
    [ 17.234941] ledchain: - Number of LEDs : 1
    [ 17.239092] ledchain: - Inverted : 0
    [ 17.243253] ledchain: - LED type : WS2813 GRB
    [ 17.248195] ledchain: - Max retries : 3
    [ 17.252345] ledchain: - Max Tpassive : 0 nS (0=chip default)
    [ 17.260789] Custom GPIO-based SPI driver version 0.1
    [ 17.266134] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 17.272153] spi-gpio-custom: unable to get master for bus 2
    [ 17.280474] Custom GPIO-based SPI driver version 0.1
    [ 17.285827] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 17.291847] spi-gpio-custom: unable to get master for bus 2
    [ 17.328495] Bluetooth: Core ver 2.22
    [ 17.332231] NET: Registered protocol family 31
    [ 17.336784] Bluetooth: HCI device and connection manager initialized
    [ 17.343256] Bluetooth: HCI socket layer initialized
    [ 17.348207] Bluetooth: L2CAP socket layer initialized
    [ 17.353373] Bluetooth: SCO socket layer initialized
    [ 17.364535] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 17.369932] Bluetooth: BNEP filters: protocol multicast
    [ 17.375297] Bluetooth: BNEP socket layer initialized
    [ 17.381112] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.387090] mmc0: error -22 whilst initialising SDIO card
    [ 17.399563] usbcore: registered new interface driver btusb
    [ 17.409989] usbcore: registered new interface driver cdc_acm
    [ 17.415806] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [ 17.424694] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.430623] mmc0: error -22 whilst initialising MMC card
    [ 17.440868] Bluetooth: HCI UART driver ver 2.3
    [ 17.445451] Bluetooth: HCI UART protocol H4 registered
    [ 17.450658] Bluetooth: HCI UART protocol BCSP registered
    [ 17.460369] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [ 17.466474] Bluetooth: HIDP socket layer initialized
    [ 17.477717] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 17.505476] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
    [ 17.518967] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.524957] mmc0: error -22 whilst initialising SDIO card
    [ 17.547373] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.553357] mmc0: error -22 whilst initialising MMC card
    [ 17.631655] rt2880-pinmux pinctrl: pin io18 already requested by pinctrl; cannot claim for 10005000.pwm
    [ 17.641278] rt2880-pinmux pinctrl: pin-18 (10005000.pwm) status -22
    [ 17.647648] rt2880-pinmux pinctrl: could not request pin 18 (io18) from group pwm0 on device rt2880-pinmux
    [ 17.657534] mtk-pwm 10005000.pwm: Error applying setting, reverse things back
    [ 17.675218] Bluetooth: RFCOMM TTY layer initialized
    [ 17.680215] Bluetooth: RFCOMM socket layer initialized
    [ 17.685534] Bluetooth: RFCOMM ver 1.11
    [ 17.689382] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.695322] mmc0: error -22 whilst initialising SDIO card
    [ 17.704307] mtk-sd 10130000.sdhci: no support for card's volts
    [ 17.710236] mmc0: error -22 whilst initialising MMC card
    [ 17.720893] Custom GPIO-based SPI driver version 0.1
    [ 17.726236] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 17.732257] spi-gpio-custom: unable to get master for bus 2
    [ 17.749638] usbcore: registered new interface driver ums-alauda
    [ 17.758884] usbcore: registered new interface driver ums-cypress
    [ 17.768370] usbcore: registered new interface driver ums-datafab
    [ 17.777524] usbcore: registered new interface driver ums-freecom
    [ 17.786915] usbcore: registered new interface driver ums-isd200
    [ 17.796458] usbcore: registered new interface driver ums-jumpshot
    [ 17.805752] usbcore: registered new interface driver ums-karma
    [ 17.815863] usbcore: registered new interface driver ums-sddr09
    [ 17.825310] usbcore: registered new interface driver ums-sddr55
    [ 17.835089] usbcore: registered new interface driver ums-usbat
    [ 17.848363] usbcore: registered new interface driver usbhid
    [ 17.854086] usbhid: USB HID core driver
    [ 17.862392] usbcore: registered new interface driver usblp
    [ 17.877954] usbcore: registered new interface driver usbserial
    [ 17.884069] usbcore: registered new interface driver usbserial_generic
    [ 17.890779] usbserial: USB Serial support registered for generic
    [ 17.910463] Driver for 1-wire Dallas network protocol.
    [ 17.939742] xt_time: kernel timezone is -0000
    [ 17.946708] usbcore: registered new interface driver ch341
    [ 17.952379] usbserial: USB Serial support registered for ch341-uart
    [ 18.022820] PPP generic driver version 2.4.2
    [ 18.030546] NET: Registered protocol family 24
    [ 18.050253] usbcore: registered new interface driver snd-usb-audio
    [ 18.058617] Custom GPIO-based SPI driver version 0.1
    [ 18.063968] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 18.069989] spi-gpio-custom: unable to get master for bus 2
    [ 18.092821] usbcore: registered new interface driver uvcvideo
    [ 18.098656] USB Video Class driver (1.1.1)
    [ 18.109769] usbcore: registered new interface driver option
    [ 18.115646] usbserial: USB Serial support registered for GSM modem (1-port)
    [ 18.128943] Custom GPIO-based SPI driver version 0.1
    [ 18.134282] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 18.140303] spi-gpio-custom: unable to get master for bus 2
    [ 18.148751] Custom GPIO-based SPI driver version 0.1
    [ 18.154091] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 18.160113] spi-gpio-custom: unable to get master for bus 2
    [ 18.167655] kmodloader: 1 module could not be probed
    [ 18.172976] kmodloader: - spi-gpio-custom - 0
    [ 18.514258] mtk-sd 10130000.sdhci: no support for card's volts
    [ 18.520191] mmc0: error -22 whilst initialising SDIO card
    [ 18.983673] mmc0: error -22 whilst initialising MMC card
    [ 19.198345] urandom_read: 5 callbacks suppressed
    [ 19.198356] random: jshn: uninitialized urandom read (4 bytes read)
    [ 21.123100] mtk-sd 10130000.sdhci: no support for card's volts
    [ 21.129035] mmc0: error -22 whilst initialising SDIO card
    [ 21.153945] mtk-sd 10130000.sdhci: no support for card's volts
    [ 21.159879] mmc0: error -22 whilst initialising MMC card
    [ 21.250019] mtk-sd 10130000.sdhci: no support for card's volts

    [ 30.974703] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready
    [ 31.072817] mtk-sd 10130000.sdhci: no support for card's volts

    [ 32.375184]
    _ _____ ___ ___ _________ ___ ____
    | | /| / / _ | / _ / _ \ / / __ / _ / / V1.2
    | |/ |/ / __ |/ , _/ / / // // / , _/ _/
    |
    /|
    /
    / |//|// _/_//|/__/
    Onion Enhanced MT7688 WiFi Driver

    [ 33.169724] DMA Scheduler Mode=0(LMAC)
    [ 33.173593] efuse_probe: efuse = 10000012
    [ 33.177709] 1. Phy Mode = 14
    [ 33.404511] 2. Phy Mode = 14
    [ 33.407485] 3. Phy Mode = 14
    [ 33.422118] WTBL Segment 1 info:
    [ 33.425550] MemBaseAddr/FID:0x28000/0
    [ 33.429436] EntrySize/Cnt:32/128
    [ 33.432898] WTBL Segment 2 info:
    [ 33.436257] MemBaseAddr/FID:0x40000/0
    [ 33.440141] EntrySize/Cnt:64/128
    [ 33.443598] WTBL Segment 3 info:
    [ 33.446956] MemBaseAddr/FID:0x42000/64
    [ 33.450929] EntrySize/Cnt:64/128
    [ 33.454385] WTBL Segment 4 info:
    [ 33.457744] MemBaseAddr/FID:0x44000/128
    [ 33.461805] EntrySize/Cnt:32/128
    [ 33.502883] mtk-sd 10130000.sdhci: no support for card's volts
    [ 33.508812] mmc0: error -22 whilst initialising SDIO card
    [ 33.550976] mtk-sd 10130000.sdhci: no support for card's volts
    [ 33.556968] mmc0: error -22 whilst initialising MMC card
    [ 72.442783] random: crng init done
    [ 352.347347] mtk-sd 10130000.sdhci: no support for card's volts
    [ 352.353347] mmc0: error -22 whilst initialising SDIO card
    [ 352.360261] mtk-sd 10130000.sdhci: no support for card's volts
    [ 352.366207] mmc0: error -22 whilst initialising MMC card
    root@Omega-EB02:/tmp#



  • @nsmith Ok so the first issue is solved, module load order. With regard to the sd card, take a look at this thread:

    https://community.onion.io/topic/4873/omega2s-can-t-read-gpio-pin-26/6?_=1672754345488

    It may be the mmc modules are creatng the issue.



  • @crispyoz Hello, The first issue is not solved, The insmod is supposed to install 3 SPI devices

    insmod spi-gpio-custom bus2=2,22,44,23,0,1000000,41,0,1000000,42,0,1000000,43
    

    It still gives an error

    Sat Nov 19 19:58:50 2022 kern.err kernel: [   18.140303] spi-gpio-custom: unable to get master for bus 2
    
    [ 15.122884] spi_gpio: probe of spi_gpio.2 failed with error -16
    [ 15.128903] spi-gpio-custom: unable to get master for bus 2
    

    I been trying different things for a week, nothing works



  • @nsmith The initial issue was the inability to load a kernel module, that issue no longer exists because the module is now loading, if it wasn't being loaded the error you have reported could not be reported. ie module cannot locate the master spi device on the bus. So now we need to address this new issue.

    Did you read the thread I referred to in my last response? From your log it looks like there is an issue with your sdcard, so as you mentioned this may be the source of your issue since you are utilising an SD card related GPIO. If the mmc kernel modules are loaded this may result in your spi module being unable to utilise the gpio. This was the gist of the thread I referred you to, inlcuding the solution.



  • @crispyoz kmod-mmc is in the build when i open up the menuconfig (Kernel Modules/Other Modules) but it seems it cant be disabled



  • I disabled kmod-mmc and its working now! thanks for your help!


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.