Could you post the dmesg of the successful initialization happening with 4.19 kernel.
Meanwhile let me check the delta in the source.
Thank you for your answer.
successful initialization on 4.19:
# dmesg | egrep -i "blue|fw|bcm"
[ 7.812864] Bluetooth: Core ver 2.22
[ 7.812875] Bluetooth: Starting self testing
[ 7.836905] Bluetooth: ECDH test passed in 23453 usecs
[ 7.841068] Bluetooth: SMP test passed in 3984 usecs
[ 7.841121] Bluetooth: Finished self testing
[ 7.841251] Bluetooth: HCI device and connection manager initialized
[ 7.841278] Bluetooth: HCI socket layer initialized
[ 7.841286] Bluetooth: L2CAP socket layer initialized
[ 7.841315] Bluetooth: SCO socket layer initialized
[ 7.888564] Bluetooth: HCI UART driver ver 2.3
[ 7.888580] Bluetooth: HCI UART protocol H4 registered
[ 7.888845] Bluetooth: HCI UART protocol Broadcom registered
[ 7.889002] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator
[ 7.889072] hci_uart_bcm serial0-0: Linked as a consumer to regulator.0
[ 7.889080] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator
[ 7.908503] ccg3 0-0008: FW file version: 7A060132626E031A
[ 8.142023] Bluetooth: hci0: BCM: chip id 86
[ 8.142842] Bluetooth: hci0: BCM: features 0x2f
[ 8.146196] Bluetooth: hci0: BCM4335C0
[ 8.146211] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0000
[ 8.577113] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2
[ 8.818166] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2
[ 8.818904] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4339/2 wl0: Aug 11 2018 06:13:33 version 220.127.116.11 (r694622 CY)
[ 9.159868] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0304
[ 10.407728] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 10.407740] Bluetooth: BNEP filters: protocol multicast
[ 10.407763] Bluetooth: BNEP socket layer initialized
With further investigation I identified this commit as the culprit: serial: xilinx_uartps: Let get_mctrl return status · Xilinx/linux-xlnx@31caf3c · GitHub
If I revert this commit, initialization works correctly on 5.4 (but the CTS pin state won't be read correctly, so this is not really a solution). Weirdly enough, if I add a 50ms sleep in `cdns_uart_get_mctrl`, initialization also works correctly on 5.4. The CTS pin is connected in the hw i'm using, so I'm not really sure what the underlying issue is.
Yes I can replicate on any boot. Let me know if you know more logs/informations.
Currently I'm using the "cts-override"  flag in my dts to avoid the issue (this is the equivalent of reverting the commit I pointed at earlier).