I am trying to connect a DS18B20 to my BeagleBone black running 6.15.11-bone27.
This is the overlay I am using:
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com>
* Virtual cape for onewire on connector pin P9.12
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BB-W1-P9.12-00A0.bb.org-overlays = __TIMESTAMP__;
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
P9_12_pinmux { status = "disabled"; }; /* P9_12 (U18) gpmc_be1n.gpio1_28 */
};
&am33xx_pinmux {
bb_dallas_w1_pins: pinmux_bb_dallas_w1_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_INPUT_PULLUP, MUX_MODE7) /* P9_12 (U18) gpmc_be1n.gpio1_28 */
>;
};
};
&{/} {
onewire {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_dallas_w1_pins>;
compatible = "w1-gpio";
gpios = <&gpio1 28>;
};
};
beagle-version shows that the overlay loaded, but /sys/bus/w1/devices is empty and dmesg shows the following error:
pinctrl-single 44e10800.pinmux: no pins entries for pinmux_bb_dallas_w1_pins
Testing.. Commits · beagleboard/BeagleBoard-DeviceTrees · GitHub
voodoo@23-am335x-bbb:/opt/source/dtb-6.15.x$ git pull
voodoo@23-am335x-bbb:/opt/source/dtb-6.15.x$ ./build_n_install.sh
voodoo@23-am335x-bbb:/opt/source/dtb-6.15.x$ cat /boot/uEnv.txt | grep -v '#'
uname_r=6.15.11-bone27
enable_uboot_overlays=1
uboot_overlay_addr0=BB-W1-P9.12-00A0.dtbo
disable_uboot_overlay_video=1
uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo
console=ttyS0,115200n8
cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
loading /boot/vmlinuz-6.15.11-bone27 ...
8651264 bytes read in 546 ms (15.1 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb ...
loading /boot/dtbs/6.15.11-bone27/am335x-boneblack-uboot.dtb ...
96616 bytes read in 11 ms (8.4 MiB/s)
Found 0 extension board(s).
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/dtbs/6.15.11-bone27/BB-ADC-00A0.dtbo ...
645 bytes read in 5 ms (126 KiB/s)
uboot_overlays: loading /boot/dtbs/6.15.11-bone27/overlays/BB-W1-P9.12-00A0.dtbo ...
1089 bytes read in 6 ms (176.8 KiB/s)
uboot_overlays: loading /boot/dtbs/6.15.11-bone27/BB-BONE-eMMC1-01-00A0.dtbo ...
1645 bytes read in 4 ms (401.4 KiB/s)
uboot_overlays: uboot loading of [BB-HDMI-TDA998x-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_video=1]...
uboot_overlays: unable to find [mmc 0:3 AM335X-PRU-UIO-00A0.dtbo]...
loading /boot/initrd.img-6.15.11-bone27 ...
12447378 bytes read in 793 ms (15 MiB/s)
debug: [console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100] ...
debug: [bootz 0x82000000 0x88080000:bdee92 88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x840200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8f421000, end 8ffffe92 ... OK
Loading Device Tree to 8f3a6000, end 8f420fff ... OK
Starting kernel ...
voodoo@23-am335x-bbb:~$ dmesg | grep onewire
[ 51.226838] gpio-540 (onewire): enforced open drain please flag it properly in DT/ACPI DSDT/board file
voodoo@23-am335x-bbb:~$ sudo beagle-version | grep UBOOT
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot.dts]
UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
UBOOT: Loaded Overlay:[BB-W1-P9.12-00A0.kernel]
Sorry no hardware …
voodoo@23-am335x-bbb:/sys/bus/w1/devices$ ls -lha
total 0
drwxr-xr-x 2 root root 0 Sep 25 15:30 .
drwxr-xr-x 4 root root 0 Sep 25 15:30 ..
lrwxrwxrwx 1 root root 0 Sep 25 15:32 w1_bus_master1 -> ../../../devices/w1_bus_master1
Regards,
Perfect, that worked. I was compiling the overlay from /opt/source/bb.org-overlays.
Thank you.