• Recent
    • Docs
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    • Register
    • Login

    DMA

    Scheduled Pinned Locked Moved Pi 4B
    6 Posts 2 Posters 757 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      happyday
      last edited by

      fbec3a30-2565-4974-b104-75702b9a1c9f-image.png
      我做设备驱动,测试过,默认SPI传输不开启DMA,如何打开master mode,用DMA传输

      G 1 Reply Last reply Reply Quote 0
      • G
        george @happyday
        last edited by

        @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";
        	};
        
        H 1 Reply Last reply Reply Quote 0
        • H
          happyday @george
          last edited by

          @george 我用的ubuntu的操作系统,下载的ubuntu的内核源码,在aspeed-bmc-supermicro-x11spi.dts中找到了SPI1的,我可以直接把你提供的代码粘进去,编译替换吗
          9ade3506-7c23-4a85-9bd5-a63a13f6df56-image.png

          G 1 Reply Last reply Reply Quote 0
          • G
            george @happyday
            last edited by

            @happyday
            这个是不一样的,关于DTS的配置参考之前发的文档,或者在rockchip的DTS目录里边找一下对应的配置,其它平台的不适用。

            H 2 Replies Last reply Reply Quote 0
            • H
              happyday @george
              last edited by

              @george 是让我去github下载arch/arm64/boot/dts/rockchip/rk3588s-cp4.dts
              这个源码吗,我没找到

              1 Reply Last reply Reply Quote 0
              • H
                happyday @george
                last edited by

                @george a301c2f3-47d4-4352-a23f-891dc803bed6-image.png
                只找到了这个

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post