AnsweredAssumed Answered

irda on i.MX 6ULL

Question asked by rust.caleb@gmail.com on Feb 19, 2020
Latest reply on Feb 20, 2020 by rust.caleb@gmail.com

Hello,

 

I am trying to get irda SIR to work on my i.mx6ull based SoM.  I would like to use the IRCOMM driver within linux to access devices using a UART, but the ircomm1 and ircomm2 devices hang the system when I write to them.

 

I have enabled the related settings in the kernel config file.

 

CONFIG_IRDA=y

CONFIG_IRCOMM=y

 

I also verified that the .dts file has the "fsl,irda-mode" string within the desired uart section.

 

&uart2 {

           pinctrl-names = "default";

           pinctrl-0 = <&pinctrl_uart2>;

           uart-has-rtscts;

           fsl,irda-mode;

           status = "okay";

};

 

After these steps I am able to see ircomm* devices in /dev/tty, so the kernel has been correctly modified. 

/dev/tty
  ircomm0
  ircomm1
  ircomm2

 

I also enabled raw writes on the device using stty.  (uart2 is mapped to ttymxc1 on this SoM)

 

stty -F /dev/ircomm1 raw -echo -echoe -echok
stty -F /dev/ircomm1 115200


Sadly the command to write to the ircomm port still hangs.

 

echo hello > /dev/ircomm1

 

In the past I have manually set the processor registers using imx-test/memtool, and this forces the standard ttymxc1 port to operate as an irda port.

 

/unit_tests/memtool CCM.CCGR0.CG14=1    #uart2 clock enable
/unit_tests/memtool UART2.UCR1.IREN=1   #uart2 irda enable

 

But I would like to avoid having to use imx-test->memtool because imx-test is difficult to incorporate using buildroot.  If I must use Yocto to get Irda to work then I will, but I'd rather not because the build times are substantial.

 

Do I need to enable hardware handling with irda-utils -> irattach?
Is there a different tool supported in buildroot which can adjust the processor memory?

 

Any suggestions are appreciated.

Outcomes