DMA
-
我做设备驱动,测试过,默认SPI传输不开启DMA,如何打开master mode,用DMA传输 -
@happyday
下图是SPI1对应的属性配置,把dmas和dma-names复制到DTS文件对应节点即可。spi1: spi@feb10000 { compatible = "rockchip,rk3066-spi"; reg = <0x0 0xfeb10000 0x0 0x1000>; interrupts = <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; clocks = <&cru CLK_SPI1>, <&cru PCLK_SPI1>; clock-names = "spiclk", "apb_pclk"; dmas = <&dmac0 16>, <&dmac0 17>; dma-names = "tx", "rx"; pinctrl-names = "default"; pinctrl-0 = <&spi1m1_cs0 &spi1m1_cs1 &spi1m1_pins>; num-cs = <2>; status = "disabled"; };
-
@george 我用的ubuntu的操作系统,下载的ubuntu的内核源码,在aspeed-bmc-supermicro-x11spi.dts中找到了SPI1的,我可以直接把你提供的代码粘进去,编译替换吗
-
@happyday
这个是不一样的,关于DTS的配置参考之前发的文档,或者在rockchip的DTS目录里边找一下对应的配置,其它平台的不适用。 -
@george 是让我去github下载arch/arm64/boot/dts/rockchip/rk3588s-cp4.dts
这个源码吗,我没找到 -
@george
只找到了这个