AnsweredAssumed Answered

UART 8250 into FPGA

Question asked by Antonio Belussi on Jul 2, 2018
Latest reply on Jul 3, 2018 by Antonio Belussi

Hi

 

I implement a UART into my FPGA, compatibles with the serial 8250.

By EIM bus I'll try to see it under "/dev/" as linux driver.

 

In the device driver file i put the following setting :

 

uartfpga1@08000000 {
compatible = "ns8250";
reg = <0x08000000 0x20>;
clock-frequency = <80000000>;
status = "okay";
};

 

&weim {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_weim_fpga_1 &pinctrl_weim_cs0_1 &pinctrl_weim_cs1_1>;
   #address-cells = <2>;
   #size-cells = <1>;
   ranges = <0 0 0x08000000 0x04000000>;
   status = "okay";
   dummy@0,0 {
   reg = <0 0 0x04000000>;
   fsl,weim-cs-timing = <0x00610089 0x00001002 0x1c072000 0x00000000 0x1ce92480 0x00000000>;
   };
};

 

In the defconfig file i put the following setting:

 

# Serial drivers #
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=1 
CONFIG_SERIAL_8250_RUNTIME_UARTS=1 
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

 

The result is that under /dev/ I find ttyS0:

 

But when I try to write something it is not works

   strace echo -ne "Ciao" > /dev/ttyS0

 

Do I forget any other setting ?

 

Thanks in advanced

Antonio

Outcomes