Hi All,
I am a newbie for Qualcom chip
I am working on a Snapdragon MDM9628 SPI using DMA to transfer data.
I have a issue with SPI DMA configuration.
I am using SPI2 and my SPI configuration in device tree is identical to spi_2 in below link:
https://android.googlesource.com/kernel/msm.git/+/android-7.1.0_r0.3/arc...
spi_2: spi@78B6000 { /* BLSP1 QUP2 */
compatible = "qcom,spi-qup-v2";
#address-cells = <1>;
#size-cells = <0>;
reg-names = "spi_physical", "spi_bam_physical";
reg = <0x78B6000 0x600>,
<0x7884000 0x23000>;
interrupt-names = "spi_irq", "spi_bam_irq";
interrupts = <0 96 0>, <0 238 0>;
spi-max-frequency = <19200000>;
qcom,use-bam;
qcom,ver-reg-exists;
qcom,bam-consumer-pipe-index = <10>;
qcom,bam-producer-pipe-index = <11>;
qcom,master-id = <86>;
qcom,use-pinctrl;
pinctrl-names = "spi_default", "spi_sleep";
pinctrl-0 = <&spi_2_active>;
pinctrl-1 = <&spi_2_sleep>;
clock-names = "iface_clk", "core_clk";
clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
<&clock_gcc clk_gcc_blsp1_qup2_spi_apps_clk>;
status = "disabled";
};
And in SPI linux kernel driver , I set DMA mask bit for SPI
// test device dma mask and prepare for buffer alloc
if (dma_set_mask(m_prot->dev, DMA_BIT_MASK(32))!=0){
printk(KERN_ALERT "SPI protocol: cannot set DMA bit mask\n");
}
if (dma_set_coherent_mask(m_prot->dev, DMA_BIT_MASK(32))!=0){
printk(KERN_ALERT "SPI protocol: cannot set coherent mask\n");
}
And the issue is that I hit the alert : cannot set DMA bit mask
I am sure of that :
- my driver is mapped to correct device
- my driver probe function is called by kernel
- my device and linux version is 32bit
Is there any missings for SPI DMA configuration in device tree ???