Bug 207912 - Banana Pi framebuffer doesn't work
Summary: Banana Pi framebuffer doesn't work
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Many People
Assignee: Jared McNeill
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-03-11 21:19 UTC by Dan MacDonald
Modified: 2020-01-10 18:59 UTC (History)
4 users (show)

See Also:


Attachments
test dtb (30.96 KB, application/octet-stream)
2016-03-11 21:35 UTC, Emmanuel Vadot
no flags Details
Add hdmi/hdmiaudio/fb device nodes to bananapi.dts (629 bytes, patch)
2016-03-11 22:39 UTC, Jared McNeill
no flags Details | Diff
Only set HDMI mode for displays with a CEA-861 extension block. (1.79 KB, patch)
2016-03-12 20:35 UTC, Jared McNeill
no flags Details | Diff
Banana Pi dtb with usbphy device node (5.57 KB, application/octet-stream)
2016-03-13 11:50 UTC, Jared McNeill
no flags Details
Test dts (1.91 KB, text/plain)
2016-03-21 23:10 UTC, Dan MacDonald
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan MacDonald 2016-03-11 21:19:46 UTC
I see the uboot output via the HDMI port on my Banana Pi fine when booting FreeBSD-11.0-CURRENT-arm-armv6-BANANAPI-20160308-r296485.img but as soon as the kernel starts to boot all I see is a static, garbled image of sorts on my monitor although I know FreeBSD is otherwise booting fine via UART serial console.

I have read of other BPi users having this same issue booting the FBSD 11 test images on the FBSD forum so its not just my config.
Comment 1 Emmanuel Vadot 2016-03-11 21:35:48 UTC
Created attachment 168022 [details]
test dtb

Could you test with the attached dtb ?
We currently use a custom one for bananapi while other boards have been converted to use the upstream one as source.
The attached one is the gnu one with custom nodes for the hdmi and clock module.

To test place the file in /boot/dtb/bananapi_test.dtb
In loader type 
$ load -t dtb /boot/dtb/bananapi_test.dtb
$ boot

Thanks
Comment 2 Dan MacDonald 2016-03-11 22:28:10 UTC
Hi Emmanuel

No, that dtb hasn't fixed the framebuffer. In fact its made things worse as the kernel only gets as far as:

uart0: console (8861,n,8,1)

Before booting stalls when I use the attached dtb. I still get the same static junk pixels on my HDMI display as I do when I use the default dtb.
Comment 3 Jared McNeill freebsd_committer 2016-03-11 22:39:12 UTC
Created attachment 168026 [details]
Add hdmi/hdmiaudio/fb device nodes to bananapi.dts

This patch simply adds the hdmi, hdmiaudio, and fb device nodes to the custom bananapi dts. Can you compile this to dtb, boot a kernel with it, and provide the resulting dmesg?
Comment 4 Dan MacDonald 2016-03-12 17:26:40 UTC
Hi Jared

I've downloaded the FBSD source tree and patched the BPi dts but I'd like to know how to build a dts file without having to rebuild the entire kernel, which is not only something I've not done before under FBSD but something I want to avoid in this case.

~/src/freebsd/sys/boot/fdt/dts/arm % dtc -O dtb -o bananapi.dtb -b 0 -p 1024 bananapi.dts
Error: bananapi.dts:31.1-9 syntax error
FATAL ERROR: Unable to parse input tree

Running `make` in that dir fails too:

$ make
...
In file included from /home/freebsd/src/freebsd/sys/boot/fdt/dts/arm/../../../../boot/fdt/dts/arm/am335x-evm.dts:29:
/home/freebsd/src/freebsd/sys/boot/fdt/dts/arm/../../../../boot/fdt/dts/arm/am335x-evm.dts:29:10: error: #include nested too deeply
#include "am335x-evm.dts"
         ^
1 error generated.
Error: <stdin>:1.1-2.1 syntax error
FATAL ERROR: Unable to parse input tree
*** Error code 1

Stop.
make: stopped in /home/freebsd/src/freebsd/sys/boot/fdt/dts/arm
Comment 5 Jared McNeill freebsd_committer 2016-03-12 17:34:54 UTC
(In reply to Dan MacDonald from comment #4)

Something like this should work from sys/boot/fdt/dts/arm (fix paths as necessary):

MACHINE=arm ../../../../tools/fdt/make_dtb.sh /usr/home/jmcneill/freebsd/sys bananapi.dts /tmp
Comment 6 Dan MacDonald 2016-03-12 18:42:24 UTC
The patched bpi dtb works better than the previous attempt because it at least successfully boots.

Now, instead of getting junk on my monitor I just get.. nothing at all. The display simply goes blank after entering the loader commands to boot the patched dtb.

KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r296485: Tue Mar  8 10:35:28 UTC 2016
    root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/A20 arm
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
CPU: Cortex A7 rev 4 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB enabled LABT branch prediction disabled
LoUU:2 LoC:3 LoUIS:2 
Cache level 1: 
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2: 
 256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 1073741824 (1024 MB)
avail memory = 1036029952 (988 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
simplebus0: Invalid #interrupt-cells property value <3>, assuming <1>
simplebus0: Invalid #interrupt-cells property value <3>, assuming <1>
a20_cpu_cfg0: <A20 CPU Configuration Module> mem 0x1c25c00-0x1c25fff on simplebus0
gic0: <ARM Generic Interrupt Controller> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c820ff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 4 on simplebus0
gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b irqs 160
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq 11 on simplebus0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
gic0: unsupported trigger/polarity configuration 0x08
gic0: unsupported trigger/polarity configuration 0x08
gic0: unsupported trigger/polarity configuration 0x08
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
a10_ccm0: <Allwinner Clock Control Module> mem 0x1c20000-0x1c203ff on simplebus0
a10_sramc0: <Allwinner sramc module> mem 0x1c00000-0x1c00fff on simplebus0
aw_wdog0: <Allwinner A10 Watchdog> mem 0x1c20c90-0x1c20c9f on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
gpioled0: <GPIO led> at pin 149 on gpiobus0
gpioc0: <GPIO controller> on gpio0
ehci0: <Allwinner Integrated USB 2.0 controller> mem 0x1c14000-0x1c14fff irq 12 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
ehci1: <Allwinner Integrated USB 2.0 controller> mem 0x1c1c000-0x1c1cfff irq 13 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci1
a10_mmc0: <Allwinner Integrated MMC/SD controller> mem 0x1c0f000-0x1c0ffff irq 14 on simplebus0
mmc0: <MMC/SD bus> on a10_mmc0
ahci0: <Allwinner Integrated AHCI controller> mem 0x1c18000-0x1c18fff irq 15 on simplebus0
ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported
ahci0: quirks=0x2<NOPMP>
ahcich0: <AHCI channel> at channel 0 on ahci0
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 16 on simplebus0
uart0: console (115200,n,8,1)
dwc0: <A20 Gigabit Ethernet Controller> mem 0x1c50000-0x1c5ffff irq 18 on simplebus0
miibus0: <MII bus> on dwc0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
dwc0: Ethernet address: 02:09:04:c2:82:f8
a10dmac0: <Allwinner DMA controller> mem 0x1c02000-0x1c02fff irq 19 on simplebus0
a10hdmi0: <Allwinner HDMI TX> mem 0x1c16000-0x1c16fff on simplebus0
pcm0: <Allwinner HDMI Audio> on simplebus0
fb0: <Allwinner Framebuffer> mem 0x1e60000-0x1e6ffff,0x1c0c000-0x1c0cfff on simplebus0
cryptosoft0: <software crypto>
Timecounters tick every 10.000 msec
IPsec: Initialized Security Association Processing.
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ugen0.1: <Allwinner> at usbus0
uhub0: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ugen1.1: <Allwinner> at usbus1
uhub1: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
mmcsd0: 4GB <SDHC SA04G 0.3 SN 9C526D1E MFG 10/2009 by 2 TM> at mmc0 50.0MHz/4bit/65535-block
fbd0 on fb0
VT: initialize with new VT driver "fb".
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST2000LM003 HN-M201RAD 2BE10001> ATA8-ACS SATA 3.x device
ada0: Serial Number S377J9FGC05642
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors)
Release APs
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
uhub1: 1 port with 1 removable, self powered
uhub0: 1 port with 1 removable, self powered
warning: no time-of-day clock registered, system time will not be set accurately
random: unblocking device.
dwc0: link state changed to DOWN
dwc0: link state changed to UP
Comment 7 Jared McNeill freebsd_committer 2016-03-12 19:37:30 UTC
(In reply to Dan MacDonald from comment #6)

Can you add boot_verbose="YES" to /boot/loader.conf as well? It will print information about the video mode the HDMI driver has selected. Also if you can tell anything about the connected display (HDMI vs DVI, whether or not it supports audio, etc) that would be a big help.
Comment 8 Dan MacDonald 2016-03-12 20:27:04 UTC
The monitor I've been using to test only has DVI and VGA inputs so I'm using a HDMI to DVI cable to attach my BPi. fb output works fine with this cable and monitor with my BPi under every version of Linux I've tried and also NetBSD 7.

KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r296485: Tue Mar  8 10:35:28 UTC 2016
    root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/A20 arm
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0a61000.
Preloaded dtb "/boot/dtb/bananapi-test.dtb" at 0xc0a61748.
CPU: Cortex A7 rev 4 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB enabled LABT branch prediction disabled
LoUU:2 LoC:3 LoUIS:2 
Cache level 1: 
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2: 
 256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 1073741824 (1024 MB)
avail memory = 1036029952 (988 MB)
Physical memory chunk(s):
  0x40000000 - 0x7fffffff,  1024 MB ( 262144 pages)
Excluded memory regions:
  0x42200000 - 0x42b53fff,     9 MB (   2388 pages) NoAlloc 
Static device mappings:
  0x01c00000 - 0x01ffffff mapped at VA 0xffb00000
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
ULE: setup cpu 0
ULE: setup cpu 1
snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25
random: entropy device external interface
nfslock: pseudo-device
crypto: <crypto core>
null: <full device, null device, zero device>
openfirm: <Open Firmware control device>
kbd0 at kbdmux0
mem: <memory>
random: harvesting attach, 8 bytes (4 bits) from nexus0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
simplebus0: Invalid #interrupt-cells property value <3>, assuming <1>
simplebus0: Invalid #interrupt-cells property value <3>, assuming <1>
random: harvesting attach, 8 bytes (4 bits) from simplebus0
random: harvesting attach, 8 bytes (4 bits) from ofwbus0
a20_cpu_cfg0: <A20 CPU Configuration Module> mem 0x1c25c00-0x1c25fff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a20_cpu_cfg0
gic0: <ARM Generic Interrupt Controller> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c820ff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 4 on simplebus0
gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b irqs 160
random: harvesting attach, 8 bytes (4 bits) from gic0
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq 11 on simplebus0
Processing 1 pin-config node(s) in pinctrl-0 for gmac@01c50000
random: harvesting attach, 8 bytes (4 bits) from gpio0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
gic0: unsupported trigger/polarity configuration 0x08
gic0: unsupported trigger/polarity configuration 0x08
gic0: unsupported trigger/polarity configuration 0x08
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
random: harvesting attach, 8 bytes (4 bits) from generic_timer0
a10_ccm0: <Allwinner Clock Control Module> mem 0x1c20000-0x1c203ff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10_ccm0
a10_sramc0: <Allwinner sramc module> mem 0x1c00000-0x1c00fff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10_sramc0
simplebus0: <timer@01c20c00> mem 0x1c20c00-0x1c20c8f irq 5,6,7,8,9,10 compat allwinner,sun4i-a10-timer (no driver attached)
aw_wdog0: <Allwinner A10 Watchdog> mem 0x1c20c90-0x1c20c9f on simplebus0
random: harvesting attach, 8 bytes (4 bits) from aw_wdog0
gpiobus0: <OFW GPIO bus> on gpio0
gpioled0: <GPIO led> at pin 149 on gpiobus0
random: harvesting attach, 8 bytes (4 bits) from gpioled0
random: harvesting attach, 8 bytes (4 bits) from gpiobus0
gpioc0: <GPIO controller> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpioc0
ehci0: <Allwinner Integrated USB 2.0 controller> mem 0x1c14000-0x1c14fff irq 12 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
ehci0: usbpf: Attached
random: harvesting attach, 8 bytes (4 bits) from usbus0
random: harvesting attach, 8 bytes (4 bits) from ehci0
ehci1: <Allwinner Integrated USB 2.0 controller> mem 0x1c1c000-0x1c1cfff irq 13 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci1
ehci1: usbpf: Attached
random: harvesting attach, 8 bytes (4 bits) from usbus1
random: harvesting attach, 8 bytes (4 bits) from ehci1
a10_mmc0: <Allwinner Integrated MMC/SD controller> mem 0x1c0f000-0x1c0ffff irq 14 on simplebus0
a10_mmc0: DMA status: enabled
mmc0: <MMC/SD bus> on a10_mmc0
random: harvesting attach, 8 bytes (4 bits) from mmc0
random: harvesting attach, 8 bytes (4 bits) from a10_mmc0
ahci0: <Allwinner Integrated AHCI controller> mem 0x1c18000-0x1c18fff irq 15 on simplebus0
ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported
ahci0: quirks=0x2<NOPMP>
ahci0: Caps: NCQ SNTF SS ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 1ports
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: Caps:
random: harvesting attach, 8 bytes (4 bits) from ahcich0
random: harvesting attach, 8 bytes (4 bits) from ahci0
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 16 on simplebus0
uart0: console (115200,n,8,1)
uart0: fast interrupt
uart0: PPS capture mode: DCDinvalid
random: harvesting attach, 8 bytes (4 bits) from uart0
simplebus0: <emac@01c0b000> mem 0x1c0b000-0x1c0bfff irq 17 disabled compat allwinner,sun4i-a10-emac (no driver attached)
dwc0: <A20 Gigabit Ethernet Controller> mem 0x1c50000-0x1c5ffff irq 18 on simplebus0
miibus0: <MII bus> on dwc0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: OUI 0x00e04c, model 0x0011, rev. 5
rgephy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
random: harvesting attach, 8 bytes (4 bits) from rgephy0
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1: OUI 0x00e04c, model 0x0011, rev. 5
rgephy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
random: harvesting attach, 8 bytes (4 bits) from rgephy1
random: harvesting attach, 8 bytes (4 bits) from miibus0
dwc0: bpf attached
dwc0: Ethernet address: 02:09:04:c2:82:f8
random: harvesting attach, 8 bytes (4 bits) from dwc0
a10dmac0: <Allwinner DMA controller> mem 0x1c02000-0x1c02fff irq 19 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10dmac0
simplebus0: <codec@01c22c00> mem 0x1c22c00-0x1c22c3f irq 20 disabled compat allwinner,sun7i-a20-codec (no driver attached)
a10hdmi0: <Allwinner HDMI TX> mem 0x1c16000-0x1c16fff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10hdmi0
pcm0: <Allwinner HDMI Audio> on simplebus0
pcm0: Mixer "pcm":
random: harvesting attach, 8 bytes (4 bits) from pcm0
fb0: <Allwinner Framebuffer> mem 0x1e60000-0x1e6ffff,0x1c0c000-0x1c0cfff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from fb0
ofwbus0: <leds> compat gpio-leds (no driver attached)
cryptosoft0: <software crypto>
crypto: assign cryptosoft0 driver id 0, flags 100663296
crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 23 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 25 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 24 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 26 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 27 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 28 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0
random: harvesting attach, 8 bytes (4 bits) from cryptosoft0
procfs registered
Timecounters tick every 10.000 msec
IPsec: Initialized Security Association Processing.
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 8192
lo0: bpf attached
mmc0: Probing bus
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ahcich0: AHCI reset...
ahcich0: SATA connect time=100us status=00000123
ugen0.1: <Allwinner> at usbus0
uhub0: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ugen1.1: <Allwinner> at usbus1
uhub1: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ahcich0: AHCI reset: device found
ahcich0: AHCI reset: device ready after 0ms
mmc0: SD 2.0 interface conditions: OK
mmc0: SD probe: OK (OCR: 0x00ff8000)
mmc0: Current OCR: 0x00ff8000
mmc0: Probing cards
mmc0: New card detected (CID 02544d5341303447039c526d1e009aaf)
mmc0: New card detected (CSD 400e00325b5900001d7b7f800a40005d)
pass0 at ahcich0 bus 0 scbus0 target 0 lun 0
pass0: <ST2000LM003 HN-M201RAD 2BE10001> ATA8-ACS SATA 3.x device
pass0: Serial Number S377J9FGC05642
pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
pass0: Command Queueing enabled
mmc0: Card at relative address 0x1234 added:
mmc0:  card: SDHC SA04G 0.3 SN 9C526D1E MFG 10/2009 by 2 TM
mmc0:  bus: 4bit, 50MHz, high speed timing
mmc0:  memory: 7729152 blocks, erase sector 8192 blocks
GEOM: new disk ada0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: mmc0: setting transfer rate to 50.000MHz (high speed timing)
mmcsd0: 4GB <SDHC SA04G 0.3 SN 9C526D1E MFG 10/2009 by 2 TM> at mmc0 50.0MHz/4bit/65535-block
random: harvesting attach, 8 bytes (4 bits) from mmcsd0
edid: max_dotclock according to supported modes: 135000
edid: max_dotclock according to supported modes: 135000
Vendor: [PGE] 
Product: [1705] GNR TS700
Serial number: b30a0000
Manufactured 2005 Week 44
EDID Version 1.3
EDID Comment: 
Video Input: 8c
	Digital
Gamma: 2.20
Max Size: 34 cm x 27 cm
Features: 2e
	DPMS active-off
	RGB
	Standard color space
	Preferred timing
Chroma Info:
	Red X: 0.632
	Red Y: 0.632
	Grn X: 0.299
	Grn Y: 0.585
	Blu X: 0.146
	Blu Y: 0.102
	Wht X: 0.313
	Wht Y: 0.329
Range:
	Horizontal: 31 - 81 kHz
	Vertical: 56 - 75 Hz
	Max Dot Clock: 140 MHz
Video modes:
	720x400 @ 70Hz (28320 738 846 900 412 414 449 -H +V)
	640x480 @ 60Hz (25175 656 752 800 490 492 525 -H -V)
	640x480 @ 73Hz (31500 664 704 832 489 492 520 -H -V)
	640x480 @ 75Hz (31500 656 720 840 481 484 500 -H -V)
	800x600 @ 56Hz (36000 824 896 1024 601 603 625 +H +V)
	800x600 @ 60Hz (40000 840 968 1056 601 605 628 +H +V)
	800x600 @ 72Hz (50000 856 976 1040 637 643 666 +H +V)
	800x600 @ 75Hz (49500 816 896 1056 601 604 625 +H +V)
	832x624 @ 75Hz (57284 864 928 1152 625 628 667 -H -V)
	1024x768 @ 60Hz (65000 1048 1184 1344 771 777 806 -H -V)
	1024x768 @ 70Hz (75000 1048 1184 1328 771 777 806 -H -V)
	1024x768 @ 75Hz (78750 1040 1136 1312 769 772 800 +H +V)
	1280x1024 @ 75Hz (135000 1296 1440 1688 1025 1028 1066 +H +V)
	1280x1024 @ 60Hz (108000 1328 1440 1688 1025 1028 1066 +H +V)
	1280x960 @ 60Hz (108000 1376 1488 1800 961 964 1000 +H +V)
	1152x864 @ 75Hz (108000 1216 1344 1600 865 868 900 +H +V)
Preferred mode: 1280x1024 @ 60Hz
Number of extension blocks: 0
fb0: using 1280x1024
fbd0 on fb0
VT: initialize with new VT driver "fb".
random: harvesting attach, 8 bytes (4 bits) from fbd0
<ST2000LM003 HN-M201RAD 2BE10001> ATA8-ACS SATA 3.x device
ada0: Serial Number S377J9FGC05642
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors)
Release APs
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
GEOM: new disk mmcsd0
uhub1: 1 port with 1 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub1
uhub0: 1 port with 1 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub0
mmc0: setting bus width to 4 bits
GEOM_PART: partition 1 on (mmcsd0, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 2 on (mmcsd0, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 1 on (mmcsd0s2, BSD) is not aligned on 4194304 bytes
GEOM_PART: partition 1 on (diskid/DISK-9C526D1E, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 2 on (diskid/DISK-9C526D1E, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 1 on (diskid/DISK-9C526D1Es2, BSD) is not aligned on 4194304 bytes
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
GEOM_PART: partition 1 on (diskid/DISK-9C526D1E, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 2 on (diskid/DISK-9C526D1E, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 1 on (diskid/DISK-9C526D1Es2, BSD) is not aligned on 4194304 bytes
random: unblocking device.
dwc0: link state changed to DOWN
dwc0: link state changed to UP
Comment 9 Jared McNeill freebsd_committer 2016-03-12 20:35:48 UTC
Created attachment 168059 [details]
Only set HDMI mode for displays with a CEA-861 extension block.

The driver always sets the HDMI transmitter for HDMI mode, which won't work for DVI displays. Here's a patch that should fix things for you.
Comment 10 Dan MacDonald 2016-03-12 20:45:01 UTC
OK so it looks like I need to rebuild the kernel to test this patch.

Any tips or links to guides for building a FreeBSD kernel for the BPi?

I am very much a FreeBSD newb so please treat me as such!
Comment 11 Jared McNeill freebsd_committer 2016-03-12 22:42:11 UTC
(In reply to Dan MacDonald from comment #10)

There are instructions for cross building a kernel on the wiki: https://wiki.freebsd.org/EmbeddedHandbook#Kernel

I've also built a kernel for you to try if you prefer: http://people.freebsd.org/~jmcneill/tmp/kernel-bug207912.gz
Comment 12 Dan MacDonald 2016-03-13 00:49:51 UTC
Thanks for saving me from building my own kernel!

If I use this new kernel image combined with the patched dtb I do now see SOME text output during boot but not all of it. I see from:

random: harvesting attach, 8 bytes (4 bits) from fbd0

to

swc0: link state changed to UP

then it cuts out again for a bunch of extra dmesg lines that only get shown over UART before it shows the login prompt in a different font on my monitor. At this point the fb display and cursor freezes because I can log in via UART but I don't see my successful login or anything else after that via HDMI/DVI.

I know it'll require another ticket if its not a known bug but I've just noticed my USB keyboard isn't working under FreeBSD on my BPi either. Have you tested USB HID Jared?

Thanks!
Comment 13 Jared McNeill freebsd_committer 2016-03-13 01:15:50 UTC
(In reply to Dan MacDonald from comment #12)

Great! I'll get that HDMI fix and bananapi.dts patch checked in.

I have not tried a USB keyboard. Does it show in dmesg? I'm not sure if it will work plugged directly into the board as the A20 kernel is missing the ohci driver. Can you try it plugged into a USB2 hub? So BPI -> USB2 hub -> keyboard.
Comment 14 Dan MacDonald 2016-03-13 01:38:51 UTC
Hi Jared

I get the impression you might've misread my last post. We are getting closer  thanks to your fixes that's for sure but BPi fb support needs more work yet before it is usable. As I said, I don't see all the boot messages via HDMI fb and fb (DVI/HDMI) output stops working entirely when the login prompt appears - the fb display freezes even though the serial console works fine.

I have checked dmesg after inserting and removing my keyboard from both USB ports  a few times but there is no mention of any activity. I know this keyboard usually works fine on my BPi under Linux and NetBSD. I thought I'd try plugging it into a powered USB2 hub anyway but that didn't make any difference.

Has work started on OHCI for A20? Is OHCI support planned for 11.0?
Comment 15 commit-hook freebsd_committer 2016-03-13 01:48:44 UTC
A commit references this bug:

Author: jmcneill
Date: Sun Mar 13 01:47:42 UTC 2016
New revision: 296789
URL: https://svnweb.freebsd.org/changeset/base/296789

Log:
  Fix display output for non-HDMI display devices.

  Only set the display to HDMI mode if a CEA-861 extension block was found
  on the connected display.

  PR:		207912
  Approved by:	gonzo (mentor)

Changes:
  head/sys/arm/allwinner/a10_hdmi.c
Comment 16 commit-hook freebsd_committer 2016-03-13 01:49:46 UTC
A commit references this bug:

Author: jmcneill
Date: Sun Mar 13 01:49:36 UTC 2016
New revision: 296790
URL: https://svnweb.freebsd.org/changeset/base/296790

Log:
  Add HDMI device nodes to Banana Pi dts.

  PR:		207912
  Approved by:	gonzo (mentor)

Changes:
  head/sys/boot/fdt/dts/arm/bananapi.dts
Comment 17 Jared McNeill freebsd_committer 2016-03-13 01:59:36 UTC
(In reply to Dan MacDonald from comment #14)

Not sure yet what to do about the boot messages. I think it is a general FreeBSD/arm issue as I see the same behavior on other boards. I guess you see very little kernel output because the HDMI driver attaches so late in the boot process.

NetBSD and Linux include both ehci and ohci drivers on A20. Typically what happens here is that low speed and full speed devices (like USB keyboards) plugged into the root hub get handed over from the ehci to the ohci (companion) controller. A USB2 hub will include a transaction translator so this shouldn't be an issue. You mentioned that you don't see any messages from the kernel when you plug in the keyboard -- does the USB2 hub show up at all when you plug it in? Do any USB devices work?
Comment 18 Jared McNeill freebsd_committer 2016-03-13 02:07:11 UTC
For Allwinner ohci support, there is a diff in review D5481 that you can try.
Comment 19 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2016-03-13 02:43:59 UTC
Boot messages going only to serial port only is known issue on ARM. There are two kinds of boot-related output: from kernel and from rc.d scripts. Kernel output goes to both serial port and to framebuffer, rc.d output goes to whatever console is available when boot process starts. Since framebuffer is activated later in boot serial port always chosen as a console. There is no support for multiple console devices just yet. To work around it in my setup I used this patch: http://people.freebsd.org/~gonzo/patches/console.preffer-20160311.diff

It introduces console.prefer tunable that can be set to "ttyv0" by loader to indicate that you want framebuffer act as a console. It's not a proper fix - it's a hack, use it if you need workaround. I suggest opening new PR for this issue to keep track of progress/activity for it.
Comment 20 Dan MacDonald 2016-03-13 08:31:36 UTC
I only mentioned not seeing all the boot messages via fb in case that gave you any clues as to  why its still not working. I don't really care about seeing the boot messages via DVI because I can always see them via dmesg or UART. The real issue with the BPi framebuffer now is that it stops working entirely once we get to the login prompt which is when I really do want it to work.

As for the USB, no, nothing has worked. I've tried my keyboard, USB hub and a memory stick but nothing shows up in dmesg for any of them when attached or detached.

I will open a new PR for the USB issues after I've tried the diff that Jared linked to but this PR needs to remain open until I can use the console over fb and hopefully start X too.
Comment 21 Dan MacDonald 2016-03-13 10:23:54 UTC
Something of interest I just noticed is that fb output stops working when the login prompt appears but it comes back to life when you run `poweroff` as the shutdown messages appear on the fb display.
Comment 22 Jared McNeill freebsd_committer 2016-03-13 11:36:58 UTC
(In reply to Dan MacDonald from comment #20)

Can you describe how it stops working? Do you get a "no signal" type of message on the display, does it simply go blank, or do you see garbage on the screen?
Comment 23 Dan MacDonald 2016-03-13 11:42:55 UTC
I see the partial boot messages followed by the login prompt but the cursor after 'login:' is a static block whereas I'd expect it to blink or not be visible.

I can login fine at this point over UART console but when I've logged in, I don't see the motd text and the new prompt appear on the fb display, just the boot messages and login prompt with the static cursor remains on the fb display.

The fb display remains like this until I halt or poweroff at which point my monitor springs back to life and starts printing the shutdown messages on the FB display after the broken prompt.
Comment 24 Jared McNeill freebsd_committer 2016-03-13 11:50:00 UTC
Created attachment 168084 [details]
Banana Pi dtb with usbphy device node

This dtb may help with your USB issue, please give it a try.
Comment 25 Jared McNeill freebsd_committer 2016-03-13 11:53:33 UTC
(In reply to Dan MacDonald from comment #23)

The serial console isn't meant to be mirrored to the framebuffer console, so it sounds like it is working as expected. The cursor on the login prompt isn't supposed to blink either.
Comment 26 Dan MacDonald 2016-03-13 16:58:28 UTC
I've tried booting with this latest dtb but there is no sign of my memory stick, usb hub or keyboard in dmesg after trying them in both ports.

Otherwise, it sounds like this PR can be closed if I'm seeing what you expect to see out of HDMI.

I'll open a new PR for the USB tomorrow.
Comment 27 Dan MacDonald 2016-03-21 23:10:00 UTC
Created attachment 168469 [details]
Test dts

Here is the dmesg for booting Test.dts (compiled to dtb, of course):

U-Boot 2015.04 (Mar 08 2016 - 10:01:34) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
I2C:   ready
DRAM:  1 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
reading u-boot.env

** Unable to read "u-boot.env" from mmc0:1 **
Using default environment

HDMI connected: Setting up a 1280x1024 dvi console
In:    serial
Out:   vga
Err:   vga
SCSI:  SUNXI SCSI INIT
SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports r3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst 
Net:   dwmac.1c50000
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
Booting from: mmc 0 ubldr
reading ubldr
262594 bytes read in 77 ms (3.3 MiB/s)
## Starting application at 0x42000094 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @0x7f235458

FreeBSD/armv6 U-Boot loader, Revision 1.2
(root@releng2.nyi.freebsd.org, Tue Mar  8 10:28:28 UTC 2016)

DRAM: 1024MB
MMC Device 1 not found
MMC Device 2 not found
MMC Device 3 not found
MMC Device 1 not found
Number of U-Boot devices: 3
U-Boot env: loaderdev='mmc 0'
Found U-Boot device: disk
  Checking unit=1 slice=<auto> partition=<auto>... good.
Booting from disk1s2a:
/boot/kernel/kernel data=0x61a164+0x125e9c syms=[0x4+0x86a90+0x4+0x99bf0]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 9 seconds... 

Type '?' for a list of commands, 'help' for more detailed help.
loader> load -t dtb /boot/dtb/bananapi-fix.dtb
/boot/dtb/bananapi-fix.dtb size=0x7bdf
loader> boot -v
Booting...
Using DTB from loaded file '/boot/dtb/bananapi-fix.dtb'.
Kernel entry at 0x0x42200100...
Kernel args: -v
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r297052: Sat Mar 19 18:46:33 GMT 2016
    dan@pcbsd-1186:/usr/home/dan/src/obj/arm.arm/usr/home/dan/src/head/sys/A20 arm
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0a72000.
Preloaded dtb "/boot/dtb/bananapi-fix.dtb" at 0xc0a72754.
CPU: Cortex A7 rev 4 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB enabled LABT branch prediction disabled
LoUU:2 LoC:3 LoUIS:2 
Cache level 1: 
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2: 
 256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 1073741824 (1024 MB)
avail memory = 1036029952 (988 MB)
Physical memory chunk(s):
  0x40000000 - 0x7fffffff,  1024 MB ( 262144 pages)
Excluded memory regions:
  0x42200000 - 0x42b53fff,     9 MB (   2388 pages) NoAlloc 
Static device mappings:
  0x01c00000 - 0x01ffffff mapped at VA 0xffb00000
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
ULE: setup cpu 0
ULE: setup cpu 1
snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25
random: entropy device external interface
nfslock: pseudo-device
crypto: <crypto core>
null: <full device, null device, zero device>
openfirm: <Open Firmware control device>
kbd0 at kbdmux0
mem: <memory>
random: harvesting attach, 8 bytes (4 bits) from nexus0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from simplebus0
random: harvesting attach, 8 bytes (4 bits) from ofwbus0
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq 24 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpiobus0
Processing 3 pin-config node(s) in pinctrl-0 for spi@01c05000
Processing 2 pin-config node(s) in pinctrl-0 for mmc@01c0f000
Processing 1 pin-config node(s) in pinctrl-0 for phy@01c13400
Processing 1 pin-config node(s) in pinctrl-0 for ir@01c21800
Processing 1 pin-config node(s) in pinctrl-0 for serial@01c28000
Processing 1 pin-config node(s) in pinctrl-0 for i2c@01c2ac00
Processing 1 pin-config node(s) in pinctrl-0 for ethernet@01c50000
Processing 1 pin-config node(s) in pinctrl-0 for usb0-vbus
Processing 1 pin-config node(s) in pinctrl-0 for usb1-vbus
Processing 1 pin-config node(s) in pinctrl-0 for usb2-vbus
Processing 1 pin-config node(s) in pinctrl-0 for leds
Processing 1 pin-config node(s) in pinctrl-0 for gmac-3v3
random: harvesting attach, 8 bytes (4 bits) from gpio0
gic0: <ARM Generic Interrupt Controller> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c82fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 54 on simplebus0
gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b irqs 160
random: harvesting attach, 8 bytes (4 bits) from gic0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
random: harvesting attach, 8 bytes (4 bits) from generic_timer0
rtc0: <Allwinner RTC> mem 0x1c20d00-0x1c20d1f irq 27 on simplebus0
rtc0: Using external oscillator
rtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500000000s)
random: harvesting attach, 8 bytes (4 bits) from rtc0
a10_ccm0: <Allwinner Clock Control Module> mem 0x1c20000-0x1c203ff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10_ccm0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu0: missing 'clock-frequency' property
random: harvesting attach, 8 bytes (4 bits) from cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu1: missing 'clock-frequency' property
random: harvesting attach, 8 bytes (4 bits) from cpu1
random: harvesting attach, 8 bytes (4 bits) from cpulist0
ofwbus0: <pmu> irq 4,5 compat arm,cortex-a7-pmu (no driver attached)
simplebus0: <sram-controller@01c00000> mem 0x1c00000-0x1c0002f compat allwinner,sun4i-a10-sram-controller (no driver attached)
simplebus0: <interrupt-controller@01c00030> mem 0x1c00030-0x1c0003b irq 6 compat allwinner,sun7i-a20-sc-nmi (no driver attached)
a10dmac0: <Allwinner DMA controller> mem 0x1c02000-0x1c02fff irq 7 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10dmac0
simplebus0: <spi@01c05000> mem 0x1c05000-0x1c05fff irq 8 compat allwinner,sun4i-a10-spi (no driver attached)
simplebus0: <spi@01c06000> mem 0x1c06000-0x1c06fff irq 9 disabled compat allwinner,sun4i-a10-spi (no driver attached)
simplebus0: <ethernet@01c0b000> mem 0x1c0b000-0x1c0bfff irq 10 disabled compat allwinner,sun4i-a10-emac (no driver attached)
simplebus0: <mdio@01c0b080> mem 0x1c0b080-0x1c0b093 disabled compat allwinner,sun4i-a10-mdio (no driver attached)
a10_mmc0: <Allwinner Integrated MMC/SD controller> mem 0x1c0f000-0x1c0ffff irq 11 on simplebus0
a10_mmc0: DMA status: enabled
mmc0: <MMC/SD bus> on a10_mmc0
random: harvesting attach, 8 bytes (4 bits) from mmc0
random: harvesting attach, 8 bytes (4 bits) from a10_mmc0
simplebus0: <mmc@01c10000> mem 0x1c10000-0x1c10fff irq 12 disabled compat allwinner,sun5i-a13-mmc (no driver attached)
simplebus0: <mmc@01c11000> mem 0x1c11000-0x1c11fff irq 13 disabled compat allwinner,sun5i-a13-mmc (no driver attached)
simplebus0: <mmc@01c12000> mem 0x1c12000-0x1c12fff irq 14 disabled compat allwinner,sun5i-a13-mmc (no driver attached)
simplebus0: <usb@01c13000> mem 0x1c13000-0x1c133ff irq 15 compat allwinner,sun4i-a10-musb (no driver attached)
awusbphy0: <Allwinner USB PHY> mem 0x1c13400-0x1c1340f,0x1c14800-0x1c14803,0x1c1c800-0x1c1c803 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from awusbphy0
ehci0: <Allwinner Integrated USB 2.0 controller> mem 0x1c14000-0x1c140ff irq 16 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
ehci0: usbpf: Attached
random: harvesting attach, 8 bytes (4 bits) from usbus0
random: harvesting attach, 8 bytes (4 bits) from ehci0
simplebus0: <usb@01c14400> mem 0x1c14400-0x1c144ff irq 17 compat allwinner,sun7i-a20-ohci (no driver attached)
simplebus0: <crypto-engine@01c15000> mem 0x1c15000-0x1c15fff irq 18 compat allwinner,sun4i-a10-crypto (no driver attached)
simplebus0: <spi@01c17000> mem 0x1c17000-0x1c17fff irq 19 disabled compat allwinner,sun4i-a10-spi (no driver attached)
ahci0: <Allwinner Integrated AHCI controller> mem 0x1c18000-0x1c18fff irq 20 on simplebus0
ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported
ahci0: quirks=0x2<NOPMP>
ahci0: Caps: NCQ SNTF SS ALP AL CLO 3Gbps PMD SSC PSC 32cmd CCC 1ports
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: Caps:
random: harvesting attach, 8 bytes (4 bits) from ahcich0
random: harvesting attach, 8 bytes (4 bits) from ahci0
ehci1: <Allwinner Integrated USB 2.0 controller> mem 0x1c1c000-0x1c1c0ff irq 21 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci1
ehci1: usbpf: Attached
random: harvesting attach, 8 bytes (4 bits) from usbus1
random: harvesting attach, 8 bytes (4 bits) from ehci1
simplebus0: <usb@01c1c400> mem 0x1c1c400-0x1c1c4ff irq 22 compat allwinner,sun7i-a20-ohci (no driver attached)
simplebus0: <spi@01c1f000> mem 0x1c1f000-0x1c1ffff irq 23 disabled compat allwinner,sun4i-a10-spi (no driver attached)
gpioled0: <GPIO led> at pin 149 on gpiobus0
random: harvesting attach, 8 bytes (4 bits) from gpioled0
gpioc0: <GPIO controller> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpioc0
simplebus0: <timer@01c20c00> mem 0x1c20c00-0x1c20c8f irq 25,26,27,28,29,30 compat allwinner,sun4i-a10-timer (no driver attached)
aw_wdog0: <Allwinner A10 Watchdog> mem 0x1c20c90-0x1c20c9f on simplebus0
random: harvesting attach, 8 bytes (4 bits) from aw_wdog0
simplebus0: <pwm@01c20e00> mem 0x1c20e00-0x1c20e0b disabled compat allwinner,sun7i-a20-pwm (no driver attached)
simplebus0: <ir@01c21800> mem 0x1c21800-0x1c2183f irq 31 compat allwinner,sun4i-a10-ir (no driver attached)
simplebus0: <ir@01c21c00> mem 0x1c21c00-0x1c21c3f irq 32 disabled compat allwinner,sun4i-a10-ir (no driver attached)
simplebus0: <lradc@01c22800> mem 0x1c22800-0x1c228ff irq 33 disabled compat allwinner,sun4i-a10-lradc-keys (no driver attached)
pcm0: <Allwinner Audio Codec> mem 0x1c22c00-0x1c22c3f irq 34 on simplebus0
pcm0: Mixer "vol":
pcm0: Mixer "line":
pcm0: Mixer "rec":
random: harvesting attach, 8 bytes (4 bits) from pcm0
simplebus0: <eeprom@01c23800> mem 0x1c23800-0x1c239ff compat allwinner,sun7i-a20-sid (no driver attached)
simplebus0: <rtp@01c25000> mem 0x1c25000-0x1c250ff irq 35 compat allwinner,sun5i-a13-ts (no driver attached)
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 36 on simplebus0
uart0: console (8861,n,8,1)
uart0: fast interrupt
uart0: PPS capture mode: DCDinvalid
random: harvesting attach, 8 bytes (4 bits) from uart0
simplebus0: <serial@01c28400> mem 0x1c28400-0x1c287ff irq 37 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c28800> mem 0x1c28800-0x1c28bff irq 38 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c28c00> mem 0x1c28c00-0x1c28fff irq 39 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c29000> mem 0x1c29000-0x1c293ff irq 40 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c29400> mem 0x1c29400-0x1c297ff irq 41 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c29800> mem 0x1c29800-0x1c29bff irq 42 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@01c29c00> mem 0x1c29c00-0x1c29fff irq 43 disabled compat snps,dw-apb-uart (no driver attached)
iichb0: <Allwinner Integrated I2C Bus Controller> mem 0x1c2ac00-0x1c2afff irq 44 on simplebus0
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
random: harvesting attach, 8 bytes (4 bits) from iic0
axp209_pmu0: <X-Power AXP209 Power Management Unit> at addr 0x68 irq -1064181232 on iicbus0
axp209_pmu0: AXP209 Powered by AC and USB
random: harvesting attach, 8 bytes (4 bits) from axp209_pmu0
random: harvesting attach, 8 bytes (4 bits) from iicbus0
random: harvesting attach, 8 bytes (4 bits) from iichb0
simplebus0: <i2c@01c2b000> mem 0x1c2b000-0x1c2b3ff irq 45 disabled compat allwinner,sun7i-a20-i2c (no driver attached)
simplebus0: <i2c@01c2b400> mem 0x1c2b400-0x1c2b7ff irq 46 disabled compat allwinner,sun7i-a20-i2c (no driver attached)
simplebus0: <i2c@01c2b800> mem 0x1c2b800-0x1c2bbff irq 47 disabled compat allwinner,sun7i-a20-i2c (no driver attached)
simplebus0: <i2c@01c2c000> mem 0x1c2c000-0x1c2c3ff irq 48 disabled compat allwinner,sun7i-a20-i2c (no driver attached)
dwc0: <A20 Gigabit Ethernet Controller> mem 0x1c50000-0x1c5ffff irq 49 on simplebus0
miibus0: <MII bus> on dwc0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: OUI 0x00e04c, model 0x0011, rev. 5
rgephy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
random: harvesting attach, 8 bytes (4 bits) from rgephy0
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1: OUI 0x00e04c, model 0x0011, rev. 5
rgephy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
random: harvesting attach, 8 bytes (4 bits) from rgephy1
random: harvesting attach, 8 bytes (4 bits) from miibus0
dwc0: bpf attached
dwc0: Ethernet address: 02:09:04:c2:82:f8
random: harvesting attach, 8 bytes (4 bits) from dwc0
simplebus0: <hstimer@01c60000> mem 0x1c60000-0x1c60fff irq 50,51,52,53 compat allwinner,sun7i-a20-hstimer (no driver attached)
simplebus0: <ps2@01c2a000> mem 0x1c2a000-0x1c2a3ff irq 55 disabled compat allwinner,sun4i-a10-ps2 (no driver attached)
simplebus0: <ps2@01c2a400> mem 0x1c2a400-0x1c2a7ff irq 56 disabled compat allwinner,sun4i-a10-ps2 (no driver attached)
a10hdmi0: <Allwinner HDMI TX> mem 0x1c16000-0x1c16fff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a10hdmi0
pcm1: <Allwinner HDMI Audio> on simplebus0
pcm1: Mixer "pcm":
random: harvesting attach, 8 bytes (4 bits) from pcm1
fb0: <Allwinner Framebuffer> mem 0x1e60000-0x1e6ffff,0x1c0c000-0x1c0cfff on simplebus0
random: harvesting attach, 8 bytes (4 bits) from fb0
ofwbus0: <ahci-5v> disabled compat regulator-fixed (no driver attached)
ofwbus0: <usb0-vbus> compat regulator-fixed (no driver attached)
ofwbus0: <usb1-vbus> compat regulator-fixed (no driver attached)
ofwbus0: <usb2-vbus> compat regulator-fixed (no driver attached)
ofwbus0: <vcc3v0> compat regulator-fixed (no driver attached)
ofwbus0: <vcc3v3> compat regulator-fixed (no driver attached)
ofwbus0: <vcc5v0> compat regulator-fixed (no driver attached)
ofwbus0: <leds> compat gpio-leds (no driver attached)
ofwbus0: <gmac-3v3> compat regulator-fixed (no driver attached)
cryptosoft0: <software crypto>
crypto: assign cryptosoft0 driver id 0, flags 100663296
crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 23 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 25 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 24 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 26 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 27 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 28 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0
random: harvesting attach, 8 bytes (4 bits) from cryptosoft0
procfs registered
Timecounters tick every 10.000 msec
IPsec: Initialized Security Association Processing.
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 8192
lo0: bpf attached
mmc0: Probing bus
a10_mmc0: timeout updating clock
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ahcich0: AHCI reset...
ugen1.1: <Allwinner> at usbus1
uhub0: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <Allwinner> at usbus0
uhub1: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ahcich0: SATA connect timeout time=10000us status=00000000
ahcich0: AHCI reset: device not found
uhub1: 1 port with 1 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub1
uhub0: 1 port with 1 removable, self powered
random: harvesting attach, 8 bytes (4 bits) from uhub0
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
mmc0: SD probe: failed
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
random: unblocking device.
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
a10_mmc0: controller timeout
a10_mmc0: timeout updating clock
mmc0: MMC probe: failed
mmc0: Current OCR: 0x00000000
mmc0: No compatible cards found on bus
edid: max_dotclock according to supported modes: 135000
edid: max_dotclock according to supported modes: 135000
Vendor: [PGE] 
Product: [1705] GNR TS700
Serial number: b30a0000
Manufactured 2005 Week 44
EDID Version 1.3
EDID Comment: 
Video Input: 8c
	Digital
Gamma: 2.20
Max Size: 34 cm x 27 cm
Features: 2e
	DPMS active-off
	RGB
	Standard color space
	Preferred timing
Chroma Info:
	Red X: 0.632
	Red Y: 0.632
	Grn X: 0.299
	Grn Y: 0.585
	Blu X: 0.146
	Blu Y: 0.102
	Wht X: 0.313
	Wht Y: 0.329
Range:
	Horizontal: 31 - 81 kHz
	Vertical: 56 - 75 Hz
	Max Dot Clock: 140 MHz
Video modes:
	720x400 @ 70Hz (28320 738 846 900 412 414 449 -H +V)
	640x480 @ 60Hz (25175 656 752 800 490 492 525 -H -V)
	640x480 @ 73Hz (31500 664 704 832 489 492 520 -H -V)
	640x480 @ 75Hz (31500 656 720 840 481 484 500 -H -V)
	800x600 @ 56Hz (36000 824 896 1024 601 603 625 +H +V)
	800x600 @ 60Hz (40000 840 968 1056 601 605 628 +H +V)
	800x600 @ 72Hz (50000 856 976 1040 637 643 666 +H +V)
	800x600 @ 75Hz (49500 816 896 1056 601 604 625 +H +V)
	832x624 @ 75Hz (57284 864 928 1152 625 628 667 -H -V)
	1024x768 @ 60Hz (65000 1048 1184 1344 771 777 806 -H -V)
	1024x768 @ 70Hz (75000 1048 1184 1328 771 777 806 -H -V)
	1024x768 @ 75Hz (78750 1040 1136 1312 769 772 800 +H +V)
	1280x1024 @ 75Hz (135000 1296 1440 1688 1025 1028 1066 +H +V)
	1280x1024 @ 60Hz (108000 1328 1440 1688 1025 1028 1066 +H +V)
	1280x960 @ 60Hz (108000 1376 1488 1800 961 964 1000 +H +V)
	1152x864 @ 75Hz (108000 1216 1344 1600 865 868 900 +H +V)
Preferred mode: 1280x1024 @ 60Hz
Number of extension blocks: 0
fb0: using 1280x1024
fbd0 on fb0
VT: initialize with new VT driver "fb".
random: harvesting attach, 8 bytes (4 bits) from fbd0
Release APs
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
mountroot: waiting for device /dev/ufs/rootfs...
Mounting from ufs:/dev/ufs/rootfs failed with error 19.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ufs/rootfs
  vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot>
Comment 28 Dan MacDonald 2016-03-23 22:04:22 UTC
The new u-boot has helped some because at least now I get power over USB during the u-boot phase but as soon as I dd the new u-boot into place, FreeBSD stops booting normally. It says

No valid device tree blob found!

and drops me to the loader prompt from which I then have to manually load my dtb file. I'm still using the dtb built from the attached dts - I've not added the suggested gbit tweak yet although I do need that too.

When I boot into FreeBSD, there is still no USB. The light on my mouse turns off a few minutes after boot.

I should note that I've been using dd under Linux to dd the new u-boot onto my FreeBSD SD card although I doubt that makes any difference, right? My SD card reader doesn't work under FreeBSD on my laptop. Maybe I'd be better doing it on the BPi live?
Comment 29 Jared McNeill freebsd_committer 2016-03-23 22:06:32 UTC
(In reply to Dan MacDonald from comment #28)

Hi Dan, this bug is closed, did you mean to post this on bug #207970?
Comment 30 Dan MacDonald 2016-03-23 22:09:53 UTC
Yes, sorry!

I keep on doing that as I keep referencing this framebuffer thread! :)
Comment 31 Dan MacDonald 2016-08-21 13:14:45 UTC
I've just tried FreeBSD-11.0-RC1-arm-armv6-BANANAPI.img on my sinovoip BPi M1 and I've failed to get a fully working display from the HDMI output.

I own two displays. One is an Acer 4K display that has HDMI, DVI and DP inputs and then I have an older, DVI-only gnr display that can just about do Standard HD. I get no display output whatsoever on either monitor when using a HDMI -> DVI cable to either monitor. When I just use a HDMI to HDMI cable with the Acer 4K display I can see some text but its garbled and unreadable.
Comment 32 Dan MacDonald 2016-08-21 18:28:38 UTC
I've just tried FreeBSD-11.0-RC1-arm-armv6-BANANAPI.img on my friends Full HD (1920x1080) LG TV using a HDMI to HDMI cable. I can see the u-boot output fine on his TV (something I didn't see on my 4K display) but when it boots the kernel I see garbled junk on the screen for a second or so and then... nothing.
Comment 33 Emmanuel Vadot freebsd_committer 2020-01-10 18:59:31 UTC
We don't support the framebuffer anymore, it was made to work with some patched DTS and we don't support that anymore.