AnsweredAssumed Answered

Fail to enable sc16is740 on ls1012a-frwy board.

Question asked by Min Wu on Mar 10, 2019
Latest reply on Mar 12, 2019 by Pavel Chubakov

I try to enable sc16is740 on ls1012a-frwy board. But it doesn't work. I can not find ttySC0 in the /dev directory.

I also enable  spidev (spidev0.1) driver on spi cs1. It works well.

 

The DTS of sc16is740 is :

 

spi@1 {    

         compatible = "rohm,dh2228fv";
   spi-max-frequency = <4000000>;
         reg = <1>;
      };

 sc16is740:sc16is7xx@0 {

                     reg = <0>;
                     compatible = "nxp,sc16is740";
                    spi-max-frequency = <4000000>;
                    clocks = <&sc16is740_clk>;
                    interrupt-parent = <&gpio1>;
                    interrupts = <13 2>;
                    sc16is740_clk: sc16is740_0_clk {
                                              compatible = "fixed-clock";
                                              #clock-cells = <0>;
                                                 clock-frequency = <24000000>;
                                          };
                };

 

The log of spi init is :

[    2.560245] ######################spidev_probe:0x876fea8
[    2.566836] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@of_irq_get end!spi->irq:0xffffffea
[    2.575009] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@dev_pm_domain_attach end!
[    2.582186] &&&&&&&&&&&&&&&&&&&&&&&&&  spidev_probe!
[    2.587357] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@sdrv->probe end!
[    2.593809] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@dev_pm_domain_detach end!
[    2.600978] $$$$$$$$$really_probe$$$$$$$ spidev:drv->probe(dev):0x876c2e8 end!
[    2.608230] $$$$$$$$$really_probe$$$$$$$ drv->probe(dev) OK!
[    2.614309] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@of_irq_get end!spi->irq:0x1f
[    2.621848] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@dev_pm_domain_attach end!
[    2.629020] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&sc16is7xx_spi_probe!
[    2.635572] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&sc16is7xx_probe!
[    2.642280] serial serial0: tty port ttySC0 registered
[    2.647806] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@sdrv->probe end!
[    2.654197] @@@@@@@@@@@@@spi_drv_probe@@@@@@@@@@@@@@dev_pm_domain_detach end!
[    2.661363] $$$$$$$$$really_probe$$$$$$$ sc16is7xx:drv->probe(dev):0x876c2e8 end!
[    2.668903] $$$$$$$$$really_probe$$$$$$$ drv->probe(dev) OK!
[    2.674699] $$$$$$$$$really_probe$$$$$$$ fsl-dspi:drv->probe(dev):0x86b1a30 end!
[    2.682175] $$$$$$$$$really_probe$$$$$$$ drv->probe(dev) OK!

 

The list of /dev directory is :

root@localhost:~# ls /dev/
autofs           fsl-usdpaa-irq    i2c-0         loop3             mmcblk0p2           null   ptyp5  ptype  ram15  random     tty    tty16  tty24  tty32  tty40  tty49  tty57  tty8   ttyp3  ttypc      vcs3   vcsa5
block            fsl_aiop_console  initctl       loop4             mmcblk0p3           port   ptyp6  ptypf  ram2   shm        tty0   tty17  tty25  tty33  tty41  tty5   tty58  tty9   ttyp4  ttypd      vcs4   vcsa6
btrfs-control    fsl_mc_console    kmsg          loop5             mqueue              ptmx   ptyp7  ram0   ram3   snapshot   tty1   tty18  tty26  tty34  tty42  tty50  tty59  ttyS0  ttyp5  ttype      vcs5   vfio
char             full              kvm           loop6             mtd0                pts    ptyp8  ram1   ram4   spidev0.1  tty10  tty19  tty27  tty35  tty43  tty51  tty6   ttyS1  ttyp6  ttypf      vcs6   vga_arbiter
console          fuse              log           loop7             mtd0ro              ptyp0  ptyp9  ram10  ram5   stderr     tty11  tty2   tty28  tty36  tty44  tty52  tty60  ttyS2  ttyp7  ttyprintk  vcsa   vhost-net
cpu_dma_latency  gpiochip0         loop-control  mem               mtdblock0           ptyp1  ptypa  ram11  ram6   stdin      tty12  tty20  tty29  tty37  tty45  tty53  tty61  ttyS3  ttyp8  urandom    vcsa1  watchdog
cuse             gpiochip1         loop0         memory_bandwidth  net                 ptyp2  ptypb  ram12  ram7   stdout     tty13  tty21  tty3   tty38  tty46  tty54  tty62  ttyp0  ttyp9  vcs        vcsa2  watchdog0
disk             hugepages         loop1         mmcblk0           network_latency     ptyp3  ptypc  ram13  ram8   tee0       tty14  tty22  tty30  tty39  tty47  tty55  tty63  ttyp1  ttypa  vcs1       vcsa3  zero
fd               hwrng             loop2         mmcblk0p1         network_throughput  ptyp4  ptypd  ram14  ram9   teepriv0   tty15  tty23  tty31  tty4   tty48  tty56  tty7   ttyp2  ttypb  vcs2       vcsa4 

Outcomes