Can anyone help with instructions about using Dallas 1 wire on Debian stretch with kernel 4.14.54-bpi-r2-main (or any really).
I have a couple of DS18B20’s here attached to a Raspberry Pi 3 and would like to move them onto the R2.
I have recompiled Frank-W’s kernel his repository at https://github.com/frank-w/BPI-R2-4.14 and added in w1-thermal and w1-gpio and they load ok but obviously I need something in the device tree. Now on a Raspberry Pi this is easy but I have no idea how to do it with the R2.
So if anyone can give me some clear instructions that would be awesome.
If by “How is your circuit” you mean how is it connected it has 3 wires, 1 is 3.3v, 1 is ground and 1 is data.
I use quite a lot of the pins on the pi at once so this is currently connected to a non standard gpio 25 (Pin 22) instead of gpio 4.
The config.txt dtoverlay line looks like dtoverlay=w1-gpio,gpiopin=25
I then load the w1-gpio and w1-therm modules at boot in /etc/modules.
It would be a pity if there is no way to do this with the bpi gpio.
We seem to be missing CONFIG_OF_CONFIGFS in the kernel configs.
I see that mentioned here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858975 as well as here https://stackoverflow.com/questions/50877808/configfs-do-not-mount-device-tree-overlays.
I would attempt to compile that driver mentioned in the last url but obviously need the kernel headers etc.
Perhaps you could have a go at compiling it Frank?
The device tree would be great actually as I also want to get my gps working on the R2 with PPS for a clocksource.
My knowledge of all this is a little limited. Guess I am too used to the ease of doing this in a Raspberry Pi with overlays and blobs.
I recently added configfs but you need to add your driver too. So you need to compile kernel by youself and then add dt-overlay. I have not tried it yet due to missing time
grep -i 'configfs\|overlay' .config
CONFIG_OF_OVERLAY=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_OVERLAY_FS=y
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
# CONFIG_OVERLAY_FS_INDEX is not set
CONFIG_CONFIGFS_FS=m
I did not found CONFIG_OF_CONFIGFS so i cannot enable it
Yep I have done all that.
No go. I see nothing in /sys/kernel/config and trying to create a folder under that results in an error.
Oh well. Onward and upward.
Ok I now have this working.
To enable w1-gpio on GPIO 19 add the following to the main node of mt7623n-bananapi-bpi-r2.dts and recompile the kernel after setting CONFIG_W1=m, CONFIG_W1_MASTER_GPIO=m and CONFIG_W1_SLAVE_THERM=m in your kernel config