From nobody Sat Mar 12 08:27:53 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DCFD11A1F214 for ; Sat, 12 Mar 2022 08:28:07 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KFwsz0klXz4Zkg for ; Sat, 12 Mar 2022 08:28:07 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ed1-x529.google.com with SMTP id b15so9451523edn.4 for ; Sat, 12 Mar 2022 00:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+qp0DiMizipyTaIg2zbeOE5UjpRdwJRXaQiWkCgeWfE=; b=DT0S3tEFQyvpeq+N9pOYhK+SbWBUbZz/+Vpk3+GqWm42SDgZzywgFMLJra0ylxFKHf 5/DGPtaEsxc0TPWIMZgXWdAcFpo1Yoekysc6WUY5iONwlJvmsdtJvrjrqbYtOZkqppWw W6ORkecm0n3x4JqWr0XeU6v5TO3gETSTdzNR7E2SppZKdpU0ZTW3oM00mCwWWr121cRo OCRcAj1sh8GJLBjcQRVlG2DwLZXhn6kQQU0vgcgfxnRlBz47mBjPm/RyBkeaStIjYNs3 x+ya0AcFpwwALGxqHkWO8SIQ/XhxNFGVgKBCS1DDl2lYveIDl/+zrEhQH+eSDrmRigRR kPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+qp0DiMizipyTaIg2zbeOE5UjpRdwJRXaQiWkCgeWfE=; b=74Z41wlRvjIIj5N5CpvuZJWCk+l+L3hIK5cT+Uy3YRCl29riklg6doAB3VtrJ1g4sf bYi3r0XTFE6L7uN3sVU5y5xBwjNpUefJXyvBXTzxfBgPeZ1x3+lmcY/cMH6TRh1S4Az6 9Gg0yMLuXKOc5504NWDH7PvPsI+omM81TxNcu4P15GOIByvI0m87gsIM0W+6d3ZgUa7e s0e3Wh7ut1YV3YsA6TSlUkXN/7ff3EQeWXiIexoBPP5S75sbW5lHYu4eH5u/R0ZR9RLT EeaFwNYSMFmwoiTan3YmdcbmOTBIVl4OCHet45Ooq0ccU1mijKrDn1FYTigJBAp2FasD uUyQ== X-Gm-Message-State: AOAM530xyiyRoMfSguAcgZgCp7AcIaQZ6SZdz7Rp8q4A5zKn3GUtSBBd fImALnV+g8xQmaHO4cxeaKeZxyjvsbMQD7rE25GtonxL68hg4g== X-Google-Smtp-Source: ABdhPJzSo9ciejc/zXnaA8EIkg+2QNlaKq0Q4ITIMk6acYro2upLsTUjlW3AkkIesqUUzAO9ZbKjrxywNv7MV4aJclI= X-Received: by 2002:a05:6402:2548:b0:416:4155:e12 with SMTP id l8-20020a056402254800b0041641550e12mr12180432edb.175.1647073684361; Sat, 12 Mar 2022 00:28:04 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Archimedes Gaviola Date: Sat, 12 Mar 2022 16:27:53 +0800 Message-ID: Subject: Re: Raspberry Pi 3B Distorted U-boot Display To: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e01a4a05da0139cc" X-Rspamd-Queue-Id: 4KFwsz0klXz4Zkg X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=DT0S3tEF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::529 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.994]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.0:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DBL_PROHIBIT(0.00)[0.0.0.0:email]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::529:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Status: O Content-Length: 8945 Lines: 186 --000000000000e01a4a05da0139cc Content-Type: text/plain; charset="UTF-8" On Mon, Feb 28, 2022 at 4:51 PM Archimedes Gaviola < archimedes.gaviola@gmail.com> wrote: > > > On Sat, Feb 26, 2022 at 11:49 AM Archimedes Gaviola < > archimedes.gaviola@gmail.com> wrote: > >> Hi, >> >> I've installed FreeBSD 13.0-RELEASE and 14.0-CURRENT successfully with >> Raspberry Pi 3B. However, upon U-boot initialization stage the monitor >> display is distorted as you can see here >> https://pasteboard.co/hxDjJHwxXPc8.jpg but when the FreeBSD kernel is >> loaded it displays normal as you can see here >> https://pasteboard.co/EkgcZdQSxjtA.jpg. I am thinking of lowering the >> resolution so I tried changing the HDMI configuration settings in the >> config.txt but it cannot be changed, it has no effect. It always stays on >> the default 1366x768 as what dmesg has detected. This behavior is also >> observed in 14.0-CURRENT. >> >> FreeBSD 13.0-RELEASE #0: Sat Feb 19 14:09:03 PST 2022 >> root@fbsd13:/usr/src/sys/arm64/compile/GENERIC arm64 >> FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git >> llvmorg-11.0.1-0-g43ff75f2c3fe) >> VT(efifb): resolution 1366x768 >> ... >> fb0: on simplebus0 >> fb0: keeping existing fb bpp of 32 >> fbd0 on fb0 >> WARNING: Device "fb" is Giant locked and may be deleted before FreeBSD >> 14.0. >> VT: Replacing driver "efifb" with new "fb". >> fb0: 1366x768(1366x768@0,0) 32bpp >> fb0: fbswap: 1, pitch 5504, base 0x3e7f2000, screen_size 4227072 >> >> freebsd@fbsd13:~ % cat /boot/msdos/config.txt >> [all] >> arm_64bit=1 >> dtparam=audio=on,i2c_arm=on,spi=on >> dtoverlay=ds3231 >> dtoverlay=mmc >> dtoverlay=disable-bt >> device_tree_address=0x4000 >> kernel=u-boot.bin >> enable_uart=1 >> >> [pi4] >> hdmi_group=2 >> hdmi_mode=11 >> armstub=armstub8-gic.bin >> >> freebsd@fbsd13:~ % grep -r "1366x768" /boot/msdos/ >> Binary file /boot/msdos/start_cd.elf matches >> Binary file /boot/msdos/start_db.elf matches >> Binary file /boot/msdos/start_x.elf matches >> Binary file /boot/msdos/start.elf matches >> Binary file /boot/msdos/start4.elf matches >> Binary file /boot/msdos/start4cd.elf matches >> Binary file /boot/msdos/start4db.elf matches >> Binary file /boot/msdos/start4x.elf matches >> >> Using the same images with 13.0-RELEASE and 14.0-CURRENT this issue does >> not occur in RPi 4B. Anyone encountered this issue? I confirmed this as >> well with another new RPi 3B hardware and it behaves the same. Please see >> attached dmesg log output for reference. >> >> Okay, I got this working now with the following HDMI config.txt > adjustment. I just indicated the :0 which means the first HDMI interface in > group and mode settings. So, the configuration from > > hdmi_group=2 > hdmi_mode=11 > > becomes > > hdmi_group:0=2 > hdmi_mode:0=11 > > Tested using 14.0-CURRENT. > > freebsd@generic:~ % uname -a > FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0 > main-n253384-45c23c2608e: Thu Feb 24 09:18:58 UTC 2022 > root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC > arm64 > > Reference: > https://www.raspberrypi.com/documentation/computers/config_txt.html > > In addition though booting the firmware and loading U-boot is very very slow, still this works in 13.0-RELEASE however the [pi3] label must be indicated otherwise it has no effect. [pi3] hdmi_group:0=2 hdmi_mode:0=11 This is for documentation purposes only. Thanks, Archimedes --000000000000e01a4a05da0139cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Feb 28, 2022 at 4:51 PM Archi= medes Gaviola <archimede= s.gaviola@gmail.com> wrote:


On Sat, Feb 26, 20= 22 at 11:49 AM Archimedes Gaviola <archimedes.gaviola@gmail.com> wrote:
<= div>Hi,

I've installed FreeBSD 13.0-RELEASE an= d 14.0-CURRENT successfully with Raspberry Pi 3B. However, upon U-boot init= ialization stage the monitor display is distorted as you can see here https://pas= teboard.co/hxDjJHwxXPc8.jpg but when the FreeBSD kernel is loaded it di= splays normal as you can see here https://pasteboard.co/EkgcZdQSxjtA.jpg. I a= m thinking of lowering the resolution so I tried changing the HDMI configur= ation settings in the config.txt but it cannot be changed, it has no effect= . It always stays on the default 1366x768 as what dmesg has detected. This = behavior is also observed in 14.0-CURRENT.

Fre= eBSD 13.0-RELEASE #0: Sat Feb 19 14:09:03 PST 2022
=C2=A0 =C2=A0 root@fb= sd13:/usr/src/sys/arm64/compile/GENERIC arm64
FreeBSD clang version 11.0= .1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)VT(efifb): resolution 1366x768
...
fb0: <BCM2835 VT= framebuffer driver> on simplebus0
fb0: keeping existing fb bpp of 32=
fbd0 on fb0
WARNING: Device "fb" is Giant locked and may b= e deleted before FreeBSD 14.0.
VT: Replacing driver "efifb" wi= th new "fb".
fb0: 1366x768(1366x768@0,0) 32bpp
fb0: fbswap:= 1, pitch 5504, base 0x3e7f2000, screen_size 4227072

freebsd@fbsd13:~ % cat /boot/msdos/config.txt
[all]
arm_64bit=3D1<= br>dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don
dtoverlay=3Dds3231
dtov= erlay=3Dmmc
dtoverlay=3Ddisable-bt
device_tree_address=3D0x4000
ke= rnel=3Du-boot.bin
enable_uart=3D1

[pi4]
hdmi_group=3D2
hdmi= _mode=3D11
armstub=3Darmstub8-gic.bin

freebsd@fbsd13:~ % grep -r "1366x768" /boot/msdos/
Binar= y file /boot/msdos/start_cd.elf matches
Binary file /boot/msdos/start_db= .elf matches
Binary file /boot/msdos/start_x.elf matches
Binary file = /boot/msdos/start.elf matches
Binary file /boot/msdos/start4.elf matches=
Binary file /boot/msdos/start4cd.elf matches
Binary file /boot/msdos= /start4db.elf matches
Binary file /boot/msdos/start4x.elf matches
<= div>
Using the same images with 13.0-RELEASE and 14.0-CURRENT= this issue does not occur in RPi 4B. Anyone encountered this issue? I conf= irmed this as well with another new RPi 3B hardware and it behaves the same= . Please see attached dmesg log output for reference.

Okay, I got this working now with the following = HDMI config.txt adjustment. I just indicated the :0 which means the first H= DMI interface in group and mode settings. So, the configuration from

hdmi_group=3D2
hdmi_mode=3D11

becomes

hdmi_group:0=3D2
hdmi_= mode:0=3D11

Tested using 14.0-CURRENT.

freebsd@generic:~ % uname -a
FreeBSD generic 14.0-CURR= ENT FreeBSD 14.0-CURRENT #0 main-n253384-45c23c2608e: Thu Feb 24 09:18:58 U= TC 2022 =C2=A0 =C2=A0 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.a= arch64/sys/GENERIC arm64



In addition though booting the firmware and lo= ading U-boot is very very slow, still this works in 13.0-RELEASE however th= e [pi3] label must be indicated otherwise it has no effect.

[pi3]
hdmi_group:0=3D2
hdmi_mode:0=3D11

This is = for documentation purposes only.

Thanks,
Archimedes


<= /div>

--000000000000e01a4a05da0139cc--