Appunti su device tree

Abilitazione DMA su seriali

/dev/ttyS1

      usart0: serial@f801c000 {
        pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts &pinctrl_usart0_cts>;
        status = "okay";
        atmel,use-dma-rx;
        atmel,use-dma-tx;
        dmas = <&dma0 2 0x3>,
               <&dma0 2 0x204>;
        dma-names = "tx", "rx";
      };

/dev/ttyS2

      usart1: serial@f8020000 {
        pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts &pinctrl_usart1_cts>;
        status = "okay";
        atmel,use-dma-rx;
        atmel,use-dma-tx;
        dmas = <&dma0 2 0x5>,
           <&dma0 2 0x206>;
        dma-names = "tx", "rx";
      };

/dev/ttyS3 (da verificare)

      usart2: serial@f8024000 {
        pinctrl-0 = <&pinctrl_usart2>;
        status = "okay";
        /* Inizio aggiunta */
        atmel,use-dma-rx;
        atmel,use-dma-tx;
        dmas = <&dma0 2 0x7>,
           <&dma0 2 0x208>;
        dma-names = "tx", "rx";
      };

In case someone else will need it... This made my Aria ttyS3 use DMA and work fine at speed 460800. (Kernel 3.14.23)

/* /dev/ttyS3 */
      usart2: serial@f8024000 {
        interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usart2>;
        atmel,use-dma-rx;
        atmel,use-dma-tx;
        dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
               <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
        dma-names = "tx", "rx";
        status = "okay";
      };