Go to advanced search

by snorremans
Fri Jun 01, 2018 7:07 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Thanks, maybe when I have time I'll dive a little deeper then :) Btw I found this link : http://buildroot-busybox.2317881.n4.nabble.com/Bug-9541-New-Platform-drivers-autoloading-from-info-in-device-tree-does-not-work-td153712.html , which contradicts your experience. But it looks like this is either...
by snorremans
Fri Jun 01, 2018 4:29 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Allright, I thought I finally got it but I guess not! You were right I made a mistake, even if I include the node in the original device tree the module is only loaded with udev included. I'm using the method of writing "dtoverlay=myoverlay" in config.txt. So if this makes no difference to including...
by snorremans
Fri Jun 01, 2018 3:39 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

So finally after some experimentation it seems that the modules are loaded by udev/eudev/mdev if the node is added by an overlay but they are added by the kernel(?) if the node is present in the original device tree. If I want to have the module loaded in a system without udev, the node should be pr...
by snorremans
Thu May 24, 2018 1:42 am
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

So I've tried the following steps: Create script /bin/mymodprobe: #! /bin/sh echo modprobe $* exec /bin/busybox modprobe $* Point symlink to the script: ln -s -f /bin/mymodprobe /sbin/modprobe When rebooting, the only time its called is: modprobe -q -- net-pf-10 which I think is from the init script...
by snorremans
Wed May 23, 2018 3:05 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Thanks, I've tried rebuilding the image with the udev config enabled, when doing this the module actually gets loaded, which confuses me even more as I thought udev would have nothing to do with this. I will try editing the /proc/ entry next without udev to get an idea what is happening. Is this mec...
by snorremans
Tue May 22, 2018 10:33 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Yup, that's also what I did. I'm testing some overlay I wrote myself. After I saw it wasn't loading the module I tried with an existing one (the mcp3008). Currently rebuilding everything with buildroot, it seems udev is not included in the default config. But it still seems to me that the kernel wou...
by snorremans
Tue May 22, 2018 8:28 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Thanks I'll try this. You're saying the kernel sends a message when it encounters a node, so is it udev who receives this message and loads the module? In that case I might check out the udev configuration in buildroot. I will look into how to get the dtoverlay program in in my buildroot image. I wi...
by snorremans
Tue May 22, 2018 7:46 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Re: Loading of kernel module with overlay

Thanks, Forgot to mention, I did that, for this particular overlay I've used the steps as in http://www.jumpnowtek.com/rpi/Using-mcp3008-ADCs-with-Raspberry-Pis.html . So I've added the lines dtparam=spi=on and dtoverlay=mcp3008:spi0-0-present,spi0-0-speed=1000000 . Still the driver is not loaded th...
by snorremans
Tue May 22, 2018 7:28 pm
Forum: Device Tree
Topic: Loading of kernel module with overlay
Replies: 18
Views: 4969

Loading of kernel module with overlay

Hello all, I have been experimenting with overlays for the device tree for the rpi. I am using a rpi B+ V1.2 with buildroot and the kernel from the raspberry pi github (I've tried versions 4.14 through 4.16). I am able to add the overlays to the device tree, for example the mcp3008-overlay by settin...
by snorremans
Fri Jun 16, 2017 12:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI1 clock is delayed?
Replies: 3
Views: 1042

Re: SPI1 clock is delayed?

Yup the link seems to be about the same problem. I've looked at the driver (spi-bcm2835aux.c) in the kernel and there it can be clearly seen that the driver only supports the CPOL, CS_HIGH and NO_CS mode bits. When I look at the bcm2835 ARM peripherals document however, the description seems to sugg...
by snorremans
Thu Jun 15, 2017 6:21 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI1 clock is delayed?
Replies: 3
Views: 1042

Re: SPI1 clock is delayed?

A little update: I've run apt-get upgrade just to see if it would help. I'm now using kernel version 4.9.24-v7+. Now when I run the spidev-test program on /dev/spidev0.0 it is still fine in all 4 SPI modes, but when I run the same on /dev/spidev1.0 in mode 1 or 3, so for example: ./spidev-test -D /d...
by snorremans
Wed Jun 14, 2017 6:45 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI1 clock is delayed?
Replies: 3
Views: 1042

SPI1 clock is delayed?

I want to use both SPI0 and SPI1 using the spidev driver. The devices appear correctly in /dev (I have spidev0.0 spidev0.1 & spidev1.0), but the clock phase of SPI1 seems wrong (see attached scope screenshots). Here, I am trying to use them in mode 2 (clock idle high, sample on falling edge). For th...

Go to advanced search