# Does mender change u-boot dts?

**URL:** <https://hub.mender.io/t/does-mender-change-u-boot-dts/318>\
**Category:** General Discussions\
**Tags:** sumo, raspberrypi-cm3\
**Created:** [March 8, 2019, 12:00pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318 "2019-03-08T12:00:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [March 8, 2019, 12:00pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/1 "2019-03-08T12:00:16Z")

</div>

Hi There,  
I’m working through a problem trying the enable uart1 on my Compute Module 3 board. While doing so, I’ve been checking the device tree and am a little confused as to which device tree is used by u-boot.  
From what I can tell, U-Boot should be using the bcm2836\_rpi\_2\_b.dts file. However, looking at the U-Boot yocto build log, I can see mender has some tasks which are also interacting with the device trees (I think it’s selecting bcm2710-rpi-cm3.dtb).  
So, what is the actual device tree which is used by U-Boot in this case?  
Cheers,  
Donal

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [March 8, 2019, 12:07pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/2 "2019-03-08T12:07:02Z")

</div>

Have you seen the " Problem using ‘dtoverlay=pi3-disable-bt’" section in “Known Issues” @ [Raspberry Pi Compute Module 3](https://hub.mender.io/t/raspberry-pi-compute-module-3/110)?

Also it is the boot firmware that chooses which device tree to load, and the [boot scripts](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in) in meta-mender re-use that.

> what is the actual device tree which is used by U-Boot in this case

This question can lead to confusion, U-boot has a built-in (part of its source code) device tree which it is used so none of the mentioned dtb files are used by U-boot.

The dtb files that you are referring to are something that is passed along to the Linux kernel and parsed by Linux kernel only.

---

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [March 8, 2019, 1:43pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/3 "2019-03-08T13:43:31Z")

</div>

Hi Mirzak,  
Yes, I had seen the pi3-disable-bt issue. Currently I have UART0 working correctly on GPIO 14 & 15. I just can’t get uart1 to register a device entry in /dev - tried on GPIO 31&32 and 40&41, but no luck.  
At the risk of going off-topic from this forum, this is my issue:  
The following error is reported at start-up:

```auto
[1.671967] bcm2835-aux-uart 3f215040.serial: unable to register 8250 port - -28
[1.679389] bcm2835-aux-uart: probe of 3f215040.serial failed with error -28

```

I’m using Yocto built Kernel version 4.14.68.

The following are the changes in my config.txt

```auto
core_freq=250
dtoverlay=pi3-disable-bt
dtparam=uart1=on
dtoverlay=uart1,txd1_pin=40,rxd1_pin=41
enable_uart=1

```

I had thought that maybe there was some issue with how U-Boot was enabling uart1 incorrectly, before the kernel kicked in.  
Any suggestions?

EDIT - Solution:  
Currently an overlay is required to get UART1 working on the CM3 with Yocto, see: [github](https://github.com/agherzan/meta-raspberrypi/issues/400)

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [March 8, 2019, 2:21pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/4 "2019-03-08T14:21:32Z")

</div>

> Any suggestions?

Sorry, not much. I didn’t even know that you could have two uarts enabled at the same time on the Raspberry Pi 3.

Does this work with a stock image, e.g Raspbian?

---

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [March 8, 2019, 2:43pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/5 "2019-03-08T14:43:07Z")

</div>

I believe they should both work simultaneously;

> “UART1 is the mini-UART of the Pi3, a.k.a. ttyS0, while UART0 is ttyAMA0. Be aware that the core (VPU) clock frequency must not change while UART1 is in use, so you need to add core\_freq=250 to config.txt.”

Will test out a stock image now.  
Cheers

---

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [March 8, 2019, 3:15pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/6 "2019-03-08T15:15:44Z")

</div>

Just tested my CM3 with a stock Raspbian Image and the uart1 enabled on pins 41 and 42, with ttyAMA0 on pins 14 and 15.  
I can verify that uart1 works simultaneously with uart0. So maybe it’s either a U-Boot and/or Yocto sumo issue. Will also disable mender from the build to confirm 100% that its not causing any issues.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [March 8, 2019, 3:28pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/7 "2019-03-08T15:28:29Z")

</div>

Then it is probably U-boot that is messing things up.

I would suggest to scrape out anything uart related from U-boot source code dtb,

> <https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/bcm2837-rpi-3-b.dts#L22-L34>

---

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [March 11, 2019, 10:59am UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/8 "2019-03-11T10:59:47Z")

</div>

I’ve reverted to a sumo yocto build without mender or my platform layers. Testing on the CM3 with and without U-Boot enabled results in the same error as before.

> root@raspberrypi-cm3:~# dmesg | grep uart  
> [0.655113] uart-pl011 3f201000.serial: cts\_event\_workaround enabled  
> [1.670428] bcm2835-aux-uart 3f215040.serial: unable to register 8250 port - -28  
> [1.677877] bcm2835-aux-uart: probe of 3f215040.serial failed with error -28  
> [1.783401] uart-pl011 3f201000.serial: no DMA platform data

I’ll try a thud and main branchs, then move to the meta-raspberrypi mailing list.  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [March 11, 2019, 12:30pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/9 "2019-03-11T12:30:16Z")

</div>

@DonalHEmb maybe you can try to read through post om [meta-raspberrypi](https://github.com/agherzan/meta-raspberrypi/issues/374) it maybe can give you some pointers.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [March 11, 2019, 12:38pm UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/10 "2019-03-11T12:38:39Z")

</div>

Thanks for reporting back @DonalHEmb

---

<div class="post-metadata">

**Author:** ![DonalHEmb](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/donalhemb/32/75_2.png) [@DonalHEmb](https://hub.mender.io/u/DonalHEmb)\
**Post date:** [May 1, 2019, 8:22am UTC](https://hub.mender.io/t/does-mender-change-u-boot-dts/318/11 "2019-05-01T08:22:15Z")

</div>

For future reference, currently an overlay is required to get UART1 working on the CM3 with Yocto, see: [github](https://github.com/agherzan/meta-raspberrypi/issues/400)
