Odroid-C4 Kernel w1-gpio

I am attempting to use ds18b20 sensors with my Odroid-C4 which is running the arm-testing branch.

As far as I can tell the w1-gpio kernel module is not available to load, and I am unsure how to add that or what I need to build a kernel with it.

I also posted on the Odroid forum.. with no luck
https://forum.odroid.com/viewtopic.php?p=298699#p298699

the w1-therm module will load
the w1-gpio module will not

uname -a
Linux odroidc4 5.7.10-1-MANJARO-ARM #1 SMP Wed Jul 22 15:36:15 CEST 2020 aarch64 GNU/Linux

sudo modprobe w1-gpio
modprobe: FATAL: Module w1-gpio not found in directory /lib/modules/5.7.10-1-MANJARO-ARM

We don't enable either of those in our mainline kernel.

So where is w1-therm module from? Did you install some package to get that?

Okay. This is likely from CONFIG_W1_SLAVE_THERM=m in the kernel config. If you can find out what is needed to enable the w1-gpio on mainline, let me know and I will enable it.

Is it: CONFIG_W1_MASTER_GPIO?
EDIT: Dug through the kernel source tree and found that this is indeed what's making the w1-gpio module. So I will enable it in the next kernel updates I do.

1 Like

Thanks Strit, was on vacation and didn't get a notification for this.

I managed to find it in the Pine64 kernel before I left, but forgot to attach it in a reply.

It should now be enabled in the kernel from 5.7.10-2 and forward.

I have another Q if anyone can help me, google-fu hasn't got me an answer.. or anything recent

/boot/dtbs/amlogic/meson-sm1-odroid-c4.dtb

does not include a line for onewire, unless I need to do it somewhere else..
from what I can tell I need something like the following inside of it, and have failed to make that work so far.

       onewire {
                compatible = "w1-gpio";
                gpios = <0x12 0x71 0x0>;
        };

https://wiki.odroid.com/odroid-c4/application_note/gpio/1wire#tab__odroid-c41

https://forum.odroid.com/viewtopic.php?f=141&t=24373

https://odroid.com/dokuwiki/doku.php?id=en:c2_hardware_1w

I also tried to boot with the meson64_odroid.dtb from armbian, no luck

Yeah, that would need to be patched into the kernel. I will see if I can figure out where it's suppose to be.

Forum kindly sponsored by