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

bcm2711-rpi-400.dtb breaks PI400 ethernet :/ #566

Closed
procount opened this issue Oct 11, 2021 · 10 comments
Closed

bcm2711-rpi-400.dtb breaks PI400 ethernet :/ #566

procount opened this issue Oct 11, 2021 · 10 comments

Comments

@procount
Copy link
Owner

@pelwell

I am updating PINN to match the latest NOOBS' firmware/kernel etc as per the following BUILD-DATA:

rpi-userland Git master @ d4a960e7817c2af508b4ed5f047556a4866a980b
rpi-firmware Git master @ 1eb8921ae7158249894f89e8bb6c4bfb04ec7377
rpi-linux Git rpi-5.10.y @ 5f69d9305998e4e0385fe84d1516de17a2499b94

NOOBS v3.7 includes bcm2711-rpi-400.dtb, but when I add that to PINN, the Pi400 ethernet does not work - it doesn't seem to load any driver. Without it, the kernel loads the bcm_genet driver for the ethernet and it works fine.

I've been comparing kernel config files but I can't see anything amiss (nothing obvious to me, anyway)

Does the bcm2711-rpi-400.dtb device-tree specify a different ethernet driver that I have omitted to add?

The same thing happens if I add this dtb to pinn v3.6.2 which uses the following commits:

rpi-userland Git master @ f73fca015d421b763936667a0b58fe5024d59921
rpi-firmware Git master @ fcf8d2f7639ad8d0330db9c8db9b71bd33eaaa28
rpi-linux Git rpi-5.4.y @ f2f7e4b23d8788e96f81a7522b2f703e51c53e70
@pelwell
Copy link

pelwell commented Oct 12, 2021

Interesting. What board revision is the PI 400 (tail /proc/cpuinfo)? My guess would be that it's a 1.1, in which case it needs a firmware later than the end of April 2021. You should be able to tell if this is the cause of your problem because:

$ find /proc/device-tree/ -name "ethernet-phy*" -print

(note the trailing /)
...will find ethernet-phy@4 where it should be ethernet-phy@0 (there was a PHY switch between those board revisions, purely for reasons of silicon availability).

@procount
Copy link
Owner Author

Raspberry Pi 400 Rev 1.0 (it's an alpha!)
I have also asked the user that reported this issue for his revision.

My device tree (with or without rpi-400.dtb) produces /proc/device-tree/scb/ethernet@7d580000/mdio@e14/ethernet-phy@1

@pelwell
Copy link

pelwell commented Oct 12, 2021

Thanks. I'll run a few tests.

@pelwell
Copy link

pelwell commented Oct 12, 2021

Initial tests using that firmware version (which includes bcm2711-rpi-400.dtb) have been successful. Does your kernel build include CONFIG_MICREL_PHY=y? And what does sudo mii-tool -v eth0 report on a working system?

@procount
Copy link
Owner Author

Yes, I added the MICREL PHY.

I dropped into RaspiOS -LIte to get mii output as follows:

eth0: negotiated 100baseTx-FD flow-control, link ok
  product info: vendor 18:03:61, model 10 rev 2
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

@procount
Copy link
Owner Author

procount commented Oct 12, 2021

I've just spotted that I am missing CONFIG_BROADCOM_PHY.
Could that be it?

@pelwell
Copy link

pelwell commented Oct 12, 2021

Yes, it could be.

Does dmesg -l err,warn show anything relevant?

@procount
Copy link
Owner Author

I couldn't see anything in dmesg (with rpi-400.dtb):

[    2.116996] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.118475] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.119955] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.122616] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.124096] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.138061] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.138066] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    2.138137] \�|�/�-� (redacted)
[    2.187937] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.bin failed with error -2
[    2.187941] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43456-sdio.bin
[    2.188031] \�|�/�-�done. (redacted)

I have extracted the config.gz file from both NOOBS and PINN so that I can get the complete set of settings, instead of just the reduced defconfig. I have sorted each file and diff'ed them (since config settings seem to move around arbitrarily. I can provide both raw files if it helps)

Here is a list of all config lines that are in NOOBS but missing from PINN (for the armv7l version). Seems more than I expected, since mostly I have added extra things to it rather than taking them out, but it could be that I missed some new config lines that are essential. Many are just comments, but if you could cast an eye over them and see if there are any that I really should have, I would appreciate it.

<<<<<<< DELETED CONFIGS
< # Altera FPGA firmware download module (requires I2C)
< # arm Debugging
< # CONFIG_APPLE_MFI_FASTCHARGE is not set
< CONFIG_ARCH_FLATMEM_ENABLE=y
< CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y
< # CONFIG_ARCH_MSTARV7 is not set
< # CONFIG_ARCH_REALTEK is not set
< CONFIG_ARCH_SELECT_MEMORY_MODEL=y
< CONFIG_ARCH_SPARSEMEM_ENABLE=y
< CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
< CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
< # CONFIG_ARM_SMC_WATCHDOG is not set
< CONFIG_AS_VFP_VMRS_FPINST=y
< # CONFIG_BAREUDP is not set
< # CONFIG_BCM54140_PHY is not set
< # CONFIG_BCM84881_PHY is not set
< # CONFIG_BLK_INLINE_ENCRYPTION is not set
< # CONFIG_BOOT_CONFIG is not set
< CONFIG_BRCMSTB_L2_IRQ=y
< CONFIG_BROADCOM_PHY=y
< # CONFIG_BTRFS_FS is not set
< CONFIG_BUILDTIME_TABLE_SORT=y
< CONFIG_CC_CAN_LINK_STATIC=y
< CONFIG_CC_HAS_KASAN_GENERIC=y
< CONFIG_CC_VERSION_TEXT="arm-buildroot-linux-uclibcgnueabi-gcc (Buildroot 2015.02-git-00132-g5de0ec8-dirty) 4.9.2"
< # CONFIG_CFG80211_WEXT is not set
< CONFIG_CLK_BCM2711_DVP=y
< CONFIG_CLK_RASPBERRYPI=y
< # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
< CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
< CONFIG_CPUFREQ_DT_PLATDEV=y
< CONFIG_CPUFREQ_DT=y
< CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
< # CONFIG_CRC_CCITT is not set
< # CONFIG_CRYPTO_AES is not set
< # CONFIG_CRYPTO_BLAKE2B is not set
< # CONFIG_CRYPTO_BLAKE2S is not set
< # CONFIG_CRYPTO_CCM is not set
< # CONFIG_CRYPTO_CMAC is not set
< # CONFIG_CRYPTO_CTR is not set
< # CONFIG_CRYPTO_CURVE25519 is not set
< # CONFIG_CRYPTO_DRBG_MENU is not set
< # CONFIG_CRYPTO_ECHAINIV is not set
< # CONFIG_CRYPTO_GCM is not set
< # CONFIG_CRYPTO_GHASH is not set
< # CONFIG_CRYPTO_HMAC is not set
< # CONFIG_CRYPTO_JITTERENTROPY is not set
< # CONFIG_CRYPTO_LIB_BLAKE2S is not set
< # CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set
< # CONFIG_CRYPTO_LIB_CHACHA is not set
< # CONFIG_CRYPTO_LIB_CURVE25519 is not set
< # CONFIG_CRYPTO_LIB_POLY1305 is not set
< CONFIG_CRYPTO_LIB_POLY1305_RSIZE=9
< # CONFIG_CRYPTO_NULL is not set
< # CONFIG_CRYPTO_SEQIV is not set
< CONFIG_CRYPTO_SKCIPHER2=y
< # CONFIG_CRYPTO_SM2 is not set
< # CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B is not set
< CONFIG_DECOMPRESS_ZSTD=y
< CONFIG_DEFAULT_INIT=""
< # CONFIG_DMABUF_MOVE_NOTIFY is not set
< CONFIG_DMA_NONCOHERENT_MMAP=y
< CONFIG_DMA_OPS=y
< # CONFIG_DMA_PERNUMA_CMA is not set
< # CONFIG_DP83869_PHY is not set
< # CONFIG_DYNAMIC_DEBUG_CORE is not set
< # CONFIG_DYNAMIC_DEBUG is not set
< CONFIG_ETHTOOL_NETLINK=y
< CONFIG_FLATMEM_MANUAL=y
< CONFIG_GCC_VERSION=40902
< CONFIG_GENERIC_GETTIMEOFDAY=y
< CONFIG_GENERIC_IRQ_CHIP=y
< CONFIG_GENERIC_IRQ_IPI=y
< CONFIG_GENERIC_VDSO_32=y
< # CONFIG_GPIO_AGGREGATOR is not set
< CONFIG_GPIO_CDEV_V1=y
< CONFIG_GPIO_CDEV=y
< # CONFIG_GPIO_FSM is not set
< # CONFIG_GPIO_LOGICVC is not set
< # CONFIG_GPIO_SIFIVE is not set
< CONFIG_HAVE_ARCH_SECCOMP=y
< CONFIG_HAVE_GENERIC_VDSO=y
< # CONFIG_HID_GLORIOUS is not set
< # CONFIG_HID_VIVALDI is not set
< # CONFIG_I2C is not set
< # CONFIG_INPUT_JOYDEV is not set
< # CONFIG_INPUT_JOYSTICK is not set
< # CONFIG_INPUT_MISC is not set
< CONFIG_IO_WQ=y
< # CONFIG_KCMP is not set
< # CONFIG_KUNIT is not set
< CONFIG_LD_VERSION=224000000
< # CONFIG_LEDS_CLASS_MULTICOLOR is not set
< CONFIG_LEDS_TRIGGER_ACTPWR=y
< # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
< # CONFIG_LEDS_TRIGGER_CPU is not set
< # CONFIG_LEDS_TRIGGER_GPIO is not set
< # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
< # CONFIG_LEDS_TRIGGER_INPUT is not set
< # CONFIG_LEDS_TRIGGER_ONESHOT is not set
< # CONFIG_LEDS_TRIGGER_PANIC is not set
< # CONFIG_LEDS_TRIGGER_TIMER is not set
< # CONFIG_LIBCRC32C is not set
< CONFIG_LINEAR_RANGES=y
< CONFIG_LLD_VERSION=0
< CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
< # CONFIG_MAC80211 is not set
< CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
< CONFIG_MDIO_DEVRES=y
< # CONFIG_MDIO_IPQ4019 is not set
< # CONFIG_MDIO_IPQ8064 is not set
< # CONFIG_MDIO_MVUSB is not set
< # CONFIG_MEDIA_CEC_SUPPORT is not set
< # CONFIG_MHI_BUS is not set
< CONFIG_MICREL_PHY=y
< # CONFIG_MICROCHIP_PIT64B is not set
< # CONFIG_MMC_HSQ is not set
< # CONFIG_MMC_SDHCI_MILBEAUT is not set
< CONFIG_MMU_GATHER_RCU_TABLE_FREE=y
< CONFIG_MMU_GATHER_TABLE_FREE=y
< # CONFIG_MODULES is not set
< # CONFIG_MPTCP is not set
< # CONFIG_NET_VENDOR_ALACRITECH is not set
< # CONFIG_NET_VENDOR_AMAZON is not set
< # CONFIG_NET_VENDOR_AQUANTIA is not set
< # CONFIG_NET_VENDOR_ARC is not set
< # CONFIG_NET_VENDOR_AURORA is not set
< # CONFIG_NET_VENDOR_CADENCE is not set
< # CONFIG_NET_VENDOR_CAVIUM is not set
< # CONFIG_NET_VENDOR_CIRRUS is not set
< # CONFIG_NET_VENDOR_CORTINA is not set
< # CONFIG_NET_VENDOR_EZCHIP is not set
< # CONFIG_NET_VENDOR_FARADAY is not set
< # CONFIG_NET_VENDOR_HISILICON is not set
< # CONFIG_NET_VENDOR_HUAWEI is not set
< # CONFIG_NET_VENDOR_INTEL is not set
< # CONFIG_NET_VENDOR_MARVELL is not set
< # CONFIG_NET_VENDOR_MICREL is not set
< # CONFIG_NET_VENDOR_MICROSEMI is not set
< # CONFIG_NET_VENDOR_NATSEMI is not set
< # CONFIG_NET_VENDOR_NETRONOME is not set
< # CONFIG_NET_VENDOR_NI is not set
< # CONFIG_NET_VENDOR_QUALCOMM is not set
< # CONFIG_NET_VENDOR_RENESAS is not set
< # CONFIG_NET_VENDOR_ROCKER is not set
< # CONFIG_NET_VENDOR_SAMSUNG is not set
< # CONFIG_NET_VENDOR_SEEQ is not set
< # CONFIG_NET_VENDOR_SMSC is not set
< # CONFIG_NET_VENDOR_SOCIONEXT is not set
< # CONFIG_NET_VENDOR_SOLARFLARE is not set
< # CONFIG_NET_VENDOR_STMICRO is not set
< # CONFIG_NET_VENDOR_SYNOPSYS is not set
< # CONFIG_NET_VENDOR_VIA is not set
< # CONFIG_NET_VENDOR_WIZNET is not set
< # CONFIG_PAGE_REPORTING is not set
< CONFIG_PCIEASPM_DEFAULT=y
< # CONFIG_PCIEASPM_PERFORMANCE is not set
< # CONFIG_PCIEASPM_POWERSAVE is not set
< # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
< CONFIG_PCIEASPM=y
< CONFIG_PCIE_BUS_DEFAULT=y
< # CONFIG_PCIE_BUS_PEER2PEER is not set
< # CONFIG_PCIE_BUS_PERFORMANCE is not set
< # CONFIG_PCIE_BUS_SAFE is not set
< # CONFIG_PCIE_BUS_TUNE_OFF is not set
< # CONFIG_PCIE_CADENCE_PLAT_HOST is not set
< # CONFIG_PCIE_PTM is not set
< # CONFIG_PCI_J721E_HOST is not set
< # CONFIG_PCS_XPCS is not set
< # CONFIG_PHY_CADENCE_SALVO is not set
< # CONFIG_PHY_CADENCE_TORRENT is not set
< # CONFIG_PLX_DMA is not set
< CONFIG_PM_OPP=y
< # CONFIG_PRIME_NUMBERS is not set
< # CONFIG_QRTR is not set
< # CONFIG_QUICC_ENGINE is not set
< # CONFIG_RCU_REF_SCALE_TEST is not set
< # CONFIG_RCU_SCALE_TEST is not set
< CONFIG_RD_ZSTD=y
< # CONFIG_RESET_BRCMSTB_RESCAL is not set
< # CONFIG_RESET_INTEL_GW is not set
< CONFIG_RESET_RASPBERRYPI=y
< # CONFIG_RPI_POE_POWER is not set
< # CONFIG_SCF_TORTURE_TEST is not set
< CONFIG_SECCOMP_FILTER=y
< CONFIG_SECCOMP=y
< CONFIG_SELECT_MEMORY_MODEL=y
< # CONFIG_SERIAL_SPRD is not set
< CONFIG_SET_FS=y
< # CONFIG_SF_PDMA is not set
< CONFIG_SMSC_PHY=y
< # CONFIG_SPARSEMEM_MANUAL is not set
< CONFIG_STACKPROTECTOR_STRONG=y
< CONFIG_SYMBOLIC_ERRNAME=y
< # CONFIG_TEST_FREE_PAGES is not set
< # CONFIG_TEST_MIN_HEAP is not set
< # CONFIG_THERMAL_NETLINK is not set
< CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=y
< # CONFIG_UCLAMP_TASK is not set
< # CONFIG_USB4 is not set
< # CONFIG_USB_EHCI_HCD is not set
< # CONFIG_USB_FEW_INIT_RETRIES is not set
< # CONFIG_USB_NET_AX88179_178A is not set
< # CONFIG_USB_NET_DM9601 is not set
< # CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set
< # CONFIG_USB_OTG_PRODUCTLIST is not set
< # CONFIG_USB_XHCI_PCI_RENESAS is not set
< # CONFIG_VDPA is not set
< # CONFIG_VFIO is not set
< # CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
< CONFIG_VHOST_MENU=y
< # CONFIG_VHOST_NET is not set
< # CONFIG_VIRTIO_CONSOLE is not set
< # CONFIG_WATCH_QUEUE is not set
< # CONFIG_WIREGUARD is not set
< # CONFIG_WLAN_VENDOR_MEDIATEK is not set
< CONFIG_WLAN_VENDOR_MICROCHIP=y
< # CONFIG_WLAN_VENDOR_RALINK is not set
< # CONFIG_WLAN_VENDOR_REALTEK is not set
< # CONFIG_XILINX_LL_TEMAC is not set
< # CONFIG_XILINX_ZYNQMP_DPDMA is not set
< # Crypto library routines
< # Debug kernel data structures
< # Debug Oops, Lockups and Hangs
< # DOS/FAT/EXFAT/NT Filesystems
< # end of arm Debugging
< # end of Debug kernel data structures
< # end of Debug Oops, Lockups and Hangs
< # end of DOS/FAT/EXFAT/NT Filesystems
< # end of Generic Kernel Debugging Instruments
< # end of Kernel Testing and Coverage
< # end of Mobiveil PCIe Core Support
< # end of PCS device drivers
< # end of Renesas pinctrl drivers
< # end of Scheduler Debugging
< # Generic Kernel Debugging Instruments
< # Kernel Testing and Coverage
< # Linux/arm 5.10.39 Kernel Configuration
< # MDIO Multiplexers
< # Mobiveil PCIe Core Support
< # PCS device drivers
< # Renesas pinctrl drivers
< # Scheduler Debugging

@procount
Copy link
Owner Author

@pelwell - I hope I've sorted it now for v3.7. I think it was the BROADCOM_PHY issue.
Thanks for the support.

@procount
Copy link
Owner Author

The above config differences were comparing noobs 3.7 with pinn 3.6.2, hence my confusion! PINN 3.7 is a lot closer. 😄

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

2 participants