dmaengine: at_hdmac: Regression regarding rs485 via dma in v5.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I was rebasing the Kernel branch of our SAMA5D35 based board from
v5.4.189 to v5.4.238.
I noticed that after the rebase we could _only send, but not receive_
through our RS485 interface.

I could bisect the problem to 77b97ef4908aa917e7b68667ec6b344cc5dc5034
in the v5.4.225 release. If I revert this commit, the tx/rx works just
like before.
Maybe this use-case wasn't considered when this patch was created?
I haven't seen a documentation change regarding this in DT bindings,
but if the config should be something else, please let me know.
Otherwise this commit breaks the RS485 function of atmel_serial at
least in the v5.4.y branch.

Best Regards,
Kristóf Havasi

The relevant device tree nodes:

from sama5d3.dtsi:

usart1: serial@f0020000 {
  compatible = "atmel,at91sam9260-usart";
  reg = <0xf0020000 0x100>;
  interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>;
  dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(5)>,
  <&dma0 2 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
  dma-names = "tx", "rx";
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_usart1>;
  clocks = <&usart1_clk>;
  clock-names = "usart";
  status = "disabled";
};

pinctrl_usart1: usart1-0 {
  atmel,pins =
  <AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
   AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_usart1_rts_cts: usart1_rts_cts-0 {
  atmel,pins =
  <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB26 periph A,
conflicts with GRX7 */
   AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB27 periph A,
conflicts with G125CKO */
};

from our dts:

&usart1 {
  pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
  atmel,use-dma-rx;
  atmel,use-dma-tx;
  rs485-rx-during-tx;
  linux,rs485-enabled-at-boot-time;
  status = "okay";
};

HW:
The SAMA5D3's PB27 is connected to the |RE+DE of the RS485 transceiver
SP3458EN-L




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux