From nobody Wed Dec 18 11:56:10 2024 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 4YCsbR35Vlz5hFN4 for ; Wed, 18 Dec 2024 11:56:35 +0000 (UTC) (envelope-from toby@tobykurien.com) Received: from spe14.ucebox.co.za (spe14.ucebox.co.za [197.242.154.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.ucebox.co.za", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCsbM4g9Bz43T4 for ; Wed, 18 Dec 2024 11:56:31 +0000 (UTC) (envelope-from toby@tobykurien.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of toby@tobykurien.com designates 197.242.154.255 as permitted sender) smtp.mailfrom=toby@tobykurien.com; dmarc=none Received: from doxy.aserv.co.za ([154.0.166.100]) by spe2.ucebox.co.za with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1tNsez-002kfF-Is for freebsd-arm@freebsd.org; Wed, 18 Dec 2024 13:56:20 +0200 Received: from cloud.nextcloudhosting.co.za (unknown [129.232.144.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by doxy.aserv.co.za (Postfix) with ESMTPSA id A63A726340C for ; Wed, 18 Dec 2024 13:56:10 +0200 (SAST) From: Toby Kurien To: freebsd-arm@freebsd.org Cc: Subject: Re: EFI framebuffer blanks during boot References: <20241216131554.Horde.Z8Ym8E7XkQDjIEr1z1LgZsl@cloud.nextcloudhosting.co.za> In-Reply-To: <20241216131554.Horde.Z8Ym8E7XkQDjIEr1z1LgZsl@cloud.nextcloudhosting.co.za> Message-ID: <20241218115610.Horde.ZMws8aj0Si_tufYawGSkq16@cloud.nextcloudhosting.co.za> User-Agent: Horde Application Framework 5 Date: Wed, 18 Dec 2024 11:56:10 +0000 Content-Type: text/plain; charset=utf-8 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 Content-Transfer-Encoding: 8bit X-Originating-IP: 154.0.166.100 X-Afrihost-Domain: doxy.aserv.co.za X-Afrihost-Username: 154.0.166.100 X-Afrihost-Outgoing-Class: ham X-Afrihost-Outgoing-Evidence: Combined (0.10) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT+j6zqrS651pJv/rKZ7GYmsPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wOvGg18h18lTsuUGH1KgAagLCWYuPCxwJEfxKP87A95+fH zJ6mVE7ewsipSVIfs4YObep0ViY8HK8+Aog7qM37ABHVTw1lV42ob3hDgXVUNbZJMuJHHFnTdGKa 3VxxhLA8U1774x9DQql3n5V1vHjnkuW1FFLwEW3UVQ/02r/eitdn5CXCG6zzUxxWbE5VnsisfbOw j6b83ihR1bz2lnCUXzxdcSEOF5ZgjdwpVsfMm9dCYgcgr835yVjKQZA6hJL1LiMHCxRezvZaFOrU Vh8zNqs59tg7m1SQLJtFApHh60KEcxAcIwRZNf0cSHBI/j8xKX6Z6/Qz1w7TE/bz3YPRDfgblxZ8 KT4UwlLW+nAm2eZE7YJwhBWCb1PmFojBOyjXs2KsRjKrCowEavDwQuKoDMwQiNpECc6NeluD4mMa /1YmDHeI9dU6Rq238kXYC+KNLtSRWKGmohoil/1AiKo+tkgXyuidojvEg3qjfiiAf/vg7iEFLP+S SY+Av5+AiC4+cZX8WknokmSP3xzvf1Ank9WUv4CtTDP6Fmro4IfzbsJvww4p7Esby16Jcn5Cg20t uctFVQp078svLEqHvTCZstIYjMKgSmf0fMSGkoiSbtO6UlGm0ycQh0Ylbt1+Ear3Y80OmAux3oN1 3+ztUzneeH9vrfuk7fRvn0o9yycTJzaslDewd9SvuBEMrxmqkuiwMUnliogBs8NMWWJGaOd+H+QL /JnhYN+sP212y4vvZoP+xmzYtBWHAoRTGsqGxCCpv6/nAnrLfB175ek9DRRm9R/2gMGq0KWAzmMf +ibVDghxtC6SPrOXv6rESukjSA5vnpiNotwN38VVUYyvwlIhJdgQGsN+N1qJPtNMC+RP0KRvQDwO 6ur/Di47GnmH3wummAO4viSzvvpPzgJUfnLxUuXi8ijc+7N/ems+rzGkbzEvuGslKTrRIXcXpFg5 ivY= X-Report-Abuse-To: spam@spe1.ucebox.co.za X-Spamd-Result: default: False [-2.33 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+ip4:197.242.144.0/20]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_SHORT(-0.03)[-0.033]; DMARC_NA(0.00)[tobykurien.com]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:37611, ipnet:197.242.144.0/20, country:ZA]; RCPT_COUNT_ONE(0.00)[1]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; HAS_XOIP(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4YCsbM4g9Bz43T4 X-Spamd-Bar: -- An update on this, I did some more digging into why the display output blanks during boot. Firstly, I can confirm that the backlight stays on throughout, so that it not the issue. I tried disabling "grf" and "cru" in the device tree, and it seems it's the rk3399_cru0 module that ends up resetting the panel. If that's disabled, the screen stays on and continues displaying output, although of course the kernel panics. I'll dig into the rk3399_cru code, but if anyone has any pointers into what I could try, that would be super helpful. Thanks.   --   tobykurien.com   "Toby Kurien" toby@tobykurien.com – December 16, 2024 3:15 PM > On the Pinephone Pro I installed u-boot with EFI framebuffer support. Two strange things happen during the FreeBSD bootup: >   > 1. Loader does not display on the EFI FB, instead it appears in the serial console. I tried adding `console="efi"` to loader.conf but to no avail. Any ideas why this might be even though (as below) some kernel output appears on EFI FB? >   > 2. However, after loader, the kernel starts loading on the screen (even showing VT(efifb): resolution 720x1440), up until rk3399_cru0 is detected, then soon after it blanks. I took a video of the process to pinpoint where it blanks out, and it appears to be when rk_grf1 (general register files) is loaded and/or when the fixed regulators are being initialized. >   > I did some digging, and I suspect that either the power to the panel is being interrupted, and/or the LCD reset pin is being set. I guess either of these will reset the panel, thus then requiring it to be re-initialized. I confirmed that rk_grf1 controls the GPIOs responsible for powering and resetting the LCD. Any ideas on how to prevent the GPIOs from being changed during bootup (if EFI FB is available)? Or maybe I'm mistaken and something else is going on? Any help would be appreciated, thanks! >   > --  >   > http://tobykurien.com >   >  >