hicks.e
Posts: 5
Joined: Thu Dec 15, 2016 9:09 pm

HAT devicetree issue after stretch upgrade

Sat Mar 03, 2018 10:19 pm

I have a HAT with a device tree in the eeprom that is a combination of pi3-disable-bt to remap the hardware uart to gpio 14 & 15 and w1 mapping to gpio 4. This has worked fine for the last year or so under Jessie, but since upgrading to Stretch this week, the remapping no longer appears to take place.

dts and eeprom_settings file can be found on bitbucket

I have made one extra change to eeprom_settings.txt to explicitly set pin 14 and 15 to ALT0 which is commented out in the above repo version (although the problem remains the same).

On booting the PI3 with the hat connected, gpio readall shows pin 14 & 15 as ALT5 rather than ALT0. If I edit config.txt and set dtoverlay=pi3-disable-bt then reboot, doing gpio readall shows the two pins are switched to ALT0 and everything works once more.

For some reason the overlay in the HATs eeprom does not appear to be disabling bluetooth and doing the pin remapping since upgrading to stretch.

more /proc/device-tree/hat/* shows the hat is detected and identified correctly.

Also, if I blank the hat eeprom and reboot, then the w1 temp sensors are no longer available, which suggests the HAT device tree is at least correctly doing part of the configuration. Flashing my dtb back to the eeprom makes the w1 temp sensors available again, but pins 14&15 remain as ALT5 rather than ALT0.

Has anything changed between raspbian Jessie and Stretch that would cause HAT auto configuration for pin 14&15 remapping to fail?

I'm at a bit of a loss, any suggestions for troubleshooting this further?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2162
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: HAT devicetree issue after stretch upgrade

Sat Mar 03, 2018 10:25 pm

Does "sudo vcdbg log msg |& grep -v -i -E '(HDMI|gpioman)'" show anything interesting?

hicks.e
Posts: 5
Joined: Thu Dec 15, 2016 9:09 pm

Re: HAT devicetree issue after stretch upgrade

Sat Mar 03, 2018 10:47 pm

It doesn't appear to show anything. Running this as root gives:

Code: Select all

$ vcdbg log msg
Unable to determine the value of __LOG_START
Unable to read logging_header from 0x00000000

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2162
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: HAT devicetree issue after stretch upgrade

Mon Mar 05, 2018 10:07 pm

Two significant things happened to the DTBs between Jessie and Stretch releases - the upstream DTBs renamed the UART nodes from "[email protected]" to "[email protected]", and we refactored our downstream DTBs to be based on the upstream versions. The end result is that the nodes referred to by the patch to the "aliases" node no longer exist with those names.

The correct form of the aliases is now:

Code: Select all

			serial0 = "/soc/[email protected]";
			serial1 = "/soc/[email protected]";
Upstream DTB changes are rare, but they do happen sometimes and we have little choice but to follow them. It's unfortunate that there is no way of patching an alias to point to a new node without binding in the absolute path to the new node, but currently that's what we have.

hicks.e
Posts: 5
Joined: Thu Dec 15, 2016 9:09 pm

Re: HAT devicetree issue after stretch upgrade

Wed Mar 07, 2018 12:56 pm

Thanks for the information. I'll make that change tonight and re-test.

Edit: That change did the trick.

Return to “Device Tree”