Did the latest (RAM upgrade) kernel and device tree break 1wire?

Post Reply
paulcrawford
Posts: 128
Joined: Tue May 10, 2016 11:51 am
languages_spoken: english
ODROIDs: c2 and n2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Did the latest (RAM upgrade) kernel and device tree break 1wire?

Unread post by paulcrawford » Thu Aug 15, 2019 6:19 am

I upgraded to the latest kernel and device tree today:

Code: Select all

root@no:/home/co/src# uname -a
Linux normaddieiin2 4.9.187-53 #1 SMP PREEMPT Fri Aug 9 06:12:18 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

to get the additional RAM but unfortunately now onewire seems to be broken although the device tree says it is okay:

Code: Select all

root@no:/home/co/src# fdtget /media/boot/meson64_odroidn2.dtb /onewire status
okay
I did change the pin for onewire:

Code: Select all

co@no:/sys/bus/w1/devices$ sudo fdtget /media/boot/meson64_odroidn2.dtb /onewire gpios
25 76 0
but I have confirmed that the probes are wired to that pin. Also, everything worked before the upgrade.

When I try to find my temperature probes they are not there:

Code: Select all

root@no:/home/co/src# ls /sys/bus/w1/devices
00-6c0000000000  00-ec0000000000  w1_bus_master1
There should actually be three not two and the two that are there have garbage as names.

Can someone at HardKernel please test the onewire wiki instructions with the latest kernel/device tree?

Edit: As an update dmesg shows the following repeating errors:

Code: Select all

[14468.038389] w1_master_driver w1_bus_master1: Family 0 for 00.748000000000.b6 is not registered.
[14468.038837] asoc-aml-card auge_sound: aml_card_probe, parse error -517
[14468.039907] aml_card_probe error ret:-517
[14514.820102] w1_master_driver w1_bus_master1: Family 0 for 00.f48000000000.3a is not registered.
[14514.820552] asoc-aml-card auge_sound: aml_card_probe, parse error -517
[14514.821611] aml_card_probe error ret:-517

cap00k
Posts: 86
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 8 times
Contact:

Re: Did the latest (RAM upgrade) kernel and device tree break 1wire?

Unread post by cap00k » Mon Aug 19, 2019 3:45 pm

I found the cause of the 1-wire not working in the latest kernels.
The GPIOA_13 pin is being used simultaneously for the spdif_output and 1-wire drivers.

Try changing the default pin as described in the link below.
In the next update, we will change the GPIOX_3 pin to the default pin.
https://wiki.odroid.com/odroid-n2/appli ... _interface
These users thanked the author cap00k for the post:
paulcrawford (Tue Aug 20, 2019 11:07 am)

paulcrawford
Posts: 128
Joined: Tue May 10, 2016 11:51 am
languages_spoken: english
ODROIDs: c2 and n2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Did the latest (RAM upgrade) kernel and device tree break 1wire?

Unread post by paulcrawford » Tue Aug 20, 2019 11:07 am

@cap00k,

Thank for the explanation but as I noted in my original post, I had already changed the pin for one wire from the default of GPIOA_13 to pin 24 GPIOX_10 (486). So I think that the conflict for my N2 is between SPI and one wire on the same pin.

I have checked, however, that SPI has been disabled in my device tree:

Code: Select all

root@no:/home/co/src# fdtget /media/boot/meson64_odroidn2.dtb /soc/cbus@ffd00000/spi@13000 status
disabled
root@no:/home/co/src# fdtget /media/boot/meson64_odroidn2.dtb /soc/cbus@ffd00000/spi@13000/spidev@0 status
disabled
Following setting SPI as disabled, I did both a reboot and a systemctl poweroff to ensure that the revised device tree would be read but I still cannot use one wire.

Another interesting side effect is that I had wanted to use pin19 GPIOX_8 (484) as an output but when I try to export it:

Code: Select all

root@no:/home/co/src# echo 484 > /sys/class/gpio/export
bash: echo: write error: Device or resource busy
It seems that the pin is busy already. The default for that pin is SPI0_MOSI so again there seems to be a conflict despite the fact that SPI has been disabled in the device tree.

I think a little more digging is in order to determine what the real issue is here.

Thanks.

paulcrawford
Posts: 128
Joined: Tue May 10, 2016 11:51 am
languages_spoken: english
ODROIDs: c2 and n2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Did the latest (RAM upgrade) kernel and device tree break 1wire?

Unread post by paulcrawford » Wed Aug 21, 2019 10:23 pm

Interestingly, but not unexpectedly, applying the latest upgrade to revert to the old kernel & uboot has resulted in one wire working again just as it did before.

Thanks @odroid for implementing the reversion.

Edit: Also the issue with exporting gpio484 has also gone away. Thanks again.

User avatar
odroid
Site Admin
Posts: 31835
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 252 times
Contact:

Re: Did the latest (RAM upgrade) kernel and device tree break 1wire?

Unread post by odroid » Thu Aug 22, 2019 8:21 am

Thank you for the confirmation.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests