FreeBSD/arm64
Details
Yesterday
I couldn't find why the firmware defaults to 16bpp.
(U-Boot also notes that the Pi 5 firmware provides a 16bpp framebuffer.
https://github.com/u-boot/u-boot/commit/cce167e)
Sun, Nov 22
I'm not against changing default depth (32bpp seems better to have by default) but it raises two questions :
- Why does the firmware sets the default to 16bpp ?
- We still panic with the default firmware configuration ?
Sat, Nov 21
Setting framebuffer_depth=32 in config.txt fixes this on the D0 board without changing bcm2835_fbd. It now attaches at 1920x1080, 32bpp with stride 7680 and size 8294400. UART login and HDMI text/colors work.
Fri, Nov 20
That's just hidding the real problem IMHO
Thanks. The failing log kept 32bpp. A follow-up check showed both GET_DEPTH and SET_DEPTH reporting 32 for a 16bpp buffer. This matches the depth-reporting problem described in https://github.com/raspberrypi/firmware/issues/1904.
Thu, Nov 19
Commited as 48fa466426d90bfd02191448d7b81e0da1acee8a
That's likely not the root of the problem, firmware likely created space for a 16bpp framebuffer but the driver is changing it to 24bpp (See https://cgit.freebsd.org/src/tree/sys/arm/broadcom/bcm2835/bcm2835_fbd.c#n88), that's why it crashes.
Wed, Nov 18
Mon, Nov 16
Sun, Nov 15
This just changes where the firmware puts the DTB. rpi_arm64 already uses the firmware-loaded DTB, which U-Boot passes through EFI to the FreeBSD loader.
On the tested Pi 5 D0 board with U-Boot 2026.10, keeping 0x4000 stops boot after the BL31 banner, before the U-Boot banner. Letting firmware choose the address boots successfully.
The exact BL31 layout in the EEPROM hasn't been verified, but a local build of Raspberry Pi's bcm2712 TF-A branch places executable code at 0x4000. This looks like a DTB/BL31 overlap, so the patch lets firmware choose the address rather than hardcoding another one.
Thanks for taking a look.
There is a lot of changes in this review and already a lot of comments, I suggest splitting this into :
So, I haven't followed RPI5 stuff for some time but what's the current behavior without this ? I'm pretty sure that people are using them.
Does that mean that we are currently using DTB loaded by u-boot and you want to switch to the DTB loaded by the firmware ? (like other PI iirc).
I'm not against the change but I'd like to understand more.
Thanks.
Sat, Nov 14
Fri, Oct 30
Oct 20 2026
otherwise OK
spit the diff as requested by maintainer
I had mistakenly uploaded the wrong diff file
Oct 19 2026
Please take this as an incomplete 'first look' review.
Oct 18 2026
Fix context size + dsi_dphy_parents definition.
- New common clock base (mt_clk.c/h, replaces mdtk_clk):** shared probe/attach, a base driver class, hwreset and optional syscon. All mt7622 clock drivers (topckgen, infracfg, pericfg, audio, eth, sgmii, ssusbsys, pciesys) were converted, which removes about 500 lines of duplicated code
- Child nodes:** clock providers with child nodes attach them through simplebus_attach_impl(). A failure there no longer fails the attach, because the clocks are already registered and cannot be unregistered.
- PLL driver (mt_clk_pll.c/h):** apmixedsys PLLs are no longer fixed-rate clocks. The driver reads the firmware-programmed PCW/postdiv and uses the Linux enable/disable sequence. armpll now reports the real 1350 MHz instead of 120 MHz, and main_core_en is enabled as a parent of infra_mux1_sel.
- PLL frequency changes:** mt_clk_pll_set_freq() follows Linux mtk_pll_set_rate_regs() (PCW + postdiv, PCW_CHG latch, read-back check). Only PLLs flagged MT_PLL_SET_FREQ are changed (armpll, aud1pll, aud2pll), so a request passed up through gates and muxes cannot reprogram a system-wide PLL..
- UART (mt_uart.c):** MediaTek high-speed baud modes (HIGHS / SAMPLE_COUNT / SAMPLE_POINT), the console baud rate is read back from the hardware, #ifdef FDT guards and style cleanup
- New common clock base (mt_clk.c/h, replaces mdtk_clk):** shared probe/attach, a base driver class, hwreset and optional syscon. All mt7622 clock drivers (topckgen, infracfg, pericfg, audio, eth, sgmii, ssusbsys, pciesys) were converted, which removes about 500 lines of duplicated code
- Child nodes:** clock providers with child nodes attach them through simplebus_attach_impl(). A failure there no longer fails the attach, because the clocks are already registered and cannot be unregistered.
- PLL driver (mt_clk_pll.c/h):** apmixedsys PLLs are no longer fixed-rate clocks. The driver reads the firmware-programmed PCW/postdiv and uses the Linux enable/disable sequence. armpll now reports the real 1350 MHz instead of 120 MHz, and main_core_en is enabled as a parent of infra_mux1_sel.
- PLL frequency changes:** mt_clk_pll_set_freq() follows Linux mtk_pll_set_rate_regs() (PCW + postdiv, PCW_CHG latch, read-back check). Only PLLs flagged MT_PLL_SET_FREQ are changed (armpll, aud1pll, aud2pll), so a request passed up through gates and muxes cannot reprogram a system-wide PLL..
- UART (mt_uart.c):** MediaTek high-speed baud modes (HIGHS / SAMPLE_COUNT / SAMPLE_POINT), the console baud rate is read back from the hardware, #ifdef FDT guards and style cleanup
