SylvainB

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Sylvain BourréSylvainB
    Participant

      Aedan, thank you for your very detailed answer, it’s fantastic. You are right about every point!

      I cannot speedup the SPI display transfers so I need to use of separate DMA controller; however to avoid re-spinning a new board, I’d like to continue using SPI5 and to use DMA2 for DCMIonly.

      The question is HOW to get DCMI to use DMA2 ?

      I enabled DMA for I2C1  in the hope that DCMI ends up using DMA2…  and it did, everything is working as expected : no more overruns!

      New /sys/kernel/debug/dmaengine/summary output:
      dma0 (58000000.dma-controller): number of channels: 32
      dma0chan0    | 48000000.dma-controller:ch0
      dma0chan1    | 48000000.dma-controller:ch1
      dma0chan2    | 48000000.dma-controller:ch2
      dma0chan3    | 48000000.dma-controller:ch3
      dma0chan4    | 48000000.dma-controller:ch4
      dma0chan5    | 48000000.dma-controller:ch5
      dma0chan6    | 48000000.dma-controller:ch6
      dma0chan7    | 48000000.dma-controller:ch7
      dma0chan8    | 48001000.dma-controller:ch0
      dma0chan9    | 48001000.dma-controller:ch1
      dma0chan10   | 48001000.dma-controller:ch2
      dma0chan11   | 48001000.dma-controller:ch3
      dma0chan12   | 48001000.dma-controller:ch4
      dma0chan13   | 48001000.dma-controller:ch5
      dma0chan14   | 48001000.dma-controller:ch6
      dma0chan15   | 48001000.dma-controller:ch7

      dma1 (48000000.dma-controller): number of channels: 8
      dma1chan0    | 4000e000.serial:rx (via router: 48002000.dma-router)
      dma1chan1    | 4000e000.serial:tx (via router: 48002000.dma-router)
      dma1chan2    | 4000b000.spi:tx (via router: 48002000.dma-router)
      dma1chan3    | 4000b000.spi:rx (via router: 48002000.dma-router)dmas
      dma1chan4    | 44009000.spi:tx (via router: 48002000.dma-router)
       dma1chan5    | 44009000.spi:rx (via router: 48002000.dma-router)
       dma1chan6    | 40012000.i2c:tx (via router: 48002000.dma-router)
       dma1chan7    | 40012000.i2c:rx (via router: 48002000.dma-router)

      dma2 (48001000.dma-controller): number of channels: 8
      dma2chan1    | 4c006000.dcmi:tx

      This is really good news ! But I don’t like the hackish method I used to getl DCMI to use DMA2… What is the recommended method ?

      I tried to add dmas = <&dma2 0 0 0x400 0xe0000001>; in my device tree node for DCMI to overwrite  dmas = <&dmamux1 75 0x400 0xe0000001>; from stm32mp151.dtsi.
      According to /sys/kernel/debug/dmaengine/summary DCMI uses the DMA2 controller, but it does not work….

      Thank you in advance,
      Sylvain.

      in reply to: VDD (buck3) still on after “poweroff” cmd #13577
      Sylvain BourréSylvainB
      Participant

        Hi Carlos, thank you for your answer. I missed this notification 🙁
        FYI, I fixed this issue by patching the TFA code… I’ll try STM32_PM_SHUTDOWN when I have time as this solution is way more elegant.

        Have a good day,
        Sylvain.

        Sylvain BourréSylvainB
        Participant

          Aedan, below is a dmesg output showing successful 25600-byte transfer on SPI5 (DMA):

          [  291.136104] spi_stm32 44009000.spi: cpol=0 cpha=0 lsb_first=0 cs_high=0
          [  291.136119] spi_stm32 44009000.spi: stm32_spi_can_dma: true
          [  291.136158] spi_stm32 44009000.spi: stm32_spi_can_dma: true
          [  291.136174] spi_stm32 44009000.spi: transfer communication mode set to 1
          [  291.136189] spi_stm32 44009000.spi: data frame of 16-bit, data packet of 2 data frames
          [  291.136202] spi_stm32 44009000.spi: speed set to 13054870Hz
          [  291.136216] spi_stm32 44009000.spi: transfer of 25600 bytes (12800 data frames)
          [  291.136228] spi_stm32 44009000.spi: dma enabled
          [  291.136244] spi_stm32 44009000.spi: Tx DMA config buswidth=2, maxburst=1
          [  291.136282] stm32-dma 48000000.dma-controller: vchan a624546f: txd d3e6b206[316]: submitted
          [  291.136302] dma dma1chan4: vchan a624546f: issued
          [  291.136318] dma dma1chan4: SCR:   0x00002c56
          [  291.136332] dma dma1chan4: NDTR:  0x00003200
          [  291.136345] dma dma1chan4: SPAR:  0x44009020
          [  291.136358] dma dma1chan4: SM0AR: 0xd8048000
          [  291.136370] dma dma1chan4: SM1AR: 0xd8048000
          [  291.136383] dma dma1chan4: SFCR:  0x00000021
          [  291.136397] dma dma1chan4: vchan a624546f: started
          [  291.136410] spi_stm32 44009000.spi: enable controller
          [  291.152230] spi_stm32 44009000.spi: disable controller
          [  291.152336] spi_stm32 44009000.spi: stm32_spi_can_dma: true
          [  291.152363] spi_stm32 44009000.spi: disable controller

          in reply to: VDD (buck3) still on after “poweroff” cmd #13495
          Sylvain BourréSylvainB
          Participant

            Thank you Neeraj !

            in reply to: SDMMC2_D7 of OSD32MP1-RED #11599
            Sylvain BourréSylvainB
            Participant

              Thank you, Neeraj !

              in reply to: MCO2 issue (OSD32MP1-BRK) #11341
              Sylvain BourréSylvainB
              Participant

                Thank you Eshtaartha !

                We added CLK_IS_CRITICAL to the clk driver and did not update the kernel DT so Linux is able to boot keep MCO2 running.

                My issue is solved even if it is not really convenient because CubeIDE always update the kernel DT regarding MCO configuration…

                Have a good day,
                Sylvain.

                in reply to: MCO2 issue (OSD32MP1-BRK) #11326
                Sylvain BourréSylvainB
                Participant

                  As the .txt file got rejected, here is a gzipped version

                  in reply to: BRK DT and “st,stm32prog-gpios” #11302
                  Sylvain BourréSylvainB
                  Participant

                    Thank you Eshtaartha for this valuable information !

                    in reply to: BRK DT and IOC #11280
                    Sylvain BourréSylvainB
                    Participant

                      Thank you Neeraj, have a good day !

                    Viewing 9 posts - 1 through 9 (of 9 total)