From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Brugger Date: Tue, 24 Dec 2019 13:38:14 +0100 Subject: Garbage UART output on RPI 4 with upstream kernel DTB In-Reply-To: <98cae6cc-9715-22dc-7c5c-27c9483570d6@i2se.com> References: <17601f2c-77df-6651-f607-fbe1019c4982@i2se.com> <0cf7d0c0-7e9b-cd09-e15c-f906365ecd63@i2se.com> <50134995-68f7-c30a-5e48-ec8469f26e39@gmail.com> <98cae6cc-9715-22dc-7c5c-27c9483570d6@i2se.com> Message-ID: <12d8c7da-dded-1502-4e31-ab9f96282f7f@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 24/12/2019 12:56, Stefan Wahren wrote: > Hi Matthias, > > Am 23.12.19 um 21:20 schrieb Matthias Brugger: >> Hi Stefan, >> >> On 23/12/2019 19:51, Stefan Wahren wrote: >>> Am 20.12.19 um 14:58 schrieb Stefan Wahren: >>>> Hi, >>>> >>>> i tried to run current U-Boot (rpi_4_32b_defconfig) on my RPi 4 with >>>> bcm2711-rpi-4-b.dtb from the upstream kernel. Unfortunately i only see >>>> garbage on the debug UART (pin 14 & 15). Using the DTB from the >>>> downstream kernel has a proper UART output. The config.txt contains >>>> debug_uart=1 >>>> >>>> I compared both and identified an offending Linux commit: >>>> ARM: dts: bcm283x: Remove brcm,bcm2835-pl011 compatible >>>> >>>> Unfortunately reverting this patch still doesn't fix the issue. Any ideas? >>> After hours of playing with the DTB, i finally found the reason why the >>> upstream kernel DTB doesn't work with U-Boot on RPI 4. The DTS must be >>> compiled with flag "-@". >>> >>> It isn't clear to me, why this is necessary but it would be nice to make >>> U-Boot work without this. >>> >> Can you provide the exact command you are using? > > i didn't call dtc directly via command line. I just added this Makefile > hack [1] to the Linux upstream tree. This will add a __symbols__ section > to the DTB which is required for overlays. You can verify this with dtdiff. > > Since the upstream kernel boots without the __symbols__ section, i think > this garbage output issue could be fixed in u-boot. > Little by little I grasp what you are doing. So you compile the DTB in the kernel, then pass the blob to u-boot and add it with OF_EMBED? Is that correct? Regards, Matthias