Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document state of Raspberry Pi 400 #188

Open
bradfitz opened this issue Apr 1, 2023 · 6 comments
Open

Document state of Raspberry Pi 400 #188

bradfitz opened this issue Apr 1, 2023 · 6 comments

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Apr 1, 2023

Platform

I’m using:

  • gokrazy/rpi3b
  • gokrazy/rpi3b+
  • gokrazy/rpi4b
  • ... and also gokrazy/rpi400

Observed behavior

The Raspberry Pi 400 seems to mostly work. Everything except wifi.

I moved one of my SD cards from a Raspberry Pi 3B+ to a RPi 400 and it booted fine, but only got DHCP on wired ethernet, not wifi. Then moved it to another RPi 400 (because I'd previously taken apart the first 400 and broke parts of its keyboard), to confirm it wasn't a hardware problem, and same on the second RPi 400: ethernet works, but no wifi.

Expected behavior

Documentation on https://gokrazy.org/platforms/ about the state of Raspberry Pi 400 (ethernet works, no wifi)

Extra bonus: fix wifi on 400 too, so I can convert my kids' Sonos controller jukebox to gokrazy :)

I'm willing to dedicate (and/or locally host) one of my three RPi 400s as a CI machine if needed.

@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 1, 2023

I guess the 4B and 400 are nearly identical, except when it comes to the wifi.

The 4B has BCM43455: "2.4 GHz and 5.0 GHz IEEE 802.11ac"
The 400 has BCM43456 (I think?): "2.4 GHz and 5.0 GHz IEEE 802.11b/g/n/ac"

When using wifi on the rpi400 with Debian, I see:

[    5.316574] brcmfmac: F1 signature read @0x18000000=0x15294345
...
[    5.341573] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
...
[    5.569214] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    5.569365] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    5.582772] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/9 wl0: May 14 2020 17:26:08 version 7.84.17.1 (r871554) FWID 01-3d9e1d87

I have no clue how any of this works, but taking notes in case it helps anybody.

My gokrazy image contains,

$ ~/go/bin/gok sbom | jq -r '.sbom.extra_file_hashes[].path' 
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430-sdio.bin
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-2-w.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430b0-sdio.clm_blob
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.bin
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43455-sdio.bin
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
/home/bradfitz/go/pkg/mod/github.com/gokrazy/wifi@v0.0.0-20230315194431-f611656338b6/_gokrazy/extrafiles/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt

I guess we'd need https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/bullseye/debian/config/brcm80211/brcm/brcmfmac43456-sdio.txt in there, which I see some people naming like brcmfmac43456-sdio.raspberrypi,400.txt ?

I haven't tried that, and not sure what else would be needed after.

But looking at gokrazy/wifi@e6db8b8 that seems like maybe all that's needed?

Oh, probably the other two binaries as well:

pi@pi400:~ $ dpkg -S brcmfmac43456
firmware-brcm80211: /lib/firmware/brcm/brcmfmac43456-sdio.txt
firmware-brcm80211: /lib/firmware/brcm/brcmfmac43456-sdio.clm_blob
firmware-brcm80211: /lib/firmware/brcm/brcmfmac43456-sdio.bin

@stapelberg
Copy link
Contributor

When using wifi on the rpi400 with Debian, I see:

Just to note: Raspbian is not the same as Debian, in particular they have different WiFi drivers.

I don’t have a Pi 400 to test, so you’ll need to try out the WiFi firmware files yourself. But yeah, maybe getting the right files in place with the right name is all you need :)

@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 2, 2023

Well, my naive attempt (bradfitz/gokrazy-wifi@46162e7) didn't work.

Maybe this means something to you:

lsmod says:

brcmfmac_wcc 16384 0 - Live 0xffffa2a99fc4c000
brcmfmac 262144 1 brcmfmac_wcc, Live 0xffffa2a99fbfa000
brcmutil 20480 1 brcmfmac, Live 0xffffa2a99fbf4000

And dmesg says:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.2.9 (gokrazy@docker) (aarch64-linux-gnu-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT Wed Mar  1 20:57:29 UTC 2017
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 400 Rev 1.0
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000037400000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000fbffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xfb817a00-0xfb819fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[    0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges
[    0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[    0.000000] percpu: Embedded 21 pages/cpu s46184 r8192 d31640 u86016
[    0.000000] pcpu-alloc: s46184 r8192 d31640 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Fallback order for Node 0: 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 996912
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: video=HDMI-A-1:1600x900M@60 dma.dmachans=0x37f5 bcm2709.boardrev=0xc03130 bcm2709.serial=0xc19a486c bcm2709.uart_clock=48000000 smsc95xx.macaddr=DC:A6:32:CD:86:A7 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=60c24cc1-f3f9-427a-8199-c55898220001/PARTNROFF=1 init=/gokrazy/init rootwait panic=10 oops=panic
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x0000000033400000-0x0000000037400000] (64MB)
[    0.000000] Memory: 3791340K/4050944K available (20416K kernel code, 4506K rwdata, 12460K rodata, 9408K init, 630K bss, 194068K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000360] Console: colour dummy device 80x25
[    0.000374] printk: console [tty1] enabled
[    0.000955] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000988] pid_max: default: 32768 minimum: 301
[    0.001076] LSM: initializing lsm=capability,landlock,integrity
[    0.001141] landlock: Up and running.
[    0.001264] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.001331] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003164] cblist_init_generic: Setting adjustable number of callback queues.
[    0.003202] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.003309] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.003565] rcu: Hierarchical SRCU implementation.
[    0.003583] rcu: 	Max phase no-delay instances is 1000.
[    0.007063] EFI services will not be available.
[    0.007461] smp: Bringing up secondary CPUs ...
[    0.008096] Detected PIPT I-cache on CPU1
[    0.008240] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.008828] Detected PIPT I-cache on CPU2
[    0.008939] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.009495] Detected PIPT I-cache on CPU3
[    0.009604] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.009689] smp: Brought up 1 node, 4 CPUs
[    0.009762] SMP: Total of 4 processors activated.
[    0.009778] CPU features: detected: 32-bit EL0 Support
[    0.009791] CPU features: detected: 32-bit EL1 Support
[    0.009806] CPU features: detected: CRC32 instructions
[    0.009909] CPU: All CPU(s) started at EL2
[    0.009933] alternatives: applying system-wide alternatives
[    0.012020] devtmpfs: initialized
[    0.020415] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.020479] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.022109] pinctrl core: initialized pinctrl subsystem
[    0.024326] DMI not present or invalid.
[    0.025014] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.026516] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.026866] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.027125] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.027195] audit: initializing netlink subsys (disabled)
[    0.027349] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1
[    0.028609] thermal_sys: Registered thermal governor 'step_wise'
[    0.028619] thermal_sys: Registered thermal governor 'power_allocator'
[    0.028710] cpuidle: using governor menu
[    0.029306] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.029437] ASID allocator initialised with 32768 entries
[    0.031663] Serial: AMBA PL011 UART driver
[    0.058789] KASLR enabled
[    0.059629] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.059652] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.059670] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.059686] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.059703] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.059718] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.059734] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.059748] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.061661] ACPI: Interpreter disabled.
[    0.064942] iommu: Default domain type: Translated 
[    0.064964] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.065310] SCSI subsystem initialized
[    0.065463] libata version 3.00 loaded.
[    0.065672] usbcore: registered new interface driver usbfs
[    0.065716] usbcore: registered new interface driver hub
[    0.065760] usbcore: registered new device driver usb
[    0.065964] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.067183] pps_core: LinuxPPS API ver. 1 registered
[    0.067202] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.067234] PTP clock support registered
[    0.067415] EDAC MC: Ver: 3.0.0
[    0.069360] FPGA manager framework
[    0.069482] Advanced Linux Sound Architecture Driver Initialized.
[    0.070762] vgaarb: loaded
[    0.071466] clocksource: Switched to clocksource arch_sys_counter
[    0.071718] VFS: Disk quotas dquot_6.6.0
[    0.071774] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.072004] pnp: PnP ACPI: disabled
[    0.079540] NET: Registered PF_INET protocol family
[    0.080020] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.084437] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.084548] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.084582] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.084795] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.085855] TCP: Hash tables configured (established 32768 bind 32768)
[    0.086064] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.086151] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.086356] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.086917] RPC: Registered named UNIX socket transport module.
[    0.086944] RPC: Registered udp transport module.
[    0.086958] RPC: Registered tcp transport module.
[    0.086970] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.088334] PCI: CLS 0 bytes, default 64
[    0.089934] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.090175] kvm [1]: IPA Size Limit: 44 bits
[    0.093170] kvm [1]: vgic interrupt IRQ9
[    0.093310] kvm [1]: Hyp mode initialized successfully
[    0.094689] Initialise system trusted keyrings
[    0.094914] workingset: timestamp_bits=42 max_order=20 bucket_order=0
[    0.095364] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.095714] NFS: Registering the id_resolver key type
[    0.095751] Key type id_resolver registered
[    0.095766] Key type id_legacy registered
[    0.095805] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.095824] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.096014] fuse: init (API version 7.38)
[    0.096175] 9p: Installing v9fs 9p2000 file system support
[    0.160268] Key type asymmetric registered
[    0.160289] Asymmetric key parser 'x509' registered
[    0.160356] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.160378] io scheduler mq-deadline registered
[    0.160392] io scheduler kyber registered
[    0.161455] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 18)
[    0.180257] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    0.180311] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    0.180365] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x0603ffffff -> 0x00f8000000
[    0.180413] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00ffffffff -> 0x0400000000
[    0.181282] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    0.181310] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.181332] pci_bus 0000:00: root bus resource [mem 0x600000000-0x603ffffff] (bus address [0xf8000000-0xfbffffff])
[    0.181389] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    0.181488] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.183993] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.184135] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[    0.184274] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator
[    0.184339] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[    0.293521] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    0.293636] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    0.293735] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    0.294026] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.303553] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.303601] pci 0000:00:00.0: BAR 14: assigned [mem 0x600000000-0x6000fffff]
[    0.303628] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    0.303663] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.303683] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    0.303874] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    0.304011] pcieport 0000:00:00.0: PME: Signaling with IRQ 23
[    0.304310] pcieport 0000:00:00.0: AER: enabled with IRQ 23
[    0.306575] simple-framebuffer 3e669000.framebuffer: framebuffer at 0x3e669000, 0x591000 bytes
[    0.306608] simple-framebuffer 3e669000.framebuffer: format=a8r8g8b8, mode=1600x900x32, linelength=6400
[    0.312727] Console: switching to colour frame buffer device 200x56
[    0.318213] simple-framebuffer 3e669000.framebuffer: fb0: simplefb registered!
[    0.318431] IPMI message handler: version 39.2
[    0.318568] ipmi device interface
[    0.318800] ipmi_ssif: IPMI SSIF Interface driver
[    0.319285] EINJ: ACPI disabled.
[    0.354279] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.356106] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 31, base_baud = 62499999) is a 16550
[    0.357921] Serial: AMBA driver
[    0.358235] SuperH (H)SCI(F) driver initialized
[    0.358986] msm_serial: driver initialized
[    0.376738] loop: module loaded
[    0.378661] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    0.380031] megasas: 07.719.03.00-rc1
[    0.383179] SPI driver spidev has no spi_device_id for brcm,bcm2835-spi
[    0.388608] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    0.388694] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    0.394254] tun: Universal TUN/TAP device driver, 1.6
[    0.395989] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    0.455542] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    0.456607] thunder_xcv, ver 1.0
[    0.456690] thunder_bgx, ver 1.0
[    0.456753] nicpf, ver 1.0
[    0.456827] nicvf, ver 1.0
[    0.456963] tulip: tulip: unknown CPU architecture, using default csr0
[    0.459045] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[    0.459113] hns3: Copyright (c) 2017 Huawei Corporation.
[    0.460992] hclge is initializing
[    0.462944] e100: Intel(R) PRO/100 Network Driver
[    0.464707] e100: Copyright(c) 1999-2006 Intel Corporation
[    0.466468] e1000: Intel(R) PRO/1000 Network Driver
[    0.468204] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    0.469965] e1000e: Intel(R) PRO/1000 Network Driver
[    0.471664] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.473384] igb: Intel(R) Gigabit Ethernet Network Driver
[    0.475068] igb: Copyright (c) 2007-2014 Intel Corporation.
[    0.476800] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[    0.478501] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    0.480728] sky2: driver version 1.30
[    0.485965] usbcore: registered new interface driver r8152
[    0.487718] usbcore: registered new interface driver lan78xx
[    0.489396] usbcore: registered new interface driver asix
[    0.491050] usbcore: registered new interface driver ax88179_178a
[    0.492716] usbcore: registered new interface driver cdc_ether
[    0.494352] usbcore: registered new interface driver smsc95xx
[    0.495993] usbcore: registered new interface driver net1080
[    0.497606] usbcore: registered new interface driver cdc_subset
[    0.499188] usbcore: registered new interface driver zaurus
[    0.500754] usbcore: registered new interface driver cdc_ncm
[    0.502273] usbcore: registered new interface driver lg-vl600
[    0.503779] usbcore: registered new interface driver r8153_ecm
[    0.505589] VFIO - User Level meta-driver version: 0.3
[    0.511291] usbcore: registered new interface driver cdc_acm
[    0.512749] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.514243] usbcore: registered new interface driver usblp
[    0.515739] usbcore: registered new interface driver usb-storage
[    0.517261] usbcore: registered new interface driver cp210x
[    0.518712] usbserial: USB Serial support registered for cp210x
[    0.520163] usbcore: registered new interface driver ftdi_sio
[    0.521562] usbserial: USB Serial support registered for FTDI USB Serial Device
[    0.527637] i2c_dev: i2c /dev entries driver
[    0.533671] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    0.535561] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode
[    0.543924] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    0.546893] ghes_edac: GHES probing device list is empty
[    0.549646] sdhci: Secure Digital Host Controller Interface driver
[    0.552513] sdhci: Copyright(c) Pierre Ossman
[    0.555046] Synopsys Designware Multimedia Card Interface Driver
[    0.557994] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.562972] ledtrig-cpu: registered to indicate activity on CPUs
[    0.568076] usbcore: registered new interface driver usbhid
[    0.569477] usbhid: USB HID core driver
[    0.572486] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.586863] Initializing XFRM netlink socket
[    0.588431] NET: Registered PF_INET6 protocol family
[    0.590735] Segment Routing with IPv6
[    0.592188] In-situ OAM (IOAM) with IPv6
[    0.593667] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.595592] NET: Registered PF_PACKET protocol family
[    0.597080] 9pnet: Installing 9P2000 support
[    0.598518] Key type dns_resolver registered
[    0.613758] registered taskstats version 1
[    0.615333] Loading compiled-in X.509 certificates
[    0.630863] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 38, base_baud = 0) is a PL011 rev2
[    0.632567] serial serial0: tty port ttyAMA0 registered
[    0.637147] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-03-21T17:18:16
[    0.640979] uart-pl011 fe201000.serial: Failed to create device link (0x180) with soc:firmware:gpio
[    0.656916] Console: switching to colour dummy device 80x25
[    0.703522] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops)
[    0.706212] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops)
[    0.709152] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops)
[    0.709352] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops)
[    0.709462] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops)
[    0.709561] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops)
[    0.709660] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops)
[    0.709725] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops)
[    0.710902] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[    0.804182] Console: switching to colour frame buffer device 200x56
[    0.820159] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[    0.848530] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
[    0.848769] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
[    0.949846] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    0.997237] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    0.997306] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    0.997688] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000040000000890
[    0.998499] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    0.998553] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    0.998616] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    0.999597] hub 1-0:1.0: USB hub found
[    0.999725] hub 1-0:1.0: 1 port detected
[    1.001146] hub 2-0:1.0: USB hub found
[    1.001252] hub 2-0:1.0: 4 ports detected
[    1.005826] sdhci-iproc fe300000.mmc: allocated mmc-pwrseq
[    1.015089] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.016432] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.016576] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.016613] cfg80211: failed to load regulatory.db
[    1.018625] ALSA device list:
[    1.018643]   #0: vc4-hdmi-0
[    1.018654]   #1: vc4-hdmi-1
[    1.039467] mmc0: SDHCI controller on fe300000.mmc [fe300000.mmc] using PIO
[    1.051462] mmc1: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.051547] Waiting for root device PARTUUID=60c24cc1-f3f9-427a-8199-c55898220001/PARTNROFF=1...
[    1.136561] mmc0: new high speed SDIO card at address 0001
[    1.152979] mmc1: new ultra high speed DDR50 SDHC card at address aaaa
[    1.154995] mmcblk1: mmc1:aaaa SH32G 29.7 GiB 
[    1.160495]  mmcblk1: p1 p2 p3 p4
[    1.166463] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    1.167995] devtmpfs: mounted
[    1.174896] Freeing unused kernel memory: 9408K
[    1.195523] Run /gokrazy/init as init process
[    1.196522]   with arguments:
[    1.196529]     /gokrazy/init
[    1.196535]   with environment:
[    1.196539]     HOME=/
[    1.196545]     TERM=linux
[    1.259501] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.411219] hub 1-1:1.0: USB hub found
[    1.412267] hub 1-1:1.0: 4 ports detected
[    1.444874] EXT4-fs (mmcblk1p4): VFS: Can't find ext4 filesystem
[    1.448867] FAT-fs (mmcblk1p4): bogus number of reserved sectors
[    1.449733] FAT-fs (mmcblk1p4): Can't find a valid FAT filesystem
[    1.711485] usb 1-1.2: new full-speed USB device number 3 using xhci_hcd
[    1.828952] input: Kinesis Advantage2 Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:29EA:0102.0001/input/input0
[    1.830060] hid-generic 0003:29EA:0102.0001: input: USB HID v1.11 Mouse [Kinesis Advantage2 Keyboard] on usb-0000:01:00.0-1.2/input0
[    1.836925] input: Kinesis Advantage2 Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.1/0003:29EA:0102.0002/input/input1
[    1.895960] hid-generic 0003:29EA:0102.0002: input: USB HID v1.11 Keyboard [Kinesis Advantage2 Keyboard] on usb-0000:01:00.0-1.2/input1
[    1.903476] input: Kinesis Advantage2 Keyboard Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.2/0003:29EA:0102.0003/input/input2
[    1.967697] input: Kinesis Advantage2 Keyboard System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.2/0003:29EA:0102.0003/input/input3
[    1.967763] hid-generic 0003:29EA:0102.0003: input: USB HID v1.11 Device [Kinesis Advantage2 Keyboard] on usb-0000:01:00.0-1.2/input2
[    1.971726] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[    2.032058] bcmgenet fd580000.ethernet eth0: Link is Down
[    2.047231] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    2.047366] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.raspberrypi,4-model-b.bin failed with error -2
[    2.047487] usb 1-1.4: new low-speed USB device number 4 using xhci_hcd
[    2.066118] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.txt failed with error -2
[    2.232124] input:   Raspberry Pi Internal Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:04D9:0007.0004/input/input4
[    2.291904] hid-generic 0003:04D9:0007.0004: input: USB HID v1.11 Keyboard [  Raspberry Pi Internal Keyboard] on usb-0000:01:00.0-1.4/input0
[    2.312238] input:   Raspberry Pi Internal Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:04D9:0007.0005/input/input5
[    2.371630] hid-generic 0003:04D9:0007.0005: input: USB HID v1.11 Device [  Raspberry Pi Internal Keyboard] on usb-0000:01:00.0-1.4/input1
[    3.071573] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[    6.115588] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    6.115632] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

This part of the above looks suspect:

[    2.047366] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.raspberrypi,4-model-b.bin failed with error -2
[    2.066118] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.txt failed with error -2

How's it thinking this is raspberrypi,4-model-b?

Debian/Raspbian on that same hardware shows:

pi@pi400-brokenkeys:~ $ uname -a
Linux pi400-brokenkeys 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux

pi@pi400-brokenkeys:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

pi@pi400-brokenkeys:~ $ cat /etc/apt/sources.list.d/raspi.list 
deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main

pi@pi400-brokenkeys:~ $ dmesg | grep brcm
[    0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 10)
[    1.282835] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.285023] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.287257] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.289412] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00ffffffff -> 0x0400000000
[    1.356153] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.358588] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    5.241661] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    5.245689] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode
[    5.378022] brcmfmac: F1 signature read @0x18000000=0x15294345
[    5.421970] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    5.424228] usbcore: registered new interface driver brcmfmac
[    5.643637] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    5.643804] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    5.655761] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/9 wl0: May 14 2020 17:26:08 version 7.84.17.1 (r871554) FWID 01-3d9e1d87
[    8.139567] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled

@jayaddison
Copy link

@bradfitz I've been attempting to identify the parts of the plain Debian Installer that don't quite work with the RPi 400, and the brcmfmac43456 question in particular has landed me here.

To attempt to answer your question:

How's it thinking this is raspberrypi,4-model-b?

I'm learning this stuff, but I think it'd be worth figuring out the 'flattened device tree' (.dtb) file that's being loaded by gokrazy at boot to determine this.

Roughly speaking: Devicetree provides an alternative to ACPI to describe the names and configuration properties of hardware, and the kernel frequently uses those properties when building firmware filepaths to request.

In the case of the brcmfmac driver, and the bcm2711 chip that exists on both the RPi4 and RPi400, the kernel module uses the 'compatible' field from Devicetree where available:

Those dts source files are compiled into .dtb files provided at boot-time, so my best-guess would be that for some reason you are booting with the rpi-4 .dtb instead of the rpi-400.

As for the brcmfmac43456 question (the reason I arrived here, because I'm trying to find out more about it) - the ideal would be for the firmware files to arrive in the upstream linux-firmware.git. That would make it easier for many different distributions to package and deliver working wifi/bluetooth for relevant systems. Synaptics seem to be the owners of the intellectual property and licensing for that device, so I think it's a question of their open source org structure and awareness of linux-firmware.git.

As of recently there is a license and firmware available, as distributed (license in the debian/copyright file in firmware-nonfree_20221012-1~bpo11+1+rpt1.debian.tar.xz, firmware in the firmware-brcm80211_20221012-1~bpo11+1+rpt1_all.deb package) by RPi Foundation.

Separately, I'm also trying to figure out whether the BCM43455 and BCM43456 are in fact the same device with different regulatory/calibration parameters.. but I'm not particularly sure how to go about doing that.

@stapelberg
Copy link
Contributor

Thanks for sharing your findings!

Separately, I'm also trying to figure out whether the BCM43455 and BCM43456 are in fact the same device with different regulatory/calibration parameters.. but I'm not particularly sure how to go about doing that.

You could try asking the Raspberry Pi employees, see e.g. RPi-Distro/firmware-nonfree#23 for a successful escalation of a WiFi issue in the past.

@jayaddison
Copy link

Thank you, @stapelberg - I'll follow up on a separate issue thread there (it may take me a while to get around to that and to write the question, but will do).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants