[5.10.x-ti] 1-wire on BeagleBone Black with Debian 11

Hi,

I’m trying to use a 1-wire temperature sensor DS18B20 connect to P9_12 (GPIO 60) of a BBB wireless under Debian 11 (upgraded from BeagleBoard.org Debian Buster IoT Image 2020-04-06). I have followed the instructions from this thread from Nov. 2021 respective from (EBC Exercise 31 Dallas 1-Wire - eLinux.org). After activating the overlay for 1w in /boot/uEnv.txt with the line

uboot_overlay_addr4=/lib/firmware/BB-W1-P9.12-00A0.dtbo

I get the following error messages from dmesg |grep w1:

[   10.180056] w1-gpio onewire: gpio_request (pin) failed
[   10.505044] w1_master_driver w1_bus_master1: Attaching one wire slave 28.000009304e33 crc 27
[   10.521323] w1_master_driver w1_bus_master1: Family 28 for 28.000009304e33.27 is not registered.

Under /sys/class/hwmon/ there are no subdirectories. Under /sys/bus/w1/devices/28-000009304e33 there is no file temperature as used to be in previous versions. What am I missing?

it never got the pin… please run the version.sh script…

sudo beagle-version

(sudo apt install bb-beagle-version)

Regards,

Here is the full output of beagle-version:

eeprom:[A335BNLTBWA52027BBWG1313]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)]:[location: dd MBR]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-ADC-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-BBBW-WL1835-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-W1-P9.12-00A2]
kernel:[5.10.90-ti-r35]
nodejs:[v12.22.5]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-W1-P9.12-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821]
pkg:[bb-customizations]:[1.20220119.0-0~buster+20220125]
pkg:[bb-usb-gadgets]:[1.20220112.3-0~buster+20220112]
pkg:[bb-wl18xx-firmware]:[1.20211222.2-0~buster+20211222]
pkg:[kmod]:[28-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20210315-3]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   34.035269] remoteproc remoteproc0: wkup_m3 is available
[   34.726663] remoteproc remoteproc0: powering up wkup_m3
[   34.726709] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   34.727012] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   48.064519] Bluetooth: hci0: change remote baud rate command in firmware
[   58.623416] remoteproc remoteproc1: 4a334000.pru is available
[   58.657123] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[    0.180056] platform 4a326004.pruss-soc-bus: Cannot lookup hwmod 'pruss'
[   58.623416] remoteproc remoteproc1: 4a334000.pru is available
[   58.657123] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pinctrl-single
[    9.756559] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[   10.196180] pinctrl-single 44e10800.pinmux: pin PIN74 already requested by 481a6000.serial; cannot claim for leds
[   10.206623] pinctrl-single 44e10800.pinmux: pin-74 (leds) status -22
[   10.213040] pinctrl-single 44e10800.pinmux: could not request pin 74 (PIN74) from group pinmux_bt_pins  on device pinctrl-single
dmesg | grep gpio-of-helper
[    9.758317] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_03'
[    9.758348] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[   10.424929] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0 name='P8_03'
[   10.425169] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1 name='P8_04'
[   10.425338] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2 name='P8_05'
[   10.425510] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3 name='P8_06'
[   10.426027] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4 name='P8_07'
[   10.426202] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5 name='P8_08'
[   10.426385] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6 name='P8_09'
[   10.426687] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7 name='P8_10'
[   10.426932] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8 name='P8_11'
[   10.427124] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9 name='P8_12'
[   10.427412] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10 name='P8_13'
[   10.427593] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11 name='P8_14'
[   10.427754] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12 name='P8_15'
[   10.427923] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13 name='P8_16'
[   10.428096] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14 name='P8_17'
[   10.428272] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15 name='P8_18'
[   10.428448] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16 name='P8_19'
[   10.428628] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17 name='P8_20'
[   10.428801] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18 name='P8_21'
[   10.428968] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19 name='P8_22'
[   10.429126] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20 name='P8_23'
[   10.429295] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21 name='P8_24'
[   10.429469] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22 name='P8_25'
[   10.429631] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23 name='P8_26'
[   10.429807] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24 name='P8_27'
[   10.429983] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25 name='P8_28'
[   10.430161] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26 name='P8_29'
[   10.430326] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27 name='P8_30'
[   10.430580] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28 name='P8_31'
[   10.430774] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29 name='P8_32'
[   10.430943] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30 name='P8_33'
[   10.431120] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31 name='P8_34'
[   10.431290] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32 name='P8_35'
[   10.431459] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33 name='P8_36'
[   10.431632] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34 name='P8_37'
[   10.431813] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35 name='P8_38'
[   10.431986] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36 name='P8_39'
[   10.432156] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37 name='P8_40'
[   10.432329] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38 name='P8_41'
[   10.432520] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39 name='P8_42'
[   10.432680] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40 name='P8_43'
[   10.432858] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41 name='P8_44'
[   10.433029] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42 name='P8_45'
[   10.433185] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43 name='P8_46'
[   10.433358] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44 name='P9_11'
[   10.433541] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45 name='P9_12'
[   10.433704] gpio-of-helper ocp:cape-universal: Allocated GPIO id=46 name='P9_13'
[   10.433882] gpio-of-helper ocp:cape-universal: Allocated GPIO id=47 name='P9_14'
[   10.434042] gpio-of-helper ocp:cape-universal: Allocated GPIO id=48 name='P9_15'
[   10.434222] gpio-of-helper ocp:cape-universal: Allocated GPIO id=49 name='P9_16'
[   10.434396] gpio-of-helper ocp:cape-universal: Allocated GPIO id=50 name='P9_17'
[   10.434656] gpio-of-helper ocp:cape-universal: Allocated GPIO id=51 name='P9_18'
[   10.434841] gpio-of-helper ocp:cape-universal: Allocated GPIO id=52 name='P9_19'
[   10.435003] gpio-of-helper ocp:cape-universal: Allocated GPIO id=53 name='P9_20'
[   10.435204] gpio-of-helper ocp:cape-universal: Allocated GPIO id=54 name='P9_21'
[   10.435382] gpio-of-helper ocp:cape-universal: Allocated GPIO id=55 name='P9_22'
[   10.435544] gpio-of-helper ocp:cape-universal: Allocated GPIO id=56 name='P9_23'
[   10.435731] gpio-of-helper ocp:cape-universal: Allocated GPIO id=57 name='P9_24'
[   10.435911] gpio-of-helper ocp:cape-universal: Allocated GPIO id=58 name='P9_25'
[   10.436091] gpio-of-helper ocp:cape-universal: Allocated GPIO id=59 name='P9_26'
[   10.436261] gpio-of-helper ocp:cape-universal: Allocated GPIO id=60 name='P9_27'
[   10.436419] gpio-of-helper ocp:cape-universal: Allocated GPIO id=61 name='P9_28'
[   10.436600] gpio-of-helper ocp:cape-universal: Allocated GPIO id=62 name='P9_29'
[   10.436784] gpio-of-helper ocp:cape-universal: Allocated GPIO id=63 name='P9_30'
[   10.436950] gpio-of-helper ocp:cape-universal: Allocated GPIO id=64 name='P9_31'
[   10.437132] gpio-of-helper ocp:cape-universal: Allocated GPIO id=65 name='P9_41'
[   10.437292] gpio-of-helper ocp:cape-universal: Allocated GPIO id=66 name='P9_91'
[   10.437464] gpio-of-helper ocp:cape-universal: Allocated GPIO id=67 name='P9_42'
[   10.437642] gpio-of-helper ocp:cape-universal: Allocated GPIO id=68 name='P9_92'
[   10.437652] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

HI @An256 let’s get your u-boot up to date…

sudo apt update
sudo apt install bb-u-boot-am335x-evm
sudo /opt/u-boot/bb-u-boot-am335x-evm/install.sh
sudo reboot

I’ll probably still have to make a kernel specific version of BB-W1-P9.12-00A2, in /boot/uEnv.txt remove all “/lib/firmware/” this will help u-boot find both versions and select the kernel version when available…

looks around my desk… Where did i stick those 1wire devices…

Regards,

Thanks @RobertCNelson. I updated u-boot according to your instructions and changed the line for the 1w overlay in /boot/uEnv.txt to

uboot_overlay_addr4=BB-W1-P9.12-00A0.dtbo

(removing “/lib/firmware/” as indicated). Similarly, I removed “/lib/firmware” for the other entries.
The 1-wire device is still not found, the dmesg output stays the same. Do I understand you correctly that something else needs to be changed in the configuration?

Correct, i need to double check it… Are you still seeing the pinmux issue in dmesg (w1-gpio onewire: gpio_request (pin) failed)

Regards,

Yes, I’m still seeing error message w1-gpio onewire: gpio_request (pin) failed.
I just realized that in /boot/uEnv.txt there is a line

uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo

which seems to refer to kernel version 4.19. However, I don’t see a corresponding file for kernel 5.10 in /lib/firmware.

You don’t need that for v5.4.x/v5.10.x… the other pru driver was broken, so only RPROC is enabled in v5.4.x/5.10.x

Regards,

Okay, thanks, I just commented that line out. I don’t notice any change, though.

Okay, got it working…

root@BeagleBone:~# dmesg | grep wire
[   58.691644] Driver for 1-wire Dallas network protocol.
[   59.144107] w1_master_driver w1_bus_master1: Attaching one wire slave 28.00000c85a408 crc 70
root@BeagleBone:~# cat /sys/class/hwmon/hwmon0/
device/      name         power/       subsystem/   temp1_input  uevent
root@BeagleBone:~# cat /sys/class/hwmon/hwmon0/temp1_input 
22000

moving it module vs built-in seems to have made it work better…

Building right now, should have a build in a few hours…

for pru…

root@BeagleBone:~# dmesg | grep pru
[   63.516491] remoteproc remoteproc1: 4a334000.pru is available
[   63.721445] remoteproc remoteproc2: 4a338000.pru is available

Regards,

Thanks a lot @RobertCNelson ! After updating the kernel to 5.10.100-ti-r37, it works! The sensor is discovered and I can read the temperature from /sys/class/hwmon/hwmon0/temp1_input.

Not the driver, but the kernel is broken. Without uio_pruss this kernel is useless.

Regards