Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus

From: Shawn Guo
Date: Wed May 12 2021 - 22:09:08 EST


On Tue, May 11, 2021 at 09:48:38AM -0500, Adam Ford wrote:
> On Tue, May 11, 2021 at 7:20 AM Robin Gong <yibin.gong@xxxxxxx> wrote:
> >
> > On 2021/05/11 18:45 Adam Ford <aford173@xxxxxxxxx> wrote:
> > > > Also may I ask if you have a real use case for this bus node?
> > >
> > > The reference manual shows the SPBA bus tells the DMA controller which
> > > peripherals are associated with it. Nearly all the i.MX boards use this. The
> > > boards I support have Bluetooth devices connected to a UART running high
> > > speeds, and if the DMA driver isn't loaded, I can see a performance change.
> > Compare PIO with DMA on UART, but not w/o this 'spba bus node ' patch?
> >
> > > In fact, if the DMA firmware isn't loaded, I often get transfer errors.
> > UART use SDMA ROM firmware instead of RAM firmware, so it should work
> > even without sdma RAM firmware loaded. Still curious what really happen in
> > your board without this patch.
>
> What I am seeing is that at times, the HCI UART loading before the DMA
> firmware is loaded.
>
> [ 10.582037] Bluetooth: HCI UART driver ver 2.3
> [ 10.586867] Bluetooth: HCI UART protocol H4 registered
> [ 10.593566] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
> [ 10.594548] Bluetooth: HCI UART protocol Broadcom registered
> [ 10.600108] imx-uart 30860000.serial: We cannot prepare for the RX slave dma!
>
> When I get the above message, the bluetooth chip I have throws
> timeouts and does not function.
>
> [ 10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
>
> Once the firmware is loaded, I can unload the HCI Uart driver and
> re-load Bluetooth works again.
>
> Based on that, I've been having my system delay the loading of the
> Bluetooth modules until after the firmware is loaded, but this tells
> me there is a relationship between the DMA and UART.

Yeah, I can see how DMA firmware impacts your Bluetooth device, but do
not follow how this spba node change make a difference here.

Nevertheless, patches look good. Applied, thanks.

Shawn