Hi Mani,
[Danny]Yes, need CONFIG_K3_DMA=y to include K3 DMA in build time. please refer to blow Makefile.
obj-$(CONFIG_INTEL_MIC_X100_DMA) += mic_x100_dma.o
obj-$(CONFIG_K3_DMA) += k3dma.o
obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o
[Mani]Can you please clarify what didn’t work? Is the UART driver not able to use DMA or UART driver is using DMA but still the BT issue persists?
[Danny] If I enable DMA for UART4, below messages are printed in kernel log.
But BT host stack can’t communicate with BT controller via UART4. According to adb log, BT host stack try to send HCI command via UART4 but doesn’t receive any reponse from BT controller.
[ 6.795185] ffd74000.serial: ttyAMA3 at MMIO 0xffd74000 (irq = 21, base_baud = 0) is a PL011 rev2
[ 6.804559] fdf01000.serial: ttyAMA4 at MMIO 0xfdf01000 (irq = 22, base_baud = 0) is a PL011 rev2
[ 6.813651] serial serial0: tty port ttyAMA4 registered
[ 6.818988] uart-pl011 fdf01000.serial: DMA channel TX dma0chan7
[ 18.138142] uart-pl011 fdf01000.serial: DMA channel RX dma0chan6
[Mani]It would be great if you can share your hi3660.dtsi file after modification.
[Danny]Here are my changes in hi3660.dtsi file.
uart4: serial@fdf01000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x0 0xfdf01000 0x0 0x1000>;
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dma0 6 &dma0 7>;
dma-names = "rx", "tx";
clocks = <&crg_ctrl HI3660_CLK_GATE_UART4>,
<&crg_ctrl HI3660_CLK_GATE_UART4>;
clock-names = "uartclk", "apb_pclk";
pinctrl-names = "default";
pinctrl-0 = <&uart4_pmx_func &uart4_cfg_func>;
status = "disabled";
};
dma0: dma@fdf30000 {
compatible = "hisilicon,k3-dma-1.0";
reg = <0x0 0xfdf30000 0x0 0x1000>;
#dma-cells = <1>;
dma-channels = <16>;
dma-requests = <32>;
dma-min-chan = <1>;
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg_ctrl HI3660_CLK_GATE_DMAC>;
dma-no-cci;
dma-type = "hi3660_dma";
};
Thanks,